Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-dev] Build p2 update site from Maven artifacts

> The Tycho build actually does not even have a target definition.
You can use target files for tycho outside of eclipse and in "pure" maven anyways as its just a text-file to instruct tycho where to pull dependencies :-)

The tycho-source plugin only generates sources form projects that are part of the reactor build. So if you do not build anything in your project it cant generate sources.

> And I am not aware that you could add Maven dependencies to a Target Definition. Yes that feature will be new in the 2020-12 release, see [1], [2], [3] and [4] for some details/preview. All these features have corresponding support in next tycho release as well.

> Of course I would like to avoid the second definition
Well that's the "maven-way" and that's how tycho currently works in that area :-) I was never happy with that and thus constantly improving support for other, less verbose ways (pomless, maven-target support) that's integrates more smoothly into the IDE+Tycho so I don't need to configure things twice.

> And they are currently blocked in updating to the latest Tycho because they need to be able to build with Java 8

Build with or build for java 8? You can build java 8 classes with tycho 2.x as well

[1] https://github.com/eclipse-m2e/m2e-core/pull/21
[2] https://github.com/eclipse-m2e/m2e-core/pull/33
[3] https://github.com/eclipse-m2e/m2e-core/pull/36
[4] https://github.com/eclipse-m2e/m2e-core/pull/38#issuecomment-735961799


Am 04.12.20 um 11:26 schrieb Fauth Dirk (CAP-SST/ESM1):
Hi Christoph,

Although this sounds nice for Eclipse projects, this is not what I was looking for. At least if I understand correctly.

The Tycho build actually does not even have a target definition. It only consumes the two bundles from Maven. I have defined the dependencies this way:

     <dependencies>
         <dependency>
             <groupId>org.eclipse.collections</groupId>
             <artifactId>eclipse-collections-api</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
             <groupId>org.eclipse.collections</groupId>
             <artifactId>eclipse-collections</artifactId>
             <version>${project.version}</version>
         </dependency>

         <dependency>
             <groupId>org.eclipse.collections</groupId>
             <artifactId>eclipse-collections-api</artifactId>
             <version>${project.version}</version>
	<classifier>sources</classifier>
         </dependency>
         <dependency>
             <groupId>org.eclipse.collections</groupId>
             <artifactId>eclipse-collections</artifactId>
             <version>${project.version}</version>
	<classifier>sources</classifier>
         </dependency>
     </dependencies>

Of course I would like to avoid the second definition for the sources dependency. But anyhow, something one could live with.

And I am not aware that you could add Maven dependencies to a Target Definition. Maybe I missed some features in the latest Tycho, but that would be totally new to me.

It is nothing critical, so there is time. I just want to help the project to create a p2 update site with less effort than it is now. And they are currently blocked in updating to the latest Tycho because they need to be able to build with Java 8 for some reasons. That is why I would like to separate the p2 repository build from the rest of their build structure.

Mit freundlichen Grüßen / Best regards

  Dirk Fauth

Cross Automotive Platforms - System, Software and Tools Engineering Engineering Software Methods and Tools1 (CAP-SST/ESM1)
Robert Bosch GmbH | Postfach 10 60 50 | 70049 Stuttgart | GERMANY | www.bosch.com
Tel. +49 711 811-57819 | Telefax +49 711 811 | Dirk.Fauth@xxxxxxxxxxxx

Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart, HRB 14000;
Aufsichtsratsvorsitzender: Franz Fehrenbach; Geschäftsführung: Dr. Volkmar Denner,
Prof. Dr. Stefan Asenkerschbaumer, Dr. Michael Bolle, Dr. Christian Fischer, Dr. Stefan Hartung,
Dr. Markus Heyn, Harald Kröger, Christoph Kübel, Rolf Najork, Uwe Raschke, Peter Tyroller

-----Ursprüngliche Nachricht-----
Von: tycho-dev-bounces@xxxxxxxxxxx <tycho-dev-bounces@xxxxxxxxxxx> Im Auftrag von Christoph Läubrich
Gesendet: Freitag, 4. Dezember 2020 10:47
An: tycho-dev@xxxxxxxxxxx
Betreff: Re: [tycho-dev] Build p2 update site from Maven artifacts

Hi Dirk,

Currently PDE requires some additional headers to really use source-jars as source bundles. So if you bundle the sources as well appropriately you can include them in tycho already.

Beside from that, automatically using maven-deps sources with tycho-source-plugin is currently under development.


If you don't mind to use snapshots/latest builds or you can wait for the
next tycho + m2e release you can solve your use-case in an alternative way:

1) You can include your desired artifacts into the target file of your
project and choose "include source" and don't mind about building an
extra P2-Updatesite
2) Create a target for your updatesite build as above and wait until I
have implemented the m2e-source-feature in tycho (hopefully next week)
and proceed with deploying and all this additional stuff

That way you can even use artifacts that are not bundles at all, either
using some default mapping or create a BND mapping description from
within the target editor.



Back to the top