Configuring Eclipse to use the Atlassian Plugin SDK

Robert Lauriston
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 10, 2011

I'm following the instructions in https://developer.atlassian.com/display/DOCS/Configuring+Eclipse+to+use+the+Atlassian+Plugin+SDK

The command to add the classpath variable is not working:

C:\plugins>atlas-mvn eclipse:add-maven-repo -Declipse.workspace=C:\Users\rlauris
ton\Eclipse
Executing: "C:\Atlassian\atlassian-plugin-sdk\apache-maven\bin\mvn.bat"   eclips
e:add-maven-repo -Declipse.workspace C:\Users\rlauriston\Eclipse
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'eclipse'.
[INFO] com.atlassian.maven.plugins: checking for updates from atlassian-public
[INFO] com.atlassian.maven.plugins: checking for updates from central
[INFO] org.apache.maven.plugins: checking for updates from atlassian-public
[INFO] org.apache.maven.plugins: checking for updates from central
[INFO] org.codehaus.mojo: checking for updates from atlassian-public
[INFO] org.codehaus.mojo: checking for updates from central
[INFO] artifact org.apache.maven.plugins:maven-eclipse-plugin: checking for upda
tes from atlassian-public
[INFO] artifact org.apache.maven.plugins:maven-eclipse-plugin: checking for upda
tes from central
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-eclips
e-plugin/2.8/maven-eclipse-plugin-2.8.pom

Downloading: https://m2proxy.atlassian.com/repository/public/org/apache/maven/pl
ugins/maven-plugins/17/maven-plugins-17.pom
12K downloaded  (maven-plugins-17.pom)
Downloading: https://m2proxy.atlassian.com/repository/public/org/apache/maven/ma
ven-parent/16/maven-parent-16.pom
22K downloaded  (maven-parent-16.pom)
Downloading: https://m2proxy.atlassian.com/repository/public/org/apache/maven/pl
ugins/maven-eclipse-plugin/2.8/maven-eclipse-plugin-2.8.jar
201K downloaded  (maven-eclipse-plugin-2.8.jar)
[INFO] Searching repository for plugin with prefix: 'C'.
[INFO] artifact org.apache.maven.plugins:maven-C-plugin: checking for updates fr
om atlassian-public
[INFO] artifact org.apache.maven.plugins:maven-C-plugin: checking for updates fr
om central
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-C-plugin' does not exist or no
 valid version could be found
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20 seconds
[INFO] Finished at: Thu Nov 10 17:05:21 PST 2011
[INFO] Final Memory: 3M/15M
[INFO] ------------------------------------------------------------------------
C:\plugins>

6 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Joe Clark
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 10, 2011

Unfortunately there's a bug in the Atlassian Plugin SDK that prevents the atlas-* batch files from correctly interpreting command-line parameters that contain an equals sign (see https://studio.atlassian.com/browse/AMPS-197).

The workaround is to call "%ATLAS_HOME%\apache-maven\bin\mvn" instead of "atlas-mvn".

Robert Lauriston
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 10, 2011

Thanks, now I'm stuck on the next step:

C:\plugins>atlas-mvn eclipse:eclipse
Executing: "C:\Atlassian\atlassian-plugin-sdk\apache-maven\bin\mvn.bat"   eclips
e:eclipse
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'eclipse'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [eclipse:eclipse]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing eclipse:eclipse
[INFO] No goals needed for project - skipping
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Cannot execute mojo: eclipse. It requires a project with an existing pom.
xml, but the build is not using one.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Fri Nov 11 10:53:50 PST 2011
[INFO] Final Memory: 2M/15M
[INFO] ------------------------------------------------------------------------

SarahA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 11, 2011

Hallo Robert

That error usually happens if you are not in the directory where the plugin was created. Try changing to the directory that contains the "pom.xml" file for your plugin.

Cheers, Sarah

1 vote
Deleted user March 30, 2012

So i used the "note" by calling mvn from atlassian install, but i now get an error that the class org.codehaus.classworlds.Launcher couldn't be found.

EDIT: solved the problem.

Terry Müller had quite the same problem. See the blog entry for more information.
The solution for me was to rename the plexus-classworlds-2.4 in the M2_Home/boot/ directory to just classworlds-2.4.jar.

0 votes
Felipe Reis
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 25, 2012
0 votes
Felipe Reis
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 25, 2012

the link appears to be broken: https://developer.atlassian.com/display/DOCS/Configuring+Eclipse+to+use+the+Atlassian+Plugin+SDK

I'm having troubles importing the plugin generated by the SDK into Eclipse. It seems that the Build Path is not configured at all... Do I have to include the JARs by hand?

0 votes
Felipe Reis
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 25, 2012

the link appears to be broken: https://developer.atlassian.com/display/DOCS/Configuring+Eclipse+to+use+the+Atlassian+Plugin+SDK

I'm having troubles importing the plugin generated by the SDK into Eclipse. It seems that the Build Path is not configured at all... Do I have to include the JARs by hand?

0 votes
SarahA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 10, 2011

Thanks Robert and Joseph,

I have added a note to the documentation, to help other people who may run into the same problem:

https://developer.atlassian.com/display/DOCS/Configuring+Eclipse+to+use+the+Atlassian+Plugin+SDK

Cheers, Sarah

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events