Discussion:
optional dependencies - one more thing....
(too old to reply)
Christophe Bouhier
2013-09-27 12:27:47 UTC
Permalink
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
2013-09-27 13:09:15 UTC
Permalink
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
Post by Christophe Bouhier
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>
--
C*hristophe Bouhier
+31612962997
Clifforstraat 43-II
1051 GS, Amsterdam
http://www.netxforge.com
Mikhail Kalkov
2013-09-27 13:14:14 UTC
Permalink
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

----- Ursprungligt meddelande -----

Från: "Christophe Bouhier" <***@gmail.com>
Till: "Tycho user list" <tycho-***@eclipse.org>
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 < ***@gmail.com > wrote:

<blockquote>




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>
--
C hristophe Bouhier
***@netxforge.com
+31612962997
Clifforstraat 43-II
1051 GS, Amsterdam
http://www.netxforge.com


</blockquote>


_______________________________________________
tycho-user mailing list
tycho-***@eclipse.org
https://dev.eclipse.org/mailman/listinfo/tycho-user
Christophe Bouhier
2013-09-27 13:27:23 UTC
Permalink
Thank you! I will try your suggestion.

the following did have little effect, is the syntax correct?

<filters>
<filter>
<type>p2-installable-unit</type>
<id>org.eclipse.debug.core</id>
<id>org.eclipse.debug.ui</id>
<id>org.eclipse.search</id>
<id>org.eclipse.team.core</id>
<id>org.eclipse.team.ui</id>
<id>org.eclipse.jdt</id>
<removeAll />
</filter>
</filters>
Rgds Christophe




On Fri, Sep 27, 2013 at 3:14 PM, Mikhail Kalkov <
Post by Mikhail Kalkov
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
------------------------------
*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
Post by Christophe Bouhier
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>
--
C*hristophe Bouhier
+31612962997
Clifforstraat 43-II
1051 GS, Amsterdam
http://www.netxforge.com
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Jan Pešta
2013-09-27 13:15:31 UTC
Permalink
Hi Christoph,



I think you are able to configure dependencies policy in several poms
differently.



You can say in general, that optional dependencies should be ignored, and on
specific places where are needed you will just change the settings.



And if you want also optional dependencies builded separately, just create
new product/parent pom where you will change dependency policy.



Regards,

Jan



Kind regards / S pozdravem



Jan Pe¹ta

SW Engineer Sr.



CertiCon a.s., <http://www.certicon.cz/> www.certicon.cz

Vaclavska 12

12000 Prague 2

Czech Republic



Office Prague: +420 224 904 406

Mobile: +420 604 794 306



E-mail: ***@certicon.cz



From: tycho-user-***@eclipse.org [mailto:tycho-user-***@eclipse.org]
On Behalf Of Christophe Bouhier
Sent: Friday, September 27, 2013 2:28 PM
To: Tycho user list
Subject: [tycho-user] optional dependencies - one more thing....



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>
Mikhail Kalkov
2013-09-27 15:58:40 UTC
Permalink
As I mentioned, I haven't used tycho's filtering feature, but I'd try with one id per filter for starters. Apart from this, I wonder if your p2 repository also includes optional dependencies, as a product materialized from it does.

On a side note, it seems that neither http://www.eclipse.org/tycho/sitedocs/index.html nor http://www.eclipse.org/tycho/sitedocs-extras/index.html contain any mavendocs for o.e.t.target-platform-configuration build plugin. Am I missing something obvious?


/Mikhail

----- Ursprungligt meddelande -----

Från: "Christophe Bouhier" <***@gmail.com>
Till: "Tycho user list" <tycho-***@eclipse.org>
Skickat: fredag, 27 sep 2013 15:27:23
Ämne: Re: [tycho-user] optional dependencies - one more thing....




Thank you! I will try your suggestion.

the following did have little effect, is the syntax correct?

<filters>
<filter>
<type>p2-installable-unit</type>
<id>org.eclipse.debug.core</id>
<id>org.eclipse.debug.ui</id>
<id>org.eclipse.search</id>
<id>org.eclipse.team.core</id>
<id>org.eclipse.team.ui</id>
<id>org.eclipse.jdt</id>
<removeAll />
</filter>
</filters>
Rgds Christophe







On Fri, Sep 27, 2013 at 3:14 PM, Mikhail Kalkov < ***@purplescout.se > wrote:




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" < ***@gmail.com >
Till: "Tycho user list" < tycho-***@eclipse.org >
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



<blockquote>






On Fri, Sep 27, 2013 at 2:27 PM, Christophe Bouhier < ***@gmail.com > wrote:

<blockquote>




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>
--
C hristophe Bouhier
***@netxforge.com
+31612962997
Clifforstraat 43-II
1051 GS, Amsterdam
http://www.netxforge.com


</blockquote>


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


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


</blockquote>


_______________________________________________
tycho-user mailing list
tycho-***@eclipse.org
https://dev.eclipse.org/mailman/listinfo/tycho-user
Christophe Bouhier
2013-10-01 18:59:23 UTC
Permalink
Hi Mikhail,

Guess what, using the filter definitions like this below works perfectly!
Thanks everyone!

<filters>
<filter>
<type>p2-installable-unit</type>
<id>org.eclipse.debug.core</id>
<removeAll />
</filter>
<filter>
<type>p2-installable-unit</type>
<id>org.eclipse.jdt.core</id>
<removeAll />
</filter>
<filter>
<type>p2-installable-unit</type>
<id>org.eclipse.search</id>
<removeAll />
</filter>
<filter>
<type>p2-installable-unit</type>
<id>org.eclipse.team.core</id>
<removeAll />
</filter>
<filter>
<type>p2-installable-unit</type>
<id>org.eclipse.team.ui</id>
<removeAll />
</filter>
</filters>



rgds Christophe


On Fri, Sep 27, 2013 at 5:58 PM, Mikhail Kalkov <
Post by Mikhail Kalkov
As I mentioned, I haven't used tycho's filtering feature, but I'd try with
one id per filter for starters. Apart from this, I wonder if your p2
repository also includes optional dependencies, as a product materialized
from it does.
On a side note, it seems that neither
Post by Mikhail Kalkov
http://www.eclipse.org/tycho/sitedocs/index.html nor
http://www.eclipse.org/tycho/sitedocs-extras/index.html contain any
mavendocs for o.e.t.target-platform-configuration build plugin. Am I
missing something obvious?
/Mikhail
------------------------------
*Skickat: *fredag, 27 sep 2013 15:27:23
*Ämne: *Re: [tycho-user] optional dependencies - one more thing....
Thank you! I will try your suggestion.
the following did have little effect, is the syntax correct?
<filters>
<filter>
<type>p2-installable-unit</type>
<id>org.eclipse.debug.core</id>
<id>org.eclipse.debug.ui</id>
<id>org.eclipse.search</id>
<id>org.eclipse.team.core</id>
<id>org.eclipse.team.ui</id>
<id>org.eclipse.jdt</id>
<removeAll />
</filter>
</filters>
Rgds Christophe
On Fri, Sep 27, 2013 at 3:14 PM, Mikhail Kalkov <
Post by Mikhail Kalkov
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
------------------------------
*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
Post by Christophe Bouhier
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>
--
C*hristophe Bouhier
+31612962997
Clifforstraat 43-II
1051 GS, Amsterdam
http://www.netxforge.com
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
Continue reading on narkive:
Loading...