You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jamie Olson (JIRA)" <ji...@codehaus.org> on 2012/02/22 15:17:02 UTC

[jira] (MNG-5252) Cannot build modules in Maven 3

Jamie Olson created MNG-5252:
--------------------------------

             Summary: Cannot build modules in Maven 3
                 Key: MNG-5252
                 URL: https://jira.codehaus.org/browse/MNG-5252
             Project: Maven 2 & 3
          Issue Type: Bug
          Components: Artifacts and Repositories
    Affects Versions: 3.0.4
         Environment: $ mvn3 --version
Apache Maven 3.0.3 (r1075438; 2011-02-28 12:31:09-0500)
Maven home: /usr/share/maven3
Java version: 1.7.0_147-icedtea, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.0.0-16-generic", arch: "amd64", family: "unix"

            Reporter: Jamie Olson


I'm not totally sure if this is a bug or a feature, but you cannot build individual modules without first building/installing the parent.  Among other things, this makes it difficult to work with groups where some modules are not compiling.

For example, using the j2ee-simple archetype:


$ mvn archetype:generate -DgroupId=com.example -DartifactId=example -Dversion=1.0-SNAPSHOT -DpackageName=com.example -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-j2ee-simple

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [archetype:generate] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] [archetype:generate {execution: default-cli}]
[INFO] Generating project in Interactive mode
[INFO] Archetype [org.apache.maven.archetypes:maven-archetype-j2ee-simple:1.0] found in catalog remote
[INFO] Using property: groupId = com.example
[INFO] Using property: artifactId = example
[INFO] Using property: version = 1.0-SNAPSHOT
[INFO] Using property: package = com.example
Confirm properties configuration:
groupId: com.example
artifactId: example
version: 1.0-SNAPSHOT
package: com.example
Y: 
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Old (1.x) Archetype: maven-archetype-j2ee-simple:1.0
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.example
[INFO] Parameter: packageName, Value: com.example
[INFO] Parameter: package, Value: com.example
[INFO] Parameter: artifactId, Value: example
[INFO] Parameter: basedir, Value: /local/home/jfolson/develop
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] project created from Old (1.x) Archetype in dir: /local/home/jfolson/develop/example
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6 seconds
[INFO] Finished at: Wed Feb 22 09:10:19 EST 2012
[INFO] Final Memory: 27M/171M
[INFO] ------------------------------------------------------------------------

$ cd example/
ear/            ejbs/           primary-source/ projects/       servlets/       src/            

$ cd example/projects/
$ mvn3 install

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] sub projects
[INFO] logging
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building sub projects 1.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ projects ---
[INFO] Installing /local/home/jfolson/develop/example/projects/pom.xml to /home/jfolson/.m2/repository/root/project/projects/1.0/projects-1.0.pom
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building logging 1.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ logging ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /local/home/jfolson/develop/example/projects/logging/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ logging ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ logging ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /local/home/jfolson/develop/example/projects/logging/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ logging ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @ logging ---
[INFO] No tests to run.
[INFO] Surefire report directory: /local/home/jfolson/develop/example/projects/logging/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
There are no tests to run.

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] 
[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ logging ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: /local/home/jfolson/develop/example/projects/logging/target/logging-1.0.jar
[INFO] 
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ logging ---
[INFO] Installing /local/home/jfolson/develop/example/projects/logging/target/logging-1.0.jar to /home/jfolson/.m2/repository/root/project/projects/logging/1.0/logging-1.0.jar
[INFO] Installing /local/home/jfolson/develop/example/projects/logging/pom.xml to /home/jfolson/.m2/repository/root/project/projects/logging/1.0/logging-1.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] sub projects ...................................... SUCCESS [0.853s]
[INFO] logging ........................................... SUCCESS [2.478s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.595s
[INFO] Finished at: Wed Feb 22 09:10:45 EST 2012
[INFO] Final Memory: 8M/105M
[INFO] ------------------------------------------------------------------------

$ cd ../primary-source/
$ mvn3 install

[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for root.project:primary-source:jar:1.0
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. @ line 26, column 18
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 20, column 18
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building core project classes 1.0
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.075s
[INFO] Finished at: Wed Feb 22 09:11:02 EST 2012
[INFO] Final Memory: 8M/105M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project primary-source: Could not resolve dependencies for project root.project:primary-source:jar:1.0: Failed to collect dependencies for [root.project.projects:logging:jar:1.0 (compile)]: Failed to read artifact descriptor for root.project.projects:logging:jar:1.0: Failure to find root:project:pom:1.0 in http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException




On the other hand, this works fine (once you remove the missing site module):

cd example
mvn3 install


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira