Hi,
I'm developin a "new" JIRA plugin for jira7. Plugin initialization is ok but if I want to add a third party dependency plugin(OSGi) gives error. How can I add a dependency to a newly created jira7 plugin?
Steps that I did:
Add a new dependency inside to dependencies block of pom.xml (jasperreports in my case)
<dependency> <groupId>net.sf.jasperreports</groupId> <artifactId>jasperreports</artifactId> <version>6.2.0</version> </dependency>
You've the "missing requirement" error
[INFO] [talledLocalContainer] 'com.jira.plugins.app' - 'app' failed to load. [INFO] [talledLocalContainer] Cannot start plugin: com.jira.plugins.app [INFO] [talledLocalContainer] Unresolved constraint in bundle com.jira.plugins.app [162]: Unable to resolve 162.0: missing requirement [162.0] osgi.wiring.package; (osgi.wiring.package=antlr)
I've tried to add 'net.sf.jasperreports.*;version="6.2.0",' to the Import-Package section like defined in this page: https://developer.atlassian.com/docs/getting-started/working-with-the-pom/managing-dependencies
How can I solve such a dependency issue?
Community moderators have prevented the ability to post new answers.
It seems that a dependency to antlr is missing. So the error message tells you that osgi is missing a wiring package:
(osgi.wiring.
package
=antlr)
So you should add the dependency of antlr to your pom.xml
<dependency> <groupId>org.antlr</groupId> <artifactId>antlr4-runtime</artifactId> <version>3.5.2</version> </dependency>
But I'm not sure about the version number but at the startup using the debug environment all available packages are listed.
atlas-run -X
After you added the dependency you probably need to clean or rebuild your maven environment:
https://maven.apache.org/plugins/maven-eclipse-plugin/usage.html
but antlr isn't my dependency. It's a compile dependency of jasperreports (you can check out other dependencies of jasperreports from here: http://mvnrepository.com/artifact/net.sf.jasperreports/jasperreports/6.2.0) I think I shouldn't add any dependencies of my dependency to pom.xml. On the other hand adding antlr to my dependency doesn't solve anything because in this case another compile dependency(bsh) of jasperreports gives a missing requirement error. It doesn't make sense to add all dependencies of my dependencies to pom.xml.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If jasperreports depends on antlr and other things all of those must be added as a dependency in your pom.xml. I can just guess from the error message which says that osgi is missing a package. And it says that the package is antlr. When you add antlr as a dependency which new one shows up and causes an error? can you post that error message as well?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.