Category Archives: Buildtools

Confusing Maven error “Can’t release project due to non released dependencies”

A confusing Maven error. During usage of the mvn release plugin this error suggests that some dependencies can not be resolved. Actual reason is that during the release proces NO snapshot versions or revering to snapshot versions is allowed.

Solution is then also to make a release of all such dependencies. Probable reason for this is that SNAPSHOT versions are mutable in nexus, release versions are not (by default).  So having no SNAPSHOT versions in your released artifact makes the file more consistent.

[INFO] Resuming release from phase 'check-dependency-snapshots'
[INFO] Checking dependencies and plugins for snapshots ...
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.408s
[INFO] Finished at: Fri Mar 01 09:30:02 CET 2013
[INFO] Final Memory: 24M/213M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.0
:prepare (default-cli) on project <artifact id>: Can't release projec
t due to non released dependencies :
[ERROR] <package>:<artifact id>:war:1
[ERROR] <package>:<artifact id>:pom:1.1.3
[ERROR] in project '<artifact id>' (<package>:<artifact id>:1.1.33-SNAPSHOT)
[ERROR] -> [Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
[ERROR] Re-run Maven using the -X switch to enable full debug logging.

GWT module may need to be recompiled

When you get a popup in GWT with the message “gwt module may need to be recompiled” then probably the *.nocache.js file is outdated.

Delete this file [in Maven it is usually placed in the directory src/main/webapp], run ‘clean package’ again and check whether the issue is fixed.

If so, this issue was caused by the fact that the *.nocache.js file that was newly generated by gwt-maven-plugin was overruled by the one you just deleted.