-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test project to demonstrate jgit buildtimestamp provider bug
Change-Id: Ied249d882fc5cb3233dc55c5b485f6a7762436ec
- Loading branch information
1 parent
b11b0c4
commit 90a3a61
Showing
5 changed files
with
129 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
tycho-its/projects/pomDependencyConsider.buildtimestamp.jgit/feature/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bin.includes = feature.xml |
26 changes: 26 additions & 0 deletions
26
tycho-its/projects/pomDependencyConsider.buildtimestamp.jgit/feature/feature.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<feature | ||
id="feature" | ||
label="Feature" | ||
version="0.0.1.qualifier"> | ||
|
||
<description url="http://www.example.com/description"> | ||
[Enter Feature Description here.] | ||
</description> | ||
|
||
<copyright url="http://www.example.com/copyright"> | ||
[Enter Copyright Description here.] | ||
</copyright> | ||
|
||
<license url="http://www.example.com/license"> | ||
[Enter License Description here.] | ||
</license> | ||
|
||
<plugin | ||
id="com.google.guava" | ||
download-size="0" | ||
install-size="0" | ||
version="0.0.0" | ||
unpack="false"/> | ||
|
||
</feature> |
11 changes: 11 additions & 0 deletions
11
tycho-its/projects/pomDependencyConsider.buildtimestamp.jgit/feature/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>pomDependencyConsider.buildtimestamp.jgit</groupId> | ||
<artifactId>parent</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>feature</artifactId> | ||
<packaging>eclipse-feature</packaging> | ||
</project> |
71 changes: 71 additions & 0 deletions
71
tycho-its/projects/pomDependencyConsider.buildtimestamp.jgit/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<project> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>pomDependencyConsider.buildtimestamp.jgit</groupId> | ||
<artifactId>parent</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<packaging>pom</packaging> | ||
|
||
<properties> | ||
<buildtimestamp.jgit.group>org.eclipse.tycho</buildtimestamp.jgit.group> | ||
<tycho-version>3.1.0-SNAPSHOT</tycho-version> | ||
</properties> | ||
|
||
<modules> | ||
<module>feature</module> | ||
</modules> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.google.guava</groupId> | ||
<artifactId>guava</artifactId> | ||
<version>30.0-jre</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.eclipse.tycho</groupId> | ||
<artifactId>tycho-maven-plugin</artifactId> | ||
<version>${tycho-version}</version> | ||
<extensions>true</extensions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.eclipse.tycho</groupId> | ||
<artifactId>target-platform-configuration</artifactId> | ||
<version>${tycho-version}</version> | ||
<configuration> | ||
<pomDependencies>consider</pomDependencies> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.eclipse.tycho</groupId> | ||
<artifactId>tycho-packaging-plugin</artifactId> | ||
<version>${tycho-version}</version> | ||
<dependencies> | ||
<dependency> | ||
<groupId>${buildtimestamp.jgit.group}</groupId> | ||
<artifactId>tycho-buildtimestamp-jgit</artifactId> | ||
<version>${tycho-version}</version> | ||
</dependency> | ||
</dependencies> | ||
<configuration> | ||
<timestampProvider>jgit</timestampProvider> | ||
<jgit.dirtyWorkingTree>warning</jgit.dirtyWorkingTree> | ||
<jgit.ignore> | ||
pom.xml | ||
</jgit.ignore> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
|
||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.10.1</version> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
</build> | ||
</project> |
20 changes: 20 additions & 0 deletions
20
...pse/tycho/test/pomDependencyConsider/PackagingPomDependencyWithTimestampProviderTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package org.eclipse.tycho.test.pomDependencyConsider; | ||
|
||
import static java.util.Arrays.asList; | ||
|
||
import org.apache.maven.it.Verifier; | ||
import org.eclipse.tycho.test.AbstractTychoIntegrationTest; | ||
import org.junit.Test; | ||
|
||
public class PackagingPomDependencyWithTimestampProviderTest extends AbstractTychoIntegrationTest { | ||
|
||
@Test | ||
public void testPackage() throws Exception { | ||
// project with pomDependency=consider, and jgit build timestamp provider and a | ||
// feature referencing a non-Tycho artifact | ||
Verifier verifier = getVerifier("pomDependencyConsider.buildtimestamp.jgit", true); | ||
verifier.executeGoals(asList("clean", "package")); | ||
// Test should not fail, but will fail with: | ||
// "Could not resolve plugin com.google.guava_0.0.0" | ||
} | ||
} |