Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Artifacts from local mvn repository on java build path

The only way to do this is by using explicit build target platform (i.e.
defined as .target file) for project C. You can define two .target file
and enable one or another using maven profile in C's pom.xml. You can
use m2e target platform configuration from [1] as copy&paste source.
.target files used by m2e are defined in [2]

[1] http://git.eclipse.org/c/m2e/m2e-core.git/tree/org.eclipse.m2e.parent/pom.xml
[2] http://git.eclipse.org/c/m2e/m2e-core.git/tree/target-platform


--
Regards,
Igor

On 11-04-15 04:49 AM, Thomas Ammann wrote:
I have two plugins A and B which both export the same package p but with
slightly different api. Then there is a plugin C which depends on package
p. I now need to compile C against A and C against B to see whether all
api used in C is met by both A and B. Therefore I set up features and
products including C and A (CA) or C and B (CB) respectively, strictly
separating A from B.

In C I intentionally use api provided by B only, expecting that the build
CA will fail. And to my surprise it doesn't if the build CB has been run before
so that B can be found in the local mvn repository. This means that in the
CA build C has been compiled against B, even though B is not referenced in
any pom nor feature etc. In the CA product build only C and A are included
as expected. This will lead to a runtime exception when C tries to access
the particular api not provided by package p in plugin A.

It seems that tycho adds plugins from the local mvn repository to the java
build path, that are not referenced in poms and features. I don't think it
should.

Is there any other way to tell tycho what should be on the java build
path?

Thanks for your help
Tom


Back to the top