You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by otterson <ot...@yahoo.com> on 2007/03/01 16:23:09 UTC
Maven JBI component and external jar
This is likely to be a PEBCAK or newbie problem... But I am stuck!
I created a new JBI component using the mvn archetype:create rule as shown
on the page
http://incubator.apache.org/servicemix/creating-a-standard-jbi-component.html
This worked fine.
Then I ran the tests on my new component: mvn test
This also worked fine.
Now I have modified my new endpoint to include classes in an external jar
file. I built the jar with Eclipse, exported the jar, and used the
mvn install:install-file -DgroupId=com.example.foo -DartifactId=foo
-Dversion=1.0 -Dpackaging=jar -Dfile=/java/libs/foo.jar
I added the dependency into my new component's pom.xml:
<dependency>
<groupId>com.example.foo</groupId>
<artifactId>foo</artifactId>
<version>1.0</version>
</dependency>
This is where I run into problems -- mvn test no longer works. I can run
the test with eclipse as a junit test, but I cannot get the test to run in
maven any more. Instead, I get a huge traceback, which pretty much tells me
nothing, because the offending error must be in the "... 16 more" lines that
are not shown. I believe that the class cannot be found.
What do I need to do to get my jar file classes to load? Help!
Jeff
(traceback follows...)
Results :
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] There are test failures.
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.BuildFailureException: There are test failures.
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:555)
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:597)
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)
Caused by: org.apache.maven.plugin.MojoFailureException: There are test
failures.
at
org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.java:403)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
... 16 more
--
View this message in context: http://www.nabble.com/Maven-JBI-component-and-external-jar-tf3327549s12049.html#a9251650
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Maven JBI component and external jar
Posted by Juergen Mayrbaeurl <ju...@hvb.sozvers.at>.
Did you look at the surefire test-reports? And did you check the local maven
repository?
Juergen
otterson wrote:
>
> This is likely to be a PEBCAK or newbie problem... But I am stuck!
>
> I created a new JBI component using the mvn archetype:create rule as shown
> on the page
> http://incubator.apache.org/servicemix/creating-a-standard-jbi-component.html
>
> This worked fine.
>
> Then I ran the tests on my new component: mvn test
>
> This also worked fine.
>
> Now I have modified my new endpoint to include classes in an external jar
> file. I built the jar with Eclipse, exported the jar, and used the
>
> mvn install:install-file -DgroupId=com.example.foo -DartifactId=foo
> -Dversion=1.0 -Dpackaging=jar -Dfile=/java/libs/foo.jar
>
> I added the dependency into my new component's pom.xml:
>
> <dependency>
> <groupId>com.example.foo</groupId>
> <artifactId>foo</artifactId>
> <version>1.0</version>
> </dependency>
>
> This is where I run into problems -- mvn test no longer works. I can run
> the test with eclipse as a junit test, but I cannot get the test to run in
> maven any more. Instead, I get a huge traceback, which pretty much tells
> me nothing, because the offending error must be in the "... 16 more" lines
> that are not shown. I believe that the class cannot be found.
>
> What do I need to do to get my jar file classes to load? Help!
>
> Jeff
>
> (traceback follows...)
>
>
> Results :
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
>
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] There are test failures.
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.BuildFailureException: There are test failures.
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:555)
> 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:597)
> 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)
> Caused by: org.apache.maven.plugin.MojoFailureException: There are test
> failures.
> at
> org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.java:403)
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
> ... 16 more
>
--
View this message in context: http://www.nabble.com/Maven-JBI-component-and-external-jar-tf3327549s12049.html#a9253146
Sent from the ServiceMix - User mailing list archive at Nabble.com.