Discussion:
[tycho-user] Shared target plaform for many independant module
MAGGI Benoit
2017-03-02 09:07:27 UTC
Permalink
Hi everyone,

I usually share my target platform using a multi-module configuration
but now I want to share it between independent module.

Example:

- Parent P Module (Don't have any child module)

o Module Child A (have the parent P module as parent)

o Module Child B (have the parent P module as parent)


? I want to use the same target platform when running maven clean install against Child A or Child B.

? How to achieve that ?

I tried to add a target platform as sub module of parent and also played a little with dependencies without success.

I suppose that one solution would be to release the platform before.

? Is there any module on Maven Central or Eclipse nexus that provide a minimal target platform?

Regards,
Benoit
Henrik Steudel
2017-03-02 10:32:54 UTC
Permalink
Hi,
not entirely sure if I understood correctly, but I gather you used a
combined parent and aggregator approach where you defined
<modules>
<module>../myModuleA</module>
<module>../myModuleB</module>
</module>

in your parent pom.

These module definitions can be refactored to an aggregator (packaging pom)
1) one aggregator which contains the multi-module Child A (+ parent P)
2) and another aggregator pom which contains Child B (+ parent P).

Target Platform configuration could still be defined in the parent pom,
as you seem to be using the same parent P for both children. At least
that's how I structured it: Target Platform in parent, modules in
aggregator.

Consequently, you'll need to build the aggregator pom to build either
multi-module project now.
Further details: https://maven.apache.org/pom.html#Aggregation

Maybe it helps
Henrik
Post by MAGGI Benoit
Hi everyone,
I usually share my target platform using a multi-module configuration
but now I want to share it between independent module.
-Parent P Module (Don’t have any child module)
oModule Child A (have the parent P module as parent)
oModule Child B (have the parent P module as parent)
ðI want to use the same target platform when running maven clean
install against Child A or Child B.
ðHow to achieve that ?
I tried to add a target platform as sub module of parent and also
played a little with dependencies without success.
I suppose that one solution would be to release the platform before.
ðIs there any module on Maven Central or Eclipse nexus that provide a
minimal target platform?
Regards,
Benoit
_______________________________________________
tycho-user mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user
--
Entimo AG
Stralauer Platz 33 - 34 | 10243 Berlin | Germany
Tel: +49.30.52 00 24 133 | Fax: +49.30.52 00 24 101
***@entimo.com | http://www.entimo.com/

Vorstand: Jürgen Spieler (Vors.), Marianne Neumann
Aufsichtratsvorsitzender: Erika Tannenbaum

Sitz der Gesellschaft: Berlin, Germany | Handelsregister: HRB Berlin-Charlottenburg 85073
MAGGI Benoit
2017-03-02 12:40:57 UTC
Permalink
Hi Henrik,

Thanks for the answer.

Your solution is the one that I usually use,
but in my use case I would like to use the maven-invoker plugin [1]
and share a target platform between the integration tests (many modules).

So my tests modules all have the same parent but their parent isn't an aggregator.

Note, it works fine with this configuration in the parent:
<repositories>
<repository>
<id>eclipse-mars</id>
<layout>p2</layout>
<url>http://download.eclipse.org/releases/mars/</url>
</repository>
</repositories>

but the repository is contacted for each module.
I kind of hope to avoid that with a targetplatform.

Regards,
Benoit
1: http://maven.apache.org/plugins/maven-invoker-plugin/


De : tycho-user-***@eclipse.org [mailto:tycho-user-***@eclipse.org] De la part de Henrik Steudel
Envoyé : jeudi 2 mars 2017 11:33
À : Tycho user list <tycho-***@eclipse.org>
Objet : Re: [tycho-user] Shared target plaform for many independant module

Hi,
not entirely sure if I understood correctly, but I gather you used a combined parent and aggregator approach where you defined
<modules>
<module>../myModuleA</module>
<module>../myModuleB</module>
</module>

in your parent pom.

These module definitions can be refactored to an aggregator (packaging pom)
1) one aggregator which contains the multi-module Child A (+ parent P)
2) and another aggregator pom which contains Child B (+ parent P).

Target Platform configuration could still be defined in the parent pom, as you seem to be using the same parent P for both children. At least that's how I structured it: Target Platform in parent, modules in aggregator.

Consequently, you'll need to build the aggregator pom to build either multi-module project now.
Further details: https://maven.apache.org/pom.html#Aggregation

Maybe it helps
Henrik

Am 02.03.2017 um 10:07 schrieb MAGGI Benoit:
Hi everyone,

I usually share my target platform using a multi-module configuration
but now I want to share it between independent module.

Example:

- Parent P Module (Don't have any child module)

o Module Child A (have the parent P module as parent)

o Module Child B (have the parent P module as parent)


ð I want to use the same target platform when running maven clean install against Child A or Child B.

ð How to achieve that ?

I tried to add a target platform as sub module of parent and also played a little with dependencies without success.

I suppose that one solution would be to release the platform before.

ð Is there any module on Maven Central or Eclipse nexus that provide a minimal target platform?

Regards,
Benoit




_______________________________________________

tycho-user mailing list

tycho-***@eclipse.org<mailto:tycho-***@eclipse.org>

To change your delivery options, retrieve your password, or unsubscribe from this list, visit

https://dev.eclipse.org/mailman/listinfo/tycho-user




--

Entimo AG

Stralauer Platz 33 - 34 | 10243 Berlin | Germany

Tel: +49.30.52 00 24 133 | Fax: +49.30.52 00 24 101

***@entimo.com<mailto:***@entimo.com> | http://www.entimo.com/



Vorstand: Jürgen Spieler (Vors.), Marianne Neumann

Aufsichtratsvorsitzender: Erika Tannenbaum



Sitz der Gesellschaft: Berlin, Germany | Handelsregister: HRB Berlin-Charlottenburg 85073
Mickael Istria
2017-03-06 07:34:49 UTC
Permalink
So my tests modules all have the same parent but their parent isn’t an
aggregator.
Whether parent is an aggregator or not shouldn't change anything
regarding resolution.
What kind of error messages do you see? That's missing in your initial post.
Do you define the target platform to use as described in
https://wiki.eclipse.org/Tycho/Target_Platform#Target_files ? Are you
sure this artifact is available for other modules to resolve it in
different reactors: Is it `mvn install`ed in your local repository or
available on a remote one modules can consume?
Like parent pom, Target definition artifacts are better being published
on a remote Maven repo, so they can be consumed by multiple projects.

HTH
--
Mickael Istria
Eclipse developer for Red Hat Developers <http://developers.redhat.com>
My blog <http://mickaelistria.wordpress.com> - My Tweets
<http://twitter.com/mickaelistria>
MAGGI Benoit
2017-03-06 08:35:14 UTC
Permalink
Hi Mickael,

Since it was to build "fake" modules for testing purposes, I was looking for a way to avoid publishing a target platform.

In the end using a targetplatform already present in Maven central did the trick. [1]
(Not sure if the build is faster than the one defining the target using the url.)

Depending of the configuration I always end up with either a "Project not found" or "Dependency not found"

I will try to setup a small example.

Regards,
Benoit

1:
<!-- Works but is it really faster ?-->
<groupId>org.integratedmodelling</groupId> <artifactId>org.integratedmodelling.kim.target</artifactId>
<version>0.9.10</version>

De : tycho-user-***@eclipse.org [mailto:tycho-user-***@eclipse.org] De la part de Mickael Istria
Envoyé : lundi 6 mars 2017 08:35
À : tycho-***@eclipse.org
Objet : Re: [tycho-user] Shared target plaform for many independant module

On 03/02/2017 01:40 PM, MAGGI Benoit wrote:
So my tests modules all have the same parent but their parent isn't an aggregator.
Whether parent is an aggregator or not shouldn't change anything regarding resolution.
What kind of error messages do you see? That's missing in your initial post.
Do you define the target platform to use as described in https://wiki.eclipse.org/Tycho/Target_Platform#Target_files ? Are you sure this artifact is available for other modules to resolve it in different reactors: Is it `mvn install`ed in your local repository or available on a remote one modules can consume?
Like parent pom, Target definition artifacts are better being published on a remote Maven repo, so they can be consumed by multiple projects.

HTH
--
Mickael Istria
Eclipse developer for Red Hat Developers<http://developers.redhat.com>
My blog<http://mickaelistria.wordpress.com> - My Tweets<http://twitter.com/mickaelistria>
Loading...