Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Cannot Reproduce
-
Affects Version/s: 0.0.9
-
Fix Version/s: 0.0.10
-
Component/s: None
-
Labels:None
-
Environment:maven 2.0.4 on Windows with eclipse 3.1
-
Number of attachments :2
Description
I have also an issue related to dependencyManagement section in parent pom with m2eclipse plugin on windows.
I have attached the projects that show the problem : when a project (projectD in my example) is defined with a dependencyManagement section in the parent pom in order to allow other projects to define its version (projectC in my example), the build in eclipse with a clean on the project (calling the install goal) fails when creating the jar.
The trace is the following :
org.apache.maven.lifecycle.LifecycleExecutionException: Error assembling JAR
...
... 8 more
Caused by: java.lang.NullPointerException
at org.apache.maven.artifact.ArtifactUtils.copyArtifact(ArtifactUtils.java:109)
...
Attachments
-
$i18n.getText("admin.common.words.hide")
- _projects.zip
- 20/Oct/06 2:24 AM
- 70 kB
- Luc Feys
-
- asoware-master/.classpath 0.4 kB
- asoware-master/.project 0.6 kB
- asoware-master/pom.xml 0.9 kB
- budget/budget-conv/.classpath 0.4 kB
- budget/budget-conv/.project 0.6 kB
- budget/budget-conv/pom.xml 1 kB
- budget/budget-conv/.../conv/Converter.java 2 kB
- budget/.../ProcessingException.java 0.4 kB
- budget/.../SheetProcessingException.java 0.3 kB
- budget/.../WorkbookProcessor.java 2 kB
- budget/.../WorksheetProcessor.java 2 kB
- budget/budget-conv/.../resources/log4j.xml 3 kB
- budget/budget-db/.classpath 0.4 kB
- budget/budget-db/.project 0.5 kB
- budget/budget-db/pom.xml 0.4 kB
- budget/budget-db/.../persistence.xml 0.9 kB
- budget/budget-db/src/.../db/DbUtil.java 1 kB
- budget/.../GenericEnumUserType.java 6 kB
- budget/budget-db/src/.../model/Beweging.java 2 kB
- budget/budget-db/.../BewegingSoort.java 0.9 kB
- budget/budget-db/.../model/Categorie.java 0.7 kB
- budget/budget-db/.../model/package-info.java 0.8 kB
- budget/budget-db/src/.../model/Periode.java 0.8 kB
- budget/budget-gui/.classpath 0.4 kB
- budget/budget-gui/.project 0.6 kB
- budget/budget-gui/pom.xml 5 kB
- budget/budget-gui/src/.../gui/BudgetApp.java 4 kB
- budget/budget-gui/.../gui/InitialView.java 2 kB
- budget/.../SimpleLifecycleAdvisor.java 5 kB
- budget/.../richclient-application-context.xml 12 kB
-
$i18n.getText("admin.common.words.hide")
- projects.zip
- 21/Aug/06 3:25 AM
- 12 kB
- Nicolas Cazottes
-
- pom.xml 1.0 kB
- projectD/.classpath 0.3 kB
- projectD/.../ProjectDMAven2InstallBuilder.launch 0.7 kB
- projectD/.project 0.9 kB
- projectD/pom.xml 0.4 kB
- projectD/src/main/.../myprojects/App.java 0.2 kB
- projectD/target/.../myprojects/App.class 0.5 kB
- projectD/target/exported-pom.xml 3 kB
- projectD/.../projectD-1.0-SNAPSHOT.jar 2 kB
- projectC/.classpath 0.3 kB
- projectC/.../ProjectCMavenInstallBuilder.launch 0.7 kB
- projectC/.project 0.9 kB
- projectC/pom.xml 0.5 kB
- projectC/src/main/.../projectc/App.java 0.2 kB
- projectC/target/.../projectc/App.class 0.5 kB
- projectC/target/exported-pom.xml 3 kB
- projectC/.../projectC-1.0-SNAPSHOT.jar 3 kB
Activity
Please feel free to reopen and provide requested info. Thanks.
I experience the same problem described here. I have the following project structure (see attached _projects.zip):
- master (pom only)
- budget (pom only, parent=master)
- budget-conv (eclipse project, parent=budget)
- budget-db (eclipse project, parent=budget)
- budget-gui (eclipse project, parent=budget)
All modules will depend on budget-db, so I added dependency management for it in budget pom.
I have defined a maven 'm2 build' for each module (with a single goal 'install') using external tools in eclipse, but with the addition to dependency management of budget-db, I get the above error if I build budget-db. All other modules build fine.
If I remove the dependency management on 'budget-db' then I can build 'budget-db'. If I build using maven from the command prompt, then budget-db builds fine, even with the dependency management section.
I hope this was a bit clear.
- master (pom only)
- budget (pom only, parent=master)
- budget-conv (eclipse project, parent=budget)
- budget-db (eclipse project, parent=budget)
- budget-gui (eclipse project, parent=budget)
Jason, can you please take a look at this. Seems similar to issue we looked at last week.
I was unable to reproduce this problem using 0.0.10.
One thing I did notice in both cases was that if a parent POM was not installed in the local repository or present in the Eclipse workspace, it would be used via implicit relative-path (<relativePath>../pom.xml</relativePath> in the <parent/> section is implicit), and when that project was installed, THE PARENT POM IS NOT INSTALLED WITH IT. This means that subsequent usage of that project artifact as a dependency will fail, since the parent POM of that dependency cannot be located in the repository. The solution is to be sure that either (a) parent POMs are represented in the Eclipse workspace, or (b) parent POMs are installed via command line into the local repository.
Please clarify if you have single Eclipse project or multiple and provide step by step instructions what exactly you are trying to do here.
Also note, that dependency management has been greatly improved in 0.0.10 (unreleased yet). So, I just need to verify your use case.