Hello,
I will be starting a custom project that involves adding quite a lot of custom features to our JIRA installation. I went through the plugin SDK documents and got some proof of concept screens with some of the types of integrations we need working. The next step before we start developing the actual set of plugins is to see how to write the sources (servlets, custom field, etc) as groovy classes and get those compiled and included in the plugin. I have seen answeres related to using the Groovy Script runner plugin to execute scripts, but I am not sure if that is what we really need. I would prefer to compile the Groovy classes using groovyc and then bundle the complled classes into our plugin jar file.
Any hints or links to documentation would be highly appreciated.
I could of course try and write my own Ivy/Ant scripts that will compile the plugin jar file, but am not sure of how to integrate that into the maven based scripts that come with the SDK.
Thanks in advance for all help and suggestions
Rakesh
Community moderators have prevented the ability to post new answers.
I developed my own ivy/ant buld system.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you try to configure the GMaven Maven plugin? It should all just work, as Groovy produces regular class files. You would also need to declare dependency on the groovy runtime. Let me know if you need more details:
http://docs.codehaus.org/display/GMAVEN/Building+Groovy+Projects
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We got it to compile during atlas-run just fine with these pom settings:
<build> <sourceDirectory>src/main/groovy</sourceDirectory> <testSourceDirectory>src/test/groovy</testSourceDirectory> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.2</version> <configuration> <compilerId>groovy-eclipse-compiler</compilerId> <source>1.7</source> <target>1.7</target> </configuration> <dependencies> <dependency> <groupId>org.codehaus.groovy</groupId> <artifactId>groovy-eclipse-batch</artifactId> <version>2.3.4-01</version> </dependency> <dependency> <groupId>org.codehaus.groovy</groupId> <artifactId>groovy-eclipse-compiler</artifactId> <version>2.9.0-01</version> </dependency> </dependencies> </plugin> <plugin> <groupId>org.codehaus.groovy</groupId> <artifactId>groovy-eclipse-compiler</artifactId> <version>2.7.0-01</version> <extensions>true</extensions> </plugin> <plugin> <groupId>com.atlassian.maven.plugins</groupId> <artifactId>maven-amps-plugin</artifactId> <version>${amps.version}</version> <extensions>true</extensions> <configuration> <productVersion>${amps.version}</productVersion> <allowGoogleTracking>false</allowGoogleTracking> <useFastdevCli>false</useFastdevCli> </configuration> </plugin> </plugins> </build>
However, when we try to run atlas-cli and the "pi" command we get:
[ERROR] Unable to complete running command: pi java.lang.RuntimeException: org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo ... Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo ... Caused by: org.apache.maven.plugin.MojoExecutionException: No such compiler 'groovy-eclipse-compiler'. ...
Sorry for the wall of text, but we can't seem to find a solution to make this work. We'd like to use atlas-cli so that we don't have to restart our local JIRA every time we make a Groovy/XML change. Any help would be greatly appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As an FYI to all considering writing a Groovy-based plugin, I ran into PermGen OutOfMemoryExceptions after deploying several times with Groovy-all embedded in my plugin. While this can be coped with in a development environment, it would have larger implications in a production environment and could cause headaches. Proceed with caution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.