Atlassian SDK error: can not install plugin - jira-plugin

I doing the following steps:
Install Atlassian latest SDK 5.1.18
Run Atlassian command: atlas-run-standalone --product jira. Then I can access the web.
Go to sample plugin folder and execute: "altas-cli:. then "pi".
This is the output error message:
java.lang.RuntimeException: org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo
at org.twdata.maven.cli.commands.ExecuteGoalCommand.run(ExecuteGoalCommand.java:112)
at org.twdata.maven.cli.commands.ExecuteGoalCommand.run(ExecuteGoalCommand.java:107)
at org.twdata.maven.cli.CliShell.interpretCommand(CliShell.java:48)
at org.twdata.maven.cli.CliShell.run(CliShell.java:29)
at org.twdata.maven.cli.AbstractCliMojo.displayShell(AbstractCliMojo.java:174)
at org.twdata.maven.cli.AbstractCliMojo.access$000(AbstractCliMojo.java:22)
at org.twdata.maven.cli.AbstractCliMojo$1.run(AbstractCliMojo.java:123)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo
at org.shaded.mojoexecutor.MojoExecutor.executeMojoImpl(MojoExecutor.java:174)
at org.shaded.mojoexecutor.MojoExecutor$ExecutionEnvironmentM3.executeMojo(MojoExecutor.java:476)
at org.shaded.mojoexecutor.MojoExecutor.executeMojo(MojoExecutor.java:75)
at org.twdata.maven.cli.MojoCall.run(MojoCall.java:33)
at org.twdata.maven.cli.commands.ExecuteGoalCommand.runMojo(ExecuteGoalCommand.java:126)
at org.twdata.maven.cli.commands.ExecuteGoalCommand.run(ExecuteGoalCommand.java:109)
... 6 more
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo
at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo(MojoExecutor.java:106)
at com.atlassian.maven.plugins.amps.MavenGoals.copyBundledDependencies(MavenGoals.java:142)
at com.atlassian.maven.plugins.amps.CopyBundledDependenciesMojo.execute(CopyBundledDependenciesMojo.java:15)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at org.shaded.mojoexecutor.MojoExecutor.executeMojoImpl(MojoExecutor.java:172)
... 11 more
Caused by: java.lang.UnsupportedOperationException
at org.apache.maven.plugin.internal.DefaultPluginManager.executeMojo(DefaultPluginManager.java:89)
at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo(MojoExecutor.java:104)
... 15 more
please help me.
Jira sample plugin: https://bitbucket.org/atlassian_tutorial/jira-gadget-2
(I succeeded installing this Gadget once)

You must be sure if Your Jira SDK version(amps.version) and Jira version specified in pom.xml are same as installed in system.
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<amps.version>5.1.11</amps.version>
<jira.version>6.3.14</jira.version>
</properties>
And please add Your pom.xml to question as Ram wrote
(I cannot add comments so I add answer)

Related

Not able to run the SimpleApp program of Google Could big-query using maven as mvn exec:java -Dexec.mainClass=com.example.bigquery.SimpleApp

Caused by: java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/JsonFactory
at com.google.api.client.json.jackson2.JacksonFactory.(JacksonFactory.java:44)
at com.google.api.client.json.jackson2.JacksonFactory$InstanceHolder.(JacksonFactory.java:64)
I just deleted the older versions of jackson-core jars from my local maven repository and then run the code and it worked

springfox 2.2.3 snapshot dependencies adding failed because of missing nexus-maven-repository-index.properties

I setup my project with springfox 2.2.3 snapshot version in IDEA 14 with gradle. I follow instruction 2.1.1. Gradle Snapshot. I failed with error that maven repository cannot be indexed and see exception in IDEA's log:
WARN - #org.jetbrains.idea.maven - Failed to update Maven indices for: [com.intellij.util.CachedValueImpl#a1d13c] http://oss.jfrog.org/simple/oss-snapshot-local/io/springfox
org.jetbrains.idea.maven.server.MavenServerIndexerException: java.lang.RuntimeException: java.io.FileNotFoundException: Resource nexus-maven-repository-index.properties does not exist
I tried both repositories and both failed:
http://oss.jfrog.org/simple/oss-snapshot-local/io/springfox/
http://oss.jfrog.org/oss-snapshot-local/io/springfox/
Could anyone have any idea how to fix the issue?
I tried to download dependencies manually and put them in my local .m2 directory and setup in gradle mavenLocal() instead of maven {url ...} but my attempt failed with IDEA's warning on Gradle refresh operation:
Warning:<i><b>project ':data-service': Web Facets/Artifacts will not be configured</b>
Details: org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':data-service:runtime'.
Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find io.springfox:springfox-swagger2:2.2.3-SNAPSHOT.
Required by:
parseq:data-service:2.4.0 alpha</i>
Now I think that should also manually add transitive dependencies for springfox package. But it looks ugly and I think I should not go this way.
Does anyone has idea what should I do?
I found issues with dependency donwloading:
* when I work from corporate network I have SSL certificate issue
* initially I added maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local/' } into buildscript {...} section, I changed it to repositories {...} and fixed the issue
* also I updated my gradle to 2.4 version (but it didn't help)
Now my starting issue is fixed.

Cargo - Jetty9 - Unexpected error when trying to start the webapp

I'm stuck on deploying a war to a remote Jetty 9.
On the app-server side I've deployed the cargo-jetty-7-and-onwards-deployer (version 1.4.9). This component seems to be running correctly and responds with (as expected on a get request):
HTTP ERROR 400
Problem accessing /cargo-jetty-deployer/. Reason:
Command / is unknown Powered by Jetty://
To deploy I'm using the cargo-maven2-plugin (version 1.4.9) with this configuration:
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>${cargo.plugin.version}</version>
<configuration>
<container>
<containerId>jetty9x</containerId>
<type>remote</type>
</container>
<configuration>
<type>runtime</type>
<properties>
<cargo.servlet.port>80</cargo.servlet.port>
<cargo.hostname>ipgoeshere</cargo.hostname>
<cargo.protocol>http</cargo.protocol>
</properties>
</configuration>
<deployables>
<deployable>
<groupId>se.dn.nav</groupId>
<artifactId>nav-api</artifactId>
<type>war</type>
<properties>
<context>/api</context>
</properties>
</deployable>
</deployables>
</configuration>
</plugin>
When running: mvn cargo:deploy
this results in the following error message:
[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.9:deploy (default-cli) on project nav-api: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.9:deploy failed: Failed to deploy [/var/lib/jenkins/jobs/Deploy-Stage/workspace/target/nav-api-1.2.war]: Response when calling http://ip:80/cargo-jetty-deployer/deploy?path=/api was: Error - Unexpected error when trying to start the webapp -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.9:deploy (default-cli) on project nav-api: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.9:deploy failed: Failed to deploy [/var/lib/jenkins/jobs/Deploy-Stage/workspace/target/nav-api-1.2.war]
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.9:deploy failed: Failed to deploy [/var/lib/jenkins/jobs/Deploy-Stage/workspace/target/nav-api-1.2.war]
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:144)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: org.codehaus.cargo.container.ContainerException: Failed to deploy [/var/lib/jenkins/jobs/Deploy-Stage/workspace/target/nav-api-1.2.war]
at org.codehaus.cargo.container.jetty.JettyRemoteDeployer.deploy(JettyRemoteDeployer.java:126)
at org.codehaus.cargo.maven2.DeployerDeployMojo.performDeployerActionOnSingleDeployable(DeployerDeployMojo.java:56)
at org.codehaus.cargo.maven2.AbstractDeployerMojo.performDeployerActionOnAllDeployables(AbstractDeployerMojo.java:166)
at org.codehaus.cargo.maven2.AbstractDeployerMojo.doExecute(AbstractDeployerMojo.java:97)
at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo.java:432)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
... 20 more
Caused by: org.codehaus.cargo.container.ContainerException: Response when calling http://ip:80/cargo-jetty-deployer/deploy?path=/api was: Error - Unexpected error when trying to start the webapp
at org.codehaus.cargo.container.jetty.JettyRemoteDeployer.deploy(JettyRemoteDeployer.java:119)
... 25 more
[ERROR]
[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/PluginExecutionException
And after this the build and deployment fails.
I've checked the logs on the Jetty, I've also upped the logging level to DEBUG, but there's no indication what is going wrong on the server side.
Does anyone have a clue what I'm doing wrong?
Is there any way I can get a better error message to indicate whats going wrong?
Any help would be GREATLY appreciated! :)
P.s.
I've removed the ip int the log.
P.s.s.
The war I'm deploying is previously tested and runs fine on Jetty.
Seems like cargo-jetty-7-and-onwards-deployer is not compatible with Jetty 9+ (there were some lifecycle changes in Jetty 9 that cargo is likely not aware of)
Do this (to find out) ...
Start jetty with the following extra command line
java -jar /opt/jetty/start.jar -Dorg.LEVEL=DEBUG -Djetty.dump.start=true
Check the logs, there should be tons more information, including a server state dump.
If cargo-jetty-deployer is either not present or not labeled as STARTED then the deployer webapp itself failed to start.
If you feel like it, update your question with the dump and/or relevant webapp startup error logging events (not the entire log, as that is just far to noisy)
What worked for me is setting the config.home system property to the parent directory of the webapps directory of Jetty.
The deployer will copy the uploaded war to the webapps directory and let Jetty deploy it automatically.
If config.home is set then the deployer will use ${config.home}/webapps, if not then it will use ${jetty.home}/webapps as the target directory for the war file. For me the webapps directory is configured to be ${jetty.base}/webapps which is something different than ${jetty.home}/webapps. Setting ${config.home} equal to ${jetty.base} solved the issue.

java.lang.ClassNotFoundException: org.apache.activemq.camel.component.ActiveMQComponent not found from bundle [camel-activemq]

I tried to deploy a sample activemq application into karaf.While deploying and starting the bundle i got this error.please help me to solve this.
I have installed all required activemq components into karaf.
still getting the following error.
karaf#root()> Exception in thread "SpringOsgiExtenderThread-7" org.springframework.beans.factory.CannotLoadBeanClassException: Can
not find class [org.apache.activemq.camel.component.ActiveMQComponent] for bean with name 'activemq' defined in URL [bundle://1171
.4:0/META-INF/spring/camel-context.xml]; nested exception is java.lang.ClassNotFoundException: org.apache.activemq.camel.component
.ActiveMQComponent not found from bundle [camel-activemq]
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1275)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBea
nFactory.java:575)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1344)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:910)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactor
y.java:609)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationConte
xt.java:932)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExec
utionApplicationContext.java:69)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionA
pplicationContext.java:355)
at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegated
ExecutionApplicationContext.java:320)
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefr
eshTask.run(DependencyWaiterApplicationContextExecutor.java:132)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.ClassNotFoundException: org.apache.activemq.camel.component.ActiveMQComponent not found from bundle [camel-ac
tivemq]
at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:103)
at org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:260)
at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:416)
at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1296)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1267)
... 11 more
Caused by: java.lang.ClassNotFoundException: org.apache.activemq.camel.component.ActiveMQComponent not found by camel-activemq [11
71]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)
at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1844)
at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:937)
at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99)
... 17 more
You miss the activemq-camel feature.
Log into karaf and issue the following commands:
For Karaf 2.3.x:
> features:chooseurl activemq
> features:install activemq-camel
For Karaf 3.0.x:
karaf#root()> feature:repo-add activemq
karaf#root()> feature:install activemq-camel
The activemq-camel feature will also install activemq-client & camel-jms.
You may need to provide a specific version number in the repository command depending on what versioning information is embedded in your bundle. E.g.:
karaf#root()> feature:repo-add activemq 5.10.0
This camel-activemq project is an upstream archetype you can use it for your quick starter of camel.
To use it in karaf, you need to add the bundle manifest.
first need to change the packing to bundle,
<packaging>bundle</packaging>
then add this part
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.7</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>camel-activemq</Bundle-SymbolicName>
<Import-Package>*,org.apache.activemq.camel.component</Import-Package>
</instructions>
</configuration>
</plugin>

teamcity 5.1 maven proxy configuration

I created a new build configuration and tried to run the same. However I encounter errors saying the artifacts could not be found in the repository. If I run the maven build from command line for the same workspace, the build works well. The proxy configuration has been mentioned in ./m2/settings.xml and the settings file has been mentioned in the build configuration. I tried even placing the proxy configuration in TeamCity\buildAgent\plugins\maven\conf\settings.xml but it does not seem to help. Kindly let me know if you have any pointers.
Caused by: org.apache.maven.plugin.InvalidPluginException: Unable to build project for plugin 'org.apache.maven.plugins:maven-site-plugin': POM 'org.apache.maven.plugins:maven-site-plugin' not found in repository: Unable to download the artifact from any repository[16:59:48]: org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-7[16:59:48]: from the specified remote repositories:[16:59:48]: central (http://repo1.maven.org/maven2)[16:59:48]: for project org.apache.maven.plugins:maven-site-plugin[16:59:48]: at org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(DefaultPluginManager.java:293)[16:59:48]: at org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:205)[16:59:48]: at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:184)[16:59:48]: at org.apache.maven.plugin.DefaultPluginManager.loadPluginDescriptor(DefaultPluginManager.java:1642)[16:59:48]: at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1540)[16:59:48]: ... 19 more[16:59:48]: Caused by: org.apache.maven.project.ProjectBuildingException: POM 'org.apache.maven.plugins:maven-site-plugin' not found in repository: Unable to download the artifact from any repository[16:59:48]: org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-7[16:59:48]: from the specified remote repositories:[16:59:48]: central (http://repo1.maven.org/maven2)[16:59:48]: for project org.apache.maven.plugins:maven-site-plugin[16:59:48]: at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:605)[16:59:48]: at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:251)[16:59:48]: at org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(DefaultPluginManager.java:277)[16:59:48]: ... 23 more[16:59:48]: Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to download the artifact from any repository[16:59:48]: org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-7[16:59:48]: from the specified remote repositories:[16:59:48]: central (http://repo1.maven.org/maven2)[16:59:48]: at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:228)[16:59:48]: at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:90)[16:59:48]: at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:558)[16:59:48]: ... 25 more[16:59:48]: Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to download the artifact from any repository[16:59:48]: at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:404)[16:59:48]: at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:216)[16:59:48]: ... 27 more
Have you tried setting the settings.xml within the Maven installation
e.g. for my TeamCity installation /usr/local/apache-maven/apache-maven-2.2.1/conf/settings.xml
Don't forget that TeamCity will probably be running as its own user, so ~/.m2/settings.xml may not be where you think it is.