Hi, I am developing some plugins that we will use internally across a variety of projects that we are migrating to Maven. As a result, I am constantly testing these plugins by invoking the "plugin:install" goal. However, I have noticed from time to time that some goals in the new version of the plugin do not work properly with Maven because the Maven's various caches contain old info. I wish that I could provide a more definitive test scenario than this, but hopefully you get the idea. In the meantime, I have found that if I delete all of the *.cache and .processed files from Maven's plugin directory tree, I am guaranteed that the goals of the new version of the plugin will be registered and work properly. I have encapsulated this logic into the following postgoal:
<postGoal name="plugin:install"> <attainGoal name="plugin:clean-cache" /> </postGoal> <goal name="plugin:clean-cache" description="Cleanup Maven's cached info on plugins and goals" > <delete includeEmptyDirs="true" verbose="false"> <fileset dir="${maven.home}/plugins"> <include name="*.cache"/> <include name="**/.processed" /> <include name="${pom.artifactId}-*/**" /> <exclude name="${maven.final.name}.jar" /> </fileset> </delete> </goal> This postgoal also guarantees 2 other issues I found: - If I have eliminated files from my plugin, the postgoal guarantees that they are also eliminated from the plugin's expansion directory. - If I change the version number of my plugin, the postgoal properly deletes any previous version from the plugins directory and thereby avoids conflicts. So far, this is working well for us. But, I am curious whether there is a better approach for handling the iterative development, installation, and testing of plugins. -------------------------------------- David Zeleznik ILOG - Changing the rules of business mailto:[EMAIL PROTECTED] http://www.ilog.com -------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]