mirror of https://github.com/sbt/sbt.git
adding test to check if we can resolve parent-poms with -SNAPSHOTs correctly.
Test for #1616
This commit is contained in:
parent
7311242bc0
commit
eb51d671a2
|
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -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>=
|
||||
Binary file not shown.
|
|
@ -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>
|
||||
|
|
@ -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>
|
||||
|
|
@ -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>
|
||||
|
|
@ -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>=
|
||||
|
|
@ -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>
|
||||
|
|
@ -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>
|
||||
|
|
@ -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>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
> cleanExampleCache
|
||||
> update
|
||||
Loading…
Reference in New Issue