Details
Description
SAK-21390 purepom changes broke all the Maven 2 Jenkins build jobs.
Fix by slimming down the <distributionManagement> section in the base pom of trunk indies in order to eliminate unnecessarily overriding purepoms values. The <build> wagon extension can also be inherited so there is no need to add it.
FROM:
<distributionManagement>
<downloadUrl>http://source.sakaiproject.org/maven2/</downloadUrl>
<snapshotRepository>
<uniqueVersion>false</uniqueVersion>
<id>sakai-maven-snapshots-scp</id>
<name>Sakai snapshot Repo</name>
<url>scp://source.sakaiproject.org/var/www/html/maven2-snapshots</url>
<layout>default</layout>
</snapshotRepository>
<repository>
<uniqueVersion>false</uniqueVersion>
<id>sakai-maven2-scp</id>
<name>Sakai maven2 repository</name>
<url>scp://source.sakaiproject.org/var/www/html/maven2</url>
<layout>default</layout>
</repository>
<site>
<id>sakai-site</id>
<name>Sakai release Site</name>
<url>${url.localsite}</url>
</site>
</distributionManagement>
TO:
<distributionManagement>
<site>
<id>sakai-site</id>
<name>Sakai release Site</name>
<url>scp://source.sakaiproject.org/var/www/html/release/site/${project.version}</url>
</site>
</distributionManagement>
Get rid of the <url.localsite> property while you are it. It's redundant.
___________________________________________________________
From https://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.html
Unlike Maven 2, Maven 3 supports out of the box only http:, https: and file: as transport protocols. To use other transport protocols like scp:, the appropriate wagons have to be explicitly declared in the POM as a build extension. If the wagon in question is only used for deployment to a repository, it can alternatively be declared as a dependency of the Maven Deploy Plugin.
Therefore, for us to release using Maven3 we need to use the extension.
This has also become an issue for us in Maven 2 when using OS X 10.7. There was a repeated prompt for the password event though we are using ssh keys, the maven settings were correct, and ssh to the box works without password.
The required mods are simply:
1. Change all deployment urls to be the scpexe protocol (i.e. every url in distribution management, including the site url)
2. Add this to the <build> block:
<extensions>
<!-- Enabling the use of external ssh -->
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh-external</artifactId>
<version>2.0</version>
</extension>
</extensions>