Hi
I used enforcer plugin in order to force all plugins declared to have a stable version. When I execute sonar the build failed because I call sonar without any version. I do not know if enforcer plugin is right because If a read the page bellow http://maven.apache.org/enforcer/enforcer-rules/requirePluginVersions.html the call of sonar plugin is concerned by the additionnalPlugins configuration tags and I have no such tag in my pom.xml my conf : <execution> <id>enforce-plugin-versions</id> <goals> <goal>enforce</goal> </goals> <configuration> <rules> <requirePluginVersions> <message>Best Practice is to always define plugin versions!</message> <banLatest>true</banLatest> <banRelease>true</banRelease> <banSnapshots>true</banSnapshots> <phases>clean,deploy,site</phases> </requirePluginVersions> </rules> </configuration> </execution> run in log message [INFO] [enforcer:enforce {execution: enforce-property}] [INFO] [enforcer:enforce {execution: enforce-plugin-versions}] [WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequirePluginVersions failed with message: Some plugins are missing valid versions:(LATEST RELEASE SNAPSHOT are not allowed ) org.codehaus.mojo:taglist-maven-plugin. The version currently in use is 2.4 org.codehaus.sonar.runtime:sonar-core-maven-plugin. The version currently in use is 20100124120342 org.codehaus.mojo:sonar-maven-plugin. The version currently in use is 1.0-beta-1 Best Practice is to always define plugin versions! [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Can not execute Sonar Embedded error: Unable to execute maven plugin Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. My sonar command call : mvn clean install -Dtest=false -DfailIfNoTests=false mvn sonar:sonar -Dsonar.phase=generate-sources Am I force to specify sonar release number ?? any other way ? |
Hello Fabrice,
The issue is not only on the sonar maven plugin but also on all plugin that are handled by Sonar (Checkstyle, PMD...). Sonar sets the version on the fly, but this is not good enough for the enforcer plugin. The best solution for this is to run Sonar with -Denforcer.skip=true Olivier On Wed, Jan 27, 2010 at 3:45 PM, fabrice.mercier1 <[hidden email]> wrote:
|
CQFD :-)
|
Free forum by Nabble | Edit this page |