Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] please test staged tycho 0.17.0

Hi Tobias,

thanks for the detailed explanation. :-)

> See my comments on the execution environment problem below.
> 
> Andreas Sewe wrote:
>> First of all,
>> target-platform-configuration/configuration/executionEnvironmentDefault
>> had to be set to JavaSE-1.6. If that was not set, the following
>> exception ensued:
>>
>>> [ERROR] Internal error: java.lang.RuntimeException: "No solution
>>> found because the problem is unsatisfiable.": ["Unable to satisfy
>>> dependency from com.sun.jersey.core 1.8.0.201302271349 to package
>>> javax.activation 0.0.0.", "Unable to satisfy dependency from
>>> com.sun.jersey.core 1.8.0.201302271349 to package javax.xml.bind
>>> 0.0.0.", "Unable to satisfy dependency from com.sun.jersey.core
>>> 1.8.0.201302271349 to package javax.xml.bind.annotation 0.0.0.",
>>> "Unable to satisfy dependency from com.sun.jersey.core
>>> 1.8.0.201302271349 to package javax.xml.stream 0.0.0.", "No solution
>>> found because the problem is unsatisfiable."] -> [Help 1]
>>> org.apache.maven.InternalErrorException: Internal error:
>>> java.lang.RuntimeException: "No solution found because the problem is
>>> unsatisfiable.": ["Unable to satisfy dependency from
>>> com.sun.jersey.core 1.8.0.201302271349 to package javax.activation
>>> 0.0.0.", "Unable to satisfy dependency from com.sun.jersey.core
>>> 1.8.0.201302271349 to package javax.xml.bind 0.0.0.", "Unable to
>>> satisfy dependency from com.sun.jersey.core 1.8.0.201302271349 to
>>> package javax.xml.bind.annotation 0.0.0.", "Unable to satisfy
>>> dependency from com.sun.jersey.core 1.8.0.201302271349 to package
>>> javax.xml.stream 0.0.0.", "No solution found because the problem is
>>> unsatisfiable."]
>>
>> While the release notes mention that the behavior w.r.t. to execution
>> environments has changed, I was nevertheless surprised by this, as the
>> com.sun.jersey.core bundle explicitly declares a
>> "Bundle-RequiredExecutionEnvironment: JavaSE-1.6" in its manifest.
>> Shouldn't this be enough?
> 
> I suppose that the problem does not occur while building com.sun.jersey.core, but while building a bundle which depends on com.sun.jersey.core. In this case, Tycho checks if it would be possible to install & run your bundle in the given context, i.e. execution environment and target platform.

Correct. The bundle com.sun.jersey.core was built ages ago in a
different reactor and published on an update site.

> With the execution environment 1.5 this would fail because some of your mandatory dependencies requires Java 1.6 in two ways:
> - via the BREE, and
> - via imports of packages available in Java 1.6
> 
> p2 currently doesn't encode the first constraint, so it only notices that there is no provider for packages like javax.activation. This error message is unfortunate because having a provider for that package wouldn't help, but only lead to an error message "Missing Constraint: Bundle-RequiredExecutionEnvironment: JavaSE-1.6" from the Equinox resolver which is called by Tycho after the p2 resolver.
> 
>> That being said, setting executionEnvironmentDefault sufficed as a
>> workaround.
> 
> This is the simplest option. You could also specify a Bundle-RequiredExecutionEnvironment: JavaSE-1.6 header in you bundle, but you'd still need the executionEnvironmentDefault so that the dependency resolution of features works.

All my own bundles have Bundle-RequiredExecutionEnvironment: JavaSE-1.6
already, but as you said this doesn't help with the feature.

> This really makes me think that the default EE should be 1.6 or even 1.7, or otherwise most people will need to set the executionEnvironmentDefault POM parameter... Not for 0.17.0 though ;-)

Fair enough. But in light of
<https://bugs.eclipse.org/bugs/show_bug.cgi?id=401310> a future default
of 1.6 seems sensible.

Best wishes,

Andreas
-- 
Codetrails.com - the knowledge transfer company


Back to the top