mirror of https://github.com/apache/maven.git
make things more friendly to non-standard settings and local-repo locations.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@612658 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c1b1ff061e
commit
e5c11f67c1
|
@ -1,4 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project>
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.apache.maven.errortest</groupId>
|
||||
<artifactId>testReportAggregatedMojoFailureException-maven-plugin</artifactId>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project>
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.apache.maven.errortest</groupId>
|
||||
<artifactId>testReportAttemptToOverrideUneditableMojoParameter-maven-plugin</artifactId>
|
||||
|
@ -8,7 +9,7 @@
|
|||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-plugin-api</artifactId>
|
||||
<version>2.1-SNAPSHOT</version>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project>
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.apache.maven.errortest</groupId>
|
||||
<artifactId>test-maven-ext-plugin</artifactId>
|
||||
|
@ -8,7 +9,7 @@
|
|||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-plugin-api</artifactId>
|
||||
<version>2.1-SNAPSHOT</version>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project>
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.apache.maven.errortest</groupId>
|
||||
<artifactId>testReportErrorFormulatingBuildPlan-maven-plugin</artifactId>
|
||||
|
@ -8,7 +9,7 @@
|
|||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-plugin-api</artifactId>
|
||||
<version>2.1-SNAPSHOT</version>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
|
|
|
@ -1,21 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project>
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.apache.maven.errortest</groupId>
|
||||
<artifactId>testReportIncompatibleMavenVersionForExtensionPlugin-maven-plugin</artifactId>
|
||||
<packaging>maven-plugin</packaging>
|
||||
<version>1</version>
|
||||
|
||||
<!--
|
||||
<!--
|
||||
<prerequisites>
|
||||
<maven>10</maven>
|
||||
</prerequisites>
|
||||
|
||||
-->
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-plugin-api</artifactId>
|
||||
<version>2.1-SNAPSHOT</version>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
|
|
|
@ -1,21 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project>
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.apache.maven.errortest</groupId>
|
||||
<artifactId>testReportIncompatibleMavenVersionForExtensionPlugin-maven-plugin</artifactId>
|
||||
<packaging>maven-plugin</packaging>
|
||||
<version>1</version>
|
||||
|
||||
<!--
|
||||
<!--
|
||||
<prerequisites>
|
||||
<maven>10</maven>
|
||||
</prerequisites>
|
||||
|
||||
-->
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-plugin-api</artifactId>
|
||||
<version>2.1-SNAPSHOT</version>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
|
|
|
@ -1,21 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project>
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.apache.maven.errortest</groupId>
|
||||
<artifactId>testReportIncompatibleMavenVersionForExtensionPlugin-maven-plugin</artifactId>
|
||||
<packaging>maven-plugin</packaging>
|
||||
<version>1</version>
|
||||
|
||||
<!--
|
||||
<!--
|
||||
<prerequisites>
|
||||
<maven>10</maven>
|
||||
</prerequisites>
|
||||
|
||||
-->
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-plugin-api</artifactId>
|
||||
<version>2.1-SNAPSHOT</version>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project>
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.apache.maven.errortest</groupId>
|
||||
<artifactId>testReportMissingRequiredMojoParameter-maven-plugin</artifactId>
|
||||
|
@ -8,7 +9,7 @@
|
|||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-plugin-api</artifactId>
|
||||
<version>2.1-SNAPSHOT</version>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project>
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.apache.maven.errortest</groupId>
|
||||
<artifactId>testReportMojoExecutionException-maven-plugin</artifactId>
|
||||
|
@ -8,7 +9,7 @@
|
|||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-plugin-api</artifactId>
|
||||
<version>2.1-SNAPSHOT</version>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
|
|
|
@ -22,6 +22,8 @@ package org.apache.maven.profiles.activation;
|
|||
import org.apache.maven.model.Activation;
|
||||
import org.apache.maven.model.Profile;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Properties;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
@ -38,21 +40,15 @@ public class FileProfileActivatorTest
|
|||
private FileProfileActivator activator = new FileProfileActivator();
|
||||
|
||||
public void testFileActivationProfile()
|
||||
throws ProfileActivationException
|
||||
throws ProfileActivationException, IOException
|
||||
{
|
||||
org.apache.maven.model.ActivationFile activationFile = new org.apache.maven.model.ActivationFile();
|
||||
|
||||
// make an educated guess at the repository location...
|
||||
String repoLocation = System.getProperty( "maven.repo.local", "${user.home}/.m2/repository" );
|
||||
|
||||
repoLocation = repoLocation.replace( '\\', '/' );
|
||||
if ( repoLocation.endsWith( "/" ) )
|
||||
{
|
||||
repoLocation = repoLocation.substring( 0, repoLocation.length() - 1 );
|
||||
}
|
||||
File tempFile = File.createTempFile( "FileProfileActivatorTest.", ".txt" );
|
||||
tempFile.deleteOnExit();
|
||||
|
||||
// Assume that junit exists
|
||||
activationFile.setExists( repoLocation + "/junit/junit/3.8.1/junit-3.8.1.jar" );
|
||||
activationFile.setExists( tempFile.getAbsolutePath() );
|
||||
|
||||
Activation fileActivation = new Activation();
|
||||
fileActivation.setFile( activationFile );
|
||||
|
|
Loading…
Reference in New Issue