aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThanh Ha2012-11-20 22:01:50 (EST)
committerTobias Oberlies2012-12-10 06:53:27 (EST)
commit1da3f150f796b335f633d282057ffa68a94a19d0 (patch)
treeace37e95ee8cd80f60fe3cdd453dc80a7e376d69
parent423972003134e879f801daf7167ec2e89e8d8770 (diff)
downloadorg.eclipse.tycho-1da3f150f796b335f633d282057ffa68a94a19d0.zip
org.eclipse.tycho-1da3f150f796b335f633d282057ffa68a94a19d0.tar.gz
org.eclipse.tycho-1da3f150f796b335f633d282057ffa68a94a19d0.tar.bz2
392716 Compute product qualifer based on inclusionsrefs/changes/41/8941/3
- Product qualifiers should be computed in the same way feature qualifiers are calculated. Bug: 392716 Change-Id: Ibd6a38a993001b51587d9a563c2917fa2377a6b2
-rw-r--r--tycho-maven-plugin/src/main/resources/META-INF/plexus/components.xml2
-rw-r--r--tycho-packaging-plugin/src/test/java/org/eclipse/tycho/buildversion/BuildQualifierTest.java8
-rw-r--r--tycho-packaging-plugin/src/test/resources/projects/stablebuildqualifier/basic/pom.xml3
-rw-r--r--tycho-packaging-plugin/src/test/resources/projects/stablebuildqualifier/basic/product/pom.xml19
-rw-r--r--tycho-packaging-plugin/src/test/resources/projects/stablebuildqualifier/basic/product/product.product10
5 files changed, 38 insertions, 4 deletions
diff --git a/tycho-maven-plugin/src/main/resources/META-INF/plexus/components.xml b/tycho-maven-plugin/src/main/resources/META-INF/plexus/components.xml
index 92b2074..78d4895 100644
--- a/tycho-maven-plugin/src/main/resources/META-INF/plexus/components.xml
+++ b/tycho-maven-plugin/src/main/resources/META-INF/plexus/components.xml
@@ -284,7 +284,7 @@
<id>default</id>
<phases>
<validate>
- org.eclipse.tycho:tycho-packaging-plugin:${project.version}:build-qualifier
+ org.eclipse.tycho:tycho-packaging-plugin:${project.version}:build-qualifier-aggregator
</validate>
<initialize>
<!-- P2 publisher application will accumulate the published content in resulting repositories.
diff --git a/tycho-packaging-plugin/src/test/java/org/eclipse/tycho/buildversion/BuildQualifierTest.java b/tycho-packaging-plugin/src/test/java/org/eclipse/tycho/buildversion/BuildQualifierTest.java
index 65595ba..9a0caea 100644
--- a/tycho-packaging-plugin/src/test/java/org/eclipse/tycho/buildversion/BuildQualifierTest.java
+++ b/tycho-packaging-plugin/src/test/java/org/eclipse/tycho/buildversion/BuildQualifierTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2011 Sonatype Inc. and others.
+ * Copyright (c) 2008, 2012 Sonatype Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -183,14 +183,18 @@ public class BuildQualifierTest extends AbstractTychoMojoTestCase {
executeMojo(session, getProject(projects, "bundle02"));
executeMojo(session, getProject(projects, "feature02"), "build-qualifier-aggregator");
executeMojo(session, getProject(projects, "feature"), "build-qualifier-aggregator");
+ executeMojo(session, getProject(projects, "product"), "build-qualifier-aggregator");
assertQualifier("201205192000", projects, "bundle02");
// feature02 includes bundle02, but its qualifier is hard-coded via the manifest
assertQualifier("201205191300", projects, "feature02");
+ // product includes feature02, and hence transitively also bundle02, but qualifier is only the max. of direct inclusions
+ assertQualifier("201205191300", projects, "product");
assertQualifier("201205191500", projects, "bundle01");
- // feature includes both bundle01 and feature02, and hence transitively also bundle01, but qualifier is only the max. of direct inclusions
+ // feature has direct inclusions bundle01 and feature02 -> bundle01's 1500 time-stamp is the max.
assertQualifier("201205191500", projects, "feature");
+
}
public void testUnparsableIncludedArtifactQualifier() throws Exception {
diff --git a/tycho-packaging-plugin/src/test/resources/projects/stablebuildqualifier/basic/pom.xml b/tycho-packaging-plugin/src/test/resources/projects/stablebuildqualifier/basic/pom.xml
index aaf99b6..ed6e732 100644
--- a/tycho-packaging-plugin/src/test/resources/projects/stablebuildqualifier/basic/pom.xml
+++ b/tycho-packaging-plugin/src/test/resources/projects/stablebuildqualifier/basic/pom.xml
@@ -24,6 +24,7 @@
<module>bundle02</module>
<module>feature02</module>
<module>feature</module>
+ <module>product</module>
</modules>
<build>
@@ -39,4 +40,4 @@
</plugins>
</build>
-</project> \ No newline at end of file
+</project>
diff --git a/tycho-packaging-plugin/src/test/resources/projects/stablebuildqualifier/basic/product/pom.xml b/tycho-packaging-plugin/src/test/resources/projects/stablebuildqualifier/basic/product/pom.xml
new file mode 100644
index 0000000..0a617af
--- /dev/null
+++ b/tycho-packaging-plugin/src/test/resources/projects/stablebuildqualifier/basic/product/pom.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>stablebuildqualifier</groupId>
+ <artifactId>stablebuildqualifier</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>product</artifactId>
+ <packaging>eclipse-repository</packaging>
+
+ <properties>
+ <testbuildtimestamp>201205191200</testbuildtimestamp>
+ </properties>
+
+</project>
diff --git a/tycho-packaging-plugin/src/test/resources/projects/stablebuildqualifier/basic/product/product.product b/tycho-packaging-plugin/src/test/resources/projects/stablebuildqualifier/basic/product/product.product
new file mode 100644
index 0000000..0367946
--- /dev/null
+++ b/tycho-packaging-plugin/src/test/resources/projects/stablebuildqualifier/basic/product/product.product
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?pde version="3.5"?>
+
+<product id="product" version="1.0.0.qualifier" useFeatures="true" includeLaunchers="false">
+
+ <features>
+ <feature id="feature02"/>
+ </features>
+
+</product>