Jira REST API Java - missing artifact - java

I have a problem when I want to connect to my jira localhost using java. I created maven project, and added dependency of atlassian plugin in pom.xml file. Here that dependency in my pom.xml:
<dependency>
<groupId>com.atlassian.plugins</groupId>
<artifactId>atlassian-plugins-osgi-javaconfig</artifactId>
<version>0.3.1</version>
</dependency>
So I'm getting this error: "Missing artifact com.atlassian.plugins:atlassian-plugins-osgi-javaconfig:jar:0.3.1".

As stated in maven repository you have to specify their repository, like this:
<repositories>
<repository>
<id>Atlassian</id>
<name>Atlassian Public</name>
<url>https://maven.atlassian.com/content/repositories/atlassian-public</url>
</repository>
</repositories>

I came here as I had the same issue. I've tried the solution provided by #WoAiNii but it failed with a cryptic message. Yet one part of his answer brought me to the correct solution:
<repository>
<id>atlassian-public</id>
<url>https://packages.atlassian.com/mvn/maven-external/</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</snapshots>
<releases>
<enabled>true</enabled>
<checksumPolicy>warn</checksumPolicy>
</releases>
</repository>
This is provided here: https://developer.atlassian.com/server/framework/atlassian-sdk/atlassian-maven-repositories-2818705/
This unfortunately brought up another error:
Failed to execute goal on project Java2Jira: Could not resolve dependencies for project com.mycompany:Java2Jira:jar:1.0-SNAPSHOT: Failure to find jta:jta:jar:1.0.1 in https://packages.atlassian.com/mvn/maven-external/ was cached in the local repository, resolution will not be reattempted until the update interval of atlassian-public has elapsed or updates are forced -> [Help 1]
This was discussed on the internal board by Atlassian and the solution seems to be just to add it externally by adding this to your dependencies:
<dependency>
<groupId>jta</groupId>
<artifactId>jta</artifactId>
<version>1.0.1b</version>
<scope>provided</scope>
</dependency>

Related

Is there a Neo4j maven repository for old dependencies?

I have an old project which uses spring data and neo4j. I'm trying to build it, but maven is not able to find the neo4j-cypher-dsl dependency. The dependency is defined as follows:
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-cypher-dsl</artifactId>
<version>2.0.1</version>
</dependency>
These are the repositories that I have configured in pom.xml:
<repositories>
<repository>
<id>neo4j</id>
<url>http://m2.neo4j.org/</url>
</repository>
<repository>
<id>neo4j-releases</id>
<url>http://m2.neo4j.org/content/repositories/releases/</url>
</repository>
</repositories>
And this is the error that I'm getting from maven:
[ERROR] Failed to execute goal on project evidencefactory: Could not
resolve dependencies for project
com.evidencefactory:evidencefactory:war:0.9-SNAPSHOT: Failed to
collect dependencies at
org.springframework.data:spring-data-neo4j-rest:jar:3.1.0.RELEASE ->
org.springframework.data:spring-data-neo4j:jar:3.1.0.RELEASE ->
org.neo4j:neo4j-cypher-dsl:jar:2.0.1: Failed to read artifact
descriptor for org.neo4j:neo4j-cypher-dsl:jar:2.0.1: Could not
transfer artifact org.neo4j:neo4j-cypher-dsl:pom:2.0.1 from/to neo4j
(http://m2.neo4j.org/): Failed to transfer file
http://m2.neo4j.org/org/neo4j/neo4j-cypher-dsl/2.0.1/neo4j-cypher-dsl-2.0.1.pom
with status code 502 -> [Help 1]
Does anyone know where I can find this old neo4j dependency?
Updating my answer to use another repo.
See my comment below for the location of the artifacts.
Adding this to my pom.xml builds this dependency.
<repositories>
<repository>
<id>xebialabs-releases</id>
<url>https://plugins.xebialabs.com/nexus/content/groups/public/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>

Unable to import library with maven

I am trying to import Ripple Effect library by using maven https://github.com/traex/RippleEffect.
It says "The lib is available on Maven Central, you can find it with Gradle, please". I have no idea what Gradle, please is and it's information (http://gradleplease.appspot.com/#rippleeffect) didn't help me at all.
I found how to import it by using maven. I added this dependency to my POM:
<dependency>
<groupId>com.github.traex.rippleeffect</groupId>
<artifactId>library</artifactId>
<version>1.3</version>
</dependency>
and made sure that I have Maven central repository:
<repository>
<id>central</id>
<name>Maven Repository Switchboard</name>
<layout>default</layout>
<url>http://repo1.maven.org/maven2</url>
<releases>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
However, when I try to run the project, it says:
Failed to execute goal on project ProjectName: Could not resolve dependencies for project lt.adnera:ProjectName:apk:0.0.1-SNAPSHOT: Failure to find com.github.traex.rippleeffect:library:jar:1.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
Any ideas?
According to http://repo1.maven.org/maven2/com/github/traex/rippleeffect/library/1.3/library-1.3.pom the packaging is aar so there is no jar which can be downloaded.
Try:
<dependency>
<groupId>com.github.traex.rippleeffect</groupId>
<artifactId>library</artifactId>
<version>1.3</version>
<type>aar</type>
</dependency>
additional Infos: http://simpligility.github.io/android-maven-plugin/aar.html

Sikulix maven project

I want to use Sikulix in my maven project but it doesn't work, I tried to add the repository like it says (http://sikulix-2014.readthedocs.org/en/latest/faq/030-java-dev.html#a-comment-on-projects-using-maven) and when I do "mvn install" it says "Could not find artifact com.sikulix:sikulixapi:jar:1.1.0-SNAPSHOT in nexus" where nexus is our repository.
My pom contains that:
...
<repositories>
<repository>
<id>com.sikulix</id>
<name>com.sikulix</name>
<url>https://oss.sonatype.org/content/groups/public</url>
<layout>default</layout>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.sikulix</groupId>
<artifactId>sikulixapi</artifactId>
<version>1.1.0-SNAPSHOT</version>
</dependency>
</dependencies>
...
Any idea why maven does not find the artifact in the correct repo?
The problem is solved. In the settings.xml we had a so maven always used the same repo.
I just removed the mirror because we didn't use it anymore, but I think that adding the additional repository there it would work too.

Maven looking for dependency in wrong repo

I have a snapshot maven repo defined:
<repositories>
<repository>
<id>tmp-repo</id>
<url>https://my-snapshot-repo</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
The problem is, for some reason, maven is looking for the following two dependencies:
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-core</artifactId>
<version>4.4</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-client</artifactId>
<version>4.4</version>
</dependency>
In the snapshot repo rather than the stable maven repo. Each compile gives this error:
[ERROR] Failed to execute goal on project myProject: Could not resolve
dependencies for project com.myGroupId:myArtifact:jar:1.0-SNAPSHOT:
The following artifacts could not be resolved:
org.apache.httpcomponents:httpcomponents-core:jar:4.4,
org.apache.httpcomponents:httpcomponents-client:jar:4.4: Could not
find artifact org.apache.httpcomponents:httpcomponents-core:jar:4.4 in
tmp-repo (https://my-snapshot-repo)
How do I force maven to not look for this dependency in the snapshot repo?
Before your edit, your original configuration said:
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</releases>
You said that this repo holds releases, as well as snapshots, so Maven is looking there.
Now you've removed <releases>, it shouldn't be doing that. Make sure you don't have any other repository definitions taking effect.

Jasper server maven repository url?

I am trying to get below dependency from jasper server.
<dependency>
<groupId>com.jaspersoft.jasperserver</groupId>
<artifactId>jasperserver-api</artifactId>
<version>6.0.1</version>
</dependency>
But i am getting below error
Missing artifact com.jaspersoft.jasperserver:jasperserver-api:jar:6.0.1
Here is my POM
<project ...>
<modelVersion>4.0.0</modelVersion>
....
<name>jasperProject</name>
<url>http://www.jaspersoft.com</url>
<dependencies>
<dependency>
<groupId>com.jaspersoft.jasperserver</groupId>
<artifactId>jasperserver-api</artifactId>
<version>6.0.1</version>
</dependency>
</dependencies>
</project>
With some simple googling you can get to this other answer on SO, where you can find a reference to this, which in term states you can add it like this:
<repository>
<id>JasperForge Maven Repository</id>
<!-- note: you need a <server> definition at bottom of file this file -->
<url>http://anonsvn:anonsvn#jasperforge.org/svn/repos/maven2</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
It also seems there's http://www.jasperforge.org/maven2/, which appears to be a non-browseable repository.
Another option is to put all required jars to a local maven repository. I know this is not the best solution, but it works, when you have no idea regarding correct Jasper public repository

Categories

Resources