Preamble: If you are working on Linux or Mac OS X platforms (with gradle), please prefer the recommended solution. This howto is only a degraded solution for Windows platforms and/or Eclipse + Maven fans.
This howto provides the way to develop users plugins on Eclipse with Maven, with features:
- Dynamic copy of groovy file (current developed user plugin) when it is saved.
- Eclipse project configuration for Groovy unit test execution
Install Artifactory Pro and start it with dev mode:
-
Download (last) version of Artifactory Pro on Bintray
-
Add
${ARTIFACTORY_HOME}/etc/artifactory.lic
file with correct licence. -
Set the tomcat port to 8088 in
${ARTIFACTORY_HOME}/tomcat/conf/server.xml
file (most common port used in unit tests) -
Enable the users plugins reloadling in
${ARTIFACTORY_HOME}/etc/artifactory.system.properties
:artifactory.plugin.scripts.refreshIntervalSecs=5
Install Groovy-Eclipse Feature in a recent Eclipse version (containing m2e plugin).
Clone artifactory-user-plugins project, import it, and:
- Update into
pom.xml
file the propertiesuser.plugin.dev
(mandatory) /artifactory.home.location
/version.artifactory
- Configure Groovy Nature and Maven Nature on project
- Execute m2e plugin (ALT+F5)
Verify that:
- JRE System Library / Maven Dependencies / Groovy Libraries are linked to your project
- The user plugin you develop is linked as build sources on project
artifactory-user-plugins/target/test-classes
contains groovy compiled class- Current user plugin files (.groovy and .properties) are in
${ARTIFACTORY_HOME}/etc/plugins
directory
You can now modify the user plugin code and execute the Groovy unit test class with Eclipse JUnit runner (and enjoy).