Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] optional dependencies - one more thing....

Hi,

Afaik, you have several options. The first one would be to ensure that all optional dependencies have x-greedy=false in their manifest files [1]. The second option is to explicitly list all bundles you want in a target file and add includeMode="slicer" to repo definitions [2]. The third option is to mirror your target repos, while skipping optional dependencies before materializing them [3].

I'm not sure if p2 filters can be used here, but would be glad to see a solution using them.

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=247099#c108
[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=342704#c10
[3] https://bugs.eclipse.org/bugs/show_bug.cgi?id=247099#c110

/Mikhail


Från: "Christophe Bouhier" <dzonekl@xxxxxxxxx>
Till: "Tycho user list" <tycho-user@xxxxxxxxxxx>
Skickat: fredag, 27 sep 2013 15:09:15
Ämne: Re: [tycho-user] optional dependencies - one more thing....

So this is the  problem I have.  https://bugs.eclipse.org/bugs/show_bug.cgi?id=342704

So I understand this clearly, make sure the optional plugin is not in the .target definition as IU, if it is it will be included in the RCP as an optional dependency correct? But what about using filters, woudn't that have the same effect?


Thank You, 
Christophe


On Fri, Sep 27, 2013 at 2:27 PM, Christophe Bouhier <dzonekl@xxxxxxxxx> wrote:
Ok, all builds fine with Tycho now, but I noticed that the materialized
plugins from a product include the optional dependencies [2], while I did configure to ignore dependencies in the root pom [2].

So I also added this config for the tycho-p2-director-plugin for the product, but with no effect.

So how do I instruct tycho-p2-director-plugin not to materialize optional plugins?

TIA, Christophe

[1]Root POM.XML

<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.netxforge.netxstudio</groupId>
    <artifactId>com.netxforge.releng</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>pom</packaging>
    <properties>
        <tycho-version>0.18.0</tycho-version>
    </properties>
    <build>
        <plugins>
            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>target-platform-configuration</artifactId>
                <version>${tycho-version}</version>
                <configuration>
                    <dependency-resolution>
                        <optionalDependencies>ignore</optionalDependencies>
                    </dependency-resolution>
                    <target>
                        <artifact>
                            <groupId>${project.groupId}</groupId>
                            <artifactId>${project.artifactId}</artifactId>
                            <version>${project.version}</version>
                            <classifier>../../releng.tycho/com.netxforge.releng.target/netxstudio_kepler</classifier>
                        </artifact>
                    </target>
                    <environments>
                        <environment>
                            <os>win32</os>
                            <ws>win32</ws>
                            <arch>x86</arch>
                        </environment>
                        <environment>
                            <os>linux</os>
                            <ws>gtk</ws>
                            <arch>x86_64</arch>
                        </environment>
                        <environment>
                            <os>macosx</os>
                            <ws>cocoa</ws>
                            <arch>x86_64</arch>
                        </environment>
                    </environments>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-maven-plugin</artifactId>
                <version>${tycho-version}</version>
                <extensions>true</extensions>
            </plugin>
        </plugins>
    </build>
    <modules>
        <module>
        ../../plugins
        </module>
        <module>
        ../../features
        </module>
        <module>
        ../../3rdPartyFeatures
        </module>
        <module>
        ../../3rdPartyLib
        </module>
        <module>
        ../../libs.eclipse
        </module>
        <module>
            ../../products/com.netxforge.releng.products.netxserver
        </module>
        <module>
            ../../products/com.netxforge.releng.products.netxstudio.cdo
        </module>
    </modules>
</project>


[2] com.netxforge.releng.products.netxstudio.cdo / pom.xml

<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>com.netxforge.releng.products.netxstudio.cdo</groupId>
    <artifactId>com.netxforge.releng.products.netxstudio.cdo</artifactId>
    <version>1.1.8-SNAPSHOT</version>
    <packaging>eclipse-repository</packaging>
    <parent>
        <groupId>com.netxforge.netxstudio</groupId>
        <artifactId>com.netxforge.releng</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <relativePath>../../releng.tycho/com.netxforge.releng</relativePath>
    </parent>
    <build>
        <plugins>
            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-p2-director-plugin</artifactId>
                <version>${tycho-version}</version>
                <configuration>
                    <dependency-resolution>
                        <optionalDependencies>ignore</optionalDependencies>
                    </dependency-resolution>
                </configuration>
                <executions>
                    <execution>
                        <id>materialize-products</id>
                        <goals>
                            <goal>materialize-products</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>archive-products</id>
                        <goals>
                            <goal>archive-products</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>





--
Christophe Bouhier
Christophe.bouhier@xxxxxxxxxxxxx
+31612962997
Clifforstraat 43-II
1051 GS, Amsterdam
http://www.netxforge.com




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


Back to the top