Hi Robert,

first of all thanks for your answer....

> For Maven2 all arguments are immediately processed, you can't trace back
the values of -pl or -amd.
I think you should go for the easy and solid solution by requiring
specific Maven versions.
For instance: In the rule, read the version value of
/META-INF/maven/org.apache.maven/maven-core/pom.properties

I think I've found a simpler (?) solution to check for the Maven version by using the parts of the rule RequireMavenVersion....so apart from that....

All information i needed about the "mvn -pl ..." is only available via classes / interfaces for Maven 3 but at the moment maven-enforcer is based on Maven 2.0.6 interfaces...which do not contain the methods i need...like this:

List<String> selectedProjects = session.getRequest().getSelectedProjects();

(The MavenSession interface only contains getRequest() starting with Maven 3) which would get the information about "mvn -pl m1,m2 .."...

So may be i oversight things but currently i see only three solutions:

1. Update Maven Enforcer to Maven 3.X only

   In my opinion it is to early to go that hard way in particular
   to fully drop down Maven 2.X compatibility so early
   (may be in the future)

2. Create separate branches:

   * 2.X Branch which is Maven 3 only

   * 1.X branch which keeps Maven 2.X compatibility...
         and drop that later (currently we have 1.3.1 out
         as release. So the next could be 1.4 or 1.3.2)

3. Extract the code I have and create a separate Maven Plugin
   to fullfil the needs and make that plugin Maven 3. only...
   may be for a limited time. But may there are up comming other
   rules which are Maven 3 only...This solution would solve
   only the single rule.

What do you think?

Kind regards
Karl-Heinz Marbaise

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

Reply via email to