diff --git a/.gitignore b/.gitignore index 81202a4..856531c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /glassfish-hk2-2.3.0.tar.xz /glassfish-hk2-2.4.0-b24.tar.xz /hk2-parent-2.4.0-b24.tar.gz +/hk2-parent-2.4.0-b25.tar.gz diff --git a/glassfish-hk2-2.4.0-b24-AbstractConfigGeneratorMojo.patch b/glassfish-hk2-2.4.0-b24-AbstractConfigGeneratorMojo.patch deleted file mode 100644 index 3d0f582..0000000 --- a/glassfish-hk2-2.4.0-b24-AbstractConfigGeneratorMojo.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- hk2-hk2-parent-2.4.0-b24/hk2-configuration/persistence/hk2-xml-dom/config-generator/src/main/java/org/jvnet/hk2/config/generator/maven/AbstractConfigGeneratorMojo.java 2015-05-18 20:04:14.000000000 +0200 -+++ hk2-hk2-parent-2.4.0-b24/hk2-configuration/persistence/hk2-xml-dom/config-generator/src/main/java/org/jvnet/hk2/config/generator/maven/AbstractConfigGeneratorMojo.java.config-generator 2015-05-26 21:56:49.828270082 +0200 -@@ -108,9 +108,18 @@ - return; - } - -- if(!getGeneratedDirectory().mkdirs()){ -- throw new MojoExecutionException( -- "Unable to create directory "+getGeneratedDirectory().getAbsolutePath()); -+ getLog().info(getGeneratedDirectory().getAbsolutePath()); -+ if (!getGeneratedDirectory().exists()) { -+ if (!getGeneratedDirectory().mkdirs()) { -+ getLog().info("Could not create output directory " + -+ getOutputDirectory().getAbsolutePath()); -+ return; -+ } -+ } -+ if (!getGeneratedDirectory().exists()) { -+ getLog().info("Exiting hk2-config-generator because could not find generated directory " + -+ getGeneratedDirectory().getAbsolutePath()); -+ return; - } - String outputPath = getGeneratedDirectory().getAbsolutePath(); - diff --git a/glassfish-hk2.spec b/glassfish-hk2.spec index 4be1be2..831db6c 100644 --- a/glassfish-hk2.spec +++ b/glassfish-hk2.spec @@ -1,28 +1,23 @@ -%global namedreltag -b24 +%global namedreltag -b25 %global namedversion %{version}%{?namedreltag} Name: glassfish-hk2 Version: 2.4.0 -Release: 0.4.b24%{?dist} +Release: 0.6.b25%{?dist} Summary: Hundred Kilobytes Kernel License: CDDL or GPLv2 with exceptions URL: http://hk2.java.net/ -# git clone -b hk2-parent-2.4.0-b24 git://java.net/hk2~git glassfish-hk2-2.4.0-b24 -# find glassfish-hk2-2.4.0-b24 -name '*.jar' ! -name "gendir.jar" -type f -print -delete -# find glassfish-hk2-2.4.0-b24 -name '*.class' -print -delete -# tar cJf glassfish-hk2-2.4.0-b24.tar.xz glassfish-hk2-2.4.0-b24 Source0: https://github.com/hk2-project/hk2/archive/hk2-parent-%{namedversion}.tar.gz # https://java.net/jira/browse/HK2-250 # wget -O glassfish-LICENSE.txt https://svn.java.net/svn/glassfish~svn/tags/legal-1.1/src/main/resources/META-INF/LICENSE.txt # glassfish-hk2 package don't include the license file Source1: glassfish-LICENSE.txt +Source2: hk2-inhabitant-generator-osgi.bundle Patch0: glassfish-hk2-2.3.0-hk2-utils-osgi_bundle.patch Patch1: glassfish-hk2-2.4.0-b24-disable-asm-all-repackaged.patch Patch2: glassfish-hk2-2.3.0-disable-external-aopalliance.patch -Patch3: glassfish-hk2-2.4.0-b24-AbstractConfigGeneratorMojo.patch - BuildRequires: maven-local BuildRequires: mvn(aopalliance:aopalliance) BuildRequires: mvn(args4j:args4j) @@ -36,6 +31,7 @@ BuildRequires: mvn(net.java:jvnet-parent:pom:) BuildRequires: mvn(org.apache.ant:ant) BuildRequires: mvn(org.apache.ant:ant-launcher) BuildRequires: mvn(org.apache.bcel:bcel) +BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) BuildRequires: mvn(org.apache.felix:org.apache.felix.bundlerepository) BuildRequires: mvn(org.apache.felix:org.osgi.core) BuildRequires: mvn(org.apache.maven:maven-archiver) @@ -44,8 +40,8 @@ BuildRequires: mvn(org.apache.maven:maven-compat) BuildRequires: mvn(org.apache.maven:maven-core) BuildRequires: mvn(org.apache.maven:maven-plugin-api) BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin) -BuildRequires: mvn(org.apache.maven.plugins:maven-clean-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-compiler-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin) BuildRequires: mvn(org.apache.maven.shared:maven-osgi) BuildRequires: mvn(org.easymock:easymock) BuildRequires: mvn(org.glassfish.hk2:osgi-resource-locator) @@ -237,8 +233,6 @@ find . -name '*.class' -print -delete %patch0 -p0 %patch1 -p1 %patch2 -p1 -%patch3 -p1 - %pom_remove_plugin :maven-resources-plugin %pom_remove_dep org.glassfish.hk2.external:aopalliance-repackaged hk2-extras @@ -330,17 +324,41 @@ for d in hk2-inhabitant-generator \ %pom_xpath_set "pom:dependency[pom:artifactId = 'javax.inject']/pom:groupId" javax.inject $d done -# RHBZ#1223468 -%pom_xpath_inject "pom:dependency[pom:artifactId = 'cdi-api']" " - - - javax.el - el-api - -" class-model - %pom_xpath_set "pom:dependency[pom:artifactId ='ant']/pom:groupId" org.apache.ant hk2-inhabitant-generator +# Drop pre-existent OSGI manifest file +rm -r hk2-inhabitant-generator/src/main/resources/META-INF/MANIFEST.MF +%pom_add_plugin org.apache.felix:maven-bundle-plugin:2.3.7 hk2-inhabitant-generator ' + + + maven-plugin + + + + + bundle-manifest + process-classes + + manifest + + +' + +# Add configuration file for osgiversion plugin +cp -p %SOURCE2 hk2-inhabitant-generator/osgi.bundle +%pom_add_plugin org.glassfish.hk2:osgiversion-maven-plugin:'${project.version}' hk2-inhabitant-generator + +# Inject manifest file +%pom_add_plugin org.apache.maven.plugins:maven-jar-plugin:2.4 hk2-inhabitant-generator " + + \${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + foo + + +" + cp -p %{SOURCE1} LICENSE.txt sed -i 's/\r//' LICENSE.txt @@ -496,6 +514,12 @@ sed -i 's/\r//' LICENSE.txt %license LICENSE.txt %changelog +* Mon Jun 08 2015 gil cattaneo 2.4.0-0.6.b25 +- update to 2.4.0-b25 + +* Wed May 27 2015 gil cattaneo 2.4.0-0.5.b24 +- generate hk2-inhabitant-generator OSGi manifest + * Mon May 25 2015 gil cattaneo 2.4.0-0.4.b24 - fix failure on directory creation diff --git a/hk2-inhabitant-generator-osgi.bundle b/hk2-inhabitant-generator-osgi.bundle new file mode 100644 index 0000000..41797a3 --- /dev/null +++ b/hk2-inhabitant-generator-osgi.bundle @@ -0,0 +1,4 @@ +-exportcontents: \ + org.jvnet.hk2.generator; \ + org.jvnet.hk2.generator.maven; \ + version=${project.osgi.version} \ No newline at end of file diff --git a/sources b/sources index 03fc2c9..53d40a6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -762cb0b0bb09f43853a9a729a140a8ce hk2-parent-2.4.0-b24.tar.gz +3a5579e6c4e366063f5ddb865ec1cd85 hk2-parent-2.4.0-b25.tar.gz