how can i configure when i add another .jar file?

i use another .jar file's classes in my servlet module plugin ,

but i put the .jar file in /helloworld3/target/jira/webapp/WEB-INF/lib

when i run it , some errors occur.

the error message is " classnotfound"

how can i configure it?

1 answer

1 accepted

From the description it sounds like you're writing a p1 plugin, but that is old school now, if your atlassian-plugin.xml is marked as version 2, then marking your dependencies as compile in your pom will cause the jar to be automatically included in your deployed JAR.

If you are in p2 and do want to include a p1 JAR classes, you can try marking the import in your pom as 'provided' scope, it may resolve.

are you creating a p2 plugin? what is the JAR?

Dear Andy Brook :

thanks for your answer!

yes!

i am writing a p1 plugin , this plugin will call some functions in a jar file named 'a' .

( 'a' is just a name )

it just like that i need some another .jar file in my java project.

according to your description, the plugin.xml version is 2.

i look my plugin.xml codes as following

<atlassian-plugin key="${project.groupId}.${project.artifactId}" name="${project.name}" plugins-version="2">

sorry, i'm a junior programer. i have some junior questions.

i don't know what the meaning 'marking your dependencies as compile in your pom will cause

the jar to be automatically included in your deployed JAR.'

thank you very much!


Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published 14 hours ago in Off-topic

Get to know our Atlassian User Group Leaders from Bengaluru, India

Meet @Dinesh Dhinakaran, @Vishnu Vasudeva, @Rajeev Verma, and Jamshid Nalakath: Our extraordinary AUG leaders from Bengaluru, India. These four work together to strengthen the bonds of their local co...

102 views 0 4
Read article

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