Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Changing P2 URL in .target, doesn't resolve new plugins.

superb Mikhail,
The Eclipse example and your clear explanation, is the setup I am looking for.
Rgds,
Christophe


On Tue, Jul 1, 2014 at 1:53 PM, Mikhail Kalkov <mikhail.kalkov@xxxxxxxxxxxxxx> wrote:
Hi,

I didnt't get the crux of your problem with p2 repos, but can clarify bi-directional references.

When you use <module> tag in "parent" pom, a unidirectional containment reference is created from "parent" to "child". It does not result in any configuration inheritance and is typically used to provide a single place to build the whole module from. When you use <parent> tag in child pom, a uni-directional inheritance reference is created from child to parent. This one makes a child inherit settings from parent and is typically used to avoid duplicating configuration in every module.

Take Eclipse Platform [1], for example. One first checks out eclipse.platform.releng.aggregator git repo and all its git submodules. The main pom.xml [2] mentions all other projects from git submodules using <module> tag. However, if you go into any of them and check their pom.xml, the parent is set to ../eclipse-platform-parent [3], which means they inherit settings from that project, and NOT from main pom.xml.

You can check this article for a more complicated example of parent-child and submodule relationships: [4]. I hope this example gives you an idea how to solve the issue with multiple parents... and before you ask it, Maven does not support composition of settings (HAS relationship), they can only be inherited (IS-A relationship).

[1] http://wiki.eclipse.org/Platform-releng/Platform_Build#Building
[2] https://git.eclipse.org/c/platform/eclipse.platform.releng.aggregator.git/tree/pom.xml
[3] https://git.eclipse.org/c/platform/eclipse.platform.common.git/tree/pom.xml
[4] http://books.sonatype.com/mvnref-book/reference/pom-relationships-sect-pom-best-practice.html

Kind regards,
Mikhail Kalkov

Eclipse Developer | Purple Scout AB | www.purplescout.com
Kyrkogatan 20-22, SE-41110 Gothenburg, Sweden


On Tue, Jul 1, 2014 at 11:50 AM, Christophe Bouhier <dzonekl@xxxxxxxxx> wrote:
Hi,

I found my problem. I use multiple parent pom.xml with each their own target definition. The child plugins however refer to only one parent pom.xml


    <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>


What would be the pattern to "re-use"  modules (Plugins) in multiple parent poms. Currently the bi-directional reference seems to prevent this. (What I mean is the children refer the parent, and the parent refers the children).

(Sorry, this sounds like a basic maven question...).

Rgds Christophe










On Tue, Jun 24, 2014 at 2:18 PM, Christophe Bouhier <dzonekl@xxxxxxxxx> wrote:
Hi,

I am upgrading one of my components (CDO):

<repository location="http://download.eclipse.org/modeling/emf/cdo/drops/R20140218-1655"/>

The tycho build doesn't pick up the plugins in this repo, as I see in the ...p2-metadata.xml (below). In the IDE, when I load this target, I get the correct plugin versions.

How do I force tycho to pick from the new location? (I have set this option, which doesn't help in this case: -Dtycho.localArtifacts=ignore

Do I need to clean the maven repo?

Thank You,
Christophe Bouhier

<required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.emf.cdo.net4j' range='[4.1.100.v20121228-1653,4.1.100.v20121228-1653]'/>
      <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.net4j.db' range='[4.2.0.v20130115-1033,4.2.0.v20130115-1033]'/>
      <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.net4j.util' range='[3.3.0.v20130126-0958,3.3.0.v20130126-0958]'/>
      <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.net4j.tcp' range='[4.1.100.v20120920-1622,4.1.100.v20120920-1622]'/>
      <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.net4j' range='[4.2.0.v20130120-1014,4.2.0.v20130120-1014]'/>
      <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.emf.cdo' range='[4.2.0.v20130130-0630,4.2.0.v20130130-0630]'/>
      <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.emf.cdo.common' range='[4.2.0.v20130126-1029,4.2.0.v20130126-1029]'/>
      <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.emf.cdo.server' range='[4.2.0.v20130126-0958,4.2.0.v20130126-0958]'/>
      <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.emf.cdo.server.db' range='[4.2.0.v20130125-0507,4.2.0.v20130125-0507]'/>
      <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.emf.cdo.server.net4j' range='[4.1.0.v20130112-1217,4.1.0.v20130112-1217]'/>
      <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.net4j.jvm' range='[4.1.100.v20120917-1349,4.1.100.v20120917-1349]'/>
      <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.net4j.db.mysql' range='[4.2.0.v20130116-0901,4.2.0.v20130116-0901]'/>
      <required namespace='org.eclipse.equinox.p2.iu' name='lpg.runtime.java' range='[2.0.17.v201004271640,2.0.17.v201004271640]'/>
      <required namespace='org.eclipse.equinox.p2.iu' name='com.mysql.driver' range='[5.1.18,5.1.18]'/>
      <required namespace='org.eclipse.equinox.p2.iu' name='org.eclipse.emf.cdo.server.db.mysql.artifacts.feature.feature.jar' range='[1.0.0.201406240140,1.0.0.201406240140]'>




_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user



Back to the top