adding test to check if we can resolve parent-poms with -SNAPSHOTs correctly.

Test for #1616
This commit is contained in:
Josh Suereth 2014-12-16 13:14:14 -05:00
parent 7311242bc0
commit eb51d671a2
11 changed files with 124 additions and 0 deletions

View File

@ -0,0 +1,24 @@
name := "test-parent-pom"
val localMavenRepo = file("local-repo")
val cleanExampleCache = taskKey[Unit]("Cleans the example cache.")
resolvers +=
MavenRepository("Maven2 Local Test", localMavenRepo.toURI.toString)
libraryDependencies +=
"com.example" % "example-child" % "1.0-SNAPSHOT"
version := "1.0-SNAPSHOT"
cleanExampleCache := {
ivySbt.value.withIvy(streams.value.log) { ivy =>
val cacheDir = ivy.getSettings.getDefaultRepositoryCacheBasedir
// TODO - Is this actually ok?
IO.delete(cacheDir / "com.example")
}
}

View File

@ -0,0 +1,4 @@
#NOTE: This is an internal implementation file, its format can be changed without prior notice.
#Tue Dec 16 09:06:35 EST 2014
example-child-1.0-SNAPSHOT.jar>=
example-child-1.0-SNAPSHOT.pom>=

View File

@ -0,0 +1,16 @@
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.example</groupId>
<artifactId>example-parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>com.example</groupId>
<artifactId>example-child</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
</project>

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata modelVersion="1.1.0">
<groupId>com.example</groupId>
<artifactId>example-child</artifactId>
<version>1.0-SNAPSHOT</version>
<versioning>
<snapshot>
<localCopy>true</localCopy>
</snapshot>
<lastUpdated>20141216140635</lastUpdated>
<snapshotVersions>
<snapshotVersion>
<extension>jar</extension>
<value>1.0-SNAPSHOT</value>
<updated>20141216140635</updated>
</snapshotVersion>
<snapshotVersion>
<extension>pom</extension>
<value>1.0-SNAPSHOT</value>
<updated>20141216140635</updated>
</snapshotVersion>
</snapshotVersions>
</versioning>
</metadata>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>com.example</groupId>
<artifactId>example-child</artifactId>
<versioning>
<versions>
<version>1.0-SNAPSHOT</version>
</versions>
<lastUpdated>20141216140635</lastUpdated>
</versioning>
</metadata>

View File

@ -0,0 +1,3 @@
#NOTE: This is an internal implementation file, its format can be changed without prior notice.
#Tue Dec 16 09:01:47 EST 2014
example-parent-1.0-SNAPSHOT.pom>=

View File

@ -0,0 +1,10 @@
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>example-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
</project>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata modelVersion="1.1.0">
<groupId>com.example</groupId>
<artifactId>example-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<versioning>
<snapshot>
<localCopy>true</localCopy>
</snapshot>
<lastUpdated>20141216140147</lastUpdated>
<snapshotVersions>
<snapshotVersion>
<extension>pom</extension>
<value>1.0-SNAPSHOT</value>
<updated>20141216140147</updated>
</snapshotVersion>
</snapshotVersions>
</versioning>
</metadata>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>com.example</groupId>
<artifactId>example-parent</artifactId>
<versioning>
<versions>
<version>1.0-SNAPSHOT</version>
</versions>
<lastUpdated>20141216140147</lastUpdated>
</versioning>
</metadata>

View File

@ -0,0 +1,2 @@
> cleanExampleCache
> update