the versions maven plugin can help somewhat... though in this case,
perhaps not perfectly
Sent from my iPod
On 9 Dec 2008, at 14:40, Thomas Jackson <[EMAIL PROTECTED]>
wrote:
I would like some confirmation as to if my expectations as to how
the release plugin is supposed work are correct.
I expect the release plugin to change the version number in the
dependency section for snapshots when it asks me to resolve the
dependencies and I answer yes. Let me try to give you a concrete
example.....
Take the following pom.xml for
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd
">
<modelVersion>4.0.0</modelVersion>
<groupId>com.xco</groupId>
<artifactId>main-jar</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>mainjar</name>
<description>This is the main jar.</description>
<scm>
<connection>scm:svn:http://svn-server/repos/productA/trunk/main/main-jar
</connection>
<developerConnection>scm:svn:http://svn-server/repos/productA/trunk/main/main-jar
</developerConnection>
<tag>HEAD</tag>
<url>http://svn-server/websvn/listing.php?repname=repos</url>
</scm>
<dependencies>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.3.03</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.abc</groupId>
<artifactId>dependent-jar-a</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.abc</groupId>
<artifactId>dependent-jar-b</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
by running
mvn release:prepare
I would expect the pom.xml in the tagged location and in the trunk
location to look like the following after it asks me to resolve the
dependencies.
Tagged pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd
">
<modelVersion>4.0.0</modelVersion>
<groupId>com.xco</groupId>
<artifactId>main-jar</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<name>mainjar</name>
<description>This is the main jar.</description>
<scm>
<connection>scm:svn:http://svn-server/repos/productA/trunk/main/main-jar
</connection>
<developerConnection>scm:svn:http://svn-server/repos/productA/trunk/main/main-jar
</developerConnection>
<tag>HEAD</tag>
<url>http://svn-server/websvn/listing.php?repname=repos</url>
</scm>
<dependencies>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.3.03</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.abc</groupId>
<artifactId>dependent-jar-a</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.abc</groupId>
<artifactId>dependent-jar-b</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</project>
Trunk Pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd
">
<modelVersion>4.0.0</modelVersion>
<groupId>com.xco</groupId>
<artifactId>main-jar</artifactId>
<version>1.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>mainjar</name>
<description>This is the main jar.</description>
<scm>
<connection>scm:svn:http://svn-server/repos/productA/trunk/main/main-jar
</connection>
<developerConnection>scm:svn:http://svn-server/repos/productA/trunk/main/main-jar
</developerConnection>
<tag>HEAD</tag>
<url>http://svn-server/websvn/listing.php?repname=repos</url>
</scm>
<dependencies>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.3.03</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.abc</groupId>
<artifactId>dependent-jar-a</artifactId>
<version>1.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.abc</groupId>
<artifactId>dependent-jar-b</artifactId>
<version>1.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
Are my assumptions about the release plugin correct or do I have to
change the dependencies manually?
Thanks
Thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]