This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit 513b3031529d1b2663aa6cafd62db780272e7830
tree 1ae252a47c3098e531930bb2c0a2a883fa64a057
parent e3c49179b3bf421b9f5574399b857a77829c0787
tree 1ae252a47c3098e531930bb2c0a2a883fa64a057
parent e3c49179b3bf421b9f5574399b857a77829c0787
| name | age | message | |
|---|---|---|---|
| |
.gitignore | ||
| |
README.textile | ||
| |
pom.xml | ||
| |
src/ |
README.textile
Description:
A need arose to test mvn releases without actually tagging and pushing artifacts to any “official” repository. Due to a bug in the maven release plugin it’s not possible to use properties in the scm information. This plugin will allow you to keep the same hostnames in the scm and distributionManagement tags, but pull a switch-a-roo with some hosts file magic.
Usage:
Given the following in your pom…
<scm>
<connection>scm:svn:http://svnhost/trunk</connection>
</scm>
<distributionManagement>
<repository>
<id>releases</id>
<url>http://mvnhost:8081/nexus/content/repositories/releases</url>
</repository>
</distributionManagement>
add the plugin repository…
<pluginRepositories>
<pluginRepository>
<id>darrinholst</id>
<url>http://darrinholst-maven.googlecode.com/svn/repo/</url>
</pluginRepository>
</pluginRepositories>
and then add the plugin (most likely to a profile) which is bound to some phase that will get executed before the release, i.e. clean
<profiles>
<profile>
<id>local-deploy</id>
<build>
<plugins>
<plugin>
<groupId>com.darrinholst</groupId>
<artifactId>hosts-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<phase>clean</phase>
<goals>
<goal>switch</goal>
</goals>
<configuration>
<hosts>
<svnhost>127.0.0.1</svnhost>
<mvnhost>127.0.0.1</mvnhost>
</hosts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
then when you execute…
mvn clean release:prepare release:perform -P local-deploy
…any traffic going to svnhost or mvnhost will head on over to 127.0.0.1








