[glassfish-gmbal] Initial import (#859112).
gil
gil at fedoraproject.org
Mon Apr 22 13:18:04 UTC 2013
commit c638392f71d3f1bc048c3c9eef279c68dd0d175a
Author: gil <puntogil at libero.it>
Date: Mon Apr 22 15:17:40 2013 +0200
Initial import (#859112).
.gitignore | 1 +
glassfish-gmbal-3.2.0-b003-01-build.xml | 293 +++++++++++++++++++++++++++++++
glassfish-gmbal.spec | 94 ++++++++++
sources | 1 +
4 files changed, 389 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..fe99e17 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/glassfish-gmbal-3.2.0-b003-src-hg.tar.gz
diff --git a/glassfish-gmbal-3.2.0-b003-01-build.xml b/glassfish-gmbal-3.2.0-b003-01-build.xml
new file mode 100644
index 0000000..3234a38
--- /dev/null
+++ b/glassfish-gmbal-3.2.0-b003-01-build.xml
@@ -0,0 +1,293 @@
+<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/glassfish-pfl-basic.jar"/>
+ <include name="glassfish-pfl/glassfish-pfl-basic-tools.jar"/>
+ <include name="glassfish-pfl/glassfish-pfl-tf.jar"/>
+ <include name="glassfish-pfl/glassfish-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.5"
+ target="1.5">
+ </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}"/>
+
+ <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/**/"/>
+
+ <make-pom
+ module="gmbal"
+ description="gmbal implementation"/>
+
+ <make-pom
+ module="gmbal-api-only"
+ description="gmbal API"/>
+
+ </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.jar" classname="aQute.bnd.main.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}"
+ source="1.5" 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.5"
+ verbose="false"
+ fork="false"
+ source="1.5">
+ <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>
\ No newline at end of file
diff --git a/glassfish-gmbal.spec b/glassfish-gmbal.spec
new file mode 100644
index 0000000..58970a9
--- /dev/null
+++ b/glassfish-gmbal.spec
@@ -0,0 +1,94 @@
+%global namedreltag -b003
+%global namedversion %{version}%{?namedreltag}
+Name: glassfish-gmbal
+Version: 3.2.0
+Release: 0.1.b003%{?dist}
+Summary: GlassFish MBean Annotation Library
+Group: Development/Libraries
+License: CDDL or GPLv2 with exceptions
+URL: http://java.net/projects/gmbal/pages/Home
+# hg clone -r VERSION-3.2.0-b003 https://hg.java.net/hg/gmbal~master glassfish-gmbal-3.2.0-b003
+# find glassfish-gmbal-3.2.0-b003/ -name '*.jar' -delete
+# find glassfish-gmbal-3.2.0-b003/ -name '*.class' -delete
+# find glassfish-gmbal-3.2.0-b003/ -name '*.tgz' -delete
+# find glassfish-gmbal-3.2.0-b003/ -name '*.zip' -delete
+# rm -rf lib/*
+# tar czf glassfish-gmbal-3.2.0-b003-src-hg.tar.gz glassfish-gmbal-3.2.0-b003
+Source0: %{name}-%{namedversion}-src-hg.tar.gz
+Source1: %{name}-%{namedversion}-01-build.xml
+
+BuildRequires: java-devel
+BuildRequires: jpackage-utils
+
+BuildRequires: ant
+BuildRequires: ant-junit
+BuildRequires: aqute-bnd
+BuildRequires: junit
+
+BuildRequires: glassfish-management-api
+BuildRequires: glassfish-pfl
+
+Requires: glassfish-management-api
+Requires: glassfish-pfl
+
+Requires: java
+Requires: jpackage-utils
+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
+Group: Documentation
+Summary: Javadoc for %{name}
+Requires: jpackage-utils
+
+%description javadoc
+This package contains javadoc for %{name}.
+
+%prep
+%setup -q -n %{name}-%{namedversion}
+
+cp -p %{SOURCE1} build.xml
+
+%build
+
+%ant osgi javadoc test
+
+%install
+
+mkdir -p %{buildroot}%{_javadir}
+install -m 644 dist/bundles/gmbal.jar %{buildroot}%{_javadir}/%{name}.jar
+install -m 644 dist/bundles/gmbal-api-only.jar %{buildroot}%{_javadir}/%{name}-api-only.jar
+
+mkdir -p %{buildroot}%{_mavenpomdir}
+install -pm 644 make/gmbal.pom %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
+%add_maven_depmap JPP-%{name}.pom %{name}.jar
+install -pm 644 make/gmbal-api-only.pom %{buildroot}%{_mavenpomdir}/JPP-%{name}-api-only.pom
+%add_maven_depmap JPP-%{name}-api-only.pom %{name}-api-only.jar
+
+#sed -i "s|gmbal/javadoc/index.html|%%{_javadocdir}/%%{name}/index.html|" index.html
+mkdir -p %{buildroot}%{_javadocdir}/%{name}
+cp -pr dist/javadoc/* %{buildroot}%{_javadocdir}/%{name}
+
+%files
+%{_javadir}/%{name}*.jar
+%{_mavenpomdir}/JPP-%{name}*.pom
+%{_mavendepmapfragdir}/%{name}
+%doc legal/LICENSE.TXT
+
+%files javadoc
+%{_javadocdir}/%{name}
+%doc legal/LICENSE.TXT
+#oc FunctionalSpec.html Gmbal.png GmbalPresentation.pdf index.html
+
+%changelog
+* Wed Sep 19 2012 gil cattaneo <puntogil at libero.it> 3.2.0-0.1.b003
+- initial rpm
\ No newline at end of file
diff --git a/sources b/sources
index e69de29..41459f1 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+b6ba37f1d7c55cc592233abfccfe990d glassfish-gmbal-3.2.0-b003-src-hg.tar.gz
More information about the scm-commits
mailing list