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

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.


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


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

Am 07.12.2016 um 20:09 schrieb Dietrich, Christian:


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


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
christian.dietrich@xxxxxxxxx <mailto:christian.dietrich@xxxxxxxxx>
XING: <>
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
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

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 |

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

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

Back to the top