get ready to support 2.1-SNAPSHOT, but disable for now

git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@679007 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2008-07-23 07:08:49 +00:00
parent bae13cc700
commit 86b16396c2
2 changed files with 10 additions and 5 deletions

View File

@ -23,8 +23,10 @@ public class MavenITmng3652UserAgentHeader
public MavenITmng3652UserAgentHeader()
throws InvalidVersionSpecificationException
{
// TODO: fix support for this in 2.1-SNAPSHOT
// 2.0.10+
super( "(2.0.9,)" );
//super( "(2.0.9,)" );
super( "(2.0.9,2.1-SNAPSHOT)" );
}
/**
@ -75,10 +77,9 @@ public class MavenITmng3652UserAgentHeader
String os = (String) lines.get( 2 ) + " " + (String) lines.get( 3 );
String artifactVersion = (String) lines.get( 4 );
assertEquals( "Apache-Maven/" + mavenVersion + " maven-artifact/" + artifactVersion + " (Java " + javaVersion + "; " + os + ")", userAgent );
assertEquals( "Comparing User-Agent '" + userAgent + "'", "Apache-Maven/" + mavenVersion + " maven-artifact/" + artifactVersion + " (Java " + javaVersion + "; " + os + ")", userAgent );
// test webdav
cliOptions = new ArrayList();
cliOptions.add( "-DtestPort=" + port );
cliOptions.add( "-DtestProtocol=dav:http" );
@ -90,7 +91,7 @@ public class MavenITmng3652UserAgentHeader
userAgent = s.userAgent;
assertNotNull( userAgent );
assertEquals( "Apache-Maven/" + mavenVersion + " maven-artifact/" + artifactVersion + " (Java " + javaVersion + "; " + os + ")", userAgent );
assertEquals( "Comparing User-Agent '" + userAgent + "'", "Apache-Maven/" + mavenVersion + " maven-artifact/" + artifactVersion + " (Java " + javaVersion + "; " + os + ")", userAgent );
// test settings with no config
@ -106,7 +107,7 @@ public class MavenITmng3652UserAgentHeader
userAgent = s.userAgent;
assertNotNull( userAgent );
assertEquals( "Apache-Maven/" + mavenVersion + " maven-artifact/" + artifactVersion + " (Java " + javaVersion + "; " + os + ")", userAgent );
assertEquals( "Comparing User-Agent '" + userAgent + "'", "Apache-Maven/" + mavenVersion + " maven-artifact/" + artifactVersion + " (Java " + javaVersion + "; " + os + ")", userAgent );
// test settings with config

View File

@ -120,6 +120,10 @@ public class MyMojo
{
Properties properties = new Properties();
resourceAsStream = getClass().getClassLoader().getResourceAsStream( "META-INF/maven/org.apache.maven/maven-artifact/pom.properties" );
if ( resourceAsStream == null )
{
resourceAsStream = getClass().getClassLoader().getResourceAsStream( "META-INF/maven/org.apache.maven.artifact/maven-artifact/pom.properties" );
}
properties.load( resourceAsStream );
artifactVersion = properties.getProperty( "version" );