Travis-CI resolving non-maven-central JARS - travis-ci

I have a JAR which isn't in maven central, thus travis ci fails with the below:
Unresolveable build extension: Plugin
org.kie:kie-maven-plugin:6.2.0.Final or one of its dependencies could
not be resolved: The following artifacts could not be resolved:
org.jbpm:jbpm-bpmn2:jar:6.0.3-redhat-6,
org.drools:drools-decisiontables:jar:6.0.3-redhat-6: Could not find
artifact org.jbpm:jbpm-bpmn2:jar:6.0.3-redhat-6 in central
(https://repo.maven.apache.org/maven2) -> [Help 2]
The jar is located #
https://maven.repository.redhat.com/nexus/content/groups/product-techpreview/org/jbpm/jbpm-bpmn2/
How can i tell travis-ci to use this repo?

Fixed by adding missing repos[1]
[1]https://github.com/garethahealy/poms/blob/master/pom.xml#L760

Related

having a problem running a build with jenkins and gatling

I'm getting the following error
[ERROR] No plugin found for prefix 'gatling' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\w7116744\.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
[ERROR]
If you already have the maven gatling plugin included in the POM, make sure that you run the maven gatling:test command in the directory where your POM is in.
The plugin doesn't check if a pom exist or not. If you are NOT running the mvn gatling:test command in the directory where your pom located, you will always get "No plugin found for prefix 'gatling' in the current project ....."
Looks like gatling-maven-plugin is not configured in your pom.xml.

Deploying the root pom.xml to artifactory via jenkins?

I'm uploading from jenkins to artifactory and my whole maven project is built with:
mvn clean install
The project has
Result of the Deploy to Artifactory:
How do I get the root pom.xml to the artifactory? I reference this from other project and it does not build because of it. All the other modules are deployed and their POMs as well.
It seems that the reason that it did not work was that I had included an include pattern in the deploy maven artifacts, I removed the ".xml, *.jar" and it deployed correctly.

How to define POM location in Jenkins that is installed on a remote PC

I have jenkins installed on a remote machine. How can I point my POM location in Jenkins. If I give the POM.xml location as C:\Automation\pom.xml I am getting the error no such file exists.
Started by user anonymous
Building in workspace C:\Users\Administrator\.jenkins\workspace\RegressionTestJob
Parsing POMs
ERROR: No such file C:\Automation\pom.xml
Perhaps you need to specify the correct POM file path in the project configuration?
TestNG Reports Processing: START
Looking for TestNG results report in workspace using pattern: **/testng-results.xml
Did not find any matching files.
Finished: FAILURE
Your pom should be in your workspace, like how you would build your project in an IDE e.g. eclipse and when you build your project Jenkins will find the pom on its own in the workspace and build the project
Incase you still wish to specify the location you can use the -f option
mvn -f PomFile.xml
Hope it helps :)

POM not released using Jenkins and Artifactory Release

We're trying to use the Artifactory release process in Jenkins to publish a jar file created by a Gradle build into a Maven repo in our Artifactory server.
It nearly all works, the only issue is that the pom file isn't being copied into the Artifactory repo.
The Gradle build includes the Gradle Maven plugin and running gradlew install locally results in both the jar and the pom inserted into the local Maven repo.
I've added a task in the Gradle build that generates the pom file in the same directory as the jar file and changed the Jenkins build to run that task too.
When the build has completed I can see both the jar and the pom file in the workspace.
Any ideas on what I need to do to get the pom file published along with the jar?
We're using:
Jenkins 2.10
Artifactory plugin 2.4.4
Gradle 2.14
The Gradle build file does not inlcude the Gradle Artifactory plugin.
Cheers, Andy
The Jenkins project is configured to use the Gradle-Artifactory integration (rather than the Generic-Artifactory integration).
As suggested by Dakota Brown I'm answering my own question, the solution to my problem was to un-tick the maven3 integration option. With that option unslected, everything works as expected.

could not find artifact while running maven build in jenkins

While building the maven application in jenkins i get the following error
[ERROR] Artifact: com.envoisolutions.sxc:sxc-runtime:jar:0.7.3-osgi has no file.
org.apache.maven.artifact.resolver.ArtifactNotFoundException: Could not find artifact com.envoisolutions.sxc:sxc-runtime:jar:0.7.3-osgi in central (http://repo.maven.apache.org/maven2)
org.apache.maven.artifact.resolver.ArtifactNotFoundException: Could not find artifact xpp3:xpp3_min:jar:1.1.3.4.O-osgi in central (http://repo.maven.apache.org/maven2)
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=xpp3 -DartifactId=xpp3_min -Dversion=1.1.3.4.O-osgi -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=xpp3 -DartifactId=xpp3_min -Dversion=1.1.3.4.O-osgi -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
xpp3:xpp3_min:jar:1.1.3.4.O-osgi
from the specified remote repositories:
central (http://repo.maven.apache.org/maven2, releases=true, snapshots=false),
codehaus-releases (http://repository.codehaus.org/, releases=true, snapshots=true),
java.net (http://download.java.net/maven/2/, releases=true, snapshots=true),
central (http://repo.maven.apache.org/maven2, releases=true, snapshots=false)
Is there any way to restrict the search of maven to few repos ?
This artifact seems to be very old.
I found it in this Maven repository :
https://teamcity-systeme.lip6.fr/nexus/content/groups/public
Add this repo to your Maven's pom.

Resources