Jasper server maven repository url? - java

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

Related

Jira REST API Java - missing artifact

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>

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.

Maven. Adding maven repository for activiti

The problem is that I'm trying to make somelike the helloworld with Activiti but I have an error here
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-engine</artifactId>
<version>5.1</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring</artifactId>
<version>5.1</version>
</dependency>
the error is the following: 'Description Resource Path Location Type
Missing artifact org.activiti:activiti-engine:jar:5.1 pom.xml /IllMakeThisTestApp line 29 Maven Dependency Problem
Trying to resolve it I've found the following recomendation here: "The download contains all the libraries that you need to work with Activiti. But for developers that prefer to use Maven, add the following reposiory"
<repositories>
<repository>
<id>Alfresco Maven Repository</id>
<url>https://maven.alfresco.com/nexus/content/groups/public/</url>
</repository>
</repositories>
But where shall I place it? To the file called settings.ini placed in M2_HOME/conf? This file is full of comments with no any sign of repositories. So I have no idea how to do this and ask you for help
You should place that in your pom.xml - see the Maven reference on the subject:
<project xmlns="http://maven.apache.org/POM/4.0.0"...
...
<repositories>
<repository>
<id>Alfresco Maven Repository</id>
...
You will only need to tinker with the Maven config if you need to setup a mirror for the repo, eg. in case your organisation has it's own Nexus/other repo mirroring the outside "world".
Cheers,
You can place right under project. For example
<project>
....
<repositories>
<repository>
<id>spring-snapshots</id>
<url>http://repo.spring.io/libs-snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</project>
In default maven will try to download all the artifacts from maven central. You can add any number of added repositories using tag given above. Alfresco is yet another open maven repository.

Maven artifact jar different name than version

I got a small question about Maven. I got a project my pom.xml
It has basically this repositories:
<repositories>
<repository>
<id>alfresco-mirror</id>
<name>Alfresco Public Mirror</name>
<url>http://maven.alfresco.com/nexus/content/groups/public</url>
</repository>
<repository>
<id>alfresco-snapshots</id>
<name>Alfresco Public Snapshots</name>
<url>http://maven.alfresco.com/nexus/content/groups/public-snapshots</url>
<snapshots>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
<repository>
<id>alfresco</id>
<name>Alfresco Public </name>
<url>http://pipin.bluexml.com/nexus/content/repositories/thirdparty/</url>
<snapshots>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
and this dependency:
<dependencies>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-web-service-client</artifactId>
<version>3.4.d</version>
<type>jar</type>
</dependency>
</dependencies>
I think the main problem is that jar file and version got different names.
How can I solve this?
I thank your help in advance.
PS: Just for save time, this dependency link location
Try adding a classifier node to see if that works:
<dependencies>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-web-service-client</artifactId>
<version>3.4.d</version>
<classifier>community</classifier>
<type>jar</type>
</dependency>
</dependencies>
You can see the reasoning behind that here. Long story short, classifiers are just appended to that artifact name right after the version number. They're not used all that often, but you do see them from time to time.

Categories

Resources