Failed loading of the Jira plugin - jira-plugin

I'm new to plugin development for Jira. I started with helloworld plugin development process of which is described in Jira documentation. I tried to create a menu with the help of atlas-create-jira-plugin-module command according to the manual and when I tried the project with atlas-run command my plugin failed to load and in the log I found the following:
[INFO] [talledLocalContainer] ___ FAILED PLUGIN REPORT
_____________________
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] 2 plugins failed to load during JIRA startup.
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] 'com.atlassian.tutorial.helloworld' - 'helloworld' failed to load.
[INFO] [talledLocalContainer] Cannot start plugin: com.atlassian.tutorial.helloworld
[INFO] [talledLocalContainer] Unresolved constraint in bundle com.atlassian.tutorial.helloworld [161]: Unable to resolve 161.0: missing requirement [161.0] osgi.wiring.package; (osgi.wiring.package=com.atlassian.plugin.spring.scanner.annotation.export)
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] It was loaded from C:\workdir\atlastutorial\helloworld\target\jira\home\plugins\installed-plugins\helloworld-1.0.0-SNAPSHOT.jar
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] 'com.atlassian.tutorial.helloworld-tests' - 'helloworld' failed to load.
[INFO] [talledLocalContainer] Cannot start plugin: com.atlassian.tutorial.helloworld-tests
[INFO] [talledLocalContainer] Unresolved constraint in bundle com.atlassian.tutorial.helloworld-tests [162]: Unable to resolve 162.0: missing requirement [162.0] osgi.wiring.package; (osgi.wiring.package=com.atlassian.tutorial.helloworld.api) [caused by: Unable to resolve 161.0: missing requirement [161.0] osgi.wiring.package; (osgi.wiring.package=com.atlassian.plugin.spring.scanner.annotation.export)]
What is the reason of failure?

Read about spring scanner (I cannot add comments so I'm writing it as an answer). And if You can please enter Your pom file here. I think that something is missing in Your pom.xml file. And one more thing, did you create plugin with
atlas-create-jira-plugin command?

Related

MFP8.0 Adapter deploy failed

We updated our Developer Kit and QA environment to product version 8.0.0.00-20170220-1900. We try to build the adapters and deploy the adapter to remote server using MFP CLI. But the deploy to server is failed with MAVEN plugin error.
Logs:
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model
for metlife:NotificationsAdapter:adapter:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for com.ibm.mfp:adapter-maven-plugin is missing. # line 44, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building NotificationsAdapter 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- adapter-maven-plugin:8.0.2017021701:deploy (default-cli) # NotificationsAdapter ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.824 s
[INFO] Finished at: 2017-03-28T12:36:16-04:00
[INFO] Final Memory: 10M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.ibm.mfp:adapter-maven-plugin:8.0.2017021701:deploy (default-cli) on project NotificationsAdapter: Execution default-cli of goal com.ibm.mfp:adapter-maven-plugin:8.0.2017021701:deploy failed: A required class was missing while executing com.ibm.mfp:adapter-maven-plugin:8.0.2017021701:deploy: org/apache/commons/logging/LogFactory
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>com.ibm.mfp:adapter-maven-plugin:8.0.2017021701
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/var/root/.m2/repository/com/ibm/mfp/adapter-maven-plugin/8.0.2017021701/adapter-maven-plugin-8.0.2017021701.jar
[ERROR] urls[1] = file:/var/root/.m2/repository/org/apache/httpcomponents/httpclient-osgi/4.3.4/httpclient-osgi-4.3.4.jar
[ERROR] urls[2] = file:/var/root/.m2/repository/org/apache/httpcomponents/httpclient/4.3.4/httpclient-4.3.4.jar
[ERROR] urls[3] = file:/var/root/.m2/repository/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar
[ERROR] urls[4] = file:/var/root/.m2/repository/commons-codec/commons-codec/1.6/commons-codec-1.6.jar
[ERROR] urls[5] = file:/var/root/.m2/repository/org/apache/httpcomponents/httpmime/4.3.4/httpmime-4.3.4.jar
[ERROR] urls[6] = file:/var/root/.m2/repository/org/apache/httpcomponents/httpclient-cache/4.3.4/httpclient-cache-4.3.4.jar
[ERROR] urls[7] = file:/var/root/.m2/repository/org/apache/httpcomponents/fluent-hc/4.3.4/fluent-hc-4.3.4.jar
[ERROR] urls[8] = file:/var/root/.m2/repository/org/apache/httpcomponents/httpcore-osgi/4.3.2/httpcore-osgi-4.3.2.jar
[ERROR] urls[9] = file:/var/root/.m2/repository/org/apache/httpcomponents/httpcore-nio/4.3.2/httpcore-nio-4.3.2.jar
[ERROR] urls[10] = file:/var/root/.m2/repository/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar
[ERROR] urls[11] = file:/var/root/.m2/repository/javax/xml/jaxp-api/1.4.2/jaxp-api-1.4.2.jar
[ERROR] urls[12] = file:/var/root/.m2/repository/org/mozilla/rhino/1.7R4/rhino-1.7R4.jar
[ERROR] urls[13] = file:/var/root/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[project>metlife:NotificationsAdapter:1.0-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]
[ERROR]
[ERROR] -----------------------------------------------------: org.apache.commons.logging.LogFactory
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
Error deploying adapter: NotificationsAdapter
If you can build successfully then Try to deploy manually from Operational Console.
From MFP Console try to deploy the adapter: your issue get fixed.
Try to change or add version detail (in-case missing) pom.xml as following. It resolved issue for me.
<build>
<plugins>
<plugin>
<groupId>com.ibm.mfp</groupId>
<artifactId>adapter-maven-plugin</artifactId>
<extensions>true</extensions>
<version>8.0.2020110500</version>
</plugin>
</plugins>
</build>
In my case it deploy using adapter-maven-plugin:8.0.2022030307:deploy and facing same error
[ERROR] Failed to execute goal com.ibm.mfp:adapter-maven-plugin:8.0.2022030307:deploy (default-cli) on project Project: Execution default-cli of goal com.ibm.mfp:adapter-maven-plugin:8.0.2022030307:deploy failed: A required class was missing while executing com.ibm.mfp:adapter-maven-plugin:8.0.2022030307:deploy: org/apache/commons/logging/LogFactory

Connection timing out while connecting to Maven repository

I am trying to build my project in my local system using the below command
mvn clean install -Dmaven.test.skip=true
It fails with the below error. It is failing to connect to repo.maven.apache.org.
I pinged to the server repo.maven.apache.org, I can see the response back.
I am using maven 3 version and connecting to maven 2 repo (repo.maven.apache.org).
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building web-order-avpn 1702.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: **https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom**
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.778 s
[INFO] Finished at: 2017-01-19T21:21:10-06:00
[INFO] Final Memory: 6M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its
dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5:
Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central
(https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.56.215] failed: Connection timed out: connect -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
Would be great if some one can suggest on what is wrong with my system?
I had this same issue and just like the comments suggested it was the maven proxy. Setup in \conf\settings.xml
http://maven.apache.org/guides/mini/guide-proxies.html

Maven2 problem to access plugins repository !

i just come to install maven2, after configuring the settings.xml in ${user.home}/.m2 and fixing a proxy error. Now by executing the command :
mvn -U archetype:create -DgroupId=maven-test -DartifactId=maven-test
-DpackageName=net.ensode.maventest
i get this error :
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] org.apache.maven.plugins: checking for updates from central
[WARNING] repository metadata for: 'org.apache.maven.plugins' could not be retri
eved from repository: central due to an error: Authorization failed: Access deni
ed to: http://repo2.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml
[INFO] Repository 'central' will be blacklisted
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not exi
st or no valid version could be found
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Thu Apr 29 16:05:40 CEST 2010
[INFO] Final Memory: 2M/247M
[INFO] ------------------------------------------------------------------------
any idea of what could cause it ?
thanks !
I think that the most likely cause is that your proxy requires you to authenticate, and you haven't configured the authentication details into your settings.xml file.

Maven changelog plugin with Mercurial problem

I have configured my Maven2 project to generate a changelog report from a Mercurial repository (accessible via file:// protocol) but the goal execution fails with the following message:
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'changelog'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Phobos3 Prototype
[INFO] task-segment: [changelog:changelog]
[INFO] ------------------------------------------------------------------------
[INFO] [changelog:changelog {execution: default-cli}]
[INFO] Generating changed sets xml to: D:\Documents and Settings\501845922\Workspace\phobos3.prototype\target\changelog.xml
[INFO] EXECUTING: hg log --verbose
[WARNING] Could not figure out: abort: Invalid argument
[ERROR]
EXECUTION FAILED
Execution of cmd : log failed with exit code: -1.
Working directory was:
D:\Documents and Settings\501845922\Workspace\phobos3.prototype
Your Hg installation seems to be valid and complete.
Hg version: 1.4.3+20100201 (OK)
[ERROR] Provider message:
[ERROR]
EXECUTION FAILED
Execution of cmd : log failed with exit code: -1.
Working directory was:
D:\Documents and Settings\501845922\Workspace\phobos3.prototype
Your Hg installation seems to be valid and complete.
Hg version: 1.4.3+20100201 (OK)
[ERROR] Command output:
[ERROR]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An error has occurred in Change Log report generation.
Embedded error: An error has occurred during changelog command :
Command failed.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: An error has occurred in Change Log report generation.
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: An error has occurred in Change Log report generation.
at org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:79)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more
Caused by: org.apache.maven.reporting.MavenReportException: An error has occurred during changelog command :
at org.apache.maven.plugin.changelog.ChangeLogReport.generateChangeSetsFromSCM(ChangeLogReport.java:555)
at org.apache.maven.plugin.changelog.ChangeLogReport.getChangedSets(ChangeLogReport.java:393)
at org.apache.maven.plugin.changelog.ChangeLogReport.executeReport(ChangeLogReport.java:340)
at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:98)
at org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:73)
... 19 more
Caused by: org.apache.maven.plugin.MojoExecutionException: Command failed.
at org.apache.maven.plugin.changelog.ChangeLogReport.checkResult(ChangeLogReport.java:705)
at org.apache.maven.plugin.changelog.ChangeLogReport.generateChangeSetsFromSCM(ChangeLogReport.java:467)
... 23 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Thu Apr 29 17:10:06 CEST 2010
[INFO] Final Memory: 5M/10M
[INFO] ------------------------------------------------------------------------
What did I miss in a configuration? (I hope it is a configuration problem not a Maven plugins related bug!:) My repository URL seems to be ok (the plugin has been complaining before, I fixed that up), I also set a date format for parsing (also been complaining, also fixed).
target/changelog.xml being promised was not generated at all.
Maven 2.2.1
Mercurial 1.4.3
Windows XP SP3
mvn scm:changelog command provides an expected output.
Thanks for any suggestions, I haven't googled up anything (nor binged up;).
I did a test with a random project (noop, to be precise):
hg clone https://noop.googlecode.com/hg/ noop
And after configuring the dateFormat of the maven-changelog-plugin in the top pom.xml:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changelog-plugin</artifactId>
<configuration>
<dateFormat>EEE MMM dd hh:mm:ss yyyy Z</dateFormat>
</configuration>
</plugin>
I've been able to run mvn changelog:changelog without troubles. My point is that the plugin seems to work for at least one project (chosen randomly :).
I'd really like to know if hg log --verbose behave correctly as the plugin seems to complain about it not running successfully. If it does, could you try to pass the -X option when running Maven and see if you get more useful information.
Also, please provide the content of your <scm> element.

maven dependency unable to read lib from the dependency jar

I have projects A & B where Project B is dependent on A. When I run mvn clean install in the command prompt, Project A compiles well and it produces the dependent jar for Project B in the maven local repository. During the compilation of Project B, I am getting a compilation error for a dependency listed in project B's POM. I have checked the classpath, versions and they are fine. The error I am seeing is mentioned below:
Project A
[INFO] Building tsscommon-ifc
[INFO] task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory V:\dhs_tss_build_view\dhs_tssproject\tss\tsscommon-ifc\target
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 455 source files to V:\dhs_tss_build_view\dhs_tssproject\tss\tsscommon-ifc\target\classes
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Not compiling test sources
[INFO] [surefire:test]
[INFO] Tests are skipped.
[INFO] [jar:jar]
[INFO] Building jar: V:\dhs_tss_build_view\dhs_tssproject\tss\tsscommon-ifc\target
\tsscommon-ifc-2.39.00-SNAPSHOT.jar
[INFO] [install:install]
[INFO] Installing V:\dhs_tss_build_view\dhs_tssproject\tss\tsscommon-ifc\target\tsscommon-ifc-2.39.00-SNAPSHOT.jar to C:\Documents and Settings\pwvxd35\.m2\repository\us\mn\state\dhs\tss\common\tsscommon-ifc\2.39.00-SNAPSHOT\tsscommon-ifc-2.39.00-SNAPSHOT.jar
This is fine.
Project B
[INFO] Building tsscommon-server
[INFO] task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory V:\dhs_tss_build_view\dhs_tssproject\tss\tsscommon-server\target
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 137 source files to V:\dhs_tss_build_view\dhs_tssproject\tss\tsscommon-server\target\classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
V:/dhs_tss_build_view/dhs_tssproject/tss/tsscommon-server/src/main/java/us/mn/state/dhs/tss/common/oblix/da/wsdl/OblixLoginAccess.java:[51,60] cannot find symbol
symbol : class BusinessException
location: class us.mn.state.dhs.tss.common.oblix.da.wsdl.OblixLoginAccess
Can anyone help with this issue?
The error is
OblixLoginAccess.java:[51,60] cannot find symbol
symbol : class BusinessException
location: class us.mn.state.dhs.tss.common.oblix.da.wsdl.OblixLoginAccess
This simply means that there is a class BusinessException referenced in the code for OblixLoginAccess at line 51, character 60.
The symbol cannot be found on the compile classpath.
This may or may not have anything to do with dependencies of Project B on Project A. You need to find out where that class is supposed to be, and make sure it is there.