[weld-issues] [JBoss JIRA] Commented: (WELD-835) Make sure all examples have instructions for importing and deploying via JBoss Tools.

Dan Allen (JIRA) jira-events at lists.jboss.org
Fri Jan 21 17:48:49 EST 2011


    [ https://issues.jboss.org/browse/WELD-835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12577274#comment-12577274 ] 

Dan Allen commented on WELD-835:
--------------------------------

> our intent with the m2eclipse/jboss tools maven integration is that importing the pom.xml as a maven project should be enough.

Good. That's what I envisioned too. So then extra configuration in the archetype isn't necessary.

Btw, when I said "generate an Eclipse project" what I meant that Eclipse would know how to consume the project, not that we would generate project files. I only generate files to provide hints.

> 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.

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>

I also generate a .settings/org.eclipse.jdt.core.prefs file to enable annotation processing by default:

eclipse.preferences.version=1
org.eclipse.jdt.apt.aptEnabled=true
org.eclipse.jdt.apt.genSrcDir=target/generated-sources/annotations
org.eclipse.jdt.apt.reconcileEnabled=true

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.

> 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

        


More information about the weld-issues mailing list