Skip to content

Instantly share code, notes, and snippets.

Created December 10, 2014 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/1cbc9db67187c2fb7a27 to your computer and use it in GitHub Desktop.
Save anonymous/1cbc9db67187c2fb7a27 to your computer and use it in GitHub Desktop.
A short example on what assuming entails (incremental compilation working correctly on 3.2)
redacted@redactedHost:/tmp/maventest$ mvn clean install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] incrementialbuild-parent
[INFO] incrementialbuild-A
[INFO] incrementialbuild-B
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building incrementialbuild-parent 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ incrementialbuild-parent ---
[INFO]
[INFO] --- maven-install-plugin:2.3:install (default-install) @ incrementialbuild-parent ---
[INFO] Installing /tmp/maventest/pom.xml to /home/redacted/.m2/repository/org/apache/maven/test/incrementialbuild-parent/1.0-SNAPSHOT/incrementialbuild-parent-1.0-SNAPSHOT.pom
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building incrementialbuild-A 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/3.2/maven-compiler-plugin-3.2.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/3.2/maven-compiler-plugin-3.2.pom (12 KB at 41.5 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/3.2/maven-compiler-plugin-3.2.jar
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/3.2/maven-compiler-plugin-3.2.jar (45 KB at 328.4 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/junit/junit/4.9/junit-4.9.pom
Downloaded: http://repo.maven.apache.org/maven2/junit/junit/4.9/junit-4.9.pom (0 B at 0.0 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/junit/junit/4.9/junit-4.9.jar
Downloaded: http://repo.maven.apache.org/maven2/junit/junit/4.9/junit-4.9.jar (0 B at 0.0 KB/sec)
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ incrementialbuild-A ---
[INFO]
[INFO] --- maven-resources-plugin:2.3:resources (default-resources) @ incrementialbuild-A ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ incrementialbuild-A ---
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-api/2.4/plexus-compiler-api-2.4.pom
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-api/2.4/plexus-compiler-api-2.4.pom (865 B at 11.7 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler/2.4/plexus-compiler-2.4.pom
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler/2.4/plexus-compiler-2.4.pom (6 KB at 72.8 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-manager/2.4/plexus-compiler-manager-2.4.pom
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-manager/2.4/plexus-compiler-manager-2.4.pom (690 B at 9.0 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-javac/2.4/plexus-compiler-javac-2.4.pom
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-javac/2.4/plexus-compiler-javac-2.4.pom (769 B at 10.4 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compilers/2.4/plexus-compilers-2.4.pom
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compilers/2.4/plexus-compilers-2.4.pom (2 KB at 17.3 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-api/2.4/plexus-compiler-api-2.4.jar
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-manager/2.4/plexus-compiler-manager-2.4.jar
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-javac/2.4/plexus-compiler-javac-2.4.jar
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-api/2.4/plexus-compiler-api-2.4.jar (25 KB at 235.8 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-manager/2.4/plexus-compiler-manager-2.4.jar (5 KB at 39.4 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compiler-javac/2.4/plexus-compiler-javac-2.4.jar (19 KB at 131.0 KB/sec)
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 2 source files to /tmp/maventest/moduleA/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.3:testResources (default-testResources) @ incrementialbuild-A ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ incrementialbuild-A ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file to /tmp/maventest/moduleA/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ incrementialbuild-A ---
[INFO] Surefire report directory: /tmp/maventest/moduleA/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running TestBeanA
TestBeanA#testA() succeeded!
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.04 sec
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-jar-plugin:2.2:jar (default-jar) @ incrementialbuild-A ---
[INFO] Building jar: /tmp/maventest/moduleA/target/incrementialbuild-A-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- maven-install-plugin:2.3:install (default-install) @ incrementialbuild-A ---
[INFO] Installing /tmp/maventest/moduleA/target/incrementialbuild-A-1.0-SNAPSHOT.jar to /home/redacted/.m2/repository/org/apache/maven/test/incrementialbuild-A/1.0-SNAPSHOT/incrementialbuild-A-1.0-SNAPSHOT.jar
[INFO] Installing /tmp/maventest/moduleA/pom.xml to /home/redacted/.m2/repository/org/apache/maven/test/incrementialbuild-A/1.0-SNAPSHOT/incrementialbuild-A-1.0-SNAPSHOT.pom
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building incrementialbuild-B 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ incrementialbuild-B ---
[INFO]
[INFO] --- maven-resources-plugin:2.3:resources (default-resources) @ incrementialbuild-B ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /tmp/maventest/moduleB/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ incrementialbuild-B ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file to /tmp/maventest/moduleB/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.3:testResources (default-testResources) @ incrementialbuild-B ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /tmp/maventest/moduleB/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ incrementialbuild-B ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ incrementialbuild-B ---
[INFO] No tests to run.
[INFO] Surefire report directory: /tmp/maventest/moduleB/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-jar-plugin:2.2:jar (default-jar) @ incrementialbuild-B ---
[INFO] Building jar: /tmp/maventest/moduleB/target/incrementialbuild-B-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- maven-install-plugin:2.3:install (default-install) @ incrementialbuild-B ---
[INFO] Installing /tmp/maventest/moduleB/target/incrementialbuild-B-1.0-SNAPSHOT.jar to /home/redacted/.m2/repository/org/apache/maven/test/incrementialbuild-B/1.0-SNAPSHOT/incrementialbuild-B-1.0-SNAPSHOT.jar
[INFO] Installing /tmp/maventest/moduleB/pom.xml to /home/redacted/.m2/repository/org/apache/maven/test/incrementialbuild-B/1.0-SNAPSHOT/incrementialbuild-B-1.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] incrementialbuild-parent .......................... SUCCESS [0.253s]
[INFO] incrementialbuild-A ............................... SUCCESS [2.462s]
[INFO] incrementialbuild-B ............................... SUCCESS [0.130s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.942s
[INFO] Finished at: Wed Dec 10 14:52:00 CET 2014
[INFO] Final Memory: 18M/353M
[INFO] ------------------------------------------------------------------------
redacted@redactedHost:/tmp/maventest$ ne moduleA/src/main/java/BeanA.java
redacted@redactedHost:/tmp/maventest$ mvn install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] incrementialbuild-parent
[INFO] incrementialbuild-A
[INFO] incrementialbuild-B
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building incrementialbuild-parent 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.3:install (default-install) @ incrementialbuild-parent ---
[INFO] Installing /tmp/maventest/pom.xml to /home/redacted/.m2/repository/org/apache/maven/test/incrementialbuild-parent/1.0-SNAPSHOT/incrementialbuild-parent-1.0-SNAPSHOT.pom
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building incrementialbuild-A 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.3:resources (default-resources) @ incrementialbuild-A ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ incrementialbuild-A ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 2 source files to /tmp/maventest/moduleA/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /tmp/maventest/moduleA/src/main/java/BeanA2.java:[10,21] cannot find symbol
symbol: method getI()
location: variable beanA of type BeanA
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] incrementialbuild-parent .......................... SUCCESS [0.210s]
[INFO] incrementialbuild-A ............................... FAILURE [0.557s]
[INFO] incrementialbuild-B ............................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.858s
[INFO] Finished at: Wed Dec 10 14:52:59 CET 2014
[INFO] Final Memory: 14M/483M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project incrementialbuild-A: Compilation failure
[ERROR] /tmp/maventest/moduleA/src/main/java/BeanA2.java:[10,21] cannot find symbol
[ERROR] symbol: method getI()
[ERROR] location: variable beanA of type BeanA
[ERROR] -> [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/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :incrementialbuild-A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment