Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Problem with Resolving Sources Artifacts

Please open a bug report, apparently Tycho does not properly install p2
metadata for sources bundle.

--
Regards,
Igor

On 11-10-17 2:27 AM, Timo Rohrberg wrote:
Hello Igor,

thank you again for your hint. Unfortunately, it did not help. In
fact, I already tried to include the dependency declaration with
classifier "sources". I just do not get it, why Tycho cannot find the
artifact which is clearly marked by the "sources" classifier.

I attached the adapted version of my setup for you to cross-check.
Do you have any other hints how to solve the issue?

Regards
Timo


2011/10/14 Igor Fedorenko<igor@xxxxxxxxxxxxxx>:
see inline

--
Regards,
Igor

On 11-10-14 10:18 AM, Timo Rohrberg wrote:

Hello Igor,

thank you for your answer. Unfortunately, I did not completely
understand what you wanted to tell me. If you run "mvn install" on my
sample com.example.logging project, the resulting
"com.example.logging-1.6.1-SNAPSHOT-sources.jar" does have an OSGi
bundle manifest. In fact that's exactly the benefit of using the
tycho-source-plugin instead of packing the jar manually via the
maven-jar-plugin plugin. The manifest correctly identifies the bundle
as source bundle to the com.example.logging bundle contained in the
"com.example.logging-1.6.1-SNAPSHOT.jar" which itself is provided with
an OSGi bundle manifest.

I did not notice the attachment and I assumed you used maven-source-plugin
to produce sources jar.


What exactly do you mean by "has to be added as feature maven dependency"?

In the com.example.logging.feature project, I declared the dependency
to the "com.example.logging-1.6.1-SNAPSHOT.jar" as follows:

<dependencies>
   <dependency>
     <groupId>example</groupId>
     <artifactId>com.example.logging</artifactId>
     <version>1.6.1-SNAPSHOT</version>
   </dependency>
</dependencies>

I can then list the com.example.logging plugin in the feature.xml and
Tycho builds the feature correctly.

In contrary, with the com.example.logging.source.feature project this
does not work, since Tycho obviously does not correctly resolve the
dependency to the "com.example.logging-1.6.1-SNAPSHOT-sources.jar" in
which the com.example.logging.source plugin is to be found.


The<dependency/>  element above defines dependency on the main artifact,
for sources jar you also need to have

  <dependency>
    <groupId>example</groupId>
    <artifactId>com.example.logging</artifactId>
    <version>1.6.1-SNAPSHOT</version>
    <classifier>sources</classifier>
  </dependency>



Of course my sample setup is a bit special as I am wrapping
third-party libraries in OSGi bundles. But the use case of resolving
binary and source bundles built with Tycho is a common one, I guess.
How would I work with such binary and source bundles if Tycho could
not resolve them?

Any hints, comments, suggestions, ...?

Thank you very much for all your help so far.

Regards
Timo


2011/10/14 Igor Fedorenko<igor@xxxxxxxxxxxxxx>:

Sources jar has to have specific OSGi bundle manifest and has to be
added as feature maven dependency. I am not sure it is possible to
create sources jar with custom manifest, but I am not 100% sure about
that.

--
Regards,
Igor

On 11-10-14 8:38 AM, Timo Rohrberg wrote:

Hello everybody,

this is a more general form of my original question and problem
description
(http://dev.eclipse.org/mhonarc/lists/tycho-user/msg01026.html).
The latter is obsolete now.

I am successfully building binary and sources artifacts for a bundle
which wraps third party libraries. Both, the normal and the sources
artifact, are correctly deployed to my local Maven repository. I then
build two feature projects with Tycho, one including the plugin from
the binary artifact, and the other including it from the sources
artifact. Building the first one works, but when trying to build the
second one, Tycho obviously cannot resolve the sources artifact
correctly and thus stops with a "Missing requirement" exception. The
com.example.logging.source plugin referred to by the feature.xml
cannot be found. My idea was to explicitely set the "sources"
classifier when declaring the pom-Dependency in the feature project.
But unfortunately this also doesn't help.

Do you have any idea? Thank you for any hints, advices, etc.

Regards
Timo

_______________________________________________
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