Issues
502 on mvn release:perform
for a war
file.
Cannot release a large artifact using mvn release:perform
:
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error deploying artifact: Failed to transfer file: http://mycompany.com/nexus/content/repositories/releases/uk/co/mycompany/client/webapp/1.0/myapp_webapp-1.0.war. Return code is: 502
Looking in the apache logs (logs/error.log
):
[Sat Oct 18 10:52:47 2008] [error] [client 82.153.174.220] proxy: error reading status line from remote server localhost
[Sat Oct 18 10:52:47 2008] [error] [client 82.153.174.220] proxy: Error reading from remote server returned by /nexus/content/repositories/releases/uk/co/mycompany/client/webapp/1.0/myapp_webapp-1.0.war
Tried adding
ProxyPassReverse /nexus http://localhost:8081/nexus/
to the apache configuration file (conf/httpd.conf
):Did not help.
ref entry on cherrypy-users mailing list. Tried adding the following to
conf/httpd.conf
:SetEnv force-proxy-request-1.0 1 SetEnv proxy-nokeepalive 1
Did not help.
Just thinking… do we want to deploy a 27605K
war
file to our Maven repository? This guy, James Lorenzen, typically doesn’t run themvn release:perform
goal.Discussed with James:
We agree, we probably don’t want to deploy the
war
files onto the Maven repository. We only need to deployjar
files which are used by other modules (i.e. dependencies).Have a look at the options for the apache proxy modules.
Have a look at the Nexus properties files. Might be some options for maximum upload size.
Group
I couldn’t add a repository to the Public Repositories group (when I clicked on Refresh in the Repository Groups screen, the repository moved back from Ordered Group Repositories to Available Repositories.
To solve the problem, I logged onto the server and edited the
sonatype-work/nexus/conf/nexus.xml
file, adding my repository in:
<repositoryGroups>
<repositoryGroup>
<groupId>public-snapshots</groupId>
<name>Public Snapshot Repositories</name>
<type>maven2</type>
<repositories>
<repository>apache-snapshots</repository>
<repository>codehaus-snapshots</repository>
</repositories>
</repositoryGroup>
<repositoryGroup>
<groupId>public</groupId>
<name>Public Repositories</name>
<type>maven2</type>
<repositories>
<repository>releases</repository>
<repository>snapshots</repository>
<repository>thirdparty</repository>
<repository>central</repository>
<repository>java.net-maven-2</repository>
<repository>jasig-cas</repository>
<repository>ops4j</repository>
</repositories>
</repositoryGroup>
</repositoryGroups>
…I re-started the server and all was well…