[ 
https://issues.apache.org/jira/browse/LUCENE-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14504790#comment-14504790
 ] 

Uwe Schindler commented on LUCENE-4045:
---------------------------------------

In forbidden-apis I never saw a difference between Maven 2 and Maven 3 code. I 
generally compile against the plugin api of 2.0 and use the Java Annotation of 
Maven 3 (see forbiddenapis ivy.xml): 
[https://github.com/policeman-tools/forbidden-apis/blob/bb281867639ea67c29acbc8a20b19945bb68f7f3/ivy.xml]

In general I prefer Java 5 annotations, but thats unrelated to the version of 
the Plugin API.

> Switch Maven test runner from maven-surefire-plugin to 
> com.carrotsearch.randomizedtesting:junit4-maven-plugin
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-4045
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4045
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: general/test
>    Affects Versions: 4.0-ALPHA
>            Reporter: Steve Rowe
>            Assignee: Dawid Weiss
>            Priority: Minor
>
> {{com.carrotsearch.randomizedtesting:junit4-maven-plugin}} can be used to run 
> all Lucene/Solr tests under Maven, providing faster execution through load 
> balancing, along with all the other goodies CS.RT brings.  (Not to mention it 
> would make testing under Maven much more like testing under Ant.)
> From [a post Dawid Weiss made on the maven-dev mailing list in 
> January|http://mail-archives.apache.org/mod_mbox/maven-dev/201201.mbox/%3ccam21rt8kdxowwmy3uq+fqvn979fq3mbm_gveqwoh226mh_z...@mail.gmail.com%3E]:
> {quote}
> http://labs.carrotsearch.com/randomizedtesting.html
> [...]
> Load balancing is just part of what the project is about [...]
> Maven integration can be seen as an integration test (with scarce 
> documentation yet) here:
> https://github.com/carrotsearch/randomizedtesting/blob/master/integration-maven/junit4-maven-plugin-tests/src/it/01-basic-test/pom.xml
> I've used it in another project, so a cleaner example of use from within a 
> POM is here (you should disable surefire or your tests will run twice):
> https://github.com/carrotsearch/hppc/blob/master/hppc-core/pom.xml#L217
> {quote}
> And from [a post Dawid made to the lucene-dev mailing list in 
> April|http://mail-archives.apache.org/mod_mbox/lucene-dev/201204.mbox/%3CCAM21Rt-Rc_Z6X04fznvsbK-d8APiUuYCMC-kvg7i=hzthaq...@mail.gmail.com%3E]:
> {quote}
> I didn't mention it but there is actually an equivalent of <junit4> task as a 
> maven plugin... it basically redirects to the ant-plugin but has a maven-like 
> facade for passing the basic set of properties. I don't think it makes such a 
> big difference for maven build - we can stick to surefire. Let me know if 
> you'd like to try that other plugin though -- an example of a maven pom using 
> it is here:
> https://github.com/carrotsearch/randomizedtesting/blob/master/examples/maven/pom.xml
> {quote}
> The CS.RT maven plugin requires Maven v3.0.2+; I asked Dawid whether Maven 
> 2.2.1 could be supported, and in private emails to me, he replied:
> {quote}
> I looked at it but it seems I need to stick to Maven 3 -- there are APIs for 
> filtering artefacts that seem to be available in 3.x only (copied and pasted 
> from surefire and maven core). If you want to dig the code is on github, I 
> won't have the time to look into it in the near future (first short vacation, 
> then a backlog of crap to deal with).
> {quote}
> {quote}
> I admit I don't have enough Maven powers to actually think of a way to use 
> either surefire or another plugin (depending on a sysproperty or something). 
> This could be a fallback for folks who really need maven 2.x.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to