A required class is missing: Lorg/apache/maven/plugin/BuildPluginManager;

Vinutha Vasan March 26, 2014

Hi All,

I am getting below error while building the jira plugin,

[INFO] [surefire:test]

[INFO] [jira:validate-manifest]

[INFO] Manifest found, validating...

[INFO] Manifest validated

[INFO] [jira:jar]

[INFO] [jar:jar]

[INFO] Building jar: E:\workspacejira61\jira_plugins\version-management-utility-plugin\target\version-management-utility-plugin-4.0.jar

[INFO] [build-helper:attach-artifact]

[INFO] [jira:generate-obr-artifact]

[INFO] Skipping OBR generation... no OSGi bundle manifest instructions found in pom.xml

[INFO] ------------------------------------------------------------------------

[ERROR] BUILD ERROR

[INFO] ------------------------------------------------------------------------

[INFO] Internal error in the plugin manager executing goal 'com.atlassian.maven.plugins:maven-amps-plugin:5.0-m1:validate-test-manifest': Unable to load the mojo 'com.atlassian.maven.plugins:maven-amps-plugin:5.0-m1:validate-test-manifest' in the plugin 'com.atlassian.maven.plugins:maven-amps-plugin'. A required class is missing: Lorg/apache/maven/plugin/BuildPluginManager;

org.apache.maven.plugin.BuildPluginManager

[INFO] ------------------------------------------------------------------------

[INFO] For more information, run Maven with the -e switch

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 41 seconds

[INFO] Finished at: Thu Mar 27 09:37:35 IST 2014

[INFO] Final Memory: 117M/385M

[INFO] ------------------------------------------------------------------------

Kindly let me know what is missing

Thanks,

Vinutha

33 answers

1 accepted

37 votes
Answer accepted
Scott Dudley [Inactive]
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.
March 26, 2014

The comments from Joseph Walton on AMPS-1112 (27/Mar/14 at 3:08 am EDT) have the best workaround, which is to add this to your list of build plugins in pom.xml. No extra JAR downloads required:

<plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-amps-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
            </plugin>
win clay March 26, 2014

Thanks, Scott.

Able to create the package now.

Luca Tanieli March 26, 2014

Thanks, great workaround :)

Pablo Ribeiro March 27, 2014

very fine, thanks

anil kumar April 1, 2014

It's not working for me..

I used like thiss.

<build>

<plugins>

<plugin>

<groupId>com.atlassian.maven.plugins</groupId>

<artifactId>maven-stash-plugin</artifactId>

<version>${amps.version}</version>

<extensions>true</extensions>

</plugin>

</plugins>

</build>

then also not working...

Is there any other work around..

anil kumar April 1, 2014

<artifactId>maven-stash-plugin</artifactId>

Got it the change it should be

<artifactId>maven-amps-plugin</artifactId>

now its not giving the error and stash server running but the earlier it worked with 7990 port now its with 5990 and stash server also changed a lot...now i'm not able to create project and repositories..

Why this is like this.

This workaround seems not enough for us. any alternate to overcome this pls..

Regards

Anil

Holger Schimanski
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.
April 5, 2014

Thanks, Scott!! Works fine.

Cheers, Holger

Matt Sommer April 8, 2014

Thanks so much! Saved my day!

Umair Haroon
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.
April 13, 2014

Thanks Scott!

Jason Nguyen May 14, 2014

Works for me too. Thanks man.

Dmitry Miroshnichenko
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.
May 14, 2014

Great job, Scott!

Kavya Rani July 1, 2014

thanks worked like a pro

29 votes
Amarendra Kumar March 26, 2014

This is because there is a change in https://maven.atlassian.com/content/groups/public/com/atlassian/maven/plugins/maven-amps-plugin/.

5.0-m1/ Thu Mar 27 02:40:54 UTC 2014

I have taken the older version maven-amps-plugin-4.2.18.jar, extracted the jar file and replaced the internal xmls version 4.2.18 to 5.0-m1.

Repacked all the extracted file with name maven-amps-plugin-5.0-m1.jar and replaced the JAR file at location \.m2\repository\com\atlassian\maven\plugins\maven-amps-plugin\5.0-m1 with the new one created.

This passed on the error of " A required class is missing: Lorg/apache/maven/plugin/BuildPluginManager;"

Resolved!! for now.

Alied Perez
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.
March 26, 2014

But why is it downloading that version?

I have configured the com.atlassian.maven.plugins:maven-jira-plugin with version 4.2.10. Why is it now using that amps plugin?

Alied Perez
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.
March 26, 2014

However, the jar and obr are created and seem to work fine. Just uploaded to the dev server and installed OK.

Amarendra Kumar March 26, 2014

This is an internal call from JIRA maven build.

For now I have my JIRA started.
Link for JAR file: https://drive.google.com/file/d/0B8HwtPHtTlJAcGhjVWZ1OFBfdUU/edit?usp=sharing<br< a="">>
Location in FileSystem: \.m2\repository\com\atlassian\maven\plugins\maven-amps-plugin\5.0-m1

JackooZ March 26, 2014

just verified, it works after using jars uploaded by Amarendra Kumar.

Dmitry Miroshnichenko
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.
March 26, 2014

Replacing jar looks like a dirty hack! Why atlassian haven't fixed this bug yet! I can't package anything!

ArtUrlWWW March 26, 2014

Thank you very much, Amarendra Kumar.

Mehmet Korkut Köse March 26, 2014

Thank you Amarendra :)

Vinutha Vasan March 26, 2014

Hi Amarendra,

You had mentioned that "replaced the internal xmls version 4.2.18 to 5.0-m1.".

I extracted the older version of maven-amps-plugin-4.2.18.jar, and where exactly I need to replace the version? Is it version field in pom.xml file?

Also I could see 2 pom.xml file in 2 different path inside the jar.

Please let me know where I should replace this version.

Thanks,

Vinutha

Amarendra Kumar March 26, 2014

Hi Vinutha,

Please download this JAR and replace it in your fileSystem.

Link for JAR file: https://drive.google.com/file/d/0B8HwtPHtTlJAcGhjVWZ1OFBfdUU/edit?usp=sharing<br< a="">>>
Location in FileSystem: \.m2\repository\com\atlassian\maven\plugins\maven-amps-plugin\5.0-m1

You don't need to replace the version.. extract blah blah.. manually.

Regards,

Amar

Vinutha Vasan March 26, 2014

Thank you Amarendra ..:)

Quan Jiang March 26, 2014

You saved my morning Amarendra O(∩_∩)O

RambanamP
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.
March 26, 2014

Thanks Buddy!!

Nick March 27, 2014

Amarendra Kumar

Thankyou! Replacing the jar file works, however, I do not understand how things broke.

It worked yesterday. No changes and it did not work today on my first build. I am not sure how this happened as I am not using any snapshots so I think a release pom must have been changed somewhere along the line?

I also have this in the properties of the pom file

<amps.version>4.2.18</amps.version>

and the following in the plugin section of the pom file of my plugin

<plugin>

<groupId>com.atlassian.maven.plugins</groupId>

<artifactId>maven-jira-plugin</artifactId>

<version>${amps.version}</version>

WTH?

Alied Perez
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.
March 27, 2014

I got to understand when read the POM workaround.

I happened that they published a latest version for maven-amps-plugin, which is a dependency of maven-jira-plugin. maven-jira-plugin seems to not declare (or something worse) the version it depends on, and then Maven just picks the latest.

The workaround works because there we specify which version of the plugin we want for our build.

This teaches us a lesson: always declare the version we depend on.

Deleted user March 30, 2014

Thanks for this temporarily solution, but I do hope Atlassian will QUICKLY solve this.

Pablo Beltran
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.
April 22, 2014

Thanks for sharing :)

6 votes
Amod Mulay March 26, 2014

This might help:

<amps.version>4.2.18</amps.version>

 <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-amps-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
            </plugin>
 
4 votes
yunfeng wu March 27, 2014

I finded one temporary solution,

you can find xml file in (eg)D:\Users\yf.wu\.m2\repository\com\atlassian\maven\plugins\maven-amps-plugin, open it, modify <latest>5.0-m1</latest> <release>5.0-m1</release> to <latest>4.2.10</latest> <release>4.2.10</release>

4 votes
RambanamP
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.
March 26, 2014
ArtUrlWWW March 26, 2014

Thanks :) .

Amarendra Kumar March 26, 2014

Thanks Rambanam.

Deleted user March 30, 2014

What I don't understand is, why the atlassian maven plugin doesn't respect the pom.xml versions? Why did it download the newer version of the jar and why does it try to build the plugin with the new jar if the pom.xml specifies an older version? Isn't that a bug in the atlassian maven plugin?

3 votes
Joe Clark
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 29, 2014

Sorry everyone, for the hassle that this has caused. There was a bug in the current version of the Plugin SDK that caused it to use the latest version of the SDK from Maven for some features, rather than the locally-installed version. This went un-noticed until we started making breaking changes for v.5.0 of the Plugin SDK.

This is now fixed in Plugin SDK 4.2.19. You can download this version from https://marketplace.atlassian.comor update your existing installation to this version by using the 'atlas-update' command.

ArtUrlWWW March 30, 2014

Hi.

Why no new version (4.2.19) in http://sdkrepo.atlassian.com/rpm-stable/? In the repo only 4.2.18 version available...

Sorry my bad English.

Viktor Dlouhý
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.
March 30, 2014
Joe Clark
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 30, 2014

The DEB and RPM archives are now available for download. It was a silly mistake by me that caused them to be missing.

Cozmin Velciu April 2, 2014

Note that it is not sufficient to run atlas-update to update the Atlassian SDK - you also have to edit the project pom.xml and add the maven-amps-plugin with a specific (tested with 4.2.10,18-20) ${amps.version} as various people mention in the answers.

AMPS-1112 for reference.

2 votes
yen_mrkid March 26, 2014

Step 1. find where is your \.m2 localtion . Usually

(Linux) cd ~/.\m2/repository/com/atlassian/maven/plugins/maven-amps-plugin/5.0-m1

(Mac) cd /Users/{your account}/.m2/repository/com/atlassian/maven/plugins/maven-amps-plugin/5.0-m1

Step2. Download https://doc-0k-7c-docs.googleusercontent.com/docs/securesc/1c6c1nb0es2aikbd7pupoo97tnn9a0k4/jghn421mrsn8k6ffdlqvm2ucdg9kmeuf/1395900000000/14201396803293265083/16645826983019855603/0B8HwtPHtTlJAcGhjVWZ1OFBfdUU?e=download&h=16653014193614665626&nonce=0r86h0b5df57q&user=16645826983019855603&hash=d62lhkjfese201l2faonehqo7f7f2occ

Step3. mv maven-amps-plugin-5.0-m1.jar to the location is metioned at Step 1.

Step4. atlas-run

the problem took me 1 day :(( ...finally done . share to who is still in trouble

Vinutha Vasan March 26, 2014

Hi Ray,

I could see maven-amps-plugin-5.0-m1.jar already exist in my \.m2 localtion.

Also i tried replacing it from the location https://maven.atlassian.com/content/groups/public/com/atlassian/maven/plugins/maven-amps-plugin/5.0-m1/maven-amps-plugin-5.0-m1.jaryou have mentioned.

Size is same.

I gave atlas-run after replacing but still getting the same error.

Any idea.

Thanks,

Vinutha

yen_mrkid March 26, 2014

Hi Vasan

First. You could try

sudo find / -name maven-amps-plugin to look up where is your possible m2 locations. maybe try to put .jar to other location.

Second.

try to download this maven-amps-plugin-5.0-m1.pom and relpace too.

Sorry. you should try to download the jar provide by Kumar

https://doc-0k-7c-docs.googleusercontent.com/docs/securesc/1c6c1nb0es2aikbd7pupoo97tnn9a0k4/jghn421mrsn8k6ffdlqvm2ucdg9kmeuf/1395900000000/14201396803293265083/16645826983019855603/0B8HwtPHtTlJAcGhjVWZ1OFBfdUU?e=download&h=16653014193614665626&nonce=0r86h0b5df57q&user=16645826983019855603&hash=d62lhkjfese201l2faonehqo7f7f2occ

Amarendra Kumar March 26, 2014

Hi Yen, I know that this is not a good solution. But for now to get our system started and builds running we can replace it manually..

I think an updated JAR shall be provided by attlasian for it.

yen_mrkid March 26, 2014

Hi Kumar

you are right ! but I can't wait :(....

1 vote
Shhaid Shaikh March 31, 2014

I ran atlas-update and it updated SDK . But even after that i tried to clean and run my plugin .

Same Problem ..

[INFO] Skipping OBR generation... no OSGi bundle manifest instructions found in pom.xml

[INFO] ------------------------------------------------------------------------

[ERROR] BUILD ERROR

[INFO] ------------------------------------------------------------------------

[INFO] Internal error in the plugin manager executing goal 'com.atlassian.maven.plugins:maven-amps-plugin:5.0-m1:validate-test-manifest': Unable to load the mojo 'com.atlassian.maven.plugins:maven

-amps-plugin:5.0-m1:validate-test-manifest' in the plugin 'com.atlassian.maven.plugins:maven-amps-plugin'. A required class is missing: Lorg/apache/maven/plugin/BuildPluginManager;

org.apache.maven.plugin.BuildPluginManager

[INFO] ------------------------------------------------------------------------

[INFO] For more information, run Maven with the -e switch

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 33 seconds

[INFO] Finished at: Tue Apr 01 14:57:49 IST 2014

[INFO] Final Memory: 92M/219M

[INFO] ------------------------------------------------------------------------

Scott Dudley [Inactive]
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.
March 31, 2014

Shhaid, I had the same problem. Joe Clark had the correct solution for me in the AMPS-1112 issue:

"Make sure you have 4.2.19 specified as the <amps.version> in your pom.xml?"

Sachin Dhamale May 19, 2014

hi scott

i did changes as u mention

1.update sdk

2.change pom file

3.add jar file in .m2 location

now it gives me this error

[WARNING] [talledLocalContainer] org.codehaus.cargo.container.ContainerException: Port number 8009 (defined with the property cargo.tomcat.ajp.port) is in use. Please free it on th
e system or set it to a different port in the container configuration.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Unable to execute mojo

Port number 8009 (defined with the property cargo.tomcat.ajp.port) is in use. Please free it on the system or set it to a different port in the container configuration.

please help me its urgent


0 votes
AhmedO May 21, 2014

Hello,

I updated the SDK to the 4.2.20

The version of maven-amps-plugin in the maven-metadata-attlassian-public.xml 5.0-m2

Then I created I new Stash plugin. When I exucte the atlas-run command the server doen't make the usual time to start and I got a white page in the browser wihout displaying any error message.

This the default configuration created by Atlassian SDK :

&lt;properties&gt;
    &lt;stash.version&gt;3.0.1&lt;/stash.version&gt;
    &lt;stash.data.version&gt;3.0.1&lt;/stash.data.version&gt;
    &lt;amps.version&gt;4.2.20&lt;/amps.version&gt;
 &lt;/properties&gt;

Then I changed this config to :

&lt;properties&gt;
     &lt;stash.version&gt;2.12.1&lt;/stash.version&gt;
     &lt;stash.data.version&gt;2.12.1&lt;/stash.data.version&gt;
     &lt;amps.version&gt;4.2.18&lt;/amps.version&gt;
&lt;/properties&gt;

whith this config I got this error :

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Internal error in the plugin manager executing goal 'com.atlassian.maven.plugins:maven-amps-plugin:5.0-m2:filter-test-plugin-descriptor': Unable to load the mojo 'com.atlassian.maven.plugins:maven-amps-p
lugin:5.0-m2:filter-test-plugin-descriptor' in the plugin 'com.atlassian.maven.plugins:maven-amps-plugin'. A required class is missing: Lorg/apache/maven/plugin/BuildPluginManager;
org.apache.maven.plugin.BuildPluginManager
[INFO] ------------------------------------------------------------------------

The only config that allowed me to run the stash plugin succesfully is :

<properties>
     <stash.version>2.12.1</stash.version>
     <stash.data.version>2.12.1</stash.data.version>
     <amps.version>4.2.20</amps.version>
</properties>

with changing the maven-amps-plugin version maven-metadata-attlassian-public.xml to 5.0-m1

I would like to know where is the problem and what is the right configuration ?

Thank you.

Cheers,
Ahmed.

0 votes
marco sa May 18, 2014

I keep getting another error.

which version you have
${amps.version} set?

Thank you.

Hi,

my amps version is 4.2.9.

Regards

0 votes
marco sa May 18, 2014

hello,

I've come to me also the same error with version
5.0-SNAPSHOT.
can you explain me more detail how to fix it.

thanks

If you have following dependency in your pom.xml:

<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-jira-plugin</artifactId>
<version>${amps.version}</version>
<extensions>true</extensions>
</plugin>
replace it with
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-amps-plugin</artifactId>
<version>${amps.version}</version>
<extensions>true</extensions>
</plugin>
Sachin Dhamale May 19, 2014

hi Marek

after doing this it gives me this error



[WARNING] [talledLocalContainer] org.codehaus.cargo.container.ContainerException: Port number 8009 (defined with the property cargo.tomcat.ajp.port) is in use. Please free it on th e system or set it to a different port in the container configuration. [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Unable to execute mojo Port number 8009 (defined with the property cargo.tomcat.ajp.port) is in use. Please free it on the system or set it to a different port in the container configuration.

Sachin Dhamale May 19, 2014

Hi Marek

Actually Port number (8090) is changing whenever i build plugin. it give me new port number.

infact no one port is in use it should take 2990 by default but that port is free to use.

Just got the same error for the newest version maven-amps-plugin:5.0-SNAPSHOT.

Resolved by changing artifactId from maven-jira-plugin to maven-amps-plugin.

0 votes
codelab expert
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.
May 7, 2014

1. Download SDK 4.2.20

2. For existing plugins update pom.xml: value for "amps.version" must be 4.2.20

0 votes
Onkar Ahire
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.
April 28, 2014

Hi All,

SDK 4.2.20 with amp-version 4.2.10 is working from my end.

Thanks all

Best Regards

Onkar Ahire

0 votes
Binisha April 2, 2014

Hi Amarendra Kumar & Scott,

Thanks a lot! The solution provided helped a lot and saved time. But looking for a permanent fix by atlassian.

0 votes
ArtUrlWWW March 30, 2014

Hi.

Why no new version (4.2.19) in http://sdkrepo.atlassian.com/rpm-stable/? In the repo only 4.2.18 version available...

Sorry my bad English.

Joe Clark
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 30, 2014

This is fixed now. Sorry for the inconvenience.

(Your English is good!)

0 votes
Dan_B March 27, 2014

I went into the file maven-metadata-atlassian-public.xml and changed the latest version to 4.2.18 instead of 5.0.-m1

<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-amps-plugin</artifactId>
<versioning>
<latest>4.2.18</latest>
<release>4.2.18</release>
<versions>

zhen zhang
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 16, 2014

thanks, it works for me!

0 votes
Deleted user March 26, 2014

Thanks community, you guys saved the day!

0 votes
Francesco R
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.
March 26, 2014

Yes Scott, thanks a lot. Your workaround works perfectly.
btw the Google drive links continue to fail

Alied Perez
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.
March 26, 2014

Yes, that fixed it.

Now I'm starting to understand (it was too late lastnight for me to analyze anything)

0 votes
Francesco R
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.
March 26, 2014

I'm sorry. I too have this problem but I'm not able to dowload the Amarendra's fix

0 votes
Amarendra Kumar March 26, 2014
AnaG March 26, 2014

This is a temporary solution. Do you know when the normal one will be available?

0 votes
Francesco R
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.
March 26, 2014

I have this problem too but I'm not able to get the Amarendra's fix

0 votes
Arnar Skulason March 26, 2014

Have the same problem.

0 votes
AnaG March 26, 2014

We are having this problem too. Any updates?

0 votes
Shhaid Shaikh March 26, 2014

Can Atlassian Give us a concrete solution ? Thanks in Advance stuck for plugin build .

0 votes
Ulises Olivenza March 26, 2014

Same problem here. We can't even compile any plugin.

Amarendra Kumar modified jar seens to make it, but I hope Atlassian fix it soon.

Regards!!

Suggest an answer

Log in or Sign up to answer