Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] publish-product errors when using release qualifiers

Hi there

Concerning bug 382482 [Allow auto-qualified OSGi versions in releases], we use the following solution for our company projects:

We keep the ".qualifier" suffix in all manifests/feature.xml and products when doing a release. We set strictVersions=false and forceContextQualifier=RELEASE when building a release version. See the attached patch of the rcp example itp04-rcp.

In the product file, we'd like to specify the exact version for the dependency example-feature: "0.1.0.qualifier" and not just "0.0.0".

This works perfectly - for Tycho 0.15.0. But with Tycho 0.16.0, there are problems when Tycho publishes the product, see the error below.

Why is this? Am I really forced to use "0.0.0"?

Regards,
Beat

[INFO] ------------------------------------------------------------------------
[INFO] Building RCP Example Product 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ eclipse-repository --- [INFO] Deleting /home/b8/tmp/tycho-demo/org.eclipse.tycho-demo/itp04-rcp/eclipse-repository/target
[INFO]
[INFO] --- tycho-packaging-plugin:0.16.0:build-qualifier (default-build-qualifier) @ eclipse-repository ---
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ eclipse-repository ---
[INFO]
[INFO] --- tycho-p2-publisher-plugin:0.16.0:publish-products (default-publish-products) @ eclipse-repository --- [WARNING] The following locally built units have been used to resolve project dependencies:
[WARNING]   example-feature-2.feature.jar/0.2.0.RELEASE
[WARNING]   example-feature.feature.jar/0.1.0.RELEASE
[WARNING]   example-feature_root.win32.win32.x86/0.1.0.RELEASE
[WARNING]   example-feature_root.gtk.linux.x86/0.1.0.RELEASE
[WARNING]   example-bundle/0.1.0.RELEASE
[WARNING]   example-feature-2.feature.group/0.2.0.RELEASE
[WARNING]   example-feature.feature.group/0.1.0.RELEASE
[WARNING]   example-feature_root/0.1.0.RELEASE
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] RCP Parent ........................................ SUCCESS [0.144s]
[INFO] RCP Example Bundle (Product Application) .......... SUCCESS [1.105s]
[INFO] RCP Example Feature ............................... SUCCESS [0.547s]
[INFO] RCP Example Feature 2 ............................. SUCCESS [0.132s]
[INFO] RCP Example Product ............................... FAILURE [0.838s]
[INFO] RCP Example Target Definition ..................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.493s
[INFO] Finished at: Wed Jan 16 17:22:05 CET 2013
[INFO] Final Memory: 61M/378M
[INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.eclipse.tycho:tycho-p2-publisher-plugin:0.16.0:publish-products (default-publish-products) on project eclipse-repository: Exception while publishing product /home/b8/tmp/tycho-demo/org.eclipse.tycho-demo/itp04-rcp/eclipse-repository/example.product: "publishing result": ["Included element example-feature.feature.group 0.1.0 is missing. Cannot determine filter for requirement to this element."] -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.tycho:tycho-p2-publisher-plugin:0.16.0:publish-products (default-publish-products) on project eclipse-repository: Exception while publishing product /home/b8/tmp/tycho-demo/org.eclipse.tycho-demo/itp04-rcp/eclipse-repository/example.product at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:203) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:451)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:188)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:134)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.apache.maven.plugin.MojoExecutionException: Exception while publishing product /home/b8/tmp/tycho-demo/org.eclipse.tycho-demo/itp04-rcp/eclipse-repository/example.product at org.eclipse.tycho.plugins.p2.publisher.PublishProductMojo.publishContent(PublishProductMojo.java:90) at org.eclipse.tycho.plugins.p2.publisher.AbstractPublishMojo.execute(AbstractPublishMojo.java:38) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195)
	... 19 more
Caused by: org.eclipse.tycho.p2.tools.FacadeException: "publishing result": ["Included element example-feature.feature.group 0.1.0 is missing. Cannot determine filter for requirement to this element."] at org.eclipse.tycho.p2.tools.publisher.PublisherServiceImpl.handlePublisherStatus(PublisherServiceImpl.java:168) at org.eclipse.tycho.p2.tools.publisher.PublisherServiceImpl.executePublisher(PublisherServiceImpl.java:157) at org.eclipse.tycho.p2.tools.publisher.PublisherServiceImpl.publishProduct(PublisherServiceImpl.java:92) at org.eclipse.tycho.plugins.p2.publisher.PublishProductMojo.publishContent(PublishProductMojo.java:86)
	... 22 more
>From 3e07cc11ee022a17caa683cb3e6e85510d113aa8 Mon Sep 17 00:00:00 2001
From: Beat Strasser <beat.strasser@xxxxxxxxxxxxx>
Date: Wed, 16 Jan 2013 17:33:54 +0100
Subject: [PATCH] Using release qualifiers

---
 itp04-rcp/eclipse-repository/example.product |    2 +-
 itp04-rcp/eclipse-repository/pom.xml         |    4 ++--
 itp04-rcp/example-bundle/pom.xml             |    4 ++--
 itp04-rcp/example-feature-2/pom.xml          |    4 ++--
 itp04-rcp/example-feature/pom.xml            |    4 ++--
 itp04-rcp/helios/pom.xml                     |    2 +-
 itp04-rcp/pom.xml                            |   24 ++++++++++++++++++++++--
 7 files changed, 32 insertions(+), 12 deletions(-)

diff --git a/itp04-rcp/eclipse-repository/example.product b/itp04-rcp/eclipse-repository/example.product
index 81376ac..7cded7f 100644
--- a/itp04-rcp/eclipse-repository/example.product
+++ b/itp04-rcp/eclipse-repository/example.product
@@ -13,7 +13,7 @@
    </plugins>
 
    <features>
-      <feature id="example-feature" version="0.0.0"/>
+      <feature id="example-feature" version="0.1.0.qualifier"/>
       <feature id="org.eclipse.rcp" version="0.0.0"/>
       <feature id="org.eclipse.equinox.p2.user.ui" version="0.0.0"/>
    </features>
diff --git a/itp04-rcp/eclipse-repository/pom.xml b/itp04-rcp/eclipse-repository/pom.xml
index 0fc3af2..63a17e3 100644
--- a/itp04-rcp/eclipse-repository/pom.xml
+++ b/itp04-rcp/eclipse-repository/pom.xml
@@ -13,13 +13,13 @@ Contributors:
 	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
 	<modelVersion>4.0.0</modelVersion>
 
-	<version>1.0.0-SNAPSHOT</version>
+	<version>1.0.0</version>
 	<artifactId>eclipse-repository</artifactId>
 	<packaging>eclipse-repository</packaging>
 	<name>RCP Example Product</name>
 
 	<parent>
-		<version>1.0.0-SNAPSHOT</version>
+		<version>1.0.0</version>
 		<groupId>example.group</groupId>
 		<artifactId>parent</artifactId>
 	</parent>
diff --git a/itp04-rcp/example-bundle/pom.xml b/itp04-rcp/example-bundle/pom.xml
index fcd1bbf..1805012 100644
--- a/itp04-rcp/example-bundle/pom.xml
+++ b/itp04-rcp/example-bundle/pom.xml
@@ -13,13 +13,13 @@ Contributors:
 	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
 	<modelVersion>4.0.0</modelVersion>
 
-	<version>0.1.0-SNAPSHOT</version>
+	<version>0.1.0</version>
 	<artifactId>example-bundle</artifactId>
 	<packaging>eclipse-plugin</packaging>
 	<name>RCP Example Bundle (Product Application)</name>
 
 	<parent>
-		<version>1.0.0-SNAPSHOT</version>
+		<version>1.0.0</version>
 		<groupId>example.group</groupId>
 		<artifactId>parent</artifactId>
 	</parent>
diff --git a/itp04-rcp/example-feature-2/pom.xml b/itp04-rcp/example-feature-2/pom.xml
index 7b8cd45..9bac9c0 100644
--- a/itp04-rcp/example-feature-2/pom.xml
+++ b/itp04-rcp/example-feature-2/pom.xml
@@ -13,13 +13,13 @@ Contributors:
 	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
 	<modelVersion>4.0.0</modelVersion>
 
-	<version>0.2.0-SNAPSHOT</version>
+	<version>0.2.0</version>
 	<artifactId>example-feature-2</artifactId>
 	<packaging>eclipse-feature</packaging>
 	<name>RCP Example Feature 2</name>
 
 	<parent>
-		<version>1.0.0-SNAPSHOT</version>
+		<version>1.0.0</version>
 		<groupId>example.group</groupId>
 		<artifactId>parent</artifactId>
 	</parent>
diff --git a/itp04-rcp/example-feature/pom.xml b/itp04-rcp/example-feature/pom.xml
index c309ec1..1b37914 100644
--- a/itp04-rcp/example-feature/pom.xml
+++ b/itp04-rcp/example-feature/pom.xml
@@ -13,13 +13,13 @@ Contributors:
 	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
 	<modelVersion>4.0.0</modelVersion>
 
-	<version>0.1.0-SNAPSHOT</version>
+	<version>0.1.0</version>
 	<artifactId>example-feature</artifactId>
 	<packaging>eclipse-feature</packaging>
 	<name>RCP Example Feature</name>
 
 	<parent>
-		<version>1.0.0-SNAPSHOT</version>
+		<version>1.0.0</version>
 		<groupId>example.group</groupId>
 		<artifactId>parent</artifactId>
 	</parent>
diff --git a/itp04-rcp/helios/pom.xml b/itp04-rcp/helios/pom.xml
index 6016b0b..acb9d90 100644
--- a/itp04-rcp/helios/pom.xml
+++ b/itp04-rcp/helios/pom.xml
@@ -21,7 +21,7 @@ Contributors:
 	<parent>
 		<artifactId>parent</artifactId>
 		<groupId>example.group</groupId>
-		<version>1.0.0-SNAPSHOT</version>
+		<version>1.0.0</version>
 	</parent>
 
 </project>
diff --git a/itp04-rcp/pom.xml b/itp04-rcp/pom.xml
index c67cba4..618e6e0 100644
--- a/itp04-rcp/pom.xml
+++ b/itp04-rcp/pom.xml
@@ -13,7 +13,7 @@ Contributors:
 	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
 	<modelVersion>4.0.0</modelVersion>
 
-	<version>1.0.0-SNAPSHOT</version>
+	<version>1.0.0</version>
 	<groupId>example.group</groupId>
 	<artifactId>parent</artifactId>
 	<packaging>pom</packaging>
@@ -43,7 +43,7 @@ Contributors:
 						<artifact>
 							<groupId>example.group</groupId>
 							<artifactId>helios</artifactId>
-							<version>1.0.0-SNAPSHOT</version>
+							<version>1.0.0</version>
 						</artifact>
 					</target>
 					<environments>
@@ -68,4 +68,24 @@ Contributors:
 			</plugin>
 		</plugins>
 	</build>
+
+    <profiles>
+    	<profile>
+    		<id>release</id>
+    		<build>
+    			<plugins>
+		            <plugin>
+		                <groupId>org.eclipse.tycho</groupId>
+		                <artifactId>tycho-packaging-plugin</artifactId>
+				<version>${tycho-version}</version>
+		                <configuration>
+		                	<strictVersions>false</strictVersions>
+		                	<forceContextQualifier>RELEASE</forceContextQualifier>
+		                </configuration>
+		            </plugin>
+    			</plugins>
+    		</build>
+    	</profile>
+    </profiles>
+
 </project>
-- 
1.7.4.1



Back to the top