mirror of https://github.com/apache/maven.git
Tests wheter override of the 'central' and 'central-plugins' builtin
repositories work. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@226656 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dc719a450f
commit
d09c2affad
|
@ -0,0 +1 @@
|
|||
target/maven-it1011-1.0-SNAPSHOT.jar
|
|
@ -0,0 +1 @@
|
|||
package
|
|
@ -0,0 +1,62 @@
|
|||
+ Error stacktraces are turned on.
|
||||
[INFO] Using local copy of plugins.xml (plugin mappings) for group: 'org.apache.maven.plugins' from: /home/forge/.m2/repository/org/apache/maven/plugins/plugins.xml
|
||||
[INFO] maven-clean-plugin: resolved to version 2.0-beta-1-SNAPSHOT from local repository
|
||||
[INFO] maven-clean-plugin: using locally installed snapshot
|
||||
[INFO] maven-plugin-parent: using locally installed snapshot
|
||||
[INFO] ----------------------------------------------------------------------------
|
||||
[INFO] Building org.apache.maven:maven-it1011:jar:1.0-SNAPSHOT
|
||||
[INFO] task-segment: [clean:clean, package]
|
||||
[INFO] ----------------------------------------------------------------------------
|
||||
[INFO] [clean:clean]
|
||||
[INFO] Deleting directory /mnt/a/home/forge/work/opensource/m2/maven-core-it/it0043/target
|
||||
[INFO] maven-resources-plugin: resolved to version 2.0-beta-1-SNAPSHOT from local repository
|
||||
[INFO] maven-resources-plugin: using locally installed snapshot
|
||||
[INFO] maven-compiler-plugin: resolved to version 2.0-beta-1-SNAPSHOT from local repository
|
||||
[INFO] maven-compiler-plugin: using locally installed snapshot
|
||||
[INFO] maven-surefire-plugin: resolved to version 2.0-beta-1-SNAPSHOT from local repository
|
||||
[INFO] maven-surefire-plugin: using locally installed snapshot
|
||||
[INFO] maven-jar-plugin: resolved to version 2.0-beta-1-SNAPSHOT from local repository
|
||||
[INFO] maven-jar-plugin: using locally installed snapshot
|
||||
[INFO] maven-source-plugin: resolved to version 2.0-beta-1-SNAPSHOT from local repository
|
||||
[INFO] maven-source-plugin: using locally installed snapshot
|
||||
[INFO] maven-projecthelp-plugin: resolved to version 2.0-beta-1-SNAPSHOT from local repository
|
||||
[INFO] maven-projecthelp-plugin: using locally installed snapshot
|
||||
[INFO] [resources:resources]
|
||||
[INFO] [compiler:compile]
|
||||
[INFO] No sources to compile
|
||||
[INFO] maven-plugin-tools-api: using locally installed snapshot
|
||||
[INFO] maven-plugin-tools: using locally installed snapshot
|
||||
[INFO] maven: using locally installed snapshot
|
||||
[INFO] [projecthelp:effective-pom {execution: default}]
|
||||
[INFO] Writing effective-POM to: /mnt/a/home/forge/work/opensource/m2/maven-core-it/it0043/target/effective-pom.xml
|
||||
[INFO] [resources:testResources]
|
||||
[INFO] [compiler:testCompile]
|
||||
Compiling 1 source file to /mnt/a/home/forge/work/opensource/m2/maven-core-it/it0043/target/test-classes
|
||||
[INFO] surefire-booter: resolved to version 1.3-20050702.131742-1 from local repository
|
||||
[INFO] surefire-root: resolved to version 1.1-20050702.131441-1 from local repository
|
||||
[INFO] surefire: resolved to version 1.3-20050720.095413-5 from local repository
|
||||
[INFO] [surefire:test]
|
||||
[INFO] Setting reports dir: /mnt/a/home/forge/work/opensource/m2/maven-core-it/it0043/target/surefire-reports
|
||||
|
||||
-------------------------------------------------------
|
||||
T E S T S
|
||||
-------------------------------------------------------
|
||||
[surefire] Running RepositoryOverrideTest
|
||||
[surefire] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.003 sec
|
||||
|
||||
Results :
|
||||
[surefire] Tests run: 1, Failures: 0, Errors: 0
|
||||
|
||||
[INFO] maven-archiver: using locally installed snapshot
|
||||
[INFO] [jar:jar]
|
||||
[WARNING] JAR will be empty - no content was marked for inclusion!
|
||||
[INFO] Building jar: /mnt/a/home/forge/work/opensource/m2/maven-core-it/it0043/target/maven-it1011-1.0-SNAPSHOT.jar
|
||||
[INFO] [source:jar]
|
||||
[INFO] Not producing source bundle for a SNAPSHOT build
|
||||
[INFO] ----------------------------------------------------------------------------
|
||||
[INFO] BUILD SUCCESSFUL
|
||||
[INFO] ----------------------------------------------------------------------------
|
||||
[INFO] Total time: 2 seconds
|
||||
[INFO] Finished at: Sun Jul 31 18:00:37 CEST 2005
|
||||
[INFO] Final Memory: 3M/10M
|
||||
[INFO] ----------------------------------------------------------------------------
|
|
@ -0,0 +1,50 @@
|
|||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-it1011</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>central</id>
|
||||
<name>Empty Repository</name>
|
||||
<url>file:/tmp/emptyRepo</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>central-plugins</id>
|
||||
<name>Empty Repository</name>
|
||||
<url>file:/tmp/emptyRepo</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<artifactId>junit</artifactId>
|
||||
<groupId>junit</groupId>
|
||||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-projecthelp-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>generate-test-resources</phase>
|
||||
<goals>
|
||||
<goal>effective-pom</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<output>target/effective-pom.xml</output>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,26 @@
|
|||
import java.io.BufferedInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.FileInputStream;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class RepositoryOverrideTest extends TestCase
|
||||
{
|
||||
public void testPOM() throws Exception
|
||||
{
|
||||
|
||||
BufferedInputStream in = new BufferedInputStream( new FileInputStream("target/effective-pom.xml") );
|
||||
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
|
||||
int rd = 0;
|
||||
byte [] buffer = new byte[512];
|
||||
|
||||
while ( ( rd = in.read( buffer ) ) > 0 )
|
||||
{
|
||||
out.write( buffer, 0, rd );
|
||||
}
|
||||
|
||||
assertEquals( -1, out.toString().indexOf("repo1.maven.org") );
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue