Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be 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"

(format xml)
Line 1: Line 1:
 
The Tycho project provides additional tools that may be useful when working with Tycho.
 
The Tycho project provides additional tools that may be useful when working with Tycho.
  
== tycho-p2-extras-plugin ==
+
= tycho-p2-extras-plugin =
  
 
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.
 
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.
Line 9: Line 9:
 
Mirror the org.eclipse.rcp feature from the Indigo p2 repository to target/repository.
 
Mirror the org.eclipse.rcp feature from the Indigo p2 repository to target/repository.
 
Filter the platform-specific fragments to only include linux/gtk/x86_64 os/ws/arch.
 
Filter the platform-specific fragments to only include linux/gtk/x86_64 os/ws/arch.
<pre>
+
<source lang="xml">
 
<build>
 
<build>
 
     <plugins>
 
     <plugins>
Line 72: Line 72:
 
     </plugins>
 
     </plugins>
 
</build>
 
</build>
</pre>
+
</source>
  
 
The mojo has the same parameters as the [http://help.eclipse.org/helios/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fp2_repositorytasks.htm p2.mirror ant task]
 
The mojo has the same parameters as the [http://help.eclipse.org/helios/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fp2_repositorytasks.htm p2.mirror ant task]
  
== tycho-eclipserun-plugin ==
+
= tycho-eclipserun-plugin =
  
 
This plugin allows to run an Eclipse application from Maven. This plugin is available since version 0.14.0. One use of this plugin is building the documentation index using Eclipse's antRunner and the help.buildHelpIndex Ant task.
 
This plugin allows to run an Eclipse application from Maven. This plugin is available since version 0.14.0. One use of this plugin is building the documentation index using Eclipse's antRunner and the help.buildHelpIndex Ant task.
Line 82: Line 82:
 
Without Tycho, this would typically be done by having an Ant file with the help.buildHelpIndex task. For example, in customBuildCallbacks.xml:
 
Without Tycho, this would typically be done by having an Ant file with the help.buildHelpIndex task. For example, in customBuildCallbacks.xml:
  
<pre>
+
<source lang="xml">
 
<project name="Build specific targets and properties" default="noDefault">
 
<project name="Build specific targets and properties" default="noDefault">
 
     <target name="post.build.jars">
 
     <target name="post.build.jars">
Line 92: Line 92:
 
     </target>
 
     </target>
 
</project>
 
</project>
</pre>
+
</source>
  
 
tycho-eclipserun-plugin can be used to run Eclipse's antRunner and reuse that Ant file.  
 
tycho-eclipserun-plugin can be used to run Eclipse's antRunner and reuse that Ant file.  
Line 98: Line 98:
 
org.eclipse.someplugin.doc.user/pom.xml:
 
org.eclipse.someplugin.doc.user/pom.xml:
  
<pre>
+
<source lang="xml">
 
<build>
 
<build>
 
     <plugins>
 
     <plugins>
Line 130: Line 130:
 
     </plugins>
 
     </plugins>
 
</build>
 
</build>
</pre>
+
</source>
  
 
For other scenarios, it might be necessary to change the elements in <dependencies>. Also, note that the JVM arguments can be changed with the <argLine> paremeter.
 
For other scenarios, it might be necessary to change the elements in <dependencies>. Also, note that the JVM arguments can be changed with the <argLine> paremeter.
Line 138: Line 138:
 
For example if you would like to install eclipse usinng this plugin you could try something like:
 
For example if you would like to install eclipse usinng this plugin you could try something like:
  
<pre>
+
<source lang="xml">
 
<properties>
 
<properties>
 
     <tycho-extras-version>0.14.0</tycho-extras-version>
 
     <tycho-extras-version>0.14.0</tycho-extras-version>
Line 200: Line 200:
 
     </plugins>
 
     </plugins>
 
</build>
 
</build>
</pre>
+
</source>
  
 
[[Category:Tycho|Additional Tools]]
 
[[Category:Tycho|Additional Tools]]

Revision as of 04:32, 19 July 2012

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 platform-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 repositories to mirror from -->
                    <repository>
                        <url>http://download.eclipse.org/releases/indigo/</url>
                        <layout>p2</layout>
                        <!-- supported layouts are "p2-metadata", "p2-artifacts", and "p2" (for joint repositories; default) -->
                    </repository>


               <ius>
                   <iu>
                       <id>org.eclipse.rcp.feature.group</id>
                   </iu>
               </ius>
               <destination>${project.build.directory}/repository</destination>
               <followStrictOnly>false</followStrictOnly>
               <includeOptional>true</includeOptional>
               <includeNonGreedy>true</includeNonGreedy>
               <filter>
                   <osgi.os>linux</osgi.os>
                   <osgi.ws>gtk</osgi.ws>
                   <osgi.arch>x86_64</osgi.arch>
               </filter>
               <latestVersionOnly>false</latestVersionOnly>
               <mirrorMetadataOnly>false</mirrorMetadataOnly>
               <compress>true</compress>
               <append>true</append>
           </configuration>
       </plugin>
   </plugins>

</build> </source>

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

tycho-eclipserun-plugin

This plugin allows to run an Eclipse application from Maven. This plugin is available since version 0.14.0. One use of this plugin is building the documentation index using Eclipse's antRunner and the help.buildHelpIndex Ant task.

Without Tycho, this would typically be done by having an Ant file with the help.buildHelpIndex task. For example, in customBuildCallbacks.xml:

<project name="Build specific targets and properties" default="noDefault">
    <target name="post.build.jars">
        <antcall target="build.index"/>
    </target>
 
    <target name="build.index" description="Builds search index for the plug-in: org.eclipse.someplugin.doc.user." if="eclipse.running">
        <help.buildHelpIndex manifest="plugin.xml" destination="."/>
    </target>
</project>

tycho-eclipserun-plugin can be used to run Eclipse's antRunner and reuse that Ant file.

org.eclipse.someplugin.doc.user/pom.xml:

<build>
    <plugins>
        ...
        <plugin>
            <groupId>org.eclipse.tycho.extras</groupId>
            <artifactId>tycho-eclipserun-plugin</artifactId>
            <version>${tycho-version}</version>
            <configuration>
                <appArgLine>-application org.eclipse.ant.core.antRunner -buildfile customBuildCallbacks.xml build.index</appArgLine>
                <dependencies>
                    <dependency>
                        <artifactId>org.apache.ant</artifactId>
                        <type>eclipse-plugin</type>
                    </dependency>
                    <dependency>
                        <artifactId>org.eclipse.help.base</artifactId>
                        <type>eclipse-plugin</type>
                    </dependency>
                </dependencies>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>eclipse-run</goal>
                    </goals>
                    <phase>compile</phase>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

For other scenarios, it might be necessary to change the elements in <dependencies>. Also, note that the JVM arguments can be changed with the <argLine> paremeter. A version of the plugin compatible with Tycho 0.13 is available at Eclipse Labs.


For example if you would like to install eclipse usinng this plugin you could try something like:

<properties>
    <tycho-extras-version>0.14.0</tycho-extras-version>
    <tycho-version>0.14.1</tycho-version>
    <features>org.eclipse.sdk.ide,org.eclipse.platform,org.eclipse.jdt,org.eclipse.m2e.feature.feature.group,org.eclipse.m2e.logback.feature.feature.group
    </features>
    <sites>${eclipse.mirror.url}/releases/indigo,${eclipse.mirror.url}/technology/m2e/releases,${eclipse.mirror.url}/eclipse/updates/3.7
    </sites>
</properties>
 
<build>
    <plugins>
        <plugin>
            <groupId>org.eclipse.tycho.extras</groupId>
            <artifactId>tycho-eclipserun-plugin</artifactId>
            <version>${tycho-extras-version}</version>
            <configuration>
                <argLine>-Declipse.p2.mirrors=false</argLine>
                <appArgLine>-consoleLog -application org.eclipse.equinox.p2.director -nosplash -destination ${build.destination} -repository ${sites} -installIUs ${features}</appArgLine>
                <dependencies>
                    <dependency>
                        <artifactId>org.eclipse.equinox.p2.transport.ecf</artifactId>
                        <type>eclipse-plugin</type>
                    </dependency>
                    <dependency>
                        <artifactId>org.eclipse.equinox.p2.repository</artifactId>
                        <type>eclipse-plugin</type>
                    </dependency>
                    <dependency>
                        <artifactId>org.eclipse.equinox.p2.touchpoint.natives</artifactId>
                        <type>eclipse-plugin</type>
                    </dependency>
                    <dependency>
                        <artifactId>org.eclipse.equinox.p2.touchpoint.eclipse</artifactId>
                        <type>eclipse-plugin</type>
                    </dependency>
                    <dependency>
                        <artifactId>org.eclipse.equinox.p2.artifact.repository
                        </artifactId>
                        <type>eclipse-plugin</type>
                    </dependency>
                    <dependency>
                        <artifactId>org.eclipse.equinox.p2.director.app</artifactId>
                        <type>eclipse-plugin</type>
                    </dependency>
                    <dependency>
                        <artifactId>org.eclipse.equinox.ds</artifactId>
                        <type>eclipse-plugin</type>
                    </dependency>
                </dependencies>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>eclipse-run</goal>
                    </goals>
                    <phase>compile</phase>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

Back to the top