Am trying to compile the source code of a basic jira plugin and when i try to do that i face this issue
manish@cxps022:~/JIRASOURCECODE/atlassian-jira-5.0-source/jira-project$ atlas-run
Executing: /home/manish/jira/atlassian-plugin-sdk-3.8/apache-maven/bin/mvn com.atlassian.maven.plugins:maven-amps-dispatcher-plugin:3.8:run
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] Atlassian JIRA
[INFO] Atlassian JIRA - Code - Components
[INFO] Atlassian JIRA - Code - API
[INFO] Atlassian JIRA - Code - Core
[INFO] Atlassian JIRA - Language Packs
[INFO] Atlassian JIRA - Code - Unit Tests
[INFO] Atlassian JIRA - Code - Screenshot Applet
[INFO] Atlassian JIRA - Plugins
[INFO] Atlassian JIRA - Plugins - OAuth Service Provider SPI
[INFO] Atlassian JIRA - Plugins - OAuth Consumer SPI
[INFO] Atlassian JIRA - Plugins - REST Plugin API
[INFO] Atlassian JIRA - Plugins - REST Plugin
[INFO] Atlassian JIRA - Plugins - Gadgets Plugin
[INFO] Atlassian JIRA - Plugins - SAL Plugin
[INFO] Atlassian JIRA - Plugins - Project Config Plugin
[INFO] Atlassian JIRA - Plugins - Application Properties
[INFO] Atlassian JIRA - Plugins - Admin Summary Component
[INFO] Atlassian JIRA - Plugins - Closure Template Renderer
[INFO] Atlassian JIRA - Plugins - View Issue Panels
[INFO] Atlassian JIRA - Plugins - Admin Quick Navigation
[INFO] Atlassian JIRA - Plugins - Look And Feel Logo Upload Plugin
[INFO] Atlassian JIRA - Testing - Func Tests
[INFO] Atlassian JIRA - Testing - UI Test Utils
[INFO] Atlassian JIRA - Testing - Page Objects Library
[INFO] Atlassian JIRA - Testing - WebDriver Tests
[INFO] Atlassian JIRA - Plugins - Mail Plugin
[INFO] Atlassian JIRA - Plugins - Share Content Component
[INFO] Atlassian JIRA - Plugins - Common AppLinks Based Issue Link Plugin
[INFO] Atlassian JIRA - Plugins - Remote JIRA Link
[INFO] Atlassian JIRA - Plugins - Issue Web Link
[INFO] Atlassian JIRA - Plugins - Confluence Link
[INFO] Atlassian JIRA - Plugins - Bundled Plugins
[INFO] Atlassian JIRA - Code - Webapp
[INFO] Atlassian JIRA - Plugins - REST
[INFO] Atlassian JIRA - Plugins - Plugin Test Resources
[INFO] Atlassian JIRA - Plugins - DevMode - Func Test Plugin
[INFO] Atlassian JIRA - Plugins - Development Only - Reference Plugin
[INFO] Atlassian JIRA - Plugins - Reference Dependent Plugin
[INFO] Atlassian JIRA - Plugins - Development Only - Reference Upgraded Plugin
[INFO] Atlassian JIRA - Plugins - Development Only - Reference Language Pack
[INFO] Atlassian JIRA - Plugins - Development Only - Reference Language Pack
[INFO] Atlassian JIRA - Testing - QUnit Plugin
[INFO] Atlassian JIRA - Code - Legacy atlassian-jira.jar
[INFO] Atlassian JIRA - Testing - Selenium Tests
[INFO] ------------------------------------------------------------------------
[INFO] Building Atlassian JIRA
[INFO] task-segment: [com.atlassian.maven.plugins:maven-amps-dispatcher-plugin:3.8:run]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing amps-dispatcher:run
[INFO] [enforcer:enforce {execution: enforce-versions}]
[INFO] [sandbox:sandbox {execution: enable-sandbox}]
[INFO] [compiler:compile {execution: compile}]
[INFO] No sources to compile
[INFO] [compiler:testCompile {execution: unit-test-compile}]
[INFO] No sources to compile
[INFO] [site:attach-descriptor]
[INFO] Preparing source:jar
[WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
[INFO] [enforcer:enforce {execution: enforce-versions}]
[INFO] [sandbox:sandbox {execution: enable-sandbox}]
[INFO] [source:jar {execution: attach-sources}]
[INFO] [amps-dispatcher:run]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Couldn't detect an AMPS product to dispatch to
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 29 seconds
[INFO] Finished at: Fri Mar 09 12:41:29 IST 2012
[INFO] Final Memory: 68M/372M
To customize the JIRA i need to certain things in plugin and then replace jars in my developed plugin
i am not able to do that as the compilation fails
please help
Thanks
Manish Ranjan
Community moderators have prevented the ability to post new answers.
Okay this was resolved bu setting M2_HOME right and also u can let that be a part of .bashrc file itself like
vi /home/$user_name/.bashrc
and adding two line
M2_HOME=/path to maven
PATH=M2_HOME/bin:$PATH
you can verify it by printing $M2_HOME and see if you are getting the value and use
which mvn to see if the installed path is coming right
alos observerd that some times this appears because I have both M2_HOME and M3_HOME set in my environment variables.Once I removed M2_HOME from my environment variables, I could get this working back again.May be this could save some serious time for some one.
We had the same problems and it seems they were related to the environment variable M2_HOME being set. I modified the atlas-create-jira5-plugin.bat and added a line resetting M2_HOME
rem --------------------------------------------------------------- rem Identify Maven location relative to script rem --------------------------------------------------------------- set M2_HOME= set MVN2_HOME=%ATLAS_HOME%\apache-maven set MAVEN_EXECUTABLE="%MVN2_HOME%\bin\mvn.bat" set ATLAS_VERSION="4.1.7"
And from then on the tool worked great.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The Atlassian SDK 3.6.2 or newer should work with JIRA 5.0 plugin code, but note that you will have to edit your pom.xml to change the <jira.version> elements to look like this:
<jira.version>5.0-beta3</jira.version>
For some reason, just "5.0" is not yet supported, even with SDK 3.9. See also this question: https://answers.atlassian.com/questions/43760/problem-with-plugin-tutorial-writing-jira-event-listeners-with-the-atlassian-event-library
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You don't need the SDK, you just need maven. In fact the source distro has maven bundled, so you just need to run build.bat / build.sh.
atlas-run is for plugins, which have an amps.version property in their pom.xml file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i checked and see the buidl.sh availabel only at root pom.xml level . Does that mean modifying plugin individually and then able to compile them so that we can pick at plugin level is not possible. as the build.sh will try to build the entire JIRA product , which may not be what i am looking for.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Trying to Run build.sh results in to this exception .Am i missing something here ?
Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/classworlds/Launcher
Caused by: java.lang.ClassNotFoundException: org.codehaus.classworlds.Launcher
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: org.codehaus.classworlds.Launcher. Program will exit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looks like a problem with the shell script - try sh -x build.sh and debug.
No you can build at any level, you just need to run the equivalent of what's in the shell script.
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.