Just confirming, using Maven 3 solved all issues. Filip
> -----Original Message----- > From: David Blevins [mailto:[email protected]] > Sent: Thursday, March 29, 2012 8:33 PM > To: [email protected] > Subject: Re: Build fails with an empty maven repository > > That's probably it. All looks fine on the added buildbot build: > > http://ci.apache.org/builders/openejb-trunk-empty-repo/builds/0 > > > -David > > On Mar 29, 2012, at 6:33 PM, Filip Hanik (mailing lists) wrote: > > > Thanks Romain, can be the Maven version, I was on 2.2.1 > > I will try tomorrow and report back > > Filip > > > >> -----Original Message----- > >> From: Romain Manni-Bucau [mailto:[email protected]] > >> Sent: Thursday, March 29, 2012 3:07 PM > >> To: [email protected] > >> Subject: Re: Build fails with an empty maven repository > >> > >> jdk 1.6.0_30, mvn 3.0.4, MAVEN_OPTS="-Xms512m -Xmx1024m - > >> XX:PermSize=256m > >> -XX:MaxPermSize=512m -XX:+AggressiveOpts -XX:+OptimizeStringConcat" > >> > >> - Romain > >> > >> > >> 2012/3/29 Filip Hanik (mailing lists) <[email protected]> > >> > >>> Ok, so with a brand new repo (empty) you build without problems. > >>> What JDK version and 64/32 also, what mvn version do you have, I'll > >>> replicate your settings. > >>> > >>> Filip > >>> > >>>> -----Original Message----- > >>>> From: David Blevins [mailto:[email protected]] > >>>> Sent: Thursday, March 29, 2012 2:30 PM > >>>> To: [email protected] > >>>> Subject: Re: Build fails with an empty maven repository > >>>> > >>>> I don't seem to be able to reproduce the issue. > >>>> > >>>> In hopes that buildbot might have better luck I setup a builder > that > >>>> does a build with an empty repo. It doesn't seem to be showing up, > >>>> though. Pinging infra to see if I can sort that out. > >>>> > >>>> > >>>> -David > >>>> > >>>> > >>>> On Mar 29, 2012, at 11:42 AM, Filip Hanik (mailing lists) wrote: > >>>> > >>>>> Hey Thanks David, > >>>>> Here is my entire patch to get it to work, total hacks as it does > >>>>> 1. disable annotation scanning on javax.annotation > >>>>> 2. disable annotation scanning on javax.ws.rs. > >>>>> 3. disable the karaf generate descriptor plugin > >>>>> > >>>>> Index: openejb/container/openejb-core/pom.xml > >>>>> > >> =================================================================== > >>>>> --- openejb/container/openejb-core/pom.xml (revision 1306627) > >>>>> +++ openejb/container/openejb-core/pom.xml (working copy) > >>>>> @@ -390,6 +390,11 @@ > >>>>> <version>0.0.1-SNAPSHOT</version> > >>>>> <artifactId>spi-helper-jee6-profile</artifactId> > >>>>> </dependency> > >>>>> + <dependency> <!-- to get the jee6 profile without > >>>> configuration > >>>>> --> > >>>>> + <groupId>org.apache.openejb</groupId> > >>>>> + <artifactId>javaee-api</artifactId> > >>>>> + <version>6.0-3</version> > >>>>> + </dependency> > >>>>> </dependencies> > >>>>> </plugin> > >>>>> </plugins> > >>>>> @@ -403,6 +408,7 @@ > >>>>> <dependency> > >>>>> <groupId>org.apache.openejb</groupId> > >>>>> <artifactId>javaee-api</artifactId> > >>>>> + <version>${javaee-api.version}</version> > >>>>> </dependency> > >>>>> <!-- required for endorsed dir support --> > >>>>> <dependency> > >>>>> Index: openejb/osgi/openejb-feature/pom.xml > >>>>> > >> =================================================================== > >>>>> --- openejb/osgi/openejb-feature/pom.xml (revision 1306627) > >>>>> +++ openejb/osgi/openejb-feature/pom.xml (working copy) > >>>>> @@ -39,6 +39,7 @@ > >>>>> </includes> > >>>>> </resource> > >>>>> </resources> > >>>>> +<!-- > >>>>> <plugins> > >>>>> <plugin> > >>>>> <groupId>org.apache.karaf.tooling</groupId> > >>>>> @@ -57,5 +58,6 @@ > >>>>> </executions> > >>>>> </plugin> > >>>>> </plugins> > >>>>> +--> > >>>>> </build> > >>>>> </project> > >>>>> Index: openejb/arquillian-tomee/arquillian-tomee-remote/pom.xml > >>>>> > >> =================================================================== > >>>>> --- openejb/arquillian-tomee/arquillian-tomee-remote/pom.xml > >>>> (revision > >>>>> 1306627) > >>>>> +++ openejb/arquillian-tomee/arquillian-tomee-remote/pom.xml > >>> (working > >>>>> copy) > >>>>> @@ -80,6 +80,12 @@ > >>>>> </dependency> > >>>>> > >>>>> <dependency> > >>>>> + <groupId>org.apache.openwebbeans</groupId> > >>>>> + <artifactId>openwebbeans-impl</artifactId> > >>>>> + <version>${org.apache.openwebbeans.version}</version> > >>>>> + </dependency> > >>>>> + > >>>>> + <dependency> > >>>>> <groupId>junit</groupId> > >>>>> <artifactId>junit</artifactId> > >>>>> <scope>test</scope> > >>>>> Index: > >>>>> maven-plugins/dd-maven- > >>>> plugin/src/main/java/org/apache/openejb/maven/plugin/ > >>>>> dd/MergeDDForWebappMojo.java > >>>>> > >> =================================================================== > >>>>> --- > >>>>> maven-plugins/dd-maven- > >>>> plugin/src/main/java/org/apache/openejb/maven/plugin/ > >>>>> dd/MergeDDForWebappMojo.java (revision 1306393) > >>>>> +++ > >>>>> maven-plugins/dd-maven- > >>>> plugin/src/main/java/org/apache/openejb/maven/plugin/ > >>>>> dd/MergeDDForWebappMojo.java (working copy) > >>>>> @@ -145,7 +145,7 @@ > >>>>> final Map<String, Merger<?>> mergers = new HashMap<String, > >>>>> Merger<?>>(); > >>>>> final ClassLoader cl = new URLClassLoader(new URL[] { > >>>>> getClass().getProtectionDomain().getCodeSource().getLocation() }, > >>>>> ClassLoader.getSystemClassLoader()); > >>>>> final AbstractFinder finder = new ClassFinder(cl, > >>>> true).link(); > >>>>> - final List<Class> foundMergers = > >>>> finder.findSubclasses((Class) > >>>>> cl.loadClass(Merger.class.getName())); > >>>>> + final List<Class> foundMergers = > >>>>> (List<Class>)finder.findSubclasses((Class) > >>>>> cl.loadClass(Merger.class.getName())); > >>>>> > >>>>> for (Class<? extends Merger> m : foundMergers) { > >>>>> try { > >>>>> Index: > >>>>> maven-plugins/spi-helper-maven- > >>>> plugin/src/main/java/org/apache/openejb/maven > >>>>> /plugin/spi/SpiMojo.java > >>>>> > >> =================================================================== > >>>>> --- > >>>>> maven-plugins/spi-helper-maven- > >>>> plugin/src/main/java/org/apache/openejb/maven > >>>>> /plugin/spi/SpiMojo.java (revision 1306393) > >>>>> +++ > >>>>> maven-plugins/spi-helper-maven- > >>>> plugin/src/main/java/org/apache/openejb/maven > >>>>> /plugin/spi/SpiMojo.java (working copy) > >>>>> @@ -192,6 +192,8 @@ > >>>>> getLog().warn("can't find " + > >> annotation); > >>>>> continue; > >>>>> } > >>>>> + if > >>>>> (annClazz.getName().indexOf("javax.annotation")==0) continue; > >>>>> + if > >>>> (annClazz.getName().indexOf("javax.ws.rs.")==0) > >>>>> continue; > >>>>> > >>>>> if (!useMeta) { > >>>>> for (Class<?> clazz : > >>>>> finder.findAnnotatedClasses(annClazz)) { > >>>>> > >>>>>> -----Original Message----- > >>>>>> From: David Blevins [mailto:[email protected]] > >>>>>> Sent: Wednesday, March 28, 2012 9:02 PM > >>>>>> To: [email protected] > >>>>>> Subject: Re: Build fails with an empty maven repository > >>>>>> > >>>>>> Thanks, Filip! > >>>>>> > >>>>>> I have a build running with an empty local maven repo and will > >> see if > >>>> I > >>>>> get the > >>>>>> same or similar results. > >>>>>> > >>>>>> For a while there we had buildbot build setup to always download > >> the > >>>> jar > >>>>> for > >>>>>> this reason to try and flush out these issues when they happen. > >>>> Buildbot > >>>>> had > >>>>>> some disk space issues for a while there and I ended up reverting > >>>> that > >>>>> part of > >>>>>> the build setup. > >>>>>> > >>>>>> Seems as though it might be a good one to revisit. A once a week > >>>> "full > >>>>>> download" build might be wise. I'll see if I can't add that > >>>> tomorrow. > >>>>>> > >>>>>> > >>>>>> Side note, good to see a new face! Welcome! > >>>>>> > >>>>>> > >>>>>> -David > >>>>>> > >>>>>> > >>>>>> On Mar 28, 2012, at 5:21 PM, Filip Hanik (mailing lists) wrote: > >>>>>> > >>>>>>> This may be very similar to > >>>>>>> > >>>>>> > >> http://openejb.markmail.org/thread/xkvzg4fvn6gjppmo#query:+page:1+mi > >>>>>> d:bl5bed > >>>>>>> 4gxkrbpens+state:results > >>>>>>> > >>>>>>> I get the exact same problem here, the NoClassDefFoundError, and > >> it > >>>>> bails > >>>>>>> out when building the openejb-core module. So far, it's proven > >> very > >>>>>>> difficult to get a complete "mvn install" in the openejb root to > >>>> work. > >>>>>>> > >>>>>>> > >>>>>>> It happens when the system tries to scan the classes in the > >>>>>> javax.annotation > >>>>>>> package > >>>>>>> While I don't know the exact reason for it, since I see no > >>>> correlation > >>>>>>> between PostConstruct and javax.interceptor.InvocationContext, > >> this > >>>> did > >>>>>>> solve my problem, albeit a workaround, it gives me a working > >>>> repository. > >>>>>>> I'm not suggesting this is the correct fix, as this problem does > >>>> show up > >>>>> in > >>>>>>> other places in the build as well [1] > >>>>>>> > >>>>>>> Index: > >>>>>>> maven-plugins/spi-helper-maven- > >>>>>> plugin/src/main/java/org/apache/openejb/maven > >>>>>>> /plugin/spi/SpiMojo.java > >>>>>>> > >>>>>> ========================================================== > >>>>>> ========= > >>>>>>> --- > >>>>>>> maven-plugins/spi-helper-maven- > >>>>>> plugin/src/main/java/org/apache/openejb/maven > >>>>>>> /plugin/spi/SpiMojo.java (revision 1306393) > >>>>>>> +++ > >>>>>>> maven-plugins/spi-helper-maven- > >>>>>> plugin/src/main/java/org/apache/openejb/maven > >>>>>>> /plugin/spi/SpiMojo.java (working copy) > >>>>>>> @@ -192,6 +192,7 @@ > >>>>>>> getLog().warn("can't find " + > >>>> annotation); > >>>>>>> continue; > >>>>>>> } > >>>>>>> + if > >>>>>>> (annClazz.getName().indexOf("javax.annotation")==0) continue; > >>>>>>> > >>>>>>> if (!useMeta) { > >>>>>>> for (Class<?> clazz : > >>>>>>> finder.findAnnotatedClasses(annClazz)) { > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> This basically bypasses all annotation checks for classes in the > >>>>>>> javax.annotation package > >>>>>>> > >>>>>>> There was one module that seemed to be missing a dependency, not > >>>> sure > >>>>>> if the > >>>>>>> parent already includes this. > >>>>>>> > >>>>>>> Index: openejb/arquillian-tomee/arquillian-tomee-remote/pom.xml > >>>>>>> > >>>>>> ========================================================== > >>>>>> ========= > >>>>>>> --- openejb/arquillian-tomee/arquillian-tomee-remote/pom.xml > >>>>>> (revision > >>>>>>> 1306627) > >>>>>>> +++ openejb/arquillian-tomee/arquillian-tomee-remote/pom.xml > >>>>>> (working > >>>>>>> copy) > >>>>>>> @@ -80,6 +80,12 @@ > >>>>>>> </dependency> > >>>>>>> > >>>>>>> <dependency> > >>>>>>> + <groupId>org.apache.openwebbeans</groupId> > >>>>>>> + <artifactId>openwebbeans-impl</artifactId> > >>>>>>> + <version>${org.apache.openwebbeans.version}</version> > >>>>>>> + </dependency> > >>>>>>> + > >>>>>>> + <dependency> > >>>>>>> <groupId>junit</groupId> > >>>>>>> <artifactId>junit</artifactId> > >>>>>>> <scope>test</scope> > >>>>>>> > >>>>>>> [1] - When the system inspects javax.ws.rs.Path during the build > >> of > >>>>>>> [INFO] Building OpenEJB :: Web Examples :: REST Example > >>>>>>> [INFO] task-segment: [compile] > >>>>>>> > >>>>>>> It throws this error: > >>>>>>> > >>>>>>> java.lang.NoClassDefFoundError: > >>>>>>> org/apache/openjpa/enhance/PersistenceCapable > >>>>>>> at java.lang.ClassLoader.defineClass1(Native Method) > >>>>>>> at > >> java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) > >>>>>>> at java.lang.ClassLoader.defineClass(ClassLoader.java:615) > >>>>>>> at > >>>>>>> > >>>> > >> > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) > >>>>>>> at > >>>> java.net.URLClassLoader.defineClass(URLClassLoader.java:283) > >>>>>>> at > >> java.net.URLClassLoader.access$000(URLClassLoader.java:58) > >>>>>>> at java.net.URLClassLoader$1.run(URLClassLoader.java:197) > >>>>>>> at java.security.AccessController.doPrivileged(Native > >> Method) > >>>>>>> at > >> java.net.URLClassLoader.findClass(URLClassLoader.java:190) > >>>>>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > >>>>>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:247) > >>>>>>> at java.lang.Class.getDeclaredMethods0(Native Method) > >>>>>>> at > >> java.lang.Class.privateGetDeclaredMethods(Class.java:2427) > >>>>>>> at java.lang.Class.getDeclaredMethods(Class.java:1791) > >>>>>>> at > >>>>>>> > >>>>>> > >> org.apache.xbean.finder.AnnotationFinder.findAnnotatedMethods(Annotat > >>>>>> ionFind > >>>>>>> er.java:584) > >>>>>>> at > >>>>>>> > >>>> > >> org.apache.openejb.maven.plugin.spi.SpiMojo.execute(SpiMojo.java:219) > >>>>>>> at > >>>>>>> > >>>>>> > >>>> > >> > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugin > >>>>>> Manage > >>>>>>> r.java:490) > >>>>>>> at > >>>>>>> > >>>>>> > >>>> > >> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default > >>>> Li > >>>>>> fe > >>>>>>> cycleExecutor.java:694) > >>>>>>> at > >>>>>>> > >>>>>> > >>>> > >> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec > >>>> y > >>>>>> cle > >>>>>>> (DefaultLifecycleExecutor.java:556) > >>>>>>> at > >>>>>>> > >>>>>> > >>>> > >> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL > >>>> if > >>>>>> ec > >>>>>>> ycleExecutor.java:535) > >>>>>>> at > >>>>>>> > >>>>>> > >>>> > >> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandl > >>>>>> eFail > >>>>>>> ures(DefaultLifecycleExecutor.java:387) > >>>>>>> at > >>>>>>> > >>>>>> > >>>> > >> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments( > >>>>>> Defa > >>>>>>> ultLifecycleExecutor.java:348) > >>>>>>> at > >>>>>>> > >>>>>> > >>>>> > >>>> > >> > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec > >>>> ycl > >>>>>> e > >>>>>>> Executor.java:180) > >>>>>>> at > >>>>>> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) > >>>>>>> at > >>>> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) > >>>>>>> at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) > >>>>>>> at > >>>>>>> > >>>>>> > >> org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:6 > >>>>>> 0) > >>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native > >> Method) > >>>>>>> at > >>>>>>> > >>>>>> > >>>> > >> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j > >>>>>> ava:39 > >>>>>>> ) > >>>>>>> at > >>>>>>> > >>>>>> > >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces > >>>>>> sorImpl > >>>>>>> .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: java.lang.ClassNotFoundException: > >>>>>>> org.apache.openjpa.enhance.PersistenceCapable > >>>>>>> at java.net.URLClassLoader$1.run(URLClassLoader.java:202) > >>>>>>> at java.security.AccessController.doPrivileged(Native > >> Method) > >>>>>>> at > >> java.net.URLClassLoader.findClass(URLClassLoader.java:190) > >>>>>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > >>>>>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:247) > >>>>>>> ... 35 more > >>>>>>> > >>>>>>> > >>>>> > >>>>> > >>> > >>> > >>> > >
