You could write a custom enforcer rule to check the classifier of projects with particular groupIds:
http://maven.apache.org/enforcer/enforcer-api/writing-a-custom-rule.html Then configure the enforcer plugin to apply that rule in your corporate pom or wherever you want to enforce it... On 22 Oct 2016 00:08, "Rémy Saissy" <remy.sai...@gmail.com> wrote: > Hi, > is there a Maven plugin that allows to automatically append a classifier > given a groupId? > > I would do something like that: > > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-???-plugin</artifactId> > <version>x.y</version> > <executions> > <execution> > <configuration> > <pluginReplacements> > <pluginReplacement> > <matchingPattern> > <matchingField>groupId</matchingField> > <matchingValue>com.company.dept</matchingValue> > </matchingPattern> > <replacement> > <replacementField>classifier</replacementField> > <replacementValue>myclassifier</replacementValue> > <overrideIfSet>false</overrideIfSet> > </replacement> > </pluginReplacements> > </pluginReplacements> > </configuration> > </execution> > </executions> > </plugin> > > > > > eg. My company has lot projects that should all use a classifier (two > values possible depending on the deployment target). > We could go through all projects over and over again to ensure that they > everybody uses the proper classifiers or put some hard rules in the > deployment code but we would like to find a simple and painless way to > ensure that classifiers are respected. Hence the question. > > Thanks! > > > > -- > Rémy Saissy > Photos: http://picasaweb.google.com/remy.saissy > Blog: http://blog.remysaissy.com >