Tim Moloney wrote:
I'm willing to do commons-logging. I haven't used bnd yet but I will
take a look at the docs and try to use it to generate the
commons-logging pom. In the meantime, I posted a pom for
commons-logging here [1] but I generated this one by hand.
I'm using bnd to bundle all the dependencies of commons-logging. I have
worked my way to jta-1.0.1B.jar which caused problems.
bnd gives a NPE as follows:
java -jar bnd-0.0.jar print
~/.m2/repository/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar
Software error occurred java.lang.NullPointerException
java.lang.NullPointerException
at aQute.lib.osgi.Verifier.<init>(Verifier.java:68)
at aQute.bnd.main.bnd.doPrint(bnd.java:456)
at aQute.bnd.main.bnd.doPrint(bnd.java:442)
at aQute.bnd.main.bnd.run(bnd.java:56)
at aQute.bnd.main.bnd.main(bnd.java:30)
While bnd shouldn't die like that, closer inspection of jta-1.0.1B.jar
shows that it's not really a jar file. It's just a zip file, no
MANIFEST.MF file. I created a jar file so bnd won't NPE but now I get
mvn install
[...]
[ERROR] Invalid value for Bundle-Version, 1.0.1B does not match
[0-9]+(\.[0-9]+(\.[0-9]+(\.[0-9A-Za-z_-]+)?)?)?
org.apache.maven.plugin.MojoFailureException: Found errors, see log
at
org.apache.felix.tools.maven2.bundleplugin.BundlePlugin.execute(BundlePlugin.java:150)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[...]
So I changed the version number to "1.0.1.B" everywhere so it matched
the RE. I can now create a jta bundle.
I'll keep pushing forward but I wanted to share this in case
a) I'm doing something wrong, or
b) things need to get fixed.
Tim Moloney