Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] How to involve category.xml within publish-features-and-bundles goal

Hi,
after your pointer I tried it. Unfortunately my build fails and I get the following error:

Execution generate-categories of goal org.eclipse.tycho:tycho-p2-publisher-plugin:0.20.0:publish-categories failed: Tycho build extension not configured for MavenProject

So I added the following to the pom:

<plugin>
	<!-- enable tycho build extension -->
	<groupId>org.eclipse.tycho</groupId>
	<artifactId>tycho-maven-plugin</artifactId>
	<version>${tycho-version}</version>
	<extensions>true</extensions>
</plugin>

But the error remains. I attached my pom.xml, maybe some one could have a look at it.

best regards,
Jan

Mickael Istria wrote:
Hi,

I've never faced this use-case, so it's not much more than a guess, but
did you try to invoke this plugin after the creation of your p2 site?
https://eclipse.org/tycho/sitedocs/tycho-p2/tycho-p2-publisher-plugin/publish-categories-mojo.html
--
Mickael Istria
Eclipse developer at JBoss, by Red Hat <http://www.jboss.org/tools>
My blog <http://mickaelistria.wordpress.com> - My Tweets
<http://twitter.com/mickaelistria>


_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user

<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>my.groupid</groupId>
	<artifactId>myArtefactID</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<packaging>pom</packaging>
	<name>Eclipse p2 Update-Site Generation</name>

	<properties>
		<tycho-version>0.20.0</tycho-version>
		<originalRepository>${JENKINS_HOME}/jobs/dependenJob/workspace/oldUpdateSite/</originalRepository>
		<targetDirectory>${WORKSPACE}/newUpdateSite/target</targetDirectory>
		<targetRepository>${targetDirectory}/repository</targetRepository>
		<updateSiteName>New p2 Trunk Update Site</updateSiteName>
	</properties>

	<repositories>
		<repository>
			<id>eclipse-kepler</id>
			<url>http://download.eclipse.org/releases/kepler</url>
			<layout>p2</layout>
		</repository>
	</repositories>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.eclipse.tycho</groupId>
					<artifactId>tycho-p2-publisher-plugin</artifactId>
					<version>${tycho-version}</version>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<!-- enable tycho build extension -->
				<groupId>org.eclipse.tycho</groupId>
				<artifactId>tycho-maven-plugin</artifactId>
				<version>${tycho-version}</version>
				<extensions>true</extensions>
			</plugin>
			<plugin>
				<groupId>org.eclipse.tycho.extras</groupId>
				<artifactId>tycho-p2-extras-plugin</artifactId>
				<version>${tycho-version}</version>
				<executions>
					<execution>
						<!-- step 1: mirror old-style update site -->
						<id>mirror-update-sites</id>
						<phase>process-resources</phase>
						<goals>
							<goal>mirror</goal>
						</goals>
						<configuration>
							<source>
								<repository>
									<url>${originalRepository}</url>
								</repository>
							</source>
							<destination>${targetRepository}</destination>
							<name>${updateSiteName}</name>
						</configuration>
					</execution>
					<execution>
						<!-- step 3: generate the full p2 metadata for the mirrored artifacts -->
						<id>generate-full-metadata</id>
						<phase>compile</phase>
						<goals>
							<goal>publish-features-and-bundles</goal>
						</goals>
						<configuration>
							<sourceLocation>${targetRepository}</sourceLocation>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.eclipse.tycho</groupId>
				<artifactId>tycho-p2-publisher-plugin</artifactId>
				<version>${tycho-version}</version>
				<executions>
					<execution>
						<id>generate-categories</id>
						<goals>
							<goal>publish-categories</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<version>1.7</version>
				<executions>
					<execution>
						<!-- step 2: strip the p2 metadata that contains the "partial IUs" 
							that which be used for dependency resolution in Tycho -->
						<id>remove-incomplete-metadata</id>
						<phase>process-resources</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<target>
								<delete file="${targetRepository}/content.jar" />
								<delete file="${targetRepository}/artifacts.jar" />
							</target>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

</project>

Back to the top