forked from phoedos/pmd
Merge branch 'toolchains'
This commit is contained in:
@ -15,7 +15,11 @@ Our latest source of PMD can be found on [GitHub]. Fork us!
|
||||
|
||||
### How to build PMD?
|
||||
|
||||
Simply use maven in the top-level directory:
|
||||
You'll need to have a `~/.m2/toolchains.xml` file setup with jdk 1.6 (for pmd 5.3.x), jdk 1.7 (for pmd 5.4.x and pmd 5.5.x)
|
||||
and jdk 1.8 (for some features in pmd 5.5.x). See [maven toolchains](https://maven.apache.org/guides/mini/guide-using-toolchains.html).
|
||||
A example file can be found here: [example-toolchains.xml](https://github.com/pmd/pmd/blob/master/example-toolchains.xml).
|
||||
|
||||
Use maven in the top-level directory:
|
||||
|
||||
mvn clean package
|
||||
|
||||
|
@ -69,15 +69,6 @@ echo "Releasing PMD"
|
||||
echo "-------------------------------------------"
|
||||
|
||||
|
||||
MVN_VERSION=$(mvn --version | grep "Java version: 1.7")
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Wrong java version!"
|
||||
echo "Expected 1.7, but was:"
|
||||
mvn --version
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
if [ "" = "$RELEASE_VERSION" ]; then
|
||||
echo -n "What is the release version of PMD? (e.g. 5.4.0) "
|
||||
read RELEASE_VERSION
|
||||
@ -87,7 +78,7 @@ if [ "" = "$DEVELOPMENT_VERSION" ]; then
|
||||
read DEVELOPMENT_VERSION
|
||||
fi
|
||||
if [ "" = "$CURRENT_BRANCH" ]; then
|
||||
echo -n "What is the branch you want to release from? (e.g. master or pmd/5.3.x) "
|
||||
echo -n "What is the branch you want to release from? (e.g. master or pmd/5.4.x or pmd/5.3.x) "
|
||||
read CURRENT_BRANCH
|
||||
fi
|
||||
|
||||
|
32
example-toolchains.xml
Normal file
32
example-toolchains.xml
Normal file
@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF8"?>
|
||||
<toolchains>
|
||||
<!-- place this file in ${user.home}/.m2/toolchains.xml -->
|
||||
|
||||
<toolchain>
|
||||
<type>jdk</type>
|
||||
<provides>
|
||||
<version>1.6</version>
|
||||
</provides>
|
||||
<configuration>
|
||||
<jdkHome>/path/to/jdk/1.6</jdkHome>
|
||||
</configuration>
|
||||
</toolchain>
|
||||
<toolchain>
|
||||
<type>jdk</type>
|
||||
<provides>
|
||||
<version>1.7</version>
|
||||
</provides>
|
||||
<configuration>
|
||||
<jdkHome>/path/to/jdk/1.7</jdkHome>
|
||||
</configuration>
|
||||
</toolchain>
|
||||
<toolchain>
|
||||
<type>jdk</type>
|
||||
<provides>
|
||||
<version>1.8</version>
|
||||
</provides>
|
||||
<configuration>
|
||||
<jdkHome>/path/to/jdk/1.8</jdkHome>
|
||||
</configuration>
|
||||
</toolchain>
|
||||
</toolchains>
|
48
pom.xml
48
pom.xml
@ -388,6 +388,25 @@
|
||||
<runOrder>alphabetical</runOrder>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-toolchains-plugin</artifactId>
|
||||
<version>1.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>toolchain</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<toolchains>
|
||||
<jdk>
|
||||
<version>${java.version}</version>
|
||||
</jdk>
|
||||
</toolchains>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
@ -563,6 +582,10 @@
|
||||
<suppressionsLocation>${checkstyle.suppressionsFile}</suppressionsLocation>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-toolchains-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
@ -941,6 +964,31 @@
|
||||
<module>pmd-scala</module>
|
||||
</modules>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>travis</id>
|
||||
<activation>
|
||||
<!-- https://github.com/travis-ci/travis-ci/issues/2727 -->
|
||||
<!-- http://docs.travis-ci.com/user/ci-environment/#Environment-variables -->
|
||||
<!-- from: https://github.com/marschall/jdeps-maven-plugin/blob/master/pom.xml -->
|
||||
<property>
|
||||
<name>env.TRAVIS</name>
|
||||
<value>true</value>
|
||||
</property>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-toolchains-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>none</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<modules>
|
||||
|
Reference in New Issue
Block a user