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

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

Accepted Answer
37 votes

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>

Thanks, Scott.

Able to create the package now.

Thanks, great workaround :)

very fine, thanks

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..

<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

Thanks, Scott!! Works fine.

Cheers, Holger

Thanks so much! Saved my day!

Works for me too. Thanks man.

thanks worked like a pro

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.

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?

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

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

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

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

Thank you very much, Amarendra Kumar.

Thank you Amarendra :)

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

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

Thank you Amarendra ..:)

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

Thanks Buddy!!

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?

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.

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

Thanks for sharing :)

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>
 

Thanks Rambanam.

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?

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>

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

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

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

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.

Hi Kumar

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

2 votes
Joe Clark Atlassian Team Mar 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.

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 Mar 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.

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.

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] ------------------------------------------------------------------------

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?"

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


I too got this error this morning and I am stuck.. :(

I tried deleting all file from repository.

I tried reinstalling the the SDK.

No luck..:-(

Just had this error as well. This is the only page that google shows with this error :-(

Tried with both SDK 4.10.10 and 4.10.18 and no luck.

Surprisingly, the build downloaded some libraries which I would swear were already downloaded (I do several builds a day) and I have not added new dependencies.

Me too. I also tried deleting all files under local repository. Still suffering this issue...

Atlassian, what's going on here?

Today morning there was an update for maven-amps-plugin at https://maven.atlassian.com/content/groups/public/com/atlassian/maven/plugins/maven-amps-plugin/with version 5.0-m1/.

This update had some files missing. This broke the Maven build.

I am having the same problem Any solution?

Please read the above comments and download the jar mentioned from Google Drive.

Hi Marco,

Try Amarendra's fix whic is mentioned in the above thread. It will solve your problem.

Hi. Yep, you can use file, provided by Kumar :).

I can not download the jar of google docs, it fails. What else can I lose?

Thanks.

Why you can't download file from Google Docs? You do not like Google Docs? :)

ok, I got it, thank you very much for everything

Nice. Not at all. %)

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!!

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

We are having this problem too. Any updates?

Have the same problem.

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

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

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

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

Yes, that fixed it.

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

Thanks community, you guys saved the day!

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>

thanks, it works for me!

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 Mar 30, 2014

This is fixed now. Sorry for the inconvenience.

(Your English is good!)

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 18, 2018 in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

26,584 views 2 7
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you