Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mvn package recompiles GWT client module on unchanged sources #6

Closed
OliverO2 opened this issue Jun 10, 2013 · 2 comments
Closed

mvn package recompiles GWT client module on unchanged sources #6

OliverO2 opened this issue Jun 10, 2013 · 2 comments

Comments

@OliverO2
Copy link

The problem can be reproduced using the e2e integration test (as of last commit eeaba17):

When running mvn package successively on the e2e project generated in "target/it-tests", the client module is always recompiled, although the sources do not change:

[INFO] ------------------------------------------------------------------------
[INFO] Building e2e-client 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- gwt-maven-plugin:1.0-SNAPSHOT:enforce-encoding (default-enforce-encoding) @ e2e-client ---
[INFO]
[INFO] --- gwt-maven-plugin:1.0-SNAPSHOT:add-super-sources (default-add-super-sources) @ e2e-client ---
[INFO]
[INFO] --- gwt-maven-plugin:1.0-SNAPSHOT:add-test-super-sources (default-add-test-super-sources) @ e2e-client ---
[INFO]
[INFO] --- gwt-maven-plugin:1.0-SNAPSHOT:import-sources (default-import-sources) @ e2e-client ---
[INFO]
[INFO] --- gwt-maven-plugin:1.0-SNAPSHOT:generate-module (default-generate-module) @ e2e-client ---
[INFO] Module is up to date; skipping.
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ e2e-client ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/oliver/Repositories/External/gwt-maven-plugin/target/it-tests/e2e/e2e-client/src/main/resources
[INFO] skip non existing resourceDirectory /home/oliver/Repositories/External/gwt-maven-plugin/target/it-tests/e2e/e2e-client/src/main/super
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ e2e-client ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- gwt-maven-plugin:1.0-SNAPSHOT:import-test-sources (default-import-test-sources) @ e2e-client ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ e2e-client ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/oliver/Repositories/External/gwt-maven-plugin/target/it-tests/e2e/e2e-client/src/test/resources
[INFO] skip non existing resourceDirectory /home/oliver/Repositories/External/gwt-maven-plugin/target/it-tests/e2e/e2e-client/src/test/super
[INFO] skip non existing resourceDirectory /home/oliver/Repositories/External/gwt-maven-plugin/target/it-tests/e2e/e2e-client/src/test/java
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ e2e-client ---
[INFO] No sources to compile
[INFO]
[INFO] --- gwt-maven-plugin:1.0-SNAPSHOT:test (default-test) @ e2e-client ---
[INFO]
[INFO] --- gwt-maven-plugin:1.0-SNAPSHOT:compile (default-compile) @ e2e-client ---
[INFO] Compiling module it.test.E2E
[INFO] Ignored 3 units with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
[INFO] Compiling 6 permutations
[INFO] Compiling permutation 3...
[INFO] Compiling permutation 0...
[INFO] Compiling permutation 2...
[INFO] Compiling permutation 1...
[INFO] Compiling permutation 4...
[INFO] Compiling permutation 5...
[INFO] Compile of permutations succeeded
[INFO] Link succeeded
[INFO] Compilation succeeded -- 2,409s
[INFO]
[INFO] --- gwt-maven-plugin:1.0-SNAPSHOT:package-app (default-package-app) @ e2e-client ---
[INFO] Building war: /home/oliver/Repositories/External/gwt-maven-plugin/target/it-tests/e2e/e2e-client/target/e2e-client-1.0.war

@tbroyer
Copy link
Owner

tbroyer commented Jun 10, 2013

Ha, the culprit is generate-module.

As a workaround, you can provide your own complete module in src/main/resources and set <skipModule>true</skipModule> to disable the goal. The drawback is that you won't have the <inherits/> generated from your (compatible) Maven dependencies.

@OliverO2
Copy link
Author

I can confirm that the workaround works.

tbroyer added a commit that referenced this issue Jul 22, 2013
It turns out BuildCOntext#newFileOutputStream does *not* do an internal
check before writing, as I assumed it would.

Fixes #6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants