How to find the problem when a maven packaging stage last indefinitely? - maven

I have a fairly large maven project that if compiled (using mvn package or mvn install), stuck on a packaging stage for 10+ hours:
[INFO] Building jar: /home/peng/git-dev/scala-2.11/datapassports/spookystuff/mldsl/target/spookystuff-mldsl-0.6.2-SNAPSHOT-javadoc.jar
[INFO]
[INFO] --- maven-source-plugin:3.1.0:jar-no-fork (attach-sources) # spookystuff-mldsl ---
[INFO] Building jar: /home/peng/git-dev/scala-2.11/datapassports/spookystuff/mldsl/target/spookystuff-mldsl-0.6.2-SNAPSHOT-sources.jar
[INFO]
[INFO] --- maven-source-plugin:3.1.0:test-jar-no-fork (attach-sources) # spookystuff-mldsl ---
[INFO] Building jar: /home/peng/git-dev/scala-2.11/datapassports/spookystuff/mldsl/target/spookystuff-mldsl-0.6.2-SNAPSHOT-test-sources.jar
[INFO]
[INFO] --- maven-jar-plugin:3.0.2:test-jar (default) # spookystuff-mldsl ---
[INFO] Building jar: /home/peng/git-dev/scala-2.11/datapassports/spookystuff/mldsl/target/spookystuff-mldsl-0.6.2-SNAPSHOT-tests.jar
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) # spookystuff-mldsl ---
[INFO] Installing /home/peng/git-dev/scala-2.11/datapassports/spookystuff/mldsl/target/spookystuff-mldsl-0.6.2-SNAPSHOT.jar to /home/peng/.m2/repository/com/tribbloids/spookystuff/spookystuff-mldsl/0.6.2-SNAPSHOT/spookystuff-mldsl-0.6.2-SNAPSHOT.jar
[INFO] Installing /home/peng/git-dev/scala-2.11/datapassports/spookystuff/mldsl/.flattened-pom.xml to /home/peng/.m2/repository/com/tribbloids/spookystuff/spookystuff-mldsl/0.6.2-SNAPSHOT/spookystuff-mldsl-0.6.2-SNAPSHOT.pom
[INFO] Installing /home/peng/git-dev/scala-2.11/datapassports/spookystuff/mldsl/target/spookystuff-mldsl-0.6.2-SNAPSHOT-javadoc.jar to /home/peng/.m2/repository/com/tribbloids/spookystuff/spookystuff-mldsl/0.6.2-SNAPSHOT/spookystuff-mldsl-0.6.2-SNAPSHOT-javadoc.jar
[INFO] Installing /home/peng/git-dev/scala-2.11/datapassports/spookystuff/mldsl/target/spookystuff-mldsl-0.6.2-SNAPSHOT-sources.jar to /home/peng/.m2/repository/com/tribbloids/spookystuff/spookystuff-mldsl/0.6.2-SNAPSHOT/spookystuff-mldsl-0.6.2-SNAPSHOT-sources.jar
[INFO] Installing /home/peng/git-dev/scala-2.11/datapassports/spookystuff/mldsl/target/spookystuff-mldsl-0.6.2-SNAPSHOT-test-sources.jar to /home/peng/.m2/repository/com/tribbloids/spookystuff/spookystuff-mldsl/0.6.2-SNAPSHOT/spookystuff-mldsl-0.6.2-SNAPSHOT-test-sources.jar
[INFO] Installing /home/peng/git-dev/scala-2.11/datapassports/spookystuff/mldsl/target/spookystuff-mldsl-0.6.2-SNAPSHOT-tests.jar to /home/peng/.m2/repository/com/tribbloids/spookystuff/spookystuff-mldsl/0.6.2-SNAPSHOT/spookystuff-mldsl-0.6.2-SNAPSHOT-tests.jar
(this is the last line of output)
The build output can be observed on CI server, with similar output:
https://app.codeship.com/projects/166836/builds/48698210?pipeline=103aace8-047a-47e4-9cb9-018c3ce0693a
I don't know what have caused this behaviour, but I suspect that a bug in maven-shade-plugin has caused dependency reduced pom generation to move into a indefinitely loop. How can I confirm this hypothesis collect enough evidence to report to the plugin maintainers?

Related

Heroku: Spring boot app successfully deploying; but receiving application error when loading site

I would like to deploy my Spring boot app on Heroku.
When i try the manual deploy, there is no error on my log. But when i try to load the site i have this error:
Application error
An error occurred in the application and your page could not be served. If you are the application
owner, check your logs for details. You can do this from the Heroku CLI with the command
heroku logs --tail
Please find below my logs.
Someone have an idea ?
did i miss some thing?
Any help would be welcome!
-----> Java app detected
-----> Installing JDK 1.8... done
-----> Executing Maven
$ ./mvnw -DskipTests clean dependency:list install
/tmp/build_3329cfca5f2723d7e41de818bf56c89f
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------< lu.amundi:ServeurAmundiFileIntegration >---------------
[INFO] Building ServeurAmundiFileIntegration 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) # ServeurAmundiFileIntegration ---
[INFO]
[INFO] --- maven-dependency-plugin:3.0.2:list (default-cli) # ServeurAmundiFileIntegration ---
[INFO]
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) # ServeurAmundiFileIntegration ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) # ServeurAmundiFileIntegration ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 64 source files to /tmp/build_3329cfca5f2723d7e41de818bf56c89f/target/classes
[INFO] /tmp/build_3329cfca5f2723d7e41de818bf56c89f/src/main/java/lu/amundi/be/security/SecurityConfig.java: Some input files use or override a deprecated API.
[INFO] /tmp/build_3329cfca5f2723d7e41de818bf56c89f/src/main/java/lu/amundi/be/security/SecurityConfig.java: Recompile with -Xlint:deprecation for details.
[INFO]
[INFO] --- maven-resources-plugin:3.0.1:testResources (default-testResources) # ServeurAmundiFileIntegration ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /tmp/build_3329cfca5f2723d7e41de818bf56c89f/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:testCompile (default-testCompile) # ServeurAmundiFileIntegration ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /tmp/build_3329cfca5f2723d7e41de818bf56c89f/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.21.0:test (default-test) # ServeurAmundiFileIntegration ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:3.0.2:jar (default-jar) # ServeurAmundiFileIntegration ---
[INFO] Building jar: /tmp/build_3329cfca5f2723d7e41de818bf56c89f/target/ServeurAmundiFileIntegration-0.0.1-SNAPSHOT.jar
[INFO]
[INFO] --- spring-boot-maven-plugin:2.0.3.RELEASE:repackage (default) # ServeurAmundiFileIntegration ---
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) # ServeurAmundiFileIntegration ---
[INFO] Installing /tmp/build_3329cfca5f2723d7e41de818bf56c89f/target/ServeurAmundiFileIntegration-0.0.1-SNAPSHOT.jar to /app/tmp/cache/.m2/repository/lu/amundi/ServeurAmundiFileIntegration/0.0.1-SNAPSHOT/ServeurAmundiFileIntegration-0.0.1-SNAPSHOT.jar
[INFO] Installing /tmp/build_3329cfca5f2723d7e41de818bf56c89f/pom.xml to /app/tmp/cache/.m2/repository/lu/amundi/ServeurAmundiFileIntegration/0.0.1-SNAPSHOT/ServeurAmundiFileIntegration-0.0.1-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.676 s
[INFO] Finished at: 2020-04-07T14:07:09Z
[INFO] ------------------------------------------------------------------------
-----> Discovering process types
Procfile declares types -> (none)
Default types for buildpack -> web
-----> Compressing...
Done: 78.8M
-----> Launching...
Released v6
https://amundi-file-integration-server.herokuapp.com/ deployed to Heroku
You have to run heroku logs --tail -a (your app name) to get access to the logs, that should have some information on why it is failing.
Try web:node server.js Not space web: node server.js in ProcFile

Maven surefire plugin doesn't run our Unit test case

Apache Maven 3.5.2 - the pom.xml doesn't declare the surefire plugin explicitly, but the effective pom.xml shows 2.18.1
When I run 'mvn test' - it ends successfully, it doesn't say that it can't find any test cases, but there is no trace of the test cases. This is all I see:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building SpreadSheetUploadWeb 1.0
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.fasterxml.jackson.core:jackson-databind:jar:1.9.10 is missing, no dependency information available
[WARNING] The POM for com.fasterxml.jackson.core:jackson-annotations:jar:1.9.10 is missing, no dependency information available
[WARNING] The POM for com.fasterxml.jackson.core:jackson-core:jar:1.9.10 is missing, no dependency information available
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # SpreadSheetUploadWeb ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 22 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # SpreadSheetUploadWeb ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # SpreadSheetUploadWeb ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 5 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # SpreadSheetUploadWeb ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) # SpreadSheetUploadWeb ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
My pom.xml has jar specified, and my test case is in:
c:/SpreadSheetUploadWeb/src/test/java/com/ibm/cio/cloud/cost/spreadsheet/dao/UnitTestJdbcCostSpreadsheetDAO.java
It works perfectly when I run test explicitly like this:
mvn surefire:test -Dtest=UnitTestJdbcCostSpreadsheetDAO.java
Why won't it run when I just run: mvn test ?
By default surefire search for files following this patterns:
**/Test*.java
**/*Test.java
**/*Tests.java
**/*TestCase.java
http://maven.apache.org/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html

VSTS Maven build - no JUnit tests run

[Update: Problem cause found! read below]
Problem: VSTS Maven build does not seem to run JUnit, does not show any JUnit results, does not seem to produce any JUnit testreports.
In VSTS, we have a Java project with a Contact and TestContact class with 1 testcase;
source\module\src\main\java\nl\customer\model\situation\Contact.java
source\module\src\test\java\nl\customer\model\ContactTest.java
source\module\pom.xml
Running Maven from Eclipse works fine. Console shows Maven using Surefire reports, running/passing the 1 unit test.
Running the project with Maven on a Windows PC also works:
mvn test
Logging:
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Domain Model
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # module ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 30 resources
[INFO] skip non existing resourceDirectory C:\project\source\projectdomain\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # module ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # module ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\project\source\module\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # module ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.20.1:test (default-test) # module ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running nl.customer.module.ContactTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 s - in nl.customer.module.ContactTest
[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.109 s
[INFO] Finished at: 2018-01-09T14:05:03+01:00
[INFO] Final Memory: 10M/196M
[INFO] ------------------------------------------------------------------------
In VSTS, using the Maven build step (goal: install) succeeds, but the log does not show anything about JUnit, even with system.debug = true.
Consequently, trying the "Publish test results" always fails (both when using a seperate build task or the Publish TFS option in the maven build task).
It seems I have found the cause of the problem: in VSTS, the Maven build task has the option
Set MAVEN_OPTS to
In our build definition, this was set to
-Xmx1024m -X
The first parameter is correct, it sets the maximum memory.
The second parameter is incorrect. If you want Maven to give debug output, you should put the "-X" parameter under Goal(s).
There is no real warning about the second parameter in the logging.

Maven clean install only works with sudo on a certain project?

Without getting into the details of my project. I am wondering if this is a common issue. without sudo I get NPM errors. NPM was installed correctly. On MAC Yosemite?
error below
C00427#C17PN92CG8WN ~/s/c/ui>
mvn clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ACS.org CQ5 --> PARENT --> UI 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # ui ---
[INFO] Deleting /Users/C00427/sites/cq5/ui/target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.180 s
[INFO] Finished at: 2015-11-12T09:59:46-05:00
[INFO] Final Memory: 15M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project ui: Failed to clean project: Failed to delete /Users/C00427/sites/cq5/ui/target/org.acs.cq-code-1.0-SNAPSHOT.jar -> [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/MojoExecutionException
C00427#C17PN92CG8WN ~/s/c/ui>
If I use sudo it works perfectly fine
C00427#C17PN92CG8WN ~/s/c/ui> sudo mvn clean install
Password:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ACS.org CQ5 --> PARENT --> UI 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # ui ---
[INFO] Deleting /Users/C00427/sites/cq5/ui/target
[INFO]
[INFO] --- frontend-maven-plugin:0.0.25:install-node-and-npm (install node and npm) # ui ---
[INFO] Node v5.0.0 is already installed.
[INFO] Found NPM version 3.3.9
[INFO]
[INFO] --- frontend-maven-plugin:0.0.25:npm (npm install) # ui ---
[INFO] Running 'npm install --color=false' in /Users/C00427/sites/cq5/ui
[ERROR] npm WARN EPACKAGEJSON ui#0.0.0 No repository field.
[INFO]
[INFO] --- frontend-maven-plugin:0.0.25:gulp (gulp build) # ui ---
[INFO] Running 'gulp.js --no-color' in /Users/C00427/sites/cq5/ui
[INFO] [10:02:23] Using gulpfile ~/sites/cq5/ui/gulpfile.js
[INFO] [10:02:23] Starting 'default'...
[INFO] [10:02:23] Starting 'coffee'...
[INFO] [10:02:23] Finished 'default' after 11 ms
[INFO] [10:02:24] Finished 'coffee' after 657 ms
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # ui ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 6 resources to META-INF
[INFO] Copying 2093 resources to jcr_root
[INFO]
[INFO] --- maven-dependency-plugin:2.9:copy-dependencies (copy-bundles) # ui ---
[INFO] Copying jackson-databind-2.5.1.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/jackson-databind-2.5.1.jar
[INFO] Copying org.apache.sling.models.api-1.1.0.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/org.apache.sling.models.api-1.1.0.jar
[INFO] Copying guice-1.0.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/guice-1.0.jar
[INFO] Copying commons-lang3-3.0.1.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/commons-lang3-3.0.1.jar
[INFO] Copying com.springsource.org.apache.commons.codec-1.3.0.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.org.apache.commons.codec-1.3.0.jar
[INFO] Copying com.springsource.org.apache.commons.logging-1.1.1.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.org.apache.commons.logging-1.1.1.jar
[INFO] Copying com.springsource.org.aopalliance-1.0.0.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.org.aopalliance-1.0.0.jar
[INFO] Copying com.springsource.org.cyberneko.html-1.9.13.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.org.cyberneko.html-1.9.13.jar
[INFO] Copying com.springsource.org.apache.commons.httpclient-3.1.0.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.org.apache.commons.httpclient-3.1.0.jar
[INFO] Copying jackson-annotations-2.5.1.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/jackson-annotations-2.5.1.jar
[INFO] Copying com.springsource.org.apache.httpcomponents.httpclient-4.1.1.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.org.apache.httpcomponents.httpclient-4.1.1.jar
[INFO] Copying groovy-all-2.3.8.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/groovy-all-2.3.8.jar
[INFO] Copying com.springsource.org.apache.httpcomponents.httpcore-4.1.1.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.org.apache.httpcomponents.httpcore-4.1.1.jar
[INFO] Copying commons-beanutils-1.8.3.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/commons-beanutils-1.8.3.jar
[INFO] Copying commons-logging-1.1.1.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/commons-logging-1.1.1.jar
[INFO] Copying jackson-core-2.5.1.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/jackson-core-2.5.1.jar
[INFO] Copying com.springsource.org.apache.xmlcommons-1.3.4.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.org.apache.xmlcommons-1.3.4.jar
[INFO] Copying io.wcm.cq5.sling.models-1.0.0.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/io.wcm.cq5.sling.models-1.0.0.jar
[INFO] Copying com.springsource.org.openid4java-0.9.6.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.org.openid4java-0.9.6.jar
[INFO] Copying com.springsource.org.apache.xerces-2.9.1.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.org.apache.xerces-2.9.1.jar
[INFO] Copying org.apache.sling.models.impl-1.1.0.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/org.apache.sling.models.impl-1.1.0.jar
[INFO] Copying com.springsource.org.apache.httpcomponents.httpmime-4.1.1.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.org.apache.httpcomponents.httpmime-4.1.1.jar
[INFO] Copying com.springsource.org.apache.httpcomponents.httpclient-cache-4.1.1.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.org.apache.httpcomponents.httpclient-cache-4.1.1.jar
[INFO] Copying ehcache-2.7.0.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/ehcache-2.7.0.jar
[INFO] Copying com.springsource.org.apache.xml.resolver-1.2.0.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.org.apache.xml.resolver-1.2.0.jar
[INFO] Copying com.springsource.com.google.inject-2.0.0.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.com.google.inject-2.0.0.jar
[INFO] Copying com.springsource.net.spy.memcached-2.5.0.jar to /Users/C00427/sites/cq5/ui/target/classes/jcr_root/apps/acs/install/com.springsource.net.spy.memcached-2.5.0.jar
[INFO]
[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) # ui ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # ui ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/C00427/sites/cq5/ui/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) # ui ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) # ui ---
[INFO] No tests to run.
[INFO]
[INFO] --- replacer:1.5.0:replace (default) # ui ---
[INFO] Replacement run on 1 file.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # ui ---
[INFO] Building jar: /Users/C00427/sites/cq5/ui/target/org.acs.cq-code-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) # ui ---
[INFO] Installing /Users/C00427/sites/cq5/ui/target/org.acs.cq-code-1.0-SNAPSHOT.jar to /var/root/.m2/repository/org/acs/cq/ui/1.0-SNAPSHOT/ui-1.0-SNAPSHOT.jar
[INFO] Installing /Users/C00427/sites/cq5/ui/pom.xml to /var/root/.m2/repository/org/acs/cq/ui/1.0-SNAPSHOT/ui-1.0-SNAPSHOT.pom
[INFO]
[INFO] --- cq-deploy-plugin:0.0.4:install-package (install-package-author) # ui ---
[INFO] execute
[INFO] Connecting to server: http://localhost:4502
[INFO] Connecting with user: admin
[INFO] Deleting package at path: org.acs.cq-code-1.0-SNAPSHOT.jar
[WARNING] Delete failed: no package
[WARNING] Delete failed with jar, trying with zip.
[INFO] Deleting package at path: org.acs.cq-code-1.0-SNAPSHOT.zip
[INFO] Delete succeeded
[INFO] Uploading package /Users/C00427/sites/cq5/ui/target/org.acs.cq-code-1.0-SNAPSHOT.jar to path: org.acs.cq-code-1.0-SNAPSHOT.jar
[INFO] Upload succeeded
[INFO] Package upload successful
[INFO] Installing package at path: org.acs.cq-code-1.0-SNAPSHOT.jar
[WARNING] Installation failed: no package
[WARNING] Installation failed with jar, trying with zip.
[INFO] Installing package at path: org.acs.cq-code-1.0-SNAPSHOT.zip
[INFO] Installation succeeded
[INFO] Package installation successful
[INFO] Package Upload/Installation Completed Successfully
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.859 s
[INFO] Finished at: 2015-11-12T10:02:36-05:00
[INFO] Final Memory: 28M/514M
[INFO] ------------------------------------------------------------------------
The Issue was resolved by reinstalling NPM. As many times as I tried to uninstall and install NPM, i never deleted hidden files that were left over inside usr/ folder.
I don't really understand why sudo worked. But the issue was resolved.

Using gwt:run-codeserver

I have just started to use the gwt maven plugin in my project and everything seems to be working fine. However, debugging is quite hard as I am unable to make superdevmode work correctly and I cannot get the errors to display on my IDE (IntelliJ).
Here is the log when I do gwt:run
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded. SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building GWT Maven Archetype 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> gwt-maven-plugin:2.5.0:run (default-cli) # xxxxxadmin >>>
[WARNING] The artifact org.apache.commons:commons-io:jar:1.3.2 has been relocated to commons- io:commons-io:jar:1.3.2
[INFO]
[INFO] --- gwt-maven-plugin:2.5.0:i18n (default) # xxxxxadmin ---
[INFO]
[INFO] --- gwt-maven-plugin:2.5.0:generateAsync (default) # xxxxxadmin ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # xxxxxadmin ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 883 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # xxxxxadmin ---
[INFO] Compiling 1 source file to /Users/myuser/git xxxxxadmin/target xxxxxadmin-1.0-SNAPSHOT/WEB-INF/ classes
[INFO]
[INFO] --- maven-war-plugin:2.1.1:exploded (default) # xxxxxadmin ---
[INFO] Exploding webapp
[INFO] Assembling webapp xxxxxadmin] in [/Users/myuser/git xxxxxadmin/target xxxxxadmin-1.0-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [/Users/myuser/git xxxxxadmin/src/main/webapp]
[INFO] Webapp assembled in [867 msecs]
[INFO]
[INFO] <<< gwt-maven-plugin:2.5.0:run (default-cli) # xxxxxadmin <<<
[WARNING] The artifact org.apache.commons:commons-io:jar:1.3.2 has been relocated to commons- io:commons-io:jar:1.3.2
[INFO]
[INFO] --- gwt-maven-plugin:2.5.0:run (default-cli) # xxxxxadmin ---
[INFO] create exploded Jetty webapp in /Users/myuser/git xxxxxadmin/target xxxxxadmin-1.0-SNAPSHOT
[INFO] auto discovered modules [com xxxxx.admin.gwt.portaladmin]
[ERROR] log4j:WARN No appenders could be found for logger (org.apache.jasper.compiler. JspRuntimeContext).
[ERROR] log4j:WARN Please initialize the log4j system properly.
[ERROR] log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
[INFO] ISC: Configuring log4j from: file:/Users/myuser/git xxxxxadmin/target xxxxxadmin-1.0-SNAPSHOT/ WEB-INF/classes/log4j.isc.config.xml
[INFO] === 2014-05-22 10:50:18,873 [main] INFO Logger - Logging system started.
Here is the log when I do gwt:run-codeserver
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded. SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building GWT Maven Archetype 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> gwt-maven-plugin:2.5.0:run-codeserver (default-cli) # xxxxxxadmin >>>
[WARNING] The artifact org.apache.commons:commons-io:jar:1.3.2 has been relocated to commons- io:commons-io:jar:1.3.2
[INFO]
[INFO] --- gwt-maven-plugin:2.5.0:i18n (default) # xxxxxxadmin ---
[INFO]
[INFO] --- gwt-maven-plugin:2.5.0:generateAsync (default) # xxxxxxadmin ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # xxxxxxadmin ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 883 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # xxxxxxadmin ---
[INFO] Compiling 1 source file to /Users/myuser/git/xxxxxxadmin/target/xxxxxxadmin-1.0-SNAPSHOT/WEB- INF/classes
[INFO]
[INFO] --- maven-war-plugin:2.1.1:exploded (default) # xxxxxxadmin ---
[INFO] Exploding webapp
[INFO] Assembling webapp [xxxxxxadmin] in [/Users/myuser/git/xxxxxxadmin/target/xxxxxxadmin-1.0- SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [/Users/myuser/git/xxxxxxadmin/src/main/webapp]
[INFO] Webapp assembled in [815 msecs]
[INFO]
[INFO] <<< gwt-maven-plugin:2.5.0:run-codeserver (default-cli) # xxxxxxadmin <<<
[WARNING] The artifact org.apache.commons:commons-io:jar:1.3.2 has been relocated to commons- io:commons-io:jar:1.3.2
[INFO]
[INFO] --- gwt-maven-plugin:2.5.0:run-codeserver (default-cli) # xxxxxxadmin ---
[INFO] auto discovered modules [com.xxxxxx.admin.gwt.portaladmin]
[INFO] workDir: /var/folders/g3/zr930nm51091q0wtc4j8qt1c0000gn/T/gwt-codeserver-7465083041692192607. tmp
[INFO] binding: user.agent=safari
[INFO] binding: compiler.useSourceMaps=true
[INFO] binding: locale=en
[INFO] Compiling module com.xxxxxx.admin.gwt.portaladmin
However, when I click the compile button nothing happens. In my previous setup I could see the compilation log and the page reloads once it ends.
As for the gwt:debug run, I have been unable to setup my environment as described here here.
I have run the gwt:debug maven configuration.
and the remote configuration
as per the suggestion. I do get to see the GWT Development Mode window as when I do a gwt:run, but I do not see any log information, only this
[UPDATE] I have hacked the Bookmarklet code to figure out that if I call the url
http://localhost:9876/recompile/portaladmin?__gwtDevModeSession:portaladmin
my superdevmode server responds with
[INFO] Compiling module com.xxxxx.admin.gwt.portaladmin
[INFO] Validating units:
[INFO] Ignored 80 units with compilation errors in first pass.
[INFO] Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
[INFO] Compiling 18 permutations
[INFO] Compiling permutation 0...
[INFO] Source Maps Enabled
[INFO] Compiling permutation 1...
[INFO] Source Maps Enabled
[INFO] Compiling permutation 2...
[INFO] Source Maps Enabled
[INFO] Compiling permutation 3...
[INFO] Source Maps Enabled
[INFO] Compiling permutation 4...
[INFO] Source Maps Enabled
[INFO] Compiling permutation 5...
[INFO] Source Maps Enabled
[INFO] Compiling permutation 6...
[INFO] Source Maps Enabled
[INFO] Compiling permutation 7...
[INFO] Source Maps Enabled
[INFO] Compiling permutation 8...
[INFO] Source Maps Enabled
[INFO] Compiling permutation 9...
[INFO] Source Maps Enabled
[INFO] Compiling permutation 10...
[INFO] Source Maps Enabled
[INFO] Compiling permutation 11...
[INFO] Source Maps Enabled
[INFO] Compiling permutation 12...
[INFO] Source Maps Enabled
[INFO] Compiling permutation 13...
[INFO] Source Maps Enabled
[INFO] Compiling permutation 14...
[INFO] Source Maps Enabled
[INFO] Compiling permutation 15...
[INFO] Source Maps Enabled
[INFO] Compiling permutation 16...
[INFO] Source Maps Enabled
[INFO] Compiling permutation 17...
[INFO] Source Maps Enabled
[INFO] Compile of permutations succeeded
[INFO] Linking into /var/folders/g3/zr930nm51091q0wtc4j8qt1c0000gn/T/gwt-codeserver-431669712100879679.tmp/com.xxxxxx.admin.gwt.portaladmin/compile-2/war/portaladmin; Writing extras to /var/folders/g3/zr930nm51091q0wtc4j8qt1c0000gn/T/gwt-codeserver-431669712100879679.tmp/com.xxxxxx.admin.gwt.portaladmin/compile-2/extras/portaladmin
[INFO] Link succeeded
[INFO] Compilation succeeded -- 29.577s
[INFO] Compile completed in 29782 ms
[INFO] [ERROR] invalid callback: null
So now we have isolated the error to the Bookmarklets: somehow my bookmarklets do not point to the right server or with the right parameters. Would you please help? Here is what I see when I click on the Dev Mode On bookmarklet properties:
javascript:{ window.__gwt_bookmarklet_params = {server_url:'http://localhost:9876/',module_name:'portaladmin'}; var s = document.createElement('script'); s.src = 'http://localhost:9876/dev_mode_on.js'; void(document.getElementsByTagName('head')[0].appendChild(s));}
By inspecting the calls to the server, it never gets to do a /recompile AJAX call. Somehow, something is wrong in the dev_mode_on.js file
Did you try to get rid of the log4j init problem? When your logging does not work, you often are blind. Is your WEB-INF/classes/log4j.isc.config.xml valid?

Resources