mirror of
https://github.com/apache/maven.git
synced 2025-02-28 05:39:15 +00:00
Adding resources and [commented out] new test method to apply scm inheritance checks to POMs read from a local repository...this is currently broken, as noted in MavenProject, line 291 or thereabouts, which is why the test is commented out.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@629632 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d54cf5b9bb
commit
0be649b7be
@ -59,6 +59,11 @@ protected void setUp()
|
||||
}
|
||||
}
|
||||
|
||||
protected MavenProjectBuilder getProjectBuilder()
|
||||
{
|
||||
return projectBuilder;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// Local repository
|
||||
// ----------------------------------------------------------------------
|
||||
|
@ -95,6 +95,33 @@ public void testScmInfoCalculatedCorrectlyOnChildOnlyRead()
|
||||
|
||||
assertEquals( project1.getScm().getUrl(), "http://host/viewer?path=/p0/modules/p1" );
|
||||
assertEquals( project1.getScm().getConnection(), "scm:svn:http://host/p0/modules/p1" );
|
||||
assertEquals( project1.getScm().getDeveloperConnection(), "scm:svn:https://host/p0/modules/p1" );
|
||||
assertEquals( project1.getScm().getDeveloperConnection(),
|
||||
"scm:svn:https://host/p0/modules/p1" );
|
||||
}
|
||||
|
||||
// public void testScmInfoCalculatedCorrectlyOnChildReadFromLocalRepository()
|
||||
// throws Exception
|
||||
// {
|
||||
// File localRepo = getLocalRepositoryPath();
|
||||
//
|
||||
// ArtifactFactory factory = (ArtifactFactory) lookup( ArtifactFactory.class );
|
||||
// Artifact artifact = factory.createProjectArtifact( "maven", "p1", "1.0" );
|
||||
//
|
||||
// ArtifactRepositoryFactory repoFactory = (ArtifactRepositoryFactory) lookup( ArtifactRepositoryFactory.class );
|
||||
// ArtifactRepository localArtifactRepo = repoFactory.createLocalRepository( localRepo );
|
||||
//
|
||||
// MavenProject project1 = getProjectBuilder().buildFromRepository( artifact, Collections.EMPTY_LIST, localArtifactRepo );
|
||||
//
|
||||
// System.out.println( "\n\n" );
|
||||
// System.out.println( "Child SCM URL is: " + project1.getScm().getUrl() );
|
||||
// System.out.println( "Child SCM connection is: " + project1.getScm().getConnection() );
|
||||
// System.out.println( "Child SCM developer connection is: "
|
||||
// + project1.getScm().getDeveloperConnection() );
|
||||
//
|
||||
// assertEquals( project1.getScm().getUrl(), "http://host/viewer?path=/p0/modules/p1" );
|
||||
// assertEquals( project1.getScm().getConnection(), "scm:svn:http://host/p0/modules/p1" );
|
||||
// assertEquals( project1.getScm().getDeveloperConnection(),
|
||||
// "scm:svn:https://host/p0/modules/p1" );
|
||||
// }
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,18 @@
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>maven</groupId>
|
||||
<artifactId>p0</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>1.0</version>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://host/p0</connection>
|
||||
<developerConnection>scm:svn:https://host/p0</developerConnection>
|
||||
<url>http://host/viewer?path=/p0</url>
|
||||
</scm>
|
||||
|
||||
<modules>
|
||||
<module>modules/p1</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
@ -0,0 +1,11 @@
|
||||
<project>
|
||||
<parent>
|
||||
<artifactId>p0</artifactId>
|
||||
<groupId>maven</groupId>
|
||||
<version>1.0</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>p1</artifactId>
|
||||
|
||||
</project>
|
Loading…
x
Reference in New Issue
Block a user