[
https://issues.jboss.org/browse/WELD-835?page=com.atlassian.jira.plugin.s...
]
Max Rydahl Andersen commented on WELD-835:
------------------------------------------
Oh great that you only need to enable the annotation processor - I
was adding the specific jar to make that work
Actually, you still need to add the JAR. I include a .factorypath in
the archetype to set this configuration. I don't understand why it is required.
The annotation processor jars can't be on the classpath, or rather the classpath of
your app cannot be on the annotation processor classpath since it would be
conflicting/cyclic. Thus there is a separate configuration step in eclipse; like it is
even when you use the javac command line.
I'll need to look to see if m2eclipse could detect annotation processor properly in
pom.xml and have it configure automatically.
To provide some background, I include the the following .factorypath
file in the root of the project:
<factorypath>
<factorypathentry kind="PLUGIN"
id="org.eclipse.jst.ws.annotations.core" enabled="true"
runInBatchMode="false"/>
<factorypathentry kind="VARJAR"
id="M2_REPO/org/hibernate/hibernate-jpamodelgen/1.1.1.Final/hibernate-jpamodelgen-1.1.1.Final.jar"
>enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR"
id="M2_REPO/org/hibernate/javax/persistence/hibernate-jpa-2.0-api/1.0.0.Final/hibernate-jpa-2.0-api->1.0.0.Final.jar"
enabled="true" runInBatchMode="false"/>
</factorypath>
hmm - surprised jpamodelgen is dependent on hibernate-jpa api ...that's annoying...
However, the annotation processing doesn't work after importing
the project. You need to go into the Annotation Processing preferences, uncheck
>"Enable annotation processing" it, do build, enable it again, then it works.
In short, it requires shaking the vending machine. Not sure why.
I'll look.
Make sure all examples have instructions for importing and deploying
via JBoss Tools.
-------------------------------------------------------------------------------------
Key: WELD-835
URL:
https://issues.jboss.org/browse/WELD-835
Project: Weld
Issue Type: Task
Reporter: Pete Muir
Priority: Critical
Fix For: 1.2.0.Beta1
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira