how to create maven mojo plugin to overwrite files directories in target project -


i writing maven plugin generates java source code based on input text file , additional configuration.
e.g. user creates maven project , adds plugin in project's pom.xml below -

    <plugin>         <groupid>abc.plugin</groupid>         <artifactid>abc-maven-plugin</artifactid>         <version>1.0.0</version>         <executions>             <execution>                 <goals>                     <goal>abc</goal>                 </goals>             </execution>         </executions>         <configuration>             <schemapath>${basedir}\input</schemapath>             <package>com.svc.xyz</package>             <filenametxt>${basedir}\input.txt</filenametxt>         </configuration>     </plugin> 

as part of executing goal of plugin, plugin delete pre existing java source files/directories in user's project rewrite pom.xml of user project.
plugin should regenerate user project's pom.xml taking existing contents , keep other existing user project resources schema directory.

also,i don't want user of plugin editing after generation of source code , prefer directly 'compile package' generated source code in user project plugin.

since plugin regenerate users' pom.xml itself, may need create new maven project altogether generated source code, compile, package , have jar created?


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -