Skip to end of metadata
Go to start of metadata

Avoiding the scope warnings of Maven 3.0.3

If you are building a Flexmojos project and you are using any of Flexmojos special scopes "rsl", "caching", "theme" etc. you will get tons of warnings from your maven build. This is due to the fact that the class DefaultModelValidator in Maven checks the types of scope to only allow the internal Maven scopes. Any other scopes are reported as warnings. Having a look at the Maven code, it is not possible to configure your build to avoid this. The only solution would be a Maven extension. The option to define an extension in the pom.xml of your project will not work, as the validation is allready finished. 

The only solution I found, was to create my own ModelValidator and to place that in the M2_HOME/lib/ext directory. This way the extension will be used in the inital plexus weaving of Maven during startup. The attached project allows turning off the model validation entirely and hereby gets rid of the warnings. I know this is a brutal "hack", but I just wanted to document my results and will certainly optimize this solution to a more extendable validation tool.

Link to the Project-Source: Link

  • No labels