You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by sa...@apache.org on 2013/02/13 20:39:11 UTC

svn commit: r1445879 - /jena/trunk/jena-parent/pom.xml

Author: sallen
Date: Wed Feb 13 19:39:10 2013
New Revision: 1445879

URL: http://svn.apache.org/r1445879
Log:
Add the maven enforcer plugin to the parent POM

Modified:
    jena/trunk/jena-parent/pom.xml

Modified: jena/trunk/jena-parent/pom.xml
URL: http://svn.apache.org/viewvc/jena/trunk/jena-parent/pom.xml?rev=1445879&r1=1445878&r2=1445879&view=diff
==============================================================================
--- jena/trunk/jena-parent/pom.xml (original)
+++ jena/trunk/jena-parent/pom.xml Wed Feb 13 19:39:10 2013
@@ -16,8 +16,8 @@
    limitations under the License.
 -->
 <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/xsd/maven-4.0.0.xsd">
+     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
 
   <groupId>org.apache.jena</groupId>
@@ -67,158 +67,197 @@
 
   <!-- General dependencies for all systems -->
   <dependencies>
-     <dependency>
-       <groupId>junit</groupId>
-       <artifactId>junit</artifactId>
-       <version>${ver.junit}</version>
-       <scope>test</scope>
-     </dependency>
-
-     <dependency>
-       <groupId>org.slf4j</groupId>
-       <artifactId>slf4j-api</artifactId>
-       <version>${ver.slf4j}</version>
-     </dependency>
-     
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>${ver.junit}</version>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+      <version>${ver.slf4j}</version>
+    </dependency>
+
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-log4j12</artifactId>
       <version>${ver.slf4j}</version>
-     </dependency>
+    </dependency>
 
-     <!-- Needed because of the logging helper code -->
-     <dependency>
-       <groupId>log4j</groupId>
-       <artifactId>log4j</artifactId>
-       <version>${ver.log4j}</version>
-       <exclusions>
-	 <!-- Exclude things that don't resolve in some versions of log4j -->
-	 <exclusion>
-	   <groupId>javax.jms</groupId>
-	   <artifactId>jms</artifactId>
-	 </exclusion>
-	 <exclusion>
-	   <groupId>com.sun.jdmk</groupId>
-	   <artifactId>jmxtools</artifactId>
+    <!-- Needed because of the logging helper code -->
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+      <version>${ver.log4j}</version>
+      <exclusions>
+        <!-- Exclude things that don't resolve in some versions of log4j -->
+        <exclusion>
+          <groupId>javax.jms</groupId>
+          <artifactId>jms</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>com.sun.jdmk</groupId>
+          <artifactId>jmxtools</artifactId>
         </exclusion>
-	<exclusion>
-	  <groupId>com.sun.jmx</groupId>
-	  <artifactId>jmxri</artifactId>
+        <exclusion>
+          <groupId>com.sun.jmx</groupId>
+          <artifactId>jmxri</artifactId>
         </exclusion>
-	<exclusion>
-	  <groupId>javax.mail</groupId>
-	  <artifactId>mail</artifactId>
-	</exclusion>
-      </exclusions> 
-     </dependency>
-     
+        <exclusion>
+          <groupId>javax.mail</groupId>
+          <artifactId>mail</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+
   </dependencies>
 
   <build>
+    <!-- Run the enforcer plugin automatically at compile time -->
+<!--
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-enforcer-plugin</artifactId>
+      </plugin>
+    </plugins>
+-->
+  
     <!-- Plugin version list: http://maven.apache.org/plugins/index.html -->
     <pluginManagement>
       <plugins>
-	<plugin>
-	  <groupId>org.apache.maven.plugins</groupId>
-	  <artifactId>maven-compiler-plugin</artifactId>
-	  <version>2.5.1</version>
-	  <configuration>
-	    <encoding>UTF-8</encoding>
-	    <debug>true</debug>
-	    <debuglevel>source,lines,vars</debuglevel>
-	    <optimize>true</optimize>
-	    <source>${jdk.version}</source>
-	    <target>${jdk.version}</target>
-	  </configuration>
-	</plugin>
-
-	<plugin>
-	  <groupId>org.apache.maven.plugins</groupId>
-	  <artifactId>maven-surefire-plugin</artifactId>
-	  <version>2.12.4</version>
-	</plugin>
-	
-	<plugin>
-	  <groupId>org.apache.maven.plugins</groupId>
-	  <artifactId>maven-jar-plugin</artifactId>
-	  <version>2.4</version>
-	</plugin>
-
-	<plugin>
-	  <groupId>org.apache.maven.plugins</groupId>
-	  <artifactId>maven-source-plugin</artifactId>
-	  <version>2.2.1</version>
-	  <executions> 
-	    <execution>
-	      <id>attach-sources</id>
-	      <goals>
-		<goal>jar-no-fork</goal> 
-	      </goals>
-	    </execution>
-	    <!-- Only material in the main jar
-	    <execution>
-	      <id>attach-sources-test</id>
-	      <goals>
-		<goal>test-jar-no-fork</goal>
-	      </goals>
-	    </execution>
-	    -->
-	  </executions>
-	</plugin>
-	
-	<plugin>
-	  <groupId>org.apache.maven.plugins</groupId>
-	  <artifactId>maven-javadoc-plugin</artifactId>
-	  <version>2.9</version>
-	  <executions>
-	    <execution>
-	      <id>attach-javadocs</id>
-	      <goals>
-		<goal>jar</goal>
-	      </goals>
-	    </execution>
-	  </executions>
-	  <configuration>
-	    <version>true</version>
-	    <show>public</show>
-	    <quiet>true</quiet>
-	    <encoding>UTF-8</encoding>
-	    <windowtitle>${project.name} ${project.version}</windowtitle>
-	    <doctitle>${project.name} ${project.version}</doctitle>
-	    <bottom>Licenced under the Apache License, Version 2.0</bottom>
-	  </configuration>
-	</plugin>
-	
-	<plugin>
-	  <groupId>org.apache.maven.plugins</groupId>
-	  <artifactId>maven-resources-plugin</artifactId>
-	  <version>2.6</version>
-	  <configuration>
-	    <encoding>UTF-8</encoding>
-	  </configuration>
-	</plugin>
-
-	<plugin>
-	  <groupId>org.apache.maven.plugins</groupId>
-	  <artifactId>maven-dependency-plugin</artifactId>
-	  <version>2.5.1</version>
-	  <configuration>
-	    <overWriteReleases>false</overWriteReleases>
-	    <overWriteIfNewer>true</overWriteIfNewer>
-	  </configuration>
-	</plugin>
-	
-	<plugin>
-	  <groupId>org.apache.maven.plugins</groupId>
-	  <artifactId>maven-eclipse-plugin</artifactId>
-	  <version>2.9</version>
-	  <configuration>
-	    <!-- By default, have separate Eclipse and maven build areas -->
-	    <buildOutputDirectory>${project.build.directory}/classes-eclipse</buildOutputDirectory>
-	    <downloadSources>true</downloadSources>
-	    <downloadJavadocs>false</downloadJavadocs>
-	  </configuration>
-	</plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>2.5.1</version>
+          <configuration>
+            <encoding>UTF-8</encoding>
+            <debug>true</debug>
+            <debuglevel>source,lines,vars</debuglevel>
+            <optimize>true</optimize>
+            <source>${jdk.version}</source>
+            <target>${jdk.version}</target>
+          </configuration>
+        </plugin>
+    
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>2.12.4</version>
+        </plugin>
+        
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-jar-plugin</artifactId>
+          <version>2.4</version>
+        </plugin>
+    
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-source-plugin</artifactId>
+          <version>2.2.1</version>
+          <executions> 
+            <execution>
+              <id>attach-sources</id>
+              <goals>
+            <goal>jar-no-fork</goal> 
+              </goals>
+            </execution>
+            <!-- Only material in the main jar
+            <execution>
+              <id>attach-sources-test</id>
+              <goals>
+            <goal>test-jar-no-fork</goal>
+              </goals>
+            </execution>
+            -->
+          </executions>
+        </plugin>
+        
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-javadoc-plugin</artifactId>
+          <version>2.9</version>
+          <executions>
+            <execution>
+              <id>attach-javadocs</id>
+              <goals>
+            <goal>jar</goal>
+              </goals>
+            </execution>
+          </executions>
+          <configuration>
+            <version>true</version>
+            <show>public</show>
+            <quiet>true</quiet>
+            <encoding>UTF-8</encoding>
+            <windowtitle>${project.name} ${project.version}</windowtitle>
+            <doctitle>${project.name} ${project.version}</doctitle>
+            <bottom>Licenced under the Apache License, Version 2.0</bottom>
+          </configuration>
+        </plugin>
+        
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-resources-plugin</artifactId>
+          <version>2.6</version>
+          <configuration>
+            <encoding>UTF-8</encoding>
+          </configuration>
+        </plugin>
+    
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-dependency-plugin</artifactId>
+          <version>2.5.1</version>
+          <configuration>
+            <overWriteReleases>false</overWriteReleases>
+            <overWriteIfNewer>true</overWriteIfNewer>
+          </configuration>
+        </plugin>
+        
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-eclipse-plugin</artifactId>
+          <version>2.9</version>
+          <configuration>
+            <!-- By default, have separate Eclipse and maven build areas -->
+            <buildOutputDirectory>${project.build.directory}/classes-eclipse</buildOutputDirectory>
+            <downloadSources>true</downloadSources>
+            <downloadJavadocs>false</downloadJavadocs>
+          </configuration>
+        </plugin>
+        
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-enforcer-plugin</artifactId>
+          <version>1.2</version>
+          <executions>
+            <execution>
+              <id>enforce</id>
+              <goals>
+                <goal>enforce</goal>
+              </goals>
+            </execution>
+          </executions>
+          <configuration>
+            <rules>
+              <requirePluginVersions>
+                <message>Best practice is to always define plugin versions!</message>
+                <banLatest>true</banLatest>
+                <banRelease>true</banRelease>
+              </requirePluginVersions>
+              <requireReleaseDeps>
+                <message>No SNAPSHOT dependencies are allowed!</message>
+                <onlyWhenRelease>true</onlyWhenRelease>
+              </requireReleaseDeps>
+              <DependencyConvergence/>
+            </rules>
+            <fail>true</fail>
+          </configuration>
+        </plugin>
       
       </plugins>
     </pluginManagement>
@@ -230,55 +269,55 @@
     <plugins>
 
       <plugin>
-	<groupId>org.apache.maven.plugins</groupId>
-	<artifactId>maven-surefire-report-plugin</artifactId>
-	<version>2.9</version>
-	<configuration>
-	  <outputDirectory>${project.basedir}/target/surefire-reports-html</outputDirectory>
-	</configuration>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-report-plugin</artifactId>
+        <version>2.9</version>
+        <configuration>
+          <outputDirectory>${project.basedir}/target/surefire-reports-html</outputDirectory>
+        </configuration>
       </plugin> 
 
       <plugin>
-	<groupId>org.codehaus.mojo</groupId>
-	<artifactId>cobertura-maven-plugin</artifactId>
-	<version>2.5.1</version>
-	<configuration>
-	  <instrumentation>
-	    <ignores>
-	      <ignore>org.slf4j.*</ignore>
-	    </ignores>
-	  </instrumentation>
-	</configuration>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>cobertura-maven-plugin</artifactId>
+        <version>2.5.1</version>
+        <configuration>
+          <instrumentation>
+            <ignores>
+              <ignore>org.slf4j.*</ignore>
+            </ignores>
+          </instrumentation>
+        </configuration>
       </plugin>
 
       <plugin>
-	<groupId>org.apache.maven.plugins</groupId>
-	<artifactId>maven-checkstyle-plugin</artifactId>
-	<version>2.7</version>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <version>2.7</version>
       </plugin>
 
       <plugin>
-	<groupId>org.apache.maven.plugins</groupId>
-	<artifactId>maven-jxr-plugin</artifactId>
-	<version>2.3</version>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jxr-plugin</artifactId>
+        <version>2.3</version>
       </plugin>
 
       <plugin>
-	<groupId>org.apache.maven.plugins</groupId>
-	<artifactId>maven-pmd-plugin</artifactId>
-	<version>2.5</version>
-	<configuration>
-	  <linkXref>true</linkXref>
-	  <sourceEncoding>utf-8</sourceEncoding>
-	  <minimumTokens>100</minimumTokens>
-	  <targetJdk>1.6</targetJdk>
-	</configuration>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-pmd-plugin</artifactId>
+        <version>2.5</version>
+        <configuration>
+          <linkXref>true</linkXref>
+          <sourceEncoding>utf-8</sourceEncoding>
+          <minimumTokens>100</minimumTokens>
+          <targetJdk>1.6</targetJdk>
+        </configuration>
       </plugin>
 
       <plugin>
-	<groupId>org.codehaus.mojo</groupId>
-	<artifactId>findbugs-maven-plugin</artifactId>
-	<version>2.3.2</version>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>findbugs-maven-plugin</artifactId>
+        <version>2.3.2</version>
       </plugin>
 
     </plugins>