start of (possible) conversion to using Maven for builds.
There are obvious advantages to moving across to Maven, and some downsides. At the moment ANT & Maven can exist side-by-side. Will shift fully across once the Maven build is on par with the ANT build, and has proven to be of benefit.
This commit is contained in:
parent
ab2656cbe7
commit
4cf555d4e6
185
pom.xml
185
pom.xml
|
|
@ -1,3 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>checkstyle</groupId>
|
||||
|
|
@ -6,16 +7,53 @@
|
|||
<packaging>jar</packaging>
|
||||
<name>Checkstyle</name>
|
||||
<url>http://checkstyle.sourceforge.net/</url>
|
||||
<inceptionYear>2001</inceptionYear>
|
||||
|
||||
<description>Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard</description>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>GNU Lesser General Public License</name>
|
||||
<url>http://www.gnu.org/licenses/lgpl.txt</url>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<scm>
|
||||
<url>https://checkstyle.svn.sourceforge.net/svnroot/checkstyle/trunk/checkstyle</url>
|
||||
</scm>
|
||||
|
||||
<mailingLists>
|
||||
<mailingList>
|
||||
<name>checkstyle-announce</name>
|
||||
<archive>https://sourceforge.net/mailarchive/forum.php?forum_name=checkstyle-announce</archive>
|
||||
<subscribe>https://lists.sourceforge.net/mailman/listinfo/checkstyle-announce</subscribe>
|
||||
<unsubscribe>https://lists.sourceforge.net/mailman/listinfo/checkstyle-announce</unsubscribe>
|
||||
</mailingList>
|
||||
<mailingList>
|
||||
<name>checkstyle-commits</name>
|
||||
<archive>https://sourceforge.net/mailarchive/forum.php?forum_name=checkstyle-commits</archive>
|
||||
<subscribe>https://lists.sourceforge.net/mailman/listinfo/checkstyle-commits</subscribe>
|
||||
<unsubscribe>https://lists.sourceforge.net/mailman/listinfo/checkstyle-commits</unsubscribe>
|
||||
</mailingList>
|
||||
<mailingList>
|
||||
<name>checkstyle-devel</name>
|
||||
<archive>https://sourceforge.net/mailarchive/forum.php?forum_name=checkstyle-devel</archive>
|
||||
<subscribe>https://lists.sourceforge.net/mailman/listinfo/checkstyle-devel</subscribe>
|
||||
<unsubscribe>https://lists.sourceforge.net/mailman/listinfo/checkstyle-devel</unsubscribe>
|
||||
</mailingList>
|
||||
<mailingList>
|
||||
<name>checkstyle-user</name>
|
||||
<archive>https://sourceforge.net/mailarchive/forum.php?forum_name=checkstyle-user</archive>
|
||||
<subscribe>https://lists.sourceforge.net/mailman/listinfo/checkstyle-user</subscribe>
|
||||
<unsubscribe>https://lists.sourceforge.net/mailman/listinfo/checkstyle-user</unsubscribe>
|
||||
</mailingList>
|
||||
</mailingLists>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<testinputs.dir>${basedir}/src/testinputs/com/puppycrawl/tools/checkstyle</testinputs.dir>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>antlr</groupId>
|
||||
|
|
@ -42,5 +80,152 @@
|
|||
<artifactId>google-collections</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.ant</groupId>
|
||||
<artifactId>ant</artifactId>
|
||||
<version>1.7.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun</groupId>
|
||||
<artifactId>tools</artifactId>
|
||||
<version>1.5.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${java.home}/../lib/tools.jar</systemPath>
|
||||
</dependency>
|
||||
|
||||
<!-- test scope stuff -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.8.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<sourceDirectory>src/checkstyle</sourceDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${basedir}/src/checkstyle</directory>
|
||||
<includes>
|
||||
<include>**/*.dtd</include>
|
||||
<include>**/*.properties</include>
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
<testSourceDirectory>src/tests</testSourceDirectory>
|
||||
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.5</source>
|
||||
<target>1.5</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
|
||||
<plugins>
|
||||
<!-- Generate the grammar -->
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>antlr-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<sourceDirectory>${basedir}/src/checkstyle/com/puppycrawl/tools/checkstyle/grammars</sourceDirectory>
|
||||
<grammars>java.g</grammars>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- Generate checkstylecompilation.properties -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<!-- version>1.3</version -->
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-checkstylecompilation.properties</id>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<propertyfile file="${project.build.outputDirectory}/checkstylecompilation.properties">
|
||||
<entry key="checkstyle.compile.version" value="${project.version}"/>
|
||||
<entry key="checkstyle.compile.timestamp" type="date" value="now" pattern="E MMMM dd yyyy, HH:mm z"/>
|
||||
</propertyfile>
|
||||
|
||||
<property name="compile_classpath" refid="maven.compile.classpath"/>
|
||||
<javadoc sourcefiles="src/checkstyle/com/puppycrawl/tools/checkstyle/api/TokenTypes.java"
|
||||
encoding="iso-8859-1"
|
||||
source="1.5"
|
||||
failonerror="yes">
|
||||
<classpath>
|
||||
<pathelement location="${project.build.outputDirectory}"/>
|
||||
<pathelement path="${compile_classpath}"/>
|
||||
</classpath>
|
||||
<doclet name="com.puppycrawl.tools.checkstyle.doclets.TokenTypesDoclet"
|
||||
path="${project.build.outputDirectory}">
|
||||
<param name="-destfile"
|
||||
value="${project.build.outputDirectory}/com/puppycrawl/tools/checkstyle/api/tokentypes.properties"
|
||||
/>
|
||||
</doclet>
|
||||
</javadoc>
|
||||
</tasks>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>ant</groupId>
|
||||
<artifactId>ant-nodeps</artifactId>
|
||||
<version>1.6.5</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<configuration>
|
||||
<xdocDirectory>${basedir}/src/xdocs</xdocDirectory>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- Used to set custom properties -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<!-- version>2.4.3</version -->
|
||||
<configuration>
|
||||
<systemProperties>
|
||||
<property>
|
||||
<name>testinputs.dir</name>
|
||||
<value>${testinputs.dir}</value>
|
||||
</property>
|
||||
</systemProperties>
|
||||
<!-- Need to fix these tests to run under Maven -->
|
||||
<excludes>
|
||||
<exclude>**/JavadocMethodCheckTest.java</exclude>
|
||||
<exclude>**/RedundantThrowsCheckTest.java</exclude>
|
||||
<exclude>**/CheckerTest.java</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,73 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project xmlns="http://maven.apache.org/DECORATION/1.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd">
|
||||
<body>
|
||||
<menu name="About">
|
||||
<item name="Checkstyle" href="index.html"/>
|
||||
</menu>
|
||||
|
||||
<menu name="Documentation">
|
||||
<item name="Release Notes" href="releasenotes.html"/>
|
||||
<item name="Configuration" href="config.html">
|
||||
<item name="Property Types" href="property_types.html"/>
|
||||
</item>
|
||||
|
||||
<item name="Running" href="running.html">
|
||||
<item name="Ant Task" href="anttask.html"/>
|
||||
<item name="Command Line" href="cmdline.html"/>
|
||||
</item>
|
||||
|
||||
<item name="Available Checks" href="availablechecks.html"/>
|
||||
<item name="Standard Checks" href="checks.html">
|
||||
<item name="Annotations" href="config_annotation.html"/>
|
||||
<item name="Block Checks" href="config_blocks.html"/>
|
||||
<item name="Class Design" href="config_design.html"/>
|
||||
<item name="Coding" href="config_coding.html"/>
|
||||
<item name="Duplicate Code" href="config_duplicates.html"/>
|
||||
<item name="Headers" href="config_header.html"/>
|
||||
<item name="Imports" href="config_imports.html"/>
|
||||
<item name="Javadoc Comments" href="config_javadoc.html"/>
|
||||
<item name="Metrics" href="config_metrics.html"/>
|
||||
<item name="Miscellaneous" href="config_misc.html"/>
|
||||
<item name="Modifiers" href="config_modifier.html"/>
|
||||
<item name="Naming Conventions" href="config_naming.html"/>
|
||||
<item name="Regexp" href="config_regexp.html"/>
|
||||
<item name="Size Violations" href="config_sizes.html"/>
|
||||
<item name="Whitespace" href="config_whitespace.html"/>
|
||||
</item>
|
||||
|
||||
<item name="Extending Checkstyle" href="extending.html">
|
||||
<item name="Writing checks" href="writingchecks.html"/>
|
||||
<item name="Writing filters" href="writingfilters.html"/>
|
||||
<item name="Writing listeners" href="writinglisteners.html"/>
|
||||
</item>
|
||||
|
||||
<item name="Javadoc" href="api/index.html"/>
|
||||
</menu>
|
||||
|
||||
<menu name="SourceForge">
|
||||
<item name="Mailing Lists"
|
||||
href="http://sourceforge.net/mail/?group_id=29721"/>
|
||||
|
||||
<item name="Bug Database"
|
||||
href="http://sourceforge.net/tracker/?atid=397078&group_id=29721&func=browse"/>
|
||||
|
||||
<item name="Feature Requests"
|
||||
href="http://sourceforge.net/tracker/?atid=397081&group_id=29721&func=browse"/>
|
||||
</menu>
|
||||
|
||||
<menu name="Developers">
|
||||
<item name="Project Page"
|
||||
href="http://sourceforge.net/projects/checkstyle"/>
|
||||
|
||||
<item name="SVN Repository"
|
||||
href="http://checkstyle.svn.sourceforge.net/viewvc/checkstyle/"/>
|
||||
|
||||
<item name="Contributing" href="contributing.html"/>
|
||||
</menu>
|
||||
|
||||
<menu ref="reports"/>
|
||||
</body>
|
||||
</project>
|
||||
Loading…
Reference in New Issue