Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Tycho and Project Classpath

Hi Sievers,

Any news on that fix that do not validate classpath before anything else?

Regards,
Charlie

2016-12-12 11:48 GMT+01:00 Sievers, Jan <jan.sievers@xxxxxxx>:
Henrik is right.

this is basically a limitation of how we map the PDE/OSGi classpath to the maven classpath model early in the build (to make it available to non-Tycho maven plugins inside a Tycho build).
Unfortunately maven checks if a file exists when added to its classpath so we can only add local files if they exist, otherwise the build would fail.
If files are not referenced in the target/ folder, but rather .gitignored somewhere in your source tree, you should only have this problem once, any subsequent build should succeed.

Since we don't know when in the lifecycle a jar will be made available, the real fix would probably be to do something similar as in MavenDependencyInjector in a mojo just before the compile phase for every eclipse(test)-plugin to fill up any missing classpath entries.

Regards,
Jan



On 09/12/16 12:47, "tycho-user-bounces@eclipse.org on behalf of Henrik Steudel" <tycho-user-bounces@eclipse.org on behalf of hst@xxxxxxxxx> wrote:

Hello,

if your dependency is copied during build process to the final location, the problem could be that tycho resolves these classpath entries only during initial computation of the target platform dependencies.

So, if your jar is not checked out , it is not present physically but only be added as external dependency if nestedJarOrDir.isFile() is true in org.eclipse.tycho.core.maven.MavenDependencyInjector.newExternalDependencies(ArtifactDescriptor).


So, to test this, just copy the dependency jar to the final location before maven starts and see if it works then.


We had a similar problem with scala-compiler not picking up any nested jars which will be created during maven build runtime and therefore had to prefix maven builds with ANT/Groovy step to create 0 byte nested jars.

Hope this helps
Henrik



Am 07.12.2016 um 20:09 schrieb Dietrich, Christian:


Hi,


i have a question on how tycho provides the project classpath.
we have a user of our xtend maven plugin
calls it inside a tycho project.


- he has a lib folder with a jar in build.properties / Manifest
- the jar is not checked in but copied with the maven dependencies plugin
- the jar is visible to the tycho compiler plugin
- the jar is not visible inside project.getCompileClasspathElements


is that intended? how can this be circomvented?


Thanks


--
Christian Dietrich (Diplom-Informatiker (BA))
Softwareentwickler / -Architekt

Tel.: +49 (0) 711 / 34 21 91-0
Fax.: +49 (0) 711 / 34 21 91-29
Mobil: +49 (0) 151 / 173969 17
Mail:
christian.dietrich@xxxxxxxxx <mailto:christian.dietrich@itemis.de>
XING:
https://www.xing.com/profile/Christian_Dietrich8 <https://www.xing.com/profile/Christian_Dietrich8>
Web: http://www.itemis.de
Skype: christiandietrich1982
ICQ: 125801794

itemis AG
Niederlassung Süd
Industriestraße 6
70565 Stuttgart

Rechtlicher Hinweis:
Registergericht: Amtsgericht Dortmund HRB 20621 | Sitz der Gesellschaft: Lünen
Vorstand: Jens Wagener (Vorsitzender) | Wolfgang Neuhaus
Aufsichtsrat: Prof. Dr. Burkhard Igel (Vors.) | Michael Neuhaus | Jennifer Fiorentino













_______________________________________________
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




--
Entimo AG
Stralauer Platz 33 - 34 | 10243 Berlin | Germany
Tel: +49.30.52 00 24 133 | Fax: +49.30.52 00 24 101
hst@xxxxxxxxxx | http://www.entimo.com/

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

Sitz der Gesellschaft: Berlin, Germany | Handelsregister: HRB Berlin-Charlottenburg 85073

_______________________________________________
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



--
Charlie Mordant

Full OSGI/EE stack made with Karaf: https://github.com/OsgiliathEnterprise/net.osgiliath.parent

Back to the top