TM> I'll keep pushing forward but I wanted to share this in case
TM>   a) I'm doing something wrong, or
TM>   b) things need to get fixed.
You seem do be doing all right :-) I have just fixed the NPE, sorry.
Never crossed my mind there could be no manifest ... Should be online
tomorrow.

The second horrible stack trace is not much I can do about. I report
the error via the log but there is only one way to report failure from
the plugin and that is an execption. I think Maven should not print a
stack trace in this case.

The version was wrong because OSGi has the major.minor.micro.qualifier
format.

Kind regards,

     Peter Kriens

TM> 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.

TM> I'm using bnd to bundle all the dependencies of commons-logging.  I have
TM> worked my way to jta-1.0.1B.jar which caused problems.

TM> bnd gives a NPE as follows:

TM> java -jar bnd-0.0.jar print 
TM> ~/.m2/repository/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar
TM> Software error occurred java.lang.NullPointerException
TM> java.lang.NullPointerException
TM>         at aQute.lib.osgi.Verifier.<init>(Verifier.java:68)
TM>         at aQute.bnd.main.bnd.doPrint(bnd.java:456)
TM>         at aQute.bnd.main.bnd.doPrint(bnd.java:442)
TM>         at aQute.bnd.main.bnd.run(bnd.java:56)
TM>         at aQute.bnd.main.bnd.main(bnd.java:30)

TM> While bnd shouldn't die like that, closer inspection of jta-1.0.1B.jar
TM> shows that it's not really a jar file.  It's just a zip file, no 
TM> MANIFEST.MF file.  I created a jar file so bnd won't NPE but now I get

TM> mvn install
TM> [...]
TM> [ERROR] Invalid value for Bundle-Version, 1.0.1B does not match 
TM> [0-9]+(\.[0-9]+(\.[0-9]+(\.[0-9A-Za-z_-]+)?)?)?
TM> org.apache.maven.plugin.MojoFailureException: Found errors, see log
TM>         at 
TM> 
org.apache.felix.tools.maven2.bundleplugin.BundlePlugin.execute(BundlePlugin.java:150)
TM>         at 
TM> 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
TM>         at 
TM> 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
TM>         at 
TM> 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
TM>         at 
TM> 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
TM>         at 
TM> 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
TM>         at 
TM> 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
TM>         at 
TM> 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
TM>         at
TM> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
TM>         at
TM> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
TM>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
TM>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
TM>         at 
TM> 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
TM>         at 
TM> 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
TM>         at java.lang.reflect.Method.invoke(Method.java:585)
TM>         at 
TM> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
TM>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
TM>         at 
TM> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
TM>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
TM> [...]

TM> So I changed the version number to "1.0.1.B" everywhere so it matched 
TM> the RE.  I can now create a jta bundle.

TM> I'll keep pushing forward but I wanted to share this in case
TM>   a) I'm doing something wrong, or
TM>   b) things need to get fixed.

TM> Tim Moloney


-- 
Peter Kriens                              Tel +33467542167
9C, Avenue St. Drézéry                    AOL,Yahoo: pkriens
34160 Beaulieu, France                    ICQ 255570717
Skype pkriens                             Fax +1 8153772599

Reply via email to