First I want to say, I hope this is not the wrong mailing list for this
question / comment, but my intent is to apply a feature patch based on
suggestions.  I've scoured the maven site but didn't want to open up Jira
features when not necessary.

I have a requirement for a project for our team to perform the following:


scan all project (and sub poms) for "Company" specific dependencies added
specifying a version

   - versions should only be specified in dependencyManagement sections.
   Fail if we find specific versions explicitly defined.


This initially feels like a feature for the mvn release plugin.  I've
searched this code and feel I could implement this feature and submit a
patch.

Also, I've considering using the custom rule for maven enforcer plugin.
http://maven.apache.org/enforcer/enforcer-api/writing-a-custom-rule.html

Basically searching for a groupId and checking if a version is explicitly
defined:

        <dependency>
            <groupId>my.company</groupId>
            <artifactId>mybjc-services-proxy</artifactId>
            <version>1.1.0.11-SNAPSHOT</version>
        </dependency>

Acceptable options:


    <dependencies>
        <dependency>
            <groupId>my.company</groupId>
            <artifactId>mybjc-services-proxy</artifactId>
        </dependency>
    </dependencies>




Right now, this is a manual process with the aid of a shell script / jar
that searches for this, but we want to create a mojo / plugin for this.  I'd
like to contribute my work to an open solution.

Thoughts or suggestions.  I'd be glad to contribute a patch in the right
place if everyone feels this is a solution that can be shared.



Thanks,

Nick

Reply via email to