Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Tycho/Additional Tools"

(347923 documentation for the new mirror goal in the tycho-p2-extras-plugin)
 
Line 3: Line 3:
 
== tycho-p2-extras-plugin ==
 
== tycho-p2-extras-plugin ==
  
The <tt>mirror</tt> goal of the <tt>tycho-p2-extras-plugin</tt> copies all installable units (plus their corresponding artifacts) from one or more p2 repositories into the build directory. This goal is available since version 0.13.0.
+
The <tt>mirror</tt> goal of the <tt>tycho-p2-extras-plugin</tt> copies installable units (plus their corresponding artifacts) from one or more p2 repositories into the build directory. This goal is available since version 0.13.0.
  
 
Example usage:
 
Example usage:
 +
 +
Mirror the org.eclipse.rcp feature from the Indigo p2 repository to target/repository.
 +
Filter the platfrom-specific fragments to only include linux/gtk/x86_64 os/ws/arch.
 
<pre>
 
<pre>
<build>
+
<build>
    <plugins>
+
<plugins>
        <plugin>
+
<plugin>
            <groupId>org.eclipse.tycho.extras</groupId>
+
<groupId>org.eclipse.tycho.extras</groupId>
            <artifactId>tycho-p2-extras-plugin</artifactId>
+
<artifactId>tycho-p2-extras-plugin</artifactId>
            <version>${tycho-version}</version>
+
<version>${tycho-version}</version>
            <executions>
+
<executions>
                <execution>
+
<execution>
                    <phase>prepare-package</phase>
+
<phase>prepare-package</phase>
                    <goals>
+
<goals>
                        <goal>mirror</goal>
+
<goal>mirror</goal>
                    </goals>
+
</goals>
                </execution>
+
</execution>
            </executions>
+
</executions>
            <configuration>
+
<configuration>
                <source>
+
<source>
                    <repository>
+
<!-- source repositori(es) to mirror from -->
                        <url>http:/example.org/p2-repository/</url>
+
<repository>
                    </repository>
+
<url>http://download.eclipse.org/releases/indigo/</url>
                    <repository>
+
<layout>p2</layout>
                        <url>http:/example.org/p2-metadata-repository/</url>
+
</repository>
                        <layout>p2-metadata</layout>
+
</source>
                    </repository>
+
                    <repository>
+
                        <url>http:/example.org/p2-artifact-repository/</url>
+
                        <layout>p2-artifacts</layout>
+
                    </repository>
+
                </source>
+
            </configuration>
+
        </plugin>
+
    </plugins>
+
</build>
+
</pre>
+
  
The mirror goal has the following additional parameters:
+
<!-- starting from here all configuration parameters are optional -->
 +
 
 +
<!-- List of IUs to mirror. If omitted, allIUs will be mirrored. -->
 +
<!-- Omitted IU version element means latest version of the IU -->
 +
<ius>
 +
<iu>
 +
<id>org.eclipse.rcp.feature.group</id>
 +
</iu>
 +
</ius>
 +
<!-- The destination directory to mirror to. -->
 +
<destination>${project.build.directory}/repository</destination>
 +
<!-- Whether only strict dependencies should be followed. -->
 +
<!-- "strict" means perfect version match -->
 +
<followStrictOnly>false</followStrictOnly>
 +
<!-- Whether or not to follow optional requirements. -->
 +
<includeOptional>true</includeOptional>
 +
<!-- Whether or not to follow non-greedy requirements. -->
 +
<includeNonGreedy>true</includeNonGreedy>
 +
<!-- filter properties. E.g. filter only one platform -->
 +
<filter>
 +
<osgi.os>linux</osgi.os>
 +
<osgi.ws>gtk</osgi.ws>
 +
<osgi.arch>x86_64</osgi.arch>
 +
</filter>
 +
<!-- Whether to filter the resulting set of IUs to only -->
 +
<!-- include the latest version of each IU -->
 +
<latestVersionOnly>false</latestVersionOnly>
 +
<!-- don't mirror artifacts, only metadata -->
 +
<mirrorMetadataOnly>false</mirrorMetadataOnly>
 +
<!-- whether to compress the target repo -->
 +
<compress>true</compress>
 +
<!-- whether to append to the target repo content -->
 +
<append>true</append>
 +
</configuration>
 +
</plugin>
 +
</plugins>
 +
</build>
 +
</pre>
  
* <tt>destination</tt>
+
The mojo has the same parameters as the [http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fp2_repositorytasks.htm p2.mirror ant task]
: The target directory for the p2 repository with the mirrored content. The default is target/repository.
+
  
 
[[Category:Tycho|Additional Tools]]
 
[[Category:Tycho|Additional Tools]]

Revision as of 11:31, 19 August 2011

The Tycho project provides additional tools that may be useful when working with Tycho.

tycho-p2-extras-plugin

The mirror goal of the tycho-p2-extras-plugin copies installable units (plus their corresponding artifacts) from one or more p2 repositories into the build directory. This goal is available since version 0.13.0.

Example usage:

Mirror the org.eclipse.rcp feature from the Indigo p2 repository to target/repository. Filter the platfrom-specific fragments to only include linux/gtk/x86_64 os/ws/arch.

	<build>
		<plugins>
			<plugin>
				<groupId>org.eclipse.tycho.extras</groupId>
				<artifactId>tycho-p2-extras-plugin</artifactId>
				<version>${tycho-version}</version>
				<executions>
					<execution>
						<phase>prepare-package</phase>
						<goals>
							<goal>mirror</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<source>
						<!-- source repositori(es) to mirror from -->
						<repository>
							<url>http://download.eclipse.org/releases/indigo/</url>
							<layout>p2</layout>
						</repository>
					</source>

					<!-- starting from here all configuration parameters are optional -->

					<!-- List of IUs to mirror. If omitted, allIUs will be mirrored. -->
					<!-- Omitted IU version element means latest version of the IU -->
					<ius>
						<iu>
							<id>org.eclipse.rcp.feature.group</id>
						</iu>
					</ius>
					<!-- The destination directory to mirror to. -->
					<destination>${project.build.directory}/repository</destination>
					<!-- Whether only strict dependencies should be followed. -->
					<!-- "strict" means perfect version match -->
					<followStrictOnly>false</followStrictOnly>
					<!-- Whether or not to follow optional requirements. -->
					<includeOptional>true</includeOptional>
					<!-- Whether or not to follow non-greedy requirements. -->
					<includeNonGreedy>true</includeNonGreedy>
					<!-- filter properties. E.g. filter only one platform -->
					<filter>
						<osgi.os>linux</osgi.os>
						<osgi.ws>gtk</osgi.ws>
						<osgi.arch>x86_64</osgi.arch>
					</filter>
					<!-- Whether to filter the resulting set of IUs to only -->
					<!-- include the latest version of each IU -->
					<latestVersionOnly>false</latestVersionOnly>
					<!-- don't mirror artifacts, only metadata -->
					<mirrorMetadataOnly>false</mirrorMetadataOnly>
					<!-- whether to compress the target repo -->
					<compress>true</compress>
					<!-- whether to append to the target repo content -->
					<append>true</append>
				</configuration>
			</plugin>
		</plugins>
	</build>

The mojo has the same parameters as the p2.mirror ant task

Back to the top