commit
e8361b22f7
BIN
VERSION-3.2.0-b003.tar.gz
Normal file
BIN
VERSION-3.2.0-b003.tar.gz
Normal file
Binary file not shown.
299
glassfish-gmbal-3.2.0-b003-01-build.xml
Normal file
299
glassfish-gmbal-3.2.0-b003-01-build.xml
Normal file
@ -0,0 +1,299 @@
|
||||
<project name="glassfish-gmbal" default="dist" basedir=".">
|
||||
<description>
|
||||
GlassFish MBean Annotation Library.
|
||||
</description>
|
||||
<!-- set global properties for this build -->
|
||||
<property name="version" value="3.2.0-b003"/>
|
||||
<property name="jar.name" value="gmbal"/>
|
||||
<property name="src" location="src"/>
|
||||
<property name="src.test" location="test"/>
|
||||
<property name="build" location="build/classes"/>
|
||||
<property name="build.test" location="build/test-classes"/>
|
||||
<property name="test.reports" location="build/test-reports"/>
|
||||
<property name="dist" location="dist"/>
|
||||
<property name="javadoc" location="dist/javadoc"/>
|
||||
<property name="javac.debug" value="true"/>
|
||||
<path id="project.cp">
|
||||
<pathelement location="${build}"/>
|
||||
</path>
|
||||
<path id="test.cp">
|
||||
<pathelement location="${build.test}"/>
|
||||
</path>
|
||||
<target name="init">
|
||||
<!-- Create the build directory structure used by compile -->
|
||||
<mkdir dir="${build}"/>
|
||||
</target>
|
||||
|
||||
<path id="build.classpath">
|
||||
<path refid="project.cp"/>
|
||||
<fileset dir="/usr/share/java">
|
||||
<include name="glassfish-management-api.jar"/>
|
||||
<include name="glassfish-pfl/pfl-basic.jar"/>
|
||||
<include name="glassfish-pfl/pfl-basic-tools.jar"/>
|
||||
<include name="glassfish-pfl/pfl-tf.jar"/>
|
||||
<include name="glassfish-pfl/pfl-tf-tools.jar"/>
|
||||
<include name="ant/ant-junit.jar"/>
|
||||
<include name="junit.jar"/>
|
||||
</fileset>
|
||||
</path>
|
||||
|
||||
<target name="compile" depends="init"
|
||||
description="compile the source " >
|
||||
<!-- Compile the java code from ${src} into ${build} -->
|
||||
<javac srcdir="${src}"
|
||||
classpathref="build.classpath"
|
||||
destdir="${build}"
|
||||
debug="${javac.debug}"
|
||||
source="1.6"
|
||||
target="1.6">
|
||||
</javac>
|
||||
</target>
|
||||
|
||||
<macrodef name="jar-and-manifest">
|
||||
<attribute name="destfile"/>
|
||||
<attribute name="basedir"/>
|
||||
<attribute name="excludes" default=""/>
|
||||
<attribute name="includes" default=""/>
|
||||
<sequential>
|
||||
<jar destfile="${dist}/@{destfile}.jar"
|
||||
basedir="@{basedir}"
|
||||
excludes="@{excludes}"
|
||||
includes="@{includes}">
|
||||
<manifest>
|
||||
<attribute name="Built-By"
|
||||
value="${user.name}"/>
|
||||
<attribute name="Bundle-Name"
|
||||
value="@{destfile}"/>
|
||||
<attribute name="Bundle-SymbolicName"
|
||||
value="@{destfile}"/>
|
||||
<attribute name="Bundle-Version"
|
||||
value="${version}"/>
|
||||
</manifest>
|
||||
</jar>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
<target name="dist" depends="compile"
|
||||
description="generate the distribution" >
|
||||
|
||||
<antcall target="make-bnd-properties"/>
|
||||
<antcall target="gen-resource-bundle"/>
|
||||
<!-- generate LogStrings.properties ResourceBundle -->
|
||||
<copy tofile="${build}/org/glassfish/gmbal/typelib/LogStrings.properties">
|
||||
<filelist dir="${build}/org/glassfish/gmbal/typelib">
|
||||
<file name="Exceptions.properties"/>
|
||||
</filelist>
|
||||
</copy>
|
||||
|
||||
<!-- Create the distribution directory -->
|
||||
<mkdir dir="${dist}"/>
|
||||
|
||||
<make-pom
|
||||
module="gmbal"
|
||||
description="gmbal implementation"/>
|
||||
|
||||
<make-pom
|
||||
module="gmbal-api-only"
|
||||
description="gmbal API"/>
|
||||
|
||||
</target>
|
||||
|
||||
<target name="jars" depends="dist"
|
||||
description="generate osgi manifest" >
|
||||
|
||||
<jar-and-manifest
|
||||
basedir="${build}"
|
||||
destfile="gmbal"
|
||||
includes="org/glassfish/gmbal/**/*"/>
|
||||
|
||||
<jar-and-manifest
|
||||
basedir="${build}"
|
||||
destfile="gmbal-api-only"
|
||||
includes="org/glassfish/gmbal/*.class,org/glassfish/gmbal/util/**/"/>
|
||||
|
||||
</target>
|
||||
|
||||
<target name="osgi" depends="dist"
|
||||
description="generate osgi manifest" >
|
||||
|
||||
<mkdir dir="${dist}/bundles"/>
|
||||
|
||||
<osgi-manifest
|
||||
inputfile="gmbal"
|
||||
bndfile="gmbal"/>
|
||||
|
||||
<osgi-manifest
|
||||
inputfile="gmbal-api-only"
|
||||
bndfile="gmbal-api-only"/>
|
||||
|
||||
</target>
|
||||
|
||||
<target name="gen-resource-bundle">
|
||||
<!-- generate Exceptions.properties ResourceBundle -->
|
||||
<java classname="org.glassfish.pfl.basic.tools.logex.ExceptionResourceGenerator" classpathref="build.classpath" fork="true" dir=".">
|
||||
<arg value="-verbose"/>
|
||||
<arg value="2"/>
|
||||
<arg value="-source"/>
|
||||
<arg value="${build}"/>
|
||||
<arg value="-destination"/>
|
||||
<arg value="${build}"/>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
<target name="make-bnd-properties">
|
||||
<delete file="make/bnd.properties"/>
|
||||
<echo message="Bundle-Version: ${version}${line.separator}" file="make/bnd.properties"/>
|
||||
</target>
|
||||
|
||||
<macrodef name="osgi-manifest">
|
||||
<attribute name="inputfile"/>
|
||||
<attribute name="bndfile"/>
|
||||
<sequential>
|
||||
<java classpath="/usr/share/java/aqute-bnd/biz.aQute.bnd.jar:/usr/share/java/aqute-bnd/biz.aQute.bndlib.jar" classname="bnd" fork="true" failonerror="true">
|
||||
<arg value="build"/>
|
||||
<arg value="-classpath"/>
|
||||
<arg value="${dist}/@{inputfile}.jar"/>
|
||||
<arg value="-output"/>
|
||||
<arg value="${dist}/bundles/@{inputfile}.jar"/>
|
||||
<arg value="make/@{bndfile}.bnd"/>
|
||||
</java>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
<macrodef name="make-pom">
|
||||
<attribute name="module"/>
|
||||
<attribute name="description"/>
|
||||
<sequential>
|
||||
<loadfile property="HEADER-@{module}" srcFile="make/header.xml">
|
||||
<filterchain>
|
||||
<replacetokens>
|
||||
<token key="artifactId" value="@{module}"/>
|
||||
<token key="version" value="${version}"/>
|
||||
<token key="jarDescription" value="@{description}"/>
|
||||
<token key="groupId" value="org.glassfish.gmbal"/>
|
||||
</replacetokens>
|
||||
</filterchain>
|
||||
</loadfile>
|
||||
<copy file="make/@{module}.template.xml" tofile="make/@{module}.pom" overwrite="true">
|
||||
<filterset>
|
||||
<filter token="HEADER" value="${HEADER-@{module}}"/>
|
||||
<filter token="version" value="${version}"/>
|
||||
<filter token="groupId" value="org.glassfish.gmbal"/>
|
||||
</filterset>
|
||||
</copy>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
<target name="clean"
|
||||
description="clean up" >
|
||||
<!-- Delete the ${build} and ${dist} directory trees -->
|
||||
<delete dir="${build}"/>
|
||||
<delete dir="${dist}"/>
|
||||
<delete dir="${javadoc}"/>
|
||||
</target>
|
||||
|
||||
<target name="javadoc">
|
||||
<javadoc sourcepath="${src}"
|
||||
destdir="${javadoc}"
|
||||
additionalparam="-Xdoclint:none"
|
||||
source="1.6" charset="ISO-8859-1"
|
||||
>
|
||||
<packageset dir="${src}"/>
|
||||
<classpath>
|
||||
<pathelement location="${dist}/${jar.name}.jar"/>
|
||||
<pathelement location="${dist}/${jar.name}-api-only.jar"/>
|
||||
<path refid="project.cp"/>
|
||||
<path refid="build.classpath"/>
|
||||
</classpath>
|
||||
</javadoc>
|
||||
</target>
|
||||
|
||||
<target name="compile-tests"
|
||||
depends="compile"
|
||||
description="Compile the test code"
|
||||
unless="test.skip">
|
||||
<mkdir dir="${build.test}"/>
|
||||
<javac destdir="${build.test}"
|
||||
encoding="UTF-8"
|
||||
nowarn="false"
|
||||
debug="true"
|
||||
optimize="false"
|
||||
deprecation="true"
|
||||
target="1.6"
|
||||
verbose="false"
|
||||
fork="false"
|
||||
source="1.6">
|
||||
<src>
|
||||
<pathelement location="${src.test}"/>
|
||||
</src>
|
||||
<classpath>
|
||||
<pathelement location="${dist}/${jar.name}.jar"/>
|
||||
<path refid="project.cp"/>
|
||||
<path refid="build.classpath"/>
|
||||
</classpath>
|
||||
</javac>
|
||||
</target>
|
||||
|
||||
<target name="test"
|
||||
depends="compile-tests, junit-missing"
|
||||
unless="junit.skipped"
|
||||
description="Run the test cases">
|
||||
<mkdir dir="${test.reports}"/>
|
||||
<junit printSummary="yes" haltonerror="true" haltonfailure="true" fork="true" dir=".">
|
||||
<sysproperty key="basedir" value="."/>
|
||||
<formatter type="xml"/>
|
||||
<formatter type="plain" usefile="false"/>
|
||||
<classpath>
|
||||
<path refid="test.cp"/>
|
||||
<pathelement location="${build}"/>
|
||||
<pathelement location="${build.test}"/>
|
||||
<path refid="project.cp"/>
|
||||
<path refid="build.classpath"/>
|
||||
<pathelement location="${java.home}/../lib/tools.jar"/>
|
||||
</classpath>
|
||||
<batchtest todir="${test.reports}" unless="test">
|
||||
<fileset dir="${src.test}">
|
||||
<include name="**/*Test.java"/>
|
||||
<!-- this test fail -->
|
||||
<exclude name="org/glassfish/gmbal/typelib/*.java"/>
|
||||
</fileset>
|
||||
</batchtest>
|
||||
<batchtest todir="${test.reports}" if="test">
|
||||
<fileset dir="${src.test}">
|
||||
<include name="**/${test}.java"/>
|
||||
<!-- this test fail -->
|
||||
<exclude name="org/glassfish/gmbal/typelib/*.java"/>
|
||||
</fileset>
|
||||
</batchtest>
|
||||
</junit>
|
||||
</target>
|
||||
|
||||
<target name="test-junit-present">
|
||||
<available classname="junit.framework.Test" property="junit.present"/>
|
||||
</target>
|
||||
|
||||
<target name="test-junit-status"
|
||||
depends="test-junit-present">
|
||||
<condition property="junit.missing">
|
||||
<and>
|
||||
<isfalse value="${junit.present}"/>
|
||||
<isfalse value="${test.skip}"/>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="junit.skipped">
|
||||
<or>
|
||||
<isfalse value="${junit.present}"/>
|
||||
<istrue value="${test.skip}"/>
|
||||
</or>
|
||||
</condition>
|
||||
</target>
|
||||
|
||||
<target name="junit-missing"
|
||||
depends="test-junit-status"
|
||||
if="junit.missing">
|
||||
<echo>=================================== WARNING ===================================</echo>
|
||||
<echo> JUnit is not present in your CLASSPATH. Tests not executed </echo>
|
||||
<echo>===============================================================================</echo>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
56
glassfish-gmbal.spec
Normal file
56
glassfish-gmbal.spec
Normal file
@ -0,0 +1,56 @@
|
||||
%global namedreltag -b003
|
||||
%global namedversion %{version}%{?namedreltag}
|
||||
Name: glassfish-gmbal
|
||||
Version: 3.2.0
|
||||
Release: 1
|
||||
Summary: GlassFish MBean Annotation Library
|
||||
License: CDDL or GPLv2 with exceptions
|
||||
URL: http://java.net/projects/gmbal/pages/Home
|
||||
Source0: https://github.com/javaee/gmbal/archive/VERSION-%{namedversion}.tar.gz
|
||||
Source1: https://src.fedoraproject.org/rpms/glassfish-gmbal/raw/f30/f/%{name}-%{namedversion}-01-build.xml
|
||||
BuildRequires: ant ant-junit aqute-bnd glassfish-management-api glassfish-pfl
|
||||
BuildRequires: javapackages-local junit
|
||||
BuildArch: noarch
|
||||
%description
|
||||
The GlassFish MBean Annotation Library (gmbal, pronounced "Gumball")
|
||||
is a library for using annotations to create Open MBeans. There is similar
|
||||
functionality in JSR 255 for JDK 7, but gmbal only requires JDK 5. Gmbal
|
||||
also supports JSR 77 ObjectNames and the GlassFish Version 3 AMX
|
||||
requirements for MBeans. AS a consequence, gmbal-enabled classes
|
||||
will be fully manageable in GlassFish v3 using the standard GlassFish
|
||||
v3 admin tools, while still being manageable with generic MBean tools
|
||||
when not run under GlassFish v3.
|
||||
|
||||
%package javadoc
|
||||
Summary: Javadoc for %{name}
|
||||
%description javadoc
|
||||
This package contains javadoc for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n gmbal-VERSION-%{namedversion}
|
||||
cp -p %{SOURCE1} build.xml
|
||||
rm -r test/org/glassfish/gmbal/impl/AMXClientTest.java
|
||||
|
||||
%build
|
||||
%ant jars javadoc test
|
||||
bnd wrap -p make/gmbal.bnd -o dist/gmbal.bar dist/gmbal.jar
|
||||
mv dist/gmbal.bar dist/gmbal.jar
|
||||
bnd wrap -p make/gmbal-api-only.bnd -o dist/gmbal-api-only.bar dist/gmbal-api-only.jar
|
||||
mv dist/gmbal-api-only.bar dist/gmbal-api-only.jar
|
||||
|
||||
%install
|
||||
%mvn_file org.glassfish.gmbal:gmbal %{name}
|
||||
%mvn_file org.glassfish.gmbal:gmbal-api-only %{name}-api-only
|
||||
%mvn_artifact make/gmbal.pom dist/gmbal.jar
|
||||
%mvn_artifact make/gmbal-api-only.pom dist/gmbal-api-only.jar
|
||||
%mvn_install -J dist/javadoc
|
||||
|
||||
%files -f .mfiles
|
||||
%license legal/LICENSE.TXT
|
||||
|
||||
%files javadoc -f .mfiles-javadoc
|
||||
%license legal/LICENSE.TXT
|
||||
|
||||
%changelog
|
||||
* Mon Aug 17 2020 Ge Wang <wangge20@huawei.com> - 3.2.0-1
|
||||
- package init
|
||||
4
glassfish-gmbal.yaml
Normal file
4
glassfish-gmbal.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
version_control: github
|
||||
src_repo: javaee/gmbal
|
||||
tag_prefix: "VERSION-"
|
||||
seperator: "."
|
||||
Loading…
x
Reference in New Issue
Block a user