maven plugin - throwing Build Error - eclipse

I am facing the below error while I am importing a plugin to the eclipse, using existing Maven Project option.
Project build error: Unresolveable build extension: Plugin com.atlassian.maven.plugins:maven-jira-plugin:3.2.3 or one of its dependencies could not be resolved: Failure to find com.atlassian.maven.plugins:maven-jira-plugin:jar:3.2.3 in http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
I am using sdk 3.2.3 & JIRA 4.2.1

You need to add an Atlassian Maven repository to your project, or your local Maven repository manager. Refer to Atlassian documentation for repository URLs. As far as I can see the maven-jira-plugin is there.

Related

eclipse - problems with creating maven project

I have tried to create a project with Maven in eclipse with no luck. I have researched and read, then tried the other solutions on other threads but I have no luck.
My settings.xml file is set and is filled out.
Whenever I try to make a maven project i always get this error:
Could not get the value for parameter encoding for plugin execution
default-resources Plugin
org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its
dependencies could not be resolved: Failure to transfer
org.codehaus.plexus:plexus-interpolation:jar:1.13 from
https://repo.maven.apache.org/maven2 was cached in the local
repository, resolution will not be reattempted until the update
interval of central has elapsed or updates are forced. Original error:
Could not transfer artifact
org.codehaus.plexus:plexus-interpolation:jar:1.13 from/to central
(https://repo.maven.apache.org/maven2): The operation was cancelled.
What solutions have you already tried ?
I had the same problem a few months ago, and it was because I was behind a proxy.
If it is the same for you, you could look at your web browser configuration.
From the documentation on Configuring a proxy:
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>proxyHost</host>
<port>proxyPort</port>
<username>proxyUser</username>
<password>userPassword</password>
<nonProxyHosts>www.google.com|*.somewhere.com</nonProxyHosts>
</proxy>

jenkins with copy artifact plugin without maven from GitHub

I am trying to deploy a war file into WAS8.5 with GitHub. at first I am specifying "EAR Path" with the war file in "Websphere Deployment" option. Then I made some changes in eclipse workspace and pushed into GitHub. Jenkins is checking for latest build but unable to deploy the same in Server. I have used copy artifact plugin, but still nothing happening. I may be wrong in configurations or something. I am getting the following exception:
Copied 0 artifacts from "simplewebapp" build number 20
ERROR: Failed to copy artifacts from simplewebapp with filter: *.war
Archiving artifacts
Finished: FAILURE
and in \jobs\simplewebapp\builds\lastSuccessfulBuild\archive\SimpleWebApp, am unable to see any archive file. How can i achieve it without Maven?
Kindly show me with some examples.
jenkinone
jenkintwo
As a final answer, I recommend to host your project code in GitHub, to use Jenkins/Maven to build your project and to publish the EAR/WAR file to WebSphere using this deployer plugin.

How do I let jenkins and m2eclipse share the same maven repository

How do I configure m2eclipse ( maven plugin for eclipse ) to use a centralized maven repository that is also used in jenkins.
The default user settings in m2eclipse is something like "home/user/.m2"
How can we do something like "ssh user#192.168.1.200:/var/lib/jenkins/.m2"?
A neat and easy way to do it is to use a repository manager. Sonatype's Nexus seems to be the most popular, but there are others (e.g. JFrog Artifactory and Apache Archiva). They run as HTTP servers, and you can change your Maven configuration (both locally and for Jenkins) to use it as a mirror for any Maven repository (e.g. the Central Maven repo), or use it to host your own repositories.
There is no need to do that. Your POM files list dependencies and they list repositories. Maven will then resolve your dependencies against all known repositories (the listed ones and the "build-in" ones, like Maven central).
Maven will do this in m2eclipse, when running a Maven build. Maven will also do that when running the build on Jenkins. So if both machines can connect to all the repositories listed in your POM files, both will retrieve the same artifacts and both will do the same builds.
You should really not try to share the local copy of the artifacts. That is as bad as if I and you try to share our Maven artifacts using a network share. Maven is designed to find and manage those artifacts and you are trying to do its job with this question.

Maven/Tycho/Eclipse : how to use published P2 Repo published in Maven repo?

I wonder how to make married eclipse development target definition and maven/tycho repository.
Suppose two teams A and B. The team A develops a target platform for team B.
In pure maven development without the help of Eclipse as development environment, the maven repository is the ideal tool to make communicate the both teams : when A releases a bundle, this one is published in the maven repository and available for team B when starting his maven generation.
But there is a problem for team B developping under Eclipse. Bundles published in repository by team A cannot be seen by Eclipse. The result is Eclipse cannot compile and link correctly... In fact, Eclipse becomes inefficient as a development environment.
I know that Tycho publishes P2 repository into Maven repository. But, how to use this published P2 repo ??? As far as I know, it is not possible de define an Eclipse Target Definition pointing to this published P2 Repository...
Any solutions ? Do you have the same problem ?
Thanks a lot for your help.
It should be possible to use the generated P2 repository. Did you create features for your bundles? Eclipse only recognizes features, if you want to configure your target platform.
If you use Nexus as repository manager and the OSGI metadata plugins for Nexus, then it isn't directly possible, because the metadata plugin for Nexus doesn't generate metadata for features. But there is development going on to bring that to the plugin.
This question is a lot like Handling non-OSGi dependencies when integrating Maven, Tycho and Eclipse
I use nexus with its p2 plugins, which provide both a maven and p2 repository. (You can pay to run nexus with p2 or you can install the older beta plugins, which work well enough.)
It's important to:
Use maven and p2 repositories
Properly setup your pom.xml files
Use the maven tycho plugin
The link above includes a discussion on how to do this.
FYI, it is possible to point to nexus p2 in you Target Platform definition.
Open your Target Definition
In Locations, select Add, and then select your nexus p2 update site

Tool for managing/hosting own p2 repositories?

Our company uses Maven. We use the Nexus repository manager in order to store our snapshots and releases.
Currently, we are developing a product based on Eclipse. We use Tycho to do that.
The problem is the following: In our Eclipse-based product we have many features. Our idea is build each feature (or group of features) separately and put them in internal p2 repositories. When one features requires another feature, we point the target platform to necessary internal p2 repository.
Currently, we build application with Tycho. We make our features "deployable", so Tycho produces a P2 site in target. We push that P2 site to our server and then run Eclipse FeaturesAndBundlesPublisher, which merges that recently-built feature with a P2 repository. As a result, we have a internal P2 repository having all the versions of required feature.
We find that this process is too cumbersome. Is there a tool like Nexus, which would be more convenient?
UPD.:There is a discussion on Tycho Users list
With the Unzip Repository Nexus Plugin, you can use Nexus for exchanging binary artifacts between Tycho builds.
Tycho project A publishes its artifacts like a normal Maven project: The project is built with mvn clean deploy, which uploads the project's artifacts into your deploy Maven repository on the Nexus. The only special requirement is that the project builds a p2 repository. The recommended way to do this is an eclipse-repository module, but a "deployable feature" should also work in most cases.
On your Nexus, you only need the following one-time configuration: For the deploy Maven repository (or a "Repository Group" which includes that repository), you need to add a virtual repository of type "Unzip Repository". This virtual repository shows zip artifacts from the deploy repository in unpacked form.
Example: If the p2 repository zip of project A is in the deploy Maven repository at http://nexus.corp/nexus/repositories/build.milestones/corp/example/project-a/project-a-repo/1.0.0/project-a-repo-1.0.0.zip, it will be available in standard p2 repository format in the Unzip Repository at http://nexus.corp/nexus/repositories/build.milestones.unzip/corp/example/project-a/project-a-repo/1.0.0/project-a-repo-1.0.0.zip-unzip/.
Tycho project B can reference the artifacts from project A by adding the latter URL to its target platform, e.g. in a target definition file.
In the above example, project B references a release version of project A. The same approach also works for snapshots because the Unzip Repository has support for "symbolic" versions, like 1.1.0-SNAPSHOT for the last deployed 1.1.0-SNAPSHOT or even just SNAPSHOT for the overall highest version. Using these symbolic versions, Project B can then, for example in its own CI build, reference the CI build results project A by adding the resulting (stable!) p2 repository URLs in its target platform.
Disclaimer: The Unzip Repository Nexus Plugin is part of the Tycho project, of which I'm a committer.
Maybe this is a bit late, but I am currently working on an open source (EPL) repository manager which supports the workflow of deploying to a repository with maven and tycho, and consuming it as P2 repository.
It is also possible to deploy bundles created by maven (not maven tycho) and the P2 metadata will be generated automatically.
The project is called "Package Drone" and hosted on github. There is also a short introduction video.