Thanks for your advice. The problem was solved!

The following stacktrace is in the surefire reports:

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.092 sec 
<<< FAILURE!
initializationError(InjectedTest)  Time elapsed: 0.005 sec  <<< ERROR!
java.lang.NoClassDefFoundError: org/mortbay/component/LifeCycle
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
        at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at 
org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyTestSuite.<init>(JellyTestSuiteBuilder.java:129)
        at 
org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyTestSuite.<init>(JellyTestSuiteBuilder.java:128)
        at 
org.jvnet.hudson.test.JellyTestSuiteBuilder.build(JellyTestSuiteBuilder.java:56)
        at 
org.jvnet.hudson.test.PluginAutomaticTestBuilder.build(PluginAutomaticTestBuilder.java:55)
        at InjectedTest.suite(InjectedTest.java:15)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at 
org.junit.internal.runners.SuiteMethod.testFromSuiteMethod(SuiteMethod.java:35)
        at 
org.junit.internal.runners.SuiteMethod.<init>(SuiteMethod.java:24)
        at 
org.junit.internal.builders.SuiteMethodBuilder.runnerForClass(SuiteMethodBuilder.java:11)
        at 
org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
        at 
org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
        at 
org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
        at 
org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:26)
        at 
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:51)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at 
org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
        at 
org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
        at 
org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:172)
        at 
org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:104)
        at 
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:70)
Caused by: java.lang.ClassNotFoundException: org.mortbay.component.LifeCycle
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        ... 40 more

The class org.mortbay.component.LifeCycle, which is in jetty-util, seemed 
to be messing.
So I added the dependency to pom.xml:

<dependencies>
  <dependency>
    <groupId>org.mortbay.jetty</groupId>
    <artifactId>jetty-util</artifactId>
    <version>6.1.26</version>
    <scope>test</scope>
  </dependency>
</dependencies>

And finally the build succeeded.

I wonder why other people don't run into this problem.

On Sunday, February 16, 2014 1:06:41 PM UTC+9, Ikedam wrote:
>
> I don't know why, but detailed reports (especially stacktraces) should be 
> available in target/surefire-reports/*.
> If not available, it might be a problem with maven, so try with mvn -X 
> package.
>
> Regards,
> ikedam
>
> On Saturday, February 15, 2014 6:18:45 AM UTC+9, Akihiro HARAI wrote:
>>
>> I am working on Ubuntu 13.10 with Maven 3.0.4 and Java 1.7.0_45(Oracle, 
>> 64-bit).
>>
>> I tried to create the first plugin with the official 
>> tutorial<https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial>
>> .
>> However, I got the following error during "mvn package":
>>
>> -------------------------------------------------------
>>  T E S T S
>> -------------------------------------------------------
>> Running InjectedTest
>> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.09 sec 
>> <<< FAILURE!
>>
>> Results :
>>
>> Tests in error: 
>>   initializationError(InjectedTest): org/mortbay/component/LifeCycle
>>
>> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
>>
>> [INFO] 
>> ------------------------------------------------------------------------
>> [INFO] BUILD FAILURE
>> [INFO] 
>> ------------------------------------------------------------------------
>>
>> I have two Ubuntu machines, but the results were the same.
>>
>> Does anyone know how to solve this problem?
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to