[Design of JBoss Build System] - Maven Version ranges - generateReleasePoms
by adrian@jboss.org
In order to capture what was actually used to build the release
you need to generate a release pom. This is a release-pom.xml that gets checked in
when you tag the release in release:perform.
| <plugin>
| <groupId>org.apache.maven.plugins</groupId>
| <artifactId>maven-release-plugin</artifactId>
| <version>2.0-beta-7</version>
| <configuration>
| <!-- The tagBase property is needed during the release process so that the maven release plugin
| - will create the tag in the appropriate svn location. If the svn location is the default
| - of "../tags" then we don't need to specify the tagBase. -->
|
| <tagBase>svn://localhost/project2/tags/</tagBase>
|
| <!-- HERE -->
|
| <generateReleasePoms>true</generateReleasePoms>
|
| <!-- We don't want to use the default release profile because it creates javadoc jars for the repo.
|
| - Since we include source jars in the repo, we don't need the javadoc jars. -->
| <useReleaseProfile>false</useReleaseProfile>
|
| <!-- The release plugin activates a custom profile called "release". -->
| <arguments>-Prelease</arguments>
| </configuration>
| <inherited>true</inherited>
| </plugin>
| </plugins>
|
I think we should do this anyway even if we don't use version ranges.
This captures all the information used to build the release including the
user's ~/.m2/settings.xml relevant to the build
e.g. you can see that during my testing I have been using some
local repositories to get artifacts.
| <?xml version="1.0" encoding="UTF-8"?><project>
| <modelVersion>4.0.0</modelVersion>
| <groupId>test</groupId>
| <artifactId>project2</artifactId>
| <name>Project2</name>
| <version>1.0.0-Beta-5</version>
| <description>Project2</description>
| <url>http://www.jboss.org/project2</url>
| <issueManagement>
| <system>jira</system>
| <url>http://jira.jboss.com/</url>
| </issueManagement>
| <licenses>
| <license>
| <name>lgpl</name>
| <url>http://repository.jboss.com/licenses/lgpl.txt</url>
| </license>
| </licenses>
| <scm>
| <connection>svn://localhost/project2/tags/project2-1.0.0-Beta-5</connection>
| <developerConnection>svn://localhost/project2/tags/project2-1.0.0-Beta-5</developerConnection>
| </scm>
| <organization>
| <name>JBoss, a division of Red Hat, Inc.</name>
| <url>http://www.jboss.org</url>
| </organization>
| <build>
| <sourceDirectory>src/main</sourceDirectory>
| <scriptSourceDirectory>src/main/scripts</scriptSourceDirectory>
| <testSourceDirectory>src/tests</testSourceDirectory>
| <outputDirectory>target/classes</outputDirectory>
| <testOutputDirectory>target/test-classes</testOutputDirectory>
| <resources>
| <resource>
| <directory>src/main/resources</directory>
| </resource>
| </resources>
| <testResources>
| <testResource>
| <directory>src/test/resources</directory>
| </testResource>
| </testResources>
| <directory>target</directory>
| <finalName>project2</finalName>
| <plugins>
| <plugin>
| <artifactId>maven-surefire-plugin</artifactId>
| <version>2.4.1</version>
| <configuration>
| <redirectTestOutputToFile>true</redirectTestOutputToFile>
| <includes>
| <include>**/*TestCase.java</include>
| </includes>
| <useSystemClassLoader>true</useSystemClassLoader>
| </configuration>
| </plugin>
| <plugin>
| <artifactId>maven-release-plugin</artifactId>
| <version>2.0-beta-7</version>
| <inherited>true</inherited>
| <configuration>
| <tagBase>svn://localhost/project2/tags/</tagBase>
| <generateReleasePoms>true</generateReleasePoms>
| <useReleaseProfile>false</useReleaseProfile>
| <arguments>-Prelease</arguments>
| </configuration>
| </plugin>
| </plugins>
| </build>
| <repositories>
| <repository>
| <releases>
| <enabled>false</enabled>
| </releases>
| <snapshots />
| <id>snapshots.jboss.org</id>
| <url>file:///home/ejort/temp/snapshots</url>
| </repository>
| <repository>
| <releases />
| <snapshots>
| <enabled>false</enabled>
| </snapshots>
| <id>repository.jboss.org</id>
| <url>http://repository.jboss.org/maven2</url>
| </repository>
| <repository>
| <releases />
| <snapshots>
| <enabled>false</enabled>
| </snapshots>
| <id>repository</id>
| <url>file:///home/ejort/temp/maven-repository</url>
| </repository>
| <repository>
| <snapshots>
| <enabled>false</enabled>
| </snapshots>
| <id>central</id>
| <name>Maven Repository Switchboard</name>
| <url>http://repo1.maven.org/maven2</url>
| </repository>
| </repositories>
| <pluginRepositories>
| <pluginRepository>
| <releases />
| <snapshots>
| <enabled>false</enabled>
| </snapshots>
| <id>repository.jboss.org</id>
| <url>http://repository.jboss.org/maven2</url>
| </pluginRepository>
| <pluginRepository>
| <releases>
| <updatePolicy>never</updatePolicy>
| </releases>
| <snapshots>
| <enabled>false</enabled>
| </snapshots>
| <id>central</id>
| <name>Maven Plugin Repository</name>
| <url>http://repo1.maven.org/maven2</url>
| </pluginRepository>
| </pluginRepositories>
| <dependencies>
| <dependency>
| <groupId>junit</groupId>
| <artifactId>junit</artifactId>
| <version>4.4</version>
| <scope>test</scope>
| </dependency>
| <dependency>
| <groupId>test</groupId>
| <artifactId>project1</artifactId>
| <version>1.0.0-Beta-1</version>
| <scope>compile</scope>
| </dependency>
| </dependencies>
| <reporting>
| <outputDirectory>target/site</outputDirectory>
| <plugins>
| <plugin>
| <artifactId>maven-javadoc-plugin</artifactId>
| <version>2.2</version>
| <configuration>
| <links>
| <link>http://java.sun.com/j2se/1.5.0/docs/api</link>
| </links>
| </configuration>
| </plugin>
| <plugin>
| <artifactId>maven-project-info-reports-plugin</artifactId>
| <version>2.0.1</version>
| </plugin>
| <plugin>
| <artifactId>maven-surefire-report-plugin</artifactId>
| <version>2.3</version>
| <reportSets>
| <reportSet>
| <reports>
| <report>report-only</report>
| </reports>
| </reportSet>
| </reportSets>
| </plugin>
| <plugin>
| <groupId>org.codehaus.mojo</groupId>
| <artifactId>taglist-maven-plugin</artifactId>
| <version>2.0</version>
| </plugin>
| </plugins>
| </reporting>
| <distributionManagement>
| <repository>
| <id>repository.jboss.org</id>
| <url>file:///home/ejort/temp/maven-repository</url>
| </repository>
| <snapshotRepository>
| <id>snapshots.jboss.org</id>
| <name>JBoss Snapshot Repository</name>
| <url>file:///home/ejort/temp/snapshots</url>
| </snapshotRepository>
| </distributionManagement>
| <properties>
| <maven.repository.root>/home/ejort/temp/maven-repository</maven.repository.root>
| <jboss.repository.root>/home/ejort/temp/repository.jboss.org</jboss.repository.root>
| </properties>
| </project>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4139822#4139822
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4139822
18 years, 2 months
[Design the new POJO MicroContainer] - Re: PropertyReplaceTC failing in maven
by adrian@jboss.org
"alesj" wrote : "adrian(a)jboss.org" wrote : What does mvn dependency:tree say is getting used?
| It still says this:
| - http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4137369#4137369
|
| I'll get a hold of Paul. ;-(
What that your maven is broken, what I posted or something else?
This is what I get. It shows classloading-vfs using MC beta11
| [INFO] snapshot org.jboss.cl:jboss-classloading:2.0.0-SNAPSHOT: checking for updates from snapshots.jboss.org
| [INFO] [dependency:tree]
| [INFO] org.jboss.cl:jboss-classloading-vfs:jar:2.0.0-SNAPSHOT
| [INFO] +- junit:junit:jar:4.4:test
| [INFO] +- org.jboss:jboss-vfs:jar:2.0.0.Beta7:compile
| [INFO] +- org.jboss.microcontainer:jboss-kernel:jar:2.0.0.Beta11:compile
| [INFO] | \- org.jboss.microcontainer:jboss-dependency:jar:2.0.0.Beta11:compile
| [INFO] | +- org.jboss:jboss-reflect:jar:2.0.0.Beta12:compile
| [INFO] | \- org.jboss:jboss-mdr:jar:2.0.0.Beta12:compile
| [INFO] +- jboss:jboss-common-logging-log4j:jar:2.0.4.GA:test
| [INFO] | \- log4j:log4j:jar:1.2.14:test
| [INFO] +- org.jboss:jboss-test:jar:1.0.5.GA:test
| [INFO] +- org.jboss.man:jboss-managed:jar:2.0.0.Beta12:compile
| [INFO] | \- org.jboss.man:jboss-metatype:jar:2.0.0.Beta12:compile
| [INFO] +- org.jboss:jbossxb:jar:2.0.0.CR7:compile
| [INFO] | +- apache-xerces:xercesImpl:jar:2.9.1:compile
| [INFO] | +- wutka-dtdparser:dtdparser121:jar:1.2.1:compile
| [INFO] | +- javax.activation:activation:jar:1.0.2:compile
| [INFO] | \- javax.xml.bind:jaxb-api:jar:2.1:compile
| [INFO] | +- javax.xml.stream:stax-api:jar:1.0-2:compile
| [INFO] | \- (javax.activation:activation:jar:1.1:compile - omitted for conflict with 1.0.2)
| [INFO] \- org.jboss.cl:jboss-classloading:jar:2.0.0-SNAPSHOT:compile
| [INFO] +- (org.jboss.microcontainer:jboss-dependency:jar:2.0.0.Beta11:compile - omitted for duplicate)
| [INFO] \- org.jboss.cl:jboss-classloader:jar:2.0.0-SNAPSHOT:compile
| [INFO] +- org.jboss:jboss-classloading-spi:jar:5.0.0.Beta4:compile
| [INFO] +- org.jboss:jboss-common-core:jar:2.2.3.GA:compile
| [INFO] \- jboss:jboss-common-logging-spi:jar:2.0.4.GA:compile
|
and all the tests pass:
| Results :
|
| Tests run: 88, Failures: 0, Errors: 0, Skipped: 0
|
| [INFO] [jar:jar]
| [INFO] Building jar: /home/ejort/jboss-cl/classloading-vfs/target/jboss-classloading-vfs.jar
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4139810#4139810
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4139810
18 years, 2 months