Skip to content

rzymek/watcher-maven-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

watcher-maven-plugin

Watches files for modifications. On such event executes specified maven goals.

Use case: regenerating exploaded WAR or Eclipse project when dependencies change

Usage:

1. Add the plugin repository to your pom:

<project>
	<pluginRepositories>
		<pluginRepository>
			<id>rzymek-snapshots</id>
			<url>https://github.com/rzymek/repository/raw/master/snapshots</url>		
		</pluginRepository>
	</pluginRepositories>
	...

2. Configure the plugin

<project>
	<build>
		<plugins>
			<plugin> 
				<groupId>watcher</groupId>
				<artifactId>watcher-maven-plugin</artifactId>
				<version>1.0-SNAPSHOT</version>
				<configuration>
					<watch>
						<param>
							<on>pom.xml</on>
							<run>clean war:inplace eclipse:eclipse</run>
						</param>
					</watch>
				</configuration>
			</plugin>
		....

3. Start watching for changes:

mvn watcher:run

About

Run maven goals when a file changes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published