Author: bimargulies
Date: Sun Apr 5 11:25:21 2009
New Revision: 762072
URL: http://svn.apache.org/viewvc?rev=762072&view=rev
Log:
turn on checkstyle in the build.
Modified:
webservices/commons/trunk/modules/XmlSchema/pom.xml
Modified: webservices/commons/trunk/modules/XmlSchema/pom.xml
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/pom.xml?rev=762072&r1=762071&r2=762072&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/pom.xml (original)
+++ webservices/commons/trunk/modules/XmlSchema/pom.xml Sun Apr 5 11:25:21 2009
@@ -57,7 +57,7 @@
<url>http://www.apache.org/</url>
</organization>
<build>
- <!-- adding relevant resources to the jar files -->
+<!-- adding relevant resources to the jar files -->
<resources>
<resource>
<directory>src/main/resources</directory>
@@ -71,54 +71,54 @@
</testResources>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-eclipse-plugin</artifactId>
- <version>2.5.1</version>
- <configuration>
- <outputDirectory>${eclipse.outputDirectory}</outputDirectory>
- <buildcommands>
-
<java.lang.String>org.eclipse.jdt.core.javabuilder</java.lang.String>
-
<java.lang.String>com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder</java.lang.String>
-
<java.lang.String>net.sourceforge.pmd.eclipse.plugin.pmdBuilder</java.lang.String>
- </buildcommands>
- <projectnatures>
- <nature>org.eclipse.jdt.core.javanature</nature>
-
<nature>com.atlassw.tools.eclipse.checkstyle.CheckstyleNature</nature>
- <nature>net.sourceforge.pmd.eclipse.plugin.pmdNature</nature>
- </projectnatures>
- <additionalConfig>
- <file>
- <name>.checkstyle</name>
- <location>etc/xmlschema-eclipse-checkstyle</location>
- </file>
- <file>
- <name>.pmd</name>
- <location>etc/xmlschema-eclipse-pmd</location>
- </file>
- <file>
- <name>.ruleset</name>
- <location>etc/xmlschema-pmd-ruleset.xml</location>
- </file>
- </additionalConfig>
- </configuration>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <version>2.5.1</version>
+ <configuration>
+ <outputDirectory>${eclipse.outputDirectory}</outputDirectory>
+ <buildcommands>
+
<java.lang.String>org.eclipse.jdt.core.javabuilder</java.lang.String>
+
<java.lang.String>com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder</java.lang.String>
+
<java.lang.String>net.sourceforge.pmd.eclipse.plugin.pmdBuilder</java.lang.String>
+ </buildcommands>
+ <projectnatures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+
<nature>com.atlassw.tools.eclipse.checkstyle.CheckstyleNature</nature>
+ <nature>net.sourceforge.pmd.eclipse.plugin.pmdNature</nature>
+ </projectnatures>
+ <additionalConfig>
+ <file>
+ <name>.checkstyle</name>
+ <location>etc/xmlschema-eclipse-checkstyle</location>
+ </file>
+ <file>
+ <name>.pmd</name>
+ <location>etc/xmlschema-eclipse-pmd</location>
+ </file>
+ <file>
+ <name>.ruleset</name>
+ <location>etc/xmlschema-pmd-ruleset.xml</location>
+ </file>
+ </additionalConfig>
+ </configuration>
</plugin>
- <plugin>
+ <plugin>
<artifactId>maven-remote-resources-plugin</artifactId>
<version>1.0</version>
<executions>
- <execution>
- <goals>
- <goal>process</goal>
- </goals>
- <configuration>
- <resourceBundles>
-
<resourceBundle>org.apache:apache-jar-resource-bundle:1.4</resourceBundle>
- </resourceBundles>
- <properties>
- <projectName>Apache WebServices -
XmlSchema</projectName>
- </properties>
- </configuration>
- </execution>
+ <execution>
+ <goals>
+ <goal>process</goal>
+ </goals>
+ <configuration>
+ <resourceBundles>
+
<resourceBundle>org.apache:apache-jar-resource-bundle:1.4</resourceBundle>
+ </resourceBundles>
+ <properties>
+ <projectName>Apache WebServices - XmlSchema</projectName>
+ </properties>
+ </configuration>
+ </execution>
</executions>
</plugin>
</plugins>
@@ -154,52 +154,51 @@
<configuration>
<source>1.5</source>
<target>1.5</target>
- </configuration>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>2.2</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-velocity</artifactId>
+ <version>1.1.3</version>
+ <exclusions>
+ <exclusion>
+<!-- Use the version specified by checkstyle:checkstyle instead -->
+ <artifactId>commons-collections</artifactId>
+ <groupId>commons-collections</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>plexus-utils</artifactId>
+ <groupId>plexus</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <encoding>UTF-8</encoding>
+ </configuration>
+ <executions>
+ <execution>
+ <id>validate</id>
+ <phase>validate</phase>
+ <configuration>
+ <configLocation>etc/xmlschema-checkstyle.xml</configLocation>
+ <consoleOutput>true</consoleOutput>
+ <failsOnError>true</failsOnError>
+ <linkXRef>false</linkXRef>
+
<suppressionsLocation>etc/xmlschema-checkstyle-suppressions.xml</suppressionsLocation>
+ <sourceDirectory>${basedir}/src</sourceDirectory>
+ </configuration>
+ <goals>
+ <goal>checkstyle</goal>
+ </goals>
+ </execution>
+ </executions>
</plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <version>2.2</version>
- <dependencies>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-velocity</artifactId>
- <version>1.1.3</version>
- <exclusions>
- <exclusion>
- <!-- Use the version specified by
checkstyle:checkstyle instead -->
-
<artifactId>commons-collections</artifactId>
- <groupId>commons-collections</groupId>
- </exclusion>
- <exclusion>
- <artifactId>plexus-utils</artifactId>
- <groupId>plexus</groupId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
- <configuration>
- <encoding>UTF-8</encoding>
- </configuration>
- <executions>
- <execution>
- <id>validate</id>
- <phase>validate</phase>
- <configuration>
-
<configLocation>etc/xmlschema-checkstyle.xml</configLocation>
- <consoleOutput>true</consoleOutput>
- <failsOnError>true</failsOnError>
- <linkXRef>false</linkXRef>
-
<suppressionsLocation>etc/xmlschema-checkstyle-suppressions.xml</suppressionsLocation>
-
<sourceDirectory>${basedir}/src</sourceDirectory>
- </configuration>
- <goals>
- <goal>checkstyle</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
@@ -218,16 +217,16 @@
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
- <executions>
- <execution>
- <id>site</id>
- <phase>package</phase>
- <goals>
- <goal>site</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
+ <executions>
+ <execution>
+ <id>site</id>
+ <phase>package</phase>
+ <goals>
+ <goal>site</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
@@ -250,7 +249,7 @@
<activation>
<property>
<name>release</name>
- <value />
+ <value/>
</property>
</activation>
<build>
@@ -400,117 +399,136 @@
</plugins>
</build>
</profile>
-
<profile>
<id>setup.eclipse</id>
<properties>
- <eclipse.workspace.dir>${basedir}/../workspace</eclipse.workspace.dir>
+ <eclipse.workspace.dir>${basedir}/../workspace</eclipse.workspace.dir>
</properties>
<build>
- <defaultGoal>process-test-sources</defaultGoal>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-eclipse-plugin</artifactId>
- <inherited>false</inherited>
- <executions>
- <execution>
- <id>setup.eclipse.workspace</id>
- <phase>process-test-sources</phase>
- <goals>
- <goal>configure-workspace</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <workspace>${eclipse.workspace.dir}</workspace>
-
<workspaceCodeStylesURL>file:${basedir}/etc/eclipse/XmlSchemaCodeFormatter.xml</workspaceCodeStylesURL>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <inherited>false</inherited>
- <dependencies>
- <dependency>
- <groupId>ant</groupId>
- <artifactId>ant-nodeps</artifactId>
- <version>1.6.5</version>
- </dependency>
- <dependency>
- <groupId>ant</groupId>
- <artifactId>ant-trax</artifactId>
- <version>1.6.5</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>setup.workspace</id>
- <phase>validate</phase>
- <configuration>
- <tasks>
- <path id="ecp.ws.path" location="${eclipse.workspace.dir}"
/>
- <property name="full.eclipse.workspace" refid="ecp.ws.path"
/>
- <property name="checkstyle.url"
location="etc/xmlschema-checkstyle.xml"/>
-
- <mkdir
dir="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings"
/>
- <mkdir
dir="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle"
/>
- <mkdir
dir="${full.eclipse.workspace}/.metadata/.plugins/net.sourceforge.pmd.eclipse"
/>
-
- <get src="file:${checkstyle.url}"
dest="${full.eclipse.workspace}/xmlschema-checkstyle.xml" />
-
- <!-- Add checkstyle config -->
- <copy
file="${basedir}/etc/eclipse/template.checkstyle-config.xml"
tofile="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml"
overwrite="no">
- <filterset>
- <filter token="CHECKSTYLE_CONFIG_FILE"
value="${full.eclipse.workspace}/xmlschema-checkstyle.xml" />
- </filterset>
- </copy>
- <xslt style="${basedir}/etc/eclipse/addcheckstyle.xsl"
in="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml"
out="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml.new">
- <param name="checkstyleconfig"
expression="${full.eclipse.workspace}/xmlschema-checkstyle.xml" />
- </xslt>
- <copy
file="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml.new"
tofile="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml"
overwrite="yes" />
-
-
- <!-- Add warning flags that we want -->
- <propertyfile
file="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs">
- <entry
key="org.eclipse.jdt.core.compiler.problem.missingSerialVersion" value="ignore"
/>
- <entry
key="org.eclipse.jdt.core.compiler.problem.unusedImport" value="ignore" />
- <entry
key="org.eclipse.jdt.core.compiler.problem.annotationSuperInterface"
value="ignore" />
- <entry
key="org.eclipse.jdt.core.compiler.problem.rawTypeReference" value="ignore" />
- </propertyfile>
- <!-- Add code format rules -->
- <loadfile property="eclipse.code.cleanup"
srcFile="${basedir}/etc/eclipse/XmlSchemaCleanUp.xml" />
- <loadfile property="eclipse.code.templates"
srcFile="${basedir}/etc/eclipse/codetemplates.xml" />
- <loadfile property="eclipse.xml.templates"
srcFile="${basedir}/etc/eclipse/xmltemplates.xml" />
- <propertyfile
file="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs">
- <entry key="cleanup_profile" value="XmlSchema" />
- <entry key="org.eclipse.jdt.ui.cleanupprofiles"
value="${eclipse.code.cleanup}" />
- <entry
key="org.eclipse.jdt.ui.text.custom_code_templates"
value="${eclipse.code.templates}" />
-
- <!-- Add import order -->
- <entry key="org.eclipse.jdt.ui.importorder"
value="java;javax;org.w3c;org.xml;org.junit;#org.junit" />
- <!-- Sort order -->
- <entry key="org.eclipse.jdt.ui.visibility.order"
value="B,R,D,V," />
- <entry key="outlinesortoption"
value="T,SF,F,SI,I,C,SM,M," />
- <entry key="org.eclipse.jdt.ui.enable.visibility.order"
value="true" />
- </propertyfile>
- <propertyfile
file="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.xml.ui.prefs">
- <entry key="eclipse.preferences.version" value="1" />
- <entry key="org.eclipse.wst.sse.ui.custom_templates"
value="${eclipse.xml.templates}" />
- </propertyfile>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
+ <defaultGoal>process-test-sources</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <inherited>false</inherited>
+ <executions>
+ <execution>
+ <id>setup.eclipse.workspace</id>
+ <phase>process-test-sources</phase>
+ <goals>
+ <goal>configure-workspace</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <workspace>${eclipse.workspace.dir}</workspace>
+
<workspaceCodeStylesURL>file:${basedir}/etc/eclipse/XmlSchemaCodeFormatter.xml</workspaceCodeStylesURL>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <inherited>false</inherited>
+ <dependencies>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-nodeps</artifactId>
+ <version>1.6.5</version>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-trax</artifactId>
+ <version>1.6.5</version>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <id>setup.workspace</id>
+ <phase>validate</phase>
+ <configuration>
+ <tasks>
+ <path id="ecp.ws.path"
location="${eclipse.workspace.dir}"/>
+ <property name="full.eclipse.workspace"
refid="ecp.ws.path"/>
+ <property name="checkstyle.url"
location="etc/xmlschema-checkstyle.xml"/>
+ <mkdir
dir="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings"/>
+ <mkdir
dir="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle"/>
+ <mkdir
dir="${full.eclipse.workspace}/.metadata/.plugins/net.sourceforge.pmd.eclipse"/>
+ <get src="file:${checkstyle.url}"
dest="${full.eclipse.workspace}/xmlschema-checkstyle.xml"/>
+<!-- Add checkstyle config -->
+ <copy
file="${basedir}/etc/eclipse/template.checkstyle-config.xml"
tofile="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml"
overwrite="no">
+ <filterset>
+ <filter token="CHECKSTYLE_CONFIG_FILE"
value="${full.eclipse.workspace}/xmlschema-checkstyle.xml"/>
+ </filterset>
+ </copy>
+ <xslt style="${basedir}/etc/eclipse/addcheckstyle.xsl"
in="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml"
out="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml.new">
+ <param name="checkstyleconfig"
expression="${full.eclipse.workspace}/xmlschema-checkstyle.xml"/>
+ </xslt>
+ <copy
file="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml.new"
tofile="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml"
overwrite="yes"/>
+<!-- Add warning flags that we want -->
+ <propertyfile
file="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs">
+ <entry
key="org.eclipse.jdt.core.compiler.problem.missingSerialVersion"
value="ignore"/>
+ <entry
key="org.eclipse.jdt.core.compiler.problem.unusedImport" value="ignore"/>
+ <entry
key="org.eclipse.jdt.core.compiler.problem.annotationSuperInterface"
value="ignore"/>
+ <entry
key="org.eclipse.jdt.core.compiler.problem.rawTypeReference" value="ignore"/>
+ </propertyfile>
+<!-- Add code format rules -->
+ <loadfile property="eclipse.code.cleanup"
srcFile="${basedir}/etc/eclipse/XmlSchemaCleanUp.xml"/>
+ <loadfile property="eclipse.code.templates"
srcFile="${basedir}/etc/eclipse/codetemplates.xml"/>
+ <loadfile property="eclipse.xml.templates"
srcFile="${basedir}/etc/eclipse/xmltemplates.xml"/>
+ <propertyfile
file="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs">
+ <entry key="cleanup_profile" value="XmlSchema"/>
+ <entry key="org.eclipse.jdt.ui.cleanupprofiles"
value="${eclipse.code.cleanup}"/>
+ <entry
key="org.eclipse.jdt.ui.text.custom_code_templates"
value="${eclipse.code.templates}"/>
+<!-- Add import order -->
+ <entry key="org.eclipse.jdt.ui.importorder"
value="java;javax;org.w3c;org.xml;org.junit;#org.junit"/>
+<!-- Sort order -->
+ <entry key="org.eclipse.jdt.ui.visibility.order"
value="B,R,D,V,"/>
+ <entry key="outlinesortoption"
value="T,SF,F,SI,I,C,SM,M,"/>
+ <entry key="org.eclipse.jdt.ui.enable.visibility.order"
value="true"/>
+ </propertyfile>
+ <propertyfile
file="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.xml.ui.prefs">
+ <entry key="eclipse.preferences.version" value="1"/>
+ <entry key="org.eclipse.wst.sse.ui.custom_templates"
value="${eclipse.xml.templates}"/>
+ </propertyfile>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>sourcecheck</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <showDeprecation>true</showDeprecation>
+ <showWarnings>true</showWarnings>
+ <compilerArgument>${compile.flags}</compilerArgument>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
+ </plugins>
</build>
</profile>
</profiles>
-
<pluginRepositories>
<pluginRepository>
<id>snapshot</id>