Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] How to use javax.annotation.Resource from JEE spec?

AFAIK, there is no nice solution and I think this is general Maven
limitation. Bugzilla [1] talks about the same problems and for command
line build the solution appears to be use of endorsed libraries. You
maybe able to workaround the problem by adding
jboss-annotations-api_1.1_spec to JRE classpath using "Installed JREs"
workspace preference page.



On 11-11-10 10:59 AM, Lars Fischer wrote:

I would like to use m2e to develop a JEE6 webapp.

My pom.xml contains this dependency as provider for the JEE classes:

One bean uses a javax.annotation.Resource annotation from the JEE6
spec, which has an additional lookup attribute.
Using m2e to perform the eclipse configuration, the JRE System library
is the first used provider for the Resource class.

This results in an eclipse compile error: "The attribute lookup is
undefined for the annotation type Resource"

I can change the order of the eclipse project settings to have the
maven dependencies bevore the JRE, but each time m2e needs to
reconfigure the eclipse settings, the order is reseted and the compile
error is back.

Is there a way to configure the pom.xml that "Update project
configuration..." results in a working configuration?

m2e-users mailing list

Back to the top