Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
The Maven yamlpom plugin is meant to be used both from the command line, and as part of the lifecycle.
Using the plugin on the command line
Add this to your pom.xml:
<pluginRepositories> <pluginRepository> <id>twdata-m2-repository</id> <name>twdata.org Maven 2 Repository</name> <url>http://twdata-m2-repository.googlecode.com/svn/</url> </pluginRepository> </pluginRepositories>
and this to your settings.xml:
<settings> <pluginGroups> <pluginGroup>org.twdata.maven</pluginGroup> ... other groups ... </pluginGroups> ... </settings>
Now, you should be able to run the sync goal from the command line:
Which basically is just a shorthand for the full command (for the full command, you won't need to make any changes to your settings.xml):
Interactions with your SCM
It is recommended you add the following yaml files to your scm's ignore list (.gitignore for git, svn:ignore for Subversion, etc):
Technically, you don't have to hide them from your scm, but a) they can change a lot, polluting your commits and b) they won't stay sync'ed when using the Maven release plugin.
Keeping the pom.yml automatically in sync
If you want to add the sync to your default lifecycle, add this to your
build: plugins: - groupId: org.twdata.maven artifactId: maven-yamlpom-plugin version: 0.3 executions: - goals: [ sync ]