Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-dev] [tycho-user] <optionalDependencies> configuration parameter

So, do we agree that the test runtime should always ignore optional
dependencies defined in test bundle manifest and the user will need to
use explicit pom.xml configuration to control what dependencies are used
by the tests?

Please note that this only affects dependencies of the test bundle
itself, all indirect optional dependencies are already ignored.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=367701

--
Regards,
Igor

On 12-01-04 4:39 AM, Oberlies, Tobias wrote:
The point of optional dependencies is that they really need to be
optional. Regardless of whether the optional dependencies are
required at compile time, I don't want them to be part of the test
runtime (by default) in order to test that the core of my bundle
doesn't fail with NoClassDefFound exceptions.

In the end, I probably want to test both (e.g. through two profiles
or two test modules), but adding bundles to the test runtime (through
the<dependencies>  parameter) is easier/more intuitive than removing
bundles from the test runtime (through target platform<filters>).

I even think that it should not be possible to add all optional
dependencies to the test runtime with a single switch. The reason is
that such a switch helps you, but it doesn't help your users to
install your bundle with all optional dependencies [1]. Instead, I
think that you should create an extra feature that brings in the
optional dependencies of your code. This allows your users to install
your code with all optional stuff, and yourself to run tests with
optional dependencies (by adding a<dependency>  to the extra
feature). >
Regards
Tobias


[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=247342


-----Original Message-----
From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-
bounces@xxxxxxxxxxx] On Behalf Of Igor Fedorenko
Sent: Dienstag, 3. Januar 2012 18:19
To: tycho-user@xxxxxxxxxxx
Subject: Re: [tycho-user] [tycho-dev]<optionalDependencies>  configuration
parameter

Can you provide a scenario where you'd want to have optionalDependencies
set differently for compile dependency resolution and when resolving
test runtime?

--
Regards,
Igor

On 12-01-03 10:06 AM, Oberlies, Tobias wrote:
Igor Fedorenko wrote:
In order to handle optional dependencies, we've introduced new
<optionalDependencies>   configuration parameter. If the parameter set
to
"require", the default, Tycho will treat optional dependencies as
required and will fail the build if any of the optional dependencies is
missing or cannot be resolved for some other reason. If set to
"ignore",
Tycho will completely ignore the optional dependencies.

The behaviour described above controls project compile classpath and
contents of OSGi test runtime of eclipse-test-plugin project.
Currently, this doesn't work reliably [1].

IMHO the requirements for the test runtime are generally different to
what is needed for compilation, so I think there should be separate
parameters for each.

Regards
Tobias


[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=367701  Optional
dependencies in test runtime depends on reactor

_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user


Back to the top