Author: jdcasey
Date: Tue Jan 22 12:49:07 2008
New Revision: 614316

URL: http://svn.apache.org/viewvc?rev=614316&view=rev
Log:
Restore JDK 1.4 compat, and add a profile to do a strict build that enforces 
the use of JDK 1.4.

Modified:
    
maven/components/trunk/maven-project/src/main/java/org/apache/maven/realm/RealmUtils.java
    maven/components/trunk/pom.xml

Modified: 
maven/components/trunk/maven-project/src/main/java/org/apache/maven/realm/RealmUtils.java
URL: 
http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/main/java/org/apache/maven/realm/RealmUtils.java?rev=614316&r1=614315&r2=614316&view=diff
==============================================================================
--- 
maven/components/trunk/maven-project/src/main/java/org/apache/maven/realm/RealmUtils.java
 (original)
+++ 
maven/components/trunk/maven-project/src/main/java/org/apache/maven/realm/RealmUtils.java
 Tue Jan 22 12:49:07 2008
@@ -37,16 +37,16 @@
     public static String createExtensionRealmId( Artifact extensionArtifact )
     {
         return "/extensions/" + extensionArtifact.getGroupId() + ":"
-               + extensionArtifact.getArtifactId() + ":" + 
extensionArtifact.getVersion() + 
-               "/thread:" + Thread.currentThread().getId(); //add thread to 
the mix to prevent clashes in paralel execution
+               + extensionArtifact.getArtifactId() + ":" + 
extensionArtifact.getVersion() +
+               "/thread:" + Thread.currentThread().getName(); //add thread to 
the mix to prevent clashes in paralel execution
     }
 
     public static String createProjectId( String projectGroupId,
                                           String projectArtifactId,
                                           String projectVersion )
     {
-        return "/projects/" + projectGroupId + ":" + projectArtifactId + ":" + 
projectVersion + 
-               "/thread:" + Thread.currentThread().getId(); //add thread to 
the mix to prevent clashes in paralel execution
+        return "/projects/" + projectGroupId + ":" + projectArtifactId + ":" + 
projectVersion +
+               "/thread:" + Thread.currentThread().getName(); //add thread to 
the mix to prevent clashes in paralel execution
     }
 
     public static String createPluginRealmId( Plugin plugin )
@@ -87,7 +87,7 @@
         }
 
         id.append( '@' ).append( depId.toString().hashCode() )
-                .append( "/thread:" ).append( Thread.currentThread().getId() 
); //add thread to the mix to prevent clashes in paralel execution
+                .append( "/thread:" ).append( Thread.currentThread().getName() 
); //add thread to the mix to prevent clashes in paralel execution
 
         return id.toString();
     }

Modified: maven/components/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/components/trunk/pom.xml?rev=614316&r1=614315&r2=614316&view=diff
==============================================================================
--- maven/components/trunk/pom.xml (original)
+++ maven/components/trunk/pom.xml Tue Jan 22 12:49:07 2008
@@ -304,5 +304,49 @@
         <module>maven-core-it-runner</module>
       </modules>
     </profile>
+    <profile>
+      <id>strict</id>
+      <build>
+        <plugins>
+          <plugin>
+             <groupId>org.apache.maven.plugins</groupId>
+             <artifactId>maven-enforcer-plugin</artifactId>
+             <version>1.0-alpha-3</version>
+             <executions>
+               <execution>
+                 <id>enforce-jdk-14</id>
+                 <goals>
+                   <goal>enforce</goal>
+                 </goals>
+                 <configuration>
+                   <rules>
+                     <requireJavaVersion>
+                       <version>[1.3,1.5.0)</version>
+                     </requireJavaVersion>
+                   </rules>    
+                 </configuration>
+               </execution>
+             </executions>
+           </plugin>
+           <plugin>
+             <artifactId>maven-compiler-plugin</artifactId>
+             <version>2.0.2</version>
+             <configuration>
+               <source>1.4</source>
+               <target>1.4</target>
+             </configuration>
+           </plugin>
+           <plugin>
+             <groupId>org.codehaus.mojo</groupId>
+             <artifactId>aspectj-maven-plugin</artifactId>
+             <version>1.0-beta-2</version>
+             <configuration>
+               <source>1.4</source>
+               <target>1.4</target>
+             </configuration>
+           </plugin>
+        </plugins>
+      </build>
+    </profile>
   </profiles>
 </project>


Reply via email to