Maven repository for PayPal java API - maven

I migrate a eclipse based project to maven based one.
<dependency>
<groupId>com.paypal.sdk</groupId>
<artifactId>paypal-base</artifactId>
<version>1.4.4</version>
</dependency>
I need version 1.4.4 or later (because the original jar file we were using was version 1.4.4). But in public repositories I find only version 1.0.0.
EDIT: We solved this problem while ago by set-uping private repo. Seems that PayPal have finally uploaded their API jars in the official maven repo.

The Maven way of solving this kind of problem is to set up your own Maven repository (e.g. Sonatype Nexus). Then you can upload the artifacts you need.
The "quick and dirty" solution would be to copy the required Jar file into a folder and include this file as dependency by using the scope "system" (see Maven documentation)

Related

How to include csjdbc.jar as part of maven dependency?

I have been looking for a dependency for csjdbc.jar in Maven repository so that I can build my app using maven and retrieve that jar on the fly. However, I cannot find a dependency in Maven repository related to that jar. Can anyone help, please?
Hopefully you have already resolved this issue.
csjdbc.jar is not listed in maven repositories. If you have composite software installed you can copy the jar from
~\Composite Software\CIS 6.1.0\apps\jdbc\lib
directory to your local machine's maven repository like below with proper versioning:
C:\maven\repository\composite\csjdbc\6.1\csjdbc-6.1.jar
(I have 6.1 jar)

Missing artifact in pom.xml

I'm facing a problem in the pom.xml. It is showing the below error. I'm trying to update maven by adding the required dependencies but unable to solve the issue .
Resource Path Location Type Missing artifact org.springframework.security:spring-security-web:jar:4.2.2.BUILD-SNAPSHOT pom.xml /spring-security-samples-xml-insecure line 171 Maven Dependency Problem
SNAPSHOT dependencies are not retrieved by default. If you really need that specific version you will need to add the spring snapshot repository to maven. Usually one relies on released versions only: maven central
The version you are looking for is in the spring snapshots repository.
The maven manual describes how to work with multiple repositories. Usually people use a repository proxy like Nexus or Artifactory to simplify this.

Boilerpipe dependency not found

According to https://github.com/Netbreeze-GmbH/boilerpipe the maven dependency for boiler pipe is
<dependency>
<groupId>de.l3s.boilerpipe</groupId>
<artifactId>boilerpipe-core</artifactId>
<version>1.2.2</version>
</dependency>
But this dependency is not available via Maven.
Closest I found is http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22de.l3s.boilerpipe%22%20AND%20a%3A%22boilerpipe%22 this dependency is version 1.1.0 . How I can add dependency 1.2.2?
Update :
I found the dependency at this location : https://mvnrepository.com/artifact/com.syncthemall/boilerpipe/1.2.2
The simply answer here is: You can't cause it does not exist in Maven Central. The location you gave https://mvnrepository.com/artifact/com.syncthemall/boilerpipe/1.2.2 is not Maven Central. This gives a location on Github repository (source repository) which hasn't deployed yet the version 1.2.2 to Maven Central...
What you might need to do is to clone the GitHub repo and build it locally and install it yourself..or best would be using a repository manager and deploy it locally in your corporate network...
You can build project with mvn clean install. That will install the artifact to your local repository. Then you can use it.
If you need it globally best you can do is to deploy the artifact (you build) to a custom maven repository. Or ask maintainers to deploy it to central repository.

Is there a way to say maven not to use timestamp for dependency resolution

I am using MAVEN3 and I have a project XXX with version 1.0.0-SNAPSHOT and it is being uploaded to artifactory.I can find the jar uploaded to artifactory as XXX-1.0.0-SNAPSHOT.jar.
Another project YYY uses XXX-1.0.0-SNAPSHOT.jar as its dependency and it is declared as
<dependency>
<groupId>...<...>
<arti...>XXX</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
When I try to build YYY maven is trying to download XXX jar file from artifactory and it fails to find.
I get the following error
Could not resolve dependencies for project com......YYY:jar:1.0.0-SNAPSHOT: Could not find artifact com....XXX:jar:1.0.0-20130710.163046-1 in repo1 (https://artifactory.xxx.com/artifactory/REPO1)
I can see that it tries to download a jar with specific timestamp.How can I tell maven not to use timestamp to download my dependency.
Any help on this is appreciated.
Support for non-unique snapshots was removed in Maven 3 (see related JIRA issue).
I found an Artifactory document mentioning one way to handle this, near the bottom of the page.
My team has noticed problems if developers publishing snapshots to the same group/artifact in the snapshot repository are not all using the same Maven version. Either everyone needs to stick with Maven 2, or everyone uses Maven 3. Mixing doesn't work well.

How to deploy JAR to Maven remote repository

Is there any way to put my JAR file in remote repository, so my maven project can get this JAR file from any place via Internet?
I have downloaded and did some fixes in the ReportNG project: https://github.com/dwdyer/reportng .
Using ANT I have compiled this project into JAR, now I want to put it into remote Maven repository, but don't know how I can do that.
Could somebody please suggest me the way, how I can perform that?
If it is a released version you want to make available in maven central follow this guide: http://maven.apache.org/guides/mini/guide-central-repository-upload.html
I'm no github professional but since a maven repo is just a file structure with some meta-data you can put it anywhere maven can read it (ftp, http, ...). so you could create a git repo to host your maven artifacts. see http://cemerick.com/2010/08/24/hosting-maven-repos-on-github/ for an example. (it may be outdated - github may have something like maven repo hosting, I just dont know)
A lightweight way to create your own maven repository is to store it on github. See Hosting a Maven repository on github for more details
I followed sonatype open source project maven deployment guide https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide and successfully deployed the latest version of reportNG into maven central repository. Now maven have both 1.1.3 and 1.1.4
http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.uncommons%22%20AND%20a%3A%22reportng%22
You should do a pull request to the github project. If the maintainer likes your fix he will put it in the next version.
If you need your fix in a remote repo NOW then you'll have to setup your own maven repository.

Resources