Hi all, as promised I changed the POMs to specify version 2.1 of the assembly plug-in and now things seem to be working on the machines that were not working before. So this seem to have solved the problem.
It does not explain why we do not have the same behaviour in all computers as we all use the same settings , as far as I can tell. In any case there seems to be an issue on maven-assembly-plugin:2.2 when dealing with test only dependencies. In particular if the dependency only constructs a test-jar and hence is not a regular jar artefact. Thanks for your help. Jose Alberto Jose Alberto Fernandez wrote: > > I will go and specify the versions. > > > Brian E. Fox wrote: >> >> If you haven't specified the version of the plugin in your pom, then the >> version each developer has can be different. See the other threads on >> this list for more info. >> >> -----Original Message----- >> From: Jose Alberto Fernandez [mailto:[EMAIL PROTECTED] >> Sent: Monday, April 23, 2007 8:36 AM >> To: [email protected] >> Subject: Re: NullPointerException during maven-assembly-plugin >> >> >> We are quite simple maven users here. We all installed maven 2.0.5, our >> project code and POMs are on SVN. We do not build any maven component >> from >> source and using the same settings. And we all run maven from the same >> recipe of commands that we more or less cut and paste like: >> >> mvn install assembly:directory -Dlive >> >> or >> >> mvn -Dproject.test.skip=false install assembly:directory -Dlive >> >> Nothing fancy. >> >> >> Jason van Zyl-2 wrote: >>> >>> >>> If you all share a single configuration then they should behave them >>> same. If some developers have different update policies then some >>> users will download new versions and some won't. If some have built >>> from trunk then some will have yet again a different version. The >>> only way to lock it down is to specify the version. The assembly >>> plugin was released on the 11th it appears: >>> >>> http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-assembly- >> >>> plugin/ >>> >>>> As per a reproducible example, this is exactly the main issue we >>>> are having, >>>> we cannot even reproduce the error across our environments here. >>> >>> >> >> Will try fixing to 2.1 and will let you know. >> >> >> Jason van Zyl-2 wrote: >>> >>> When you specify a version? >>> >>>> We are all >>>> running maven 2.0.5 and we are all building out of the same source >>>> on SVN. >>> >> >> Will let you know... >>> >>> >>> >>> Jason van Zyl-2 wrote: >>>> >>>> Specify the version of the assembly plugin you want to use, and you >>>> probably want 2.1 which was the release before 2.2-beta-1. >>>> >>>> You've hit a bug with the new version of the assembly plugin. This is >>>> why it is good to specify the versions of plugins you are using. Your >>>> builds probably updated to the latest version of the assembly plugin. >>>> >>>> Please give us a build that is representative of your build so that >>>> we can fix it. >>>> >>>> Thanks, >>>> >>>> Jason. >>>> >>>>> >>>>> Jose Alberto Fernandez wrote: >>>>>> >>>>>> Hi guys, I posted this on the user list but got no answers. It >>>>>> is an >>>>>> urgent matter as it is affecting some of our developers that are >>>>>> unable to >>>>>> build the project anymore while others can. Talking about >>>>>> unreproducible >>>>>> builds. >>>>>> >>>>>> We are getting the following stack-trace while executing the >>>>>> assembly:directory goal. >>>>>> >>>>>> The artifact com.cellectivity:fattoush-test-shared is declared >>>>>> on the >>>>>> module POMs as: >>>>>> >>>>>> <dependency> >>>>>> <groupId>com.cellectivity</groupId> >>>>>> <artifactId>fattoush-test-shared</artifactId> >>>>>> <scope>test</scope> >>>>>> <version>[1.0,)</version> >>>>>> <type>test-jar</type> >>>>>> </dependency> >>>>>> >>>>>> As it is needed only for testing. Notice that the version is >>>>>> required by >>>>>> MVN and if I ask for the specific current version $ >>>>>> {project.version} MVN >>>>>> complaints it cannot find it. Eventhough it is one of the >>>>>> artifacts that >>>>>> is building. >>>>>> >>>>>> <project xmlns="http://maven.apache.org/POM/4.0.0" >>>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>>>>> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 >>>>>> http://maven.apache.org/maven-v4_0_0.xsd"> >>>>>> <parent> >>>>>> <groupId>com.cellectivity</groupId> >>>>>> <artifactId>fattoush</artifactId> >>>>>> <version>1.5.2-SNAPSHOT</version> >>>>>> </parent> >>>>>> <modelVersion>4.0.0</modelVersion> >>>>>> <artifactId>fattoush-test-shared</artifactId> >>>>>> <packaging>jar</packaging> >>>>>> <name>Fattoush Test Shared</name> >>>>>> <dependencies> >>>>>> <dependency> >>>>>> <groupId>com.cellectivity</groupId> >>>>>> <artifactId>fattoush-core</artifactId> >>>>>> </dependency> >>>>>> <dependency> >>>>>> <groupId>com.cellectivity</groupId> >>>>>> <artifactId>fattoush-module-constant</artifactId> >>>>>> </dependency> >>>>>> </dependencies> >>>>>> <build> >>>>>> <plugins> >>>>>> <plugin> >>>>>> <groupId>org.apache.maven.plugins</groupId> >>>>>> <artifactId>maven-jar-plugin</artifactId> >>>>>> <executions> >>>>>> <execution> >>>>>> <goals> >>>>>> <goal>test-jar</goal> >>>>>> </goals> >>>>>> </execution> >>>>>> </executions> >>>>>> </plugin> >>>>>> </plugins> >>>>>> </build> >>>>>> </project> >>>>>> >>>>>> when we execute mvn install everything works, but if we do mvn >>>>>> install >>>>>> assembly:directory it fails during assembly. the stack-trace is as >>>>>> follows: >>>>>> >>>>>> [INFO] [assembly:directory] >>>>>> [INFO] Reading assembly descriptor: >>>>>> D:\fattoush\mvn\fattoush\assembly\assembly-live.xml >>>>>> [WARNING] NOTE: Currently, inclusion of module dependencies may >>>>>> produce >>>>>> unpredictable results if a version conflict occu rs. >>>>>> [INFO] Processing DependencySet (output=${version}/lib) [INFO] >>>>>> ------------------------------------------------------------------- >> >>>>>> -- >>>>>> --- >>>>>> [ERROR] FATAL ERROR >>>>>> [INFO] >>>>>> ------------------------------------------------------------------- >> >>>>>> -- >>>>>> --- >>>>>> [INFO] version was null for com.cellectivity:fattoush-test-shared >>>>>> [INFO] >>>>>> ------------------------------------------------------------------- >> >>>>>> -- >>>>>> --- >>>>>> [INFO] Trace >>>>>> java.lang.NullPointerException: version was null for >>>>>> com.cellectivity:fattoush-test-shared >>>>>> at >>>>>> org.apache.maven.artifact.DefaultArtifact.getBaseVersion >>>>>> (DefaultArtifact.java:364) >>>>>> at >>>>>> org.apache.maven.artifact.DefaultArtifact.getId >>>>>> (DefaultArtifact.java:225) >>>>>> at >>>>>> org.apache.maven.shared.artifact.filter.ScopeArtifactFilter.include >>>>>> (ScopeArtifactFilter.java:142) >>>>>> at >>>>>> org.apache.maven.project.artifact.MavenMetadataSource.createArtifac >> >>>>>> ts >>>>>> (MavenMetadataSource.java:344) >>>>>> at >>>>>> org.apache.maven.plugin.assembly.artifact.DefaultDependencyResolver >> >>>>>> .r >>>>>> esolveDependencies(DefaultDependencyReso >>>>>> lver.java:82) >>>>>> at >>>>>> org.apache.maven.plugin.assembly.archive.task.AddDependencySetsTask >> >>>>>> .r >>>>>> esolveDependencyArtifacts(AddDependencyS >>>>>> etsTask.java:155) >>>>>> at >>>>>> org.apache.maven.plugin.assembly.archive.task.AddDependencySetsTask >> >>>>>> .a >>>>>> ddDependencySet(AddDependencySetsTask.ja >>>>>> va:100) >>>>>> at >>>>>> org.apache.maven.plugin.assembly.archive.task.AddDependencySetsTask >> >>>>>> .e >>>>>> xecute(AddDependencySetsTask.java:90) >>>>>> at >>>>>> org.apache.maven.plugin.assembly.archive.phase.ModuleSetAssemblyPha >> >>>>>> se >>>>>> .addModuleBinaries(ModuleSetAssemblyPhas >>>>>> e.java:198) >>>>>> at >>>>>> org.apache.maven.plugin.assembly.archive.phase.ModuleSetAssemblyPha >> >>>>>> se >>>>>> .execute(ModuleSetAssemblyPhase.java:91) >>>>>> >>>>>> at >>>>>> org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.cr >> >>>>>> ea >>>>>> teArchive(DefaultAssemblyArchiver.java:9 >>>>>> 8) >>>>>> at >>>>>> org.apache.maven.plugin.assembly.mojos.AbstractDirectoryMojo.create >> >>>>>> Di >>>>>> rectory(AbstractDirectoryMojo.java:79) >>>>>> at >>>>>> org.apache.maven.plugin.assembly.mojos.AbstractDirectoryMojo.execut >> >>>>>> e( >>>>>> AbstractDirectoryMojo.java:57) >>>>>> at >>>>>> org.apache.maven.plugin.DefaultPluginManager.executeMojo >>>>>> (DefaultPluginManager.java:420) >>>>>> at >>>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals >>>>>> (DefaultLifecycleExecutor.java:539) >>>>>> at >>>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalo >> >>>>>> ne >>>>>> Goal(DefaultLifecycleExecutor.java:493) >>>>>> at >>>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal >>>>>> (DefaultLifecycleExecutor.java:463) >>>>>> at >>>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndH >> >>>>>> an >>>>>> dleFailures(DefaultLifecycleExecutor.jav >>>>>> a:311) >>>>>> at >>>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegm >> >>>>>> en >>>>>> ts(DefaultLifecycleExecutor.java:224) >>>>>> at >>>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute >>>>>> (DefaultLifecycleExecutor.java:143) >>>>>> at org.apache.maven.DefaultMaven.doExecute >>>>>> (DefaultMaven.java:330) >>>>>> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java: >>>>>> 123) >>>>>> at org.apache.maven.cli.MavenCli.main(MavenCli.java:272) >>>>>> 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) >>>>>> >>>>>> The interesting part of the assembly descriptor is: >>>>>> >>>>>> <moduleSets> >>>>>> <moduleSet> >>>>>> <includes> >>>>>> <include>com.cellectivity:fattoush-app-portal</include> >>>>>> </includes> >>>>>> <binaries> >>>>>> <outputDirectory>${version}/lib</outputDirectory> >>>>>> <includeDependencies>true</includeDependencies> >>>>>> <unpack>false</unpack> >>>>>> </binaries> >>>>>> </moduleSet> >>>>>> </moduleSets> >>>>>> >>>>>> Funny enough the error only happens consistently on certain >>>>>> machines and >>>>>> not in others. I am able to build, but one of my co-workers >>>>>> cannot, same >>>>>> branch. So much about reproducible builds. We have even tried >>>>>> copying my >>>>>> local repository into his local repository to see if it made any >>>>>> difference; try deleting his repository completely; but nothing >>>>>> helps. >>>>>> >>>>>> Any clues on what can be going wrong, will be appreciated. >>>>>> >>>>>> >>>>> >>>>> -- >>>>> View this message in context: http://www.nabble.com/ >>>>> NullPointerException-during-maven-assembly-plugin- >>>>> tf3624104s177.html#a10128693 >>>>> Sent from the Maven Developers mailing list archive at Nabble.com. >>>>> >>>>> >>>>> -------------------------------------------------------------------- >> >>>>> - >>>>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>>>> For additional commands, e-mail: [EMAIL PROTECTED] >>>>> >>>>> >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>>> For additional commands, e-mail: [EMAIL PROTECTED] >>>> >>>> >>>> >>> >>> -- >>> View this message in context: http://www.nabble.com/ >>> NullPointerException-during-maven-assembly-plugin- >>> tf3624104s177.html#a10138035 >>> Sent from the Maven Developers mailing list archive at Nabble.com. >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> -- >> View this message in context: >> http://www.nabble.com/NullPointerException-during-maven-assembly-plugin- >> tf3624104s177.html#a10139230 >> Sent from the Maven Developers mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > > -- View this message in context: http://www.nabble.com/NullPointerException-during-maven-assembly-plugin-tf3624104s177.html#a10159805 Sent from the Maven Developers mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
