Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Produce artifacts consumable by Maven and Tycho

Thanks again for this very helpful insight!

Right now I'm just gathering information, but think I could try this out.

Thanks for the hint with the JRE11 and Maven.

The bigger picture:
As for the "pathway", I must admit that we are always building our whole rcp and maven builds and don't use any maven mechanisms to install or deploy the artifacts to any repo. Currently our dependencies between maven and tycho builds are in fact ring-dependencies which copy sources and artifacts between involved projects... That's the whole reason behind my question. I wan't to cut out those "core-utils" from involved projects and correct the dependencies, so that they look somewhat like in my initial question.
- In order to consume the build artifacts I think I would install them in local maven repos for now.

The next step would be to use appropriate maven/tycho install or deploy mechanisms, so that we would not have to build the artifacts everytime.
- But I would come back to this later in another thread, otherwise it could blow this thread.
- If you could point me to any lecture that would provide information about best practices for maven/tycho artifact deployments. Are the best practices from maven with the maven release plugin etc. usable here?
-- Especially I'm interested in the part where different versioning-system branches are involved. How do we handle the artifacts from these branches regarding the version-numbers and structure in the artifact repository?

Best regards,
Ahmet



Ahmet Bilgin, M.Sc.
Software Development
MAGMA Gießereitechnologie GmbH
T: +49 241 88901 203
A: Kackertstrasse 16-18, 52072 Aachen, Germany
W: www.magmasoft.de
E: a.bilgin@xxxxxxxxxxxx
GERMANY ● USA ● BRAZIL ● SINGAPORE ● SOUTH KOREA ● CHINA ● INDIA ● TURKEY ● CZECH REPUBLIC

SAVE THE DATE!
17 - 19 March 2021 - 46th Aachen Foundry Colloquium
The virtual foundry - status and future developments

MAGMA Gießereitechnologie GmbH | Kackertstraße 16-18, 52072 Aachen, Germany | Legal form: GmbH, Register court: Aachen HRB 3912, Value added tax identification number: DE121745780 | Management: Dr. Marc C. Schneider (CEO and President), Dr.-Ing. Jörg C. Sturm (Managing Director)Digital Conference - Aachen, Germany-----Original Message-----
From: tycho-user [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Christoph Läubrich
Sent: Tuesday, February 16, 2021 11:29 AM
To: tycho-user@xxxxxxxxxxx
Subject: Re: [tycho-user] Produce artifacts consumable by Maven and Tycho

The new m2e integration allows smooth usage both in tycho+pde with the
same target file.

With the old way one needs to take care that those dependencies are
somewhat accessible while developing with pde, but I assume you have
already a pathway for this.

If not you can still use the new m2e-pde in the ide, add your maven
dependencies to the target but need to duplicate that information in the
pom.xml to be consumed by older tycho versions.

BTW only the JRE that runs maven must be java11 not the source-projects.


Am 16.02.21 um 11:17 schrieb Ahmet Bilgin:
> As a temporary workaround "consider dependencies" sounds interesting.
>
> But what exactly does this mean: "but they will  not show up in the IDE"?
> - The dependencies wouln't resolve and the project would not compile in the IDE?
> - Or are the dependencies just not shown in the UI, but the projects can compile?
>
> Best regards,
> Ahmet
>
>
>
> Ahmet Bilgin, M.Sc.
> Software Development
> MAGMA Gießereitechnologie GmbH
> T: +49 241 88901 203
> A: Kackertstrasse 16-18, 52072 Aachen, Germany
> W: www.magmasoft.de
> E: a.bilgin@xxxxxxxxxxxx
> GERMANY ● USA ● BRAZIL ● SINGAPORE ● SOUTH KOREA ● CHINA ● INDIA ● TURKEY ● CZECH REPUBLIC
>
> SAVE THE DATE!
> 17 - 19 March 2021 - 46th Aachen Foundry Colloquium
> The virtual foundry - status and future developments
>
> MAGMA Gießereitechnologie GmbH | Kackertstraße 16-18, 52072 Aachen, Germany | Legal form: GmbH, Register court: Aachen HRB 3912, Value added tax identification number: DE121745780 | Management: Dr. Marc C. Schneider (CEO and President), Dr.-Ing. Jörg C. Sturm (Managing Director)Digital Conference - Aachen, Germany-----Original Message-----
> From: tycho-user [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Christoph Läubrich
> Sent: Tuesday, February 16, 2021 10:01 AM
> To: tycho-user@xxxxxxxxxxx
> Subject: Re: [tycho-user] Produce artifacts consumable by Maven and Tycho
>
> If your maven artifacts are already "bundled" you can simply use
> "consider" maven dependencies in the target configuration (but they will
> not show up in the IDE).
>
> https://wiki.eclipse.org/Tycho/Target_Platform#.22POM_dependencies_consider.22
>
> Am 16.02.21 um 09:55 schrieb Ahmet Bilgin:
>> Dirk, thank you for the good  explanation! This makes perfect sense.
>>
>> As this Tycho feature is only available in the latest Tycho version,
>> which requires Java11, I will have to switch to our migration branch
>> (Eclipse, Tycho, Java ) to implement this. This branch will
>> unfortunately take some time to be delivered back to our main.
>>
>> Best regards,
>>
>> Ahmet
>>
>>
>>
>> Ahmet Bilgin, M.Sc.
>> Software Development
>>
>> *MAGMA Gießereitechnologie GmbH*
>>
>> P: +49 241 88901 203
>> Kackertstrasse 16-18, 52072 Aachen, Germany
>> www.magmasoft.de <http://www.magmasoft.de>
>> a.bilgin@xxxxxxxxxxxx <mailto:a.bilgin@xxxxxxxxxxxx>
>>
>> ------------------------------------------------------------------------
>> *GERMANY ● USA ● BRAZIL ● SINGAPORE ● SOUTH KOREA ● CHINA ● INDIA ●
>> TURKEY ● CZECH REPUBLIC*
>>
>> *<https://www.magmasoft.de/de/event/Die-virtuelle-Giesserei-Virtuelle-internationale-Konferenz-46.-Aachener-Giesserei-Kolloquium/?pk_campaign=Aachener-Giesserei-Kolloquium&pk_keyword=Aachener-Giesserei-Kolloquium&pk_source=Mailfooter&pk_medium=Email&pk_content=Link%20more%20Information>*
>>
>> SAVE THE DATE! 17 - 19 March 2021 - 46th Aachen Foundry Colloquium | The
>> virtual foundry - status and future developments | Digital Conference -
>> Aachen, Germany
>>
>> MAGMA Gießereitechnologie GmbH | Kackertstraße 16-18, 52072 Aachen,
>> Germany | Legal form: GmbH, Register court: Aachen HRB 3912, Value added
>> tax identification number: DE121745780 | Management: Dr. Marc C.
>> Schneider (CEO and President), Dr.-Ing. Jörg C. Sturm (Managing Director)
>>
>> *From:*tycho-user [mailto:tycho-user-bounces@xxxxxxxxxxx] *On Behalf Of
>> *Fauth Dirk (XC-ECO/ESM1)
>> *Sent:* Tuesday, February 16, 2021 6:24 AM
>> *To:* Tycho user list
>> *Subject:* Re: [tycho-user] Produce artifacts consumable by Maven and Tycho
>>
>> Hi,
>>
>> In this scenario I would suggest to build the “core-utils” with plain
>> Maven and use the maven-bnd-plugin to generate the OSGi metadata
>> (MANIFEST.MF). This way your “core-utils” can be published to a Maven
>> repository directly as valid OSGi bundles without modifications afterwards.
>>
>> Your Tycho builds can then consume the Maven artifacts directly by using
>> the m2e PDE Extension and Tycho 2.2.
>>
>> BTW, Tycho would also use the bnd tooling for generating the OSGi
>> metadata on the fly. So you would only “win” the fact that you don’t
>> need to call that plugin yourself. But I personally think that if you
>> are in control of the build artifacts, you should use the
>> maven-bnd-plugin and publish correct OSGi bundles to a Maven repository
>> instead of publishing plain Maven.
>>
>> Mit freundlichen Grüßen / Best regards
>>
>> *Dirk Fauth*
>>
>> Cross-Domain Computing Solutions, Cross Automotive Platforms - System,
>> Software and Tools Engineering Engineering Software Methods and Tools1
>> (XC-ECO/ESM1)
>> Robert Bosch GmbH | Postfach 30 02 40 | 70442 Stuttgart | GERMANY |
>> www.bosch.com <www.bosch.com>
>> Tel. +49 711 811-57819 | Telefax +49 711 811 | Dirk.Fauth@xxxxxxxxxxxx
>> <mailto:Dirk.Fauth@xxxxxxxxxxxx>
>>
>> Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart, HRB 14000;
>> Aufsichtsratsvorsitzender: Franz Fehrenbach; Geschäftsführung: Dr.
>> Volkmar Denner,
>> Prof. Dr. Stefan Asenkerschbaumer, Filiz Albrecht, Dr. Michael Bolle,
>> Dr. Christian Fischer,
>> Dr. Stefan Hartung, Dr. Markus Heyn, Harald Kröger, Rolf Najork, Uwe
>> Raschke
>> ​
>>
>> *Von:*tycho-user <tycho-user-bounces@xxxxxxxxxxx> *Im Auftrag von *Ahmet
>> Bilgin
>> *Gesendet:* Montag, 15. Februar 2021 18:36
>> *An:* tycho-user@xxxxxxxxxxx
>> *Betreff:* [tycho-user] Produce artifacts consumable by Maven and Tycho
>>
>> Hi,
>>
>> what is the current best practice to build common artifacts that are
>> used in both Maven and Tycho builds?
>>
>> Scenario:
>>
>> Here is a scenario (all listed modules are build inhouse, except the one
>> called 3^rd -Party):
>>
>> Let’s call the following modules our “core-utils”:
>>
>> - Module1 (depends on)
>>
>>       -- Module2
>>
>>       -- Module3 (depends on)
>>
>>               --- 3^rd -Party
>>
>>       -- Module4
>>
>> Module1 – Module4 (“core-utils”) are all required in our Tycho RCP Build
>> and in our Maven Builds (non-eclipse):
>>
>> -  tycho-rcp-build (depends on)
>>
>>       -- Module1
>>
>>       -- Module2
>>
>>       -- Module3
>>
>>       -- Module4
>>
>> - maven-builds (depend on)
>>
>>       -- Module1
>>
>>       -- Module2
>>
>>       -- Module3
>>
>>       -- Module4
>>
>> And now the big price question:
>>
>> Which should be the leading build-system for these “core-utils” – Tycho
>> or Maven?
>>
>> Additional info: we have way more tycho rcp bundles than plain maven
>> artifacts.
>>
>> There are two options:
>>
>> Option-1: Build maven-artifacts with maven
>>
>> - build and install to maven repo
>>
>> - Maven builds: can consume the artifacts without additional effort
>>
>> - Tycho builds: use on-the-fly conversion to Tycho/osgi artifact
>>
>>       --  Tycho tooling for this is implemented in tycho v.2.2
>>
>>       -- Alternative: something like maven-bnd-plugin
>>
>>       --  Consume converted artifacts in tycho build
>>
>> Option-2: Build tycho artifacts
>>
>> - build tycho artifacts but store artifacts in Maven style repo or use
>> some other mechanisms to make the artifacts consumable from maven builds
>>
>>       --  I know that the b3aggretor has this capability when mirroring
>> P2-Repos. See
>> https://wiki.eclipse.org/index.php?title=CBI/aggregator&redirect=no#Creating_a_Maven-conformant_p2_repo
>> <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eclipse.org%2Findex.php%3Ftitle%3DCBI%2Faggregator%26redirect%3Dno%23Creating_a_Maven-conformant_p2_repo&data=04%7C01%7Cdirk.fauth%40de.bosch.com%7C14840969597043d0c8b508d8d1d83b46%7C0ae51e1907c84e4bbb6d648ee58410f4%7C0%7C0%7C637490074796738580%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=6mySl2eDioRfL2BD9de2yr0uJxqmp2IWdlRozrHAPOQ%3D&reserved=0>
>>
>>       -- Has Tycho this feature too?
>>
>>       -- Alternative: for example something like this:
>> https://github.com/lhein/EclipseToMavenTooling
>> <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Flhein%2FEclipseToMavenTooling&data=04%7C01%7Cdirk.fauth%40de.bosch.com%7C14840969597043d0c8b508d8d1d83b46%7C0ae51e1907c84e4bbb6d648ee58410f4%7C0%7C0%7C637490074796738580%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=6IX93EwWg2IOV5oVdubQvI3yxd97lMg%2FAX4LyYoWQVg%3D&reserved=0>
>>
>> - Tycho Builds: can consume the artifacts without additional effort
>>
>> - Maven-Builds: can consume the artifacts without additional effort
>> (because the repo is structured like a maven repo, but also has p2
>> metainformation)
>>
>> Questions:
>>
>> 1. Which way is preferable /  which should be the leading build system
>> for these “core-utils”?
>>
>> 2. Is there any downside to one of the approaches, I’m maybe missing?
>>
>> Best regards,
>>
>> Ahmet
>>
>>
>> _______________________________________________
>> tycho-user mailing list
>> tycho-user@xxxxxxxxxxx
>> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/tycho-user
>>
> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/tycho-user
> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/tycho-user
>
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/tycho-user

Back to the top