Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Eclipse support for tycho-compiler-plugin: extraClasspathElements

As far as I can tell, m2e-tycho does not add plain Maven dependencies to the classpath. Or am I mistaken?

I only get 'Plug-in Dependencies', which is managed by PDE based on the bundle's manifest. There is no available 'Maven Managed Dependencies' classpath container, and I can't add it manually.

Robert


On Fri, Aug 2, 2013 at 6:40 PM, Jeff MAURY <jeffmaury@xxxxxxxxxxxxx> wrote:
I understood you were using m2e-tycho so you should see the dependency.

Jeff


On Fri, Aug 2, 2013 at 5:22 PM, Robert Munteanu <robert.munteanu@xxxxxxxxx> wrote:



On Thu, Aug 1, 2013 at 4:35 PM, Jeff MAURY <jeffmaury@xxxxxxxxxxxxx> wrote:
Why don't you add it as a standard Maven dependency ?

Jeff


If I add it as a standard Maven dep then Eclipse ( as an IDE ) doesn't include it in the project classpath and I get compile-time errors.

Robert

 


On Thu, Aug 1, 2013 at 11:19 AM, Robert Munteanu <robert.munteanu@xxxxxxxxx> wrote:
Hi,

I'm trying to combine a tycho build with the maven-scr-plugin. The
maven-scr-plugin allows me to annotate classes and then generates SCR
descriptors for them automatically, rather than me having to maintain
them manually.

This also requires the org.apache.felix.scr.annotations jar to be part
of the classpath. Given that this jar is not a bundle and not present
in a p2 repository, it seemed like a roadblock. Courtesy of
StackOverflow [1] I was able to get the tycho build working, by

- using the tycho-compiler-plugin: extraClasspathElements
configuration option to add the annotations jar to the class path
- binding the maven-scr-plugin to the compile phase
- using the tycho-packaging-plugin to include the generated
descriptors in the final jar

The only blocker that I have is that inside Eclipse the annotations
are not added to the classpath and therefore Eclipse generates
compiler errors.

How can I convince Eclipse/the tycho m2e configurator to add jars from
the extraClassPathElements to the project's classpath?

Thanks,

Robert

[1]: http://stackoverflow.com/questions/17835007/using-annotations-from-a-library-which-is-not-a-bundle-in-a-tycho-build

--
http://robert.muntea.nu/

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



--
Jeff MAURY


"Legacy code" often differs from its suggested alternative by actually working and scaling.
 - Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury

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




--
http://robert.muntea.nu/

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




--
Jeff MAURY


"Legacy code" often differs from its suggested alternative by actually working and scaling.
 - Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury

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




--
http://robert.muntea.nu/

Back to the top