Monthly Archives: March 2013

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.

Jira and a Reverse proxy

You might have a similar issue: when you want to install Jira, the default port for web servers (80) is already occupied.  Therefore you have to install Jira under a less common port. Due to company restrictions this port might be blocked due to safety reasons.

Solution: setup a reverse proxy. In this example we have Jira running on <example ip>:9004 which we want to make available through http://atlassian.<example>.com/jira

First step is to configure the base url in Jira (“Administration” -> “General Configuration”) to the value of “http://atlassian.<example>.com/jira”

Second step is to configure the apache server [httpd.conf]

LoadModule proxy_http_module /usr/lib/apache2/modules/
LoadModule headers_module /usr/lib/apache2/modules/

ProxyPass /jira http://<example ip>:9004/jira
ProxyPassReverse /jira http://<example ip>:9004/jira

Step 3 is to restart the apache server

Now you will see that most functionality of Jira is already available through “http://atlassian.<example>.com/jira”. For example gadgets will not work yet because of the REST interface. Now the following error will be given

com.atlassian.gadgets.dashboard.internal.diagnostics.UrlHostnameMismatchException: Detected URL hostname, '<example ip>', does not match expected hostname, 'atlassian.<example>.nl'
	at com.atlassian.gadgets.dashboard.internal.diagnostics.Diagnostics.checkExpectedHostname(
	at com.atlassian.gadgets.dashboard.internal.diagnostics.Diagnostics.check(
	at com.atlassian.gadgets.dashboard.internal.diagnostics.DiagnosticsServlet.executeDiagnostics(
	at com.atlassian.gadgets.dashboard.internal.diagnostics.DiagnosticsServlet.doPost(
	at javax.servlet.http.HttpServlet.service(
	at javax.servlet.http.HttpServlet.service(
	at com.atlassian.plugin.servlet.DelegatingPluginServlet.service(
	at javax.servlet.http.HttpServlet.service(
	at com.atlassian.plugin.servlet.ServletModuleContainerServlet.service(
	at javax.servlet.http.HttpServlet.service(
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(

To fix this, one additional step needs to be performed.

Step 4 is to change <jira installation directory>\conf\server.xml in which to add the proxyName and proxyPort attribute

<Connector port="9004" proxyName="" proxyPort="80"

and set the path to the value of “jira”

<Context path="/jira" docBase="${catalina.home}/atlassian-jira" reloadable="false" useHttpOnly="true">

Step 5 – the final one – is to restart Jira