Restore JDK 1.4 compat, and add a profile to do a strict build that enforces the use of JDK 1.4.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@614316 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2008-01-22 20:49:07 +00:00
parent d818cc018b
commit 0cee304d37
2 changed files with 49 additions and 5 deletions

View File

@ -37,16 +37,16 @@ public final class RealmUtils
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 @@ public final class RealmUtils
}
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();
}

44
pom.xml
View File

@ -304,5 +304,49 @@ under the License.
<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>