[ 
https://issues.apache.org/jira/browse/OPENJPA-374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12566917#action_12566917
 ] 

Michael Dick commented on OPENJPA-374:
--------------------------------------

The fix I came up with is similar to the one for OPENJPA-512. 

In short the idea is to have an ant target that won't execute if ${test}=false 
or if ${maven.test.skip}=true. To do that I pulled the ant task out of pom.xml 
and created the enhancer.xml file which contains two targets : 

"enhance" which only runs if ${test}!=false 
"enhance.all.entities" which runs if ${maven.test.skip}!=true. 

enhance calls enhance.all.entities, which actually calls the enhancer. As I 
understand it you have to create multiple targets if you want to do something 
like this in ant - it's not really meant to be a scripting language. 

> OpenJPA build process enhances Entity classes even when testing is 
> deactivated via -Dtest=false
> -----------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-374
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-374
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: build / infrastructure
>            Reporter: Pinaki Poddar
>            Assignee: Michael Dick
>
> $ mvn package -Dtest=false
> attempts to enhance all the known Entity classes.
> It should not. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to