https://github.com/born2snipe/maven-plugin-execution-watcher-extension
Record the maven plugin execution times of your build for later review
https://github.com/born2snipe/maven-plugin-execution-watcher-extension
Last synced: 10 months ago
JSON representation
Record the maven plugin execution times of your build for later review
- Host: GitHub
- URL: https://github.com/born2snipe/maven-plugin-execution-watcher-extension
- Owner: born2snipe
- License: other
- Created: 2012-11-25T04:59:03.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-12-12T18:07:01.000Z (over 12 years ago)
- Last Synced: 2025-05-15T17:50:56.159Z (about 1 year ago)
- Language: Java
- Homepage:
- Size: 305 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Maven Plugin Execution Time Monitor Extension
This maven extension logs all plugin executions to a [H2](http://www.h2database.com/html/main.html) database. This allows for monitoring plugins over time to help determine if there is any performance decline.
## Setup
- Clone the repo or download the zip of the code and build the project using Maven and get the jar from the target directory
- Put the jar file in your maven's `lib/ext` directory. Maven auto-magically puts these jars in the classpath.
- The data is stored in a local [H2](http://www.h2database.com/html/main.html) database in `${user.home}/.m2-plugin-execution-watcher`. To view the data you just need a JDBC friendly database viewer.
## FAQ
- How to change the directory location of the database?
- Provide the following system property `plugin.execution.watcher.directory=${directory-you-want-the-database}`
- I keep seeing the following error: `[WARNING] Failed to notify spy org.apache.maven.eventspy.PluginWatcherEventSpy: Could not get JDBC Connection; nested exception is org.h2.jdbc.JdbcSQLException: Database may be already in use: "Locked by another process". Possible solutions: close all other connection(s); use the server mode [90020-168]`
- This is a limitation of the embedded [H2](http://www.h2database.com/html/main.html) database. Only one process can access the database. (ex. mvn, db viewer, etc)
- Can I change out the storage mechanism?
- You just need to implement the [BuildInformationRepository][1]
- Follow the steps for using Java's [ServiceLoader](http://docs.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html) or use Netbeans [@ServiceProvider](http://bits.netbeans.org/dev/javadoc/org-openide-util-lookup/org/openide/util/lookup/ServiceProvider.html) annotation
- Put your newly created class in a jar
- Place your new jar with it's required dependencies in the `lib/ext`
- You should be good to go
- Can I track some data that is specific to the build?
- You can provide the following system property `plugin.execution.watcher.build.data=${data-to-store}` and the value provided will be stored with that run of the build
- the data can be up to 1024 characters
[1]: https://github.com/born2snipe/maven-plugin-execution-watcher-extension/blob/master/src/main/java/co/leantechniques/maven/BuildInformationRepository.java "repo"