Jenkins not able to find out pom.xml - jenkins

I created a project and pushed it in the git.Once I configured it in Jenkins using JDK 7 and Maven 3.0. Now when I try to build it using Jenkins it throws me an error like below.
ERROR: No such file
/Users/ios/jenkins/workspace/ACADEM-4705-Test-Jenkins-Allegretto/pom.xml
Note: I am pushing the project as a whole into git

where did your pom file exists in workspace ?
If your pom.xml file exists in the root folder of workspace , then there is no need for you to mention the path of pom.xml file. in Maven 3 step , leave it empty.
If your pom.xml file exists inside the root folder , then the easy way to access that would be
$workspace/subfolder/pom.xml
Please note you will commonly face this issue when "/" is provided in stead of "\" in different OS (windows,linux) or vice versa.

Related

How to update log4j-1.2.12.jar file in jenkins

I have this log4j-1.2.12.jar file in my jenkins server
Path to it: /data/jenkins/.m2/repository/log4j/log4j/1.2.12/log4j-1.2.12.jar I got this Apache Log4j Unsupported Version Detection message from security team, how to resolve this I tried downloading the latest version but it is something like this log4j-api-2.19.0.jar
No, it's not "in Jenkins", more accurately, log4j is not a part of Jenkins. Jenkins consumes its jars from the exploded war in ${JENKINS_HOME}/war/WEB-INF/lib. It is not located there.
If a plugin consumes log4j, that would be found within the exploded plugin directory at ${JENKINS_HOME}/plugins/<plugin_name>/WEB-INF/lib. The status of log4j as it related to most plugins was tracked under JENKINS-67353.
What you are referencing is the maven local repository, .m2/repository. This structure is created when running a maven build on the controller; the dependency jars specified in (one of) your build's pom.xml.
The guidance in the comments is correct; find the appropriate pom.xml and update it, then rebuild.
You can verify these claims by deleting the entire .m2 directory (or moving / zip;delete if you are paranoid) and restarting Jenkins. You'll discover Jenkins is running fine and the directory remains empty. Run your maven jobs and it will repopulate, including log4j-1.2.12.jar, assuming it's still specified in your pom.xml. Fix your maven pom.xml, delete the directory, rerun your jobs and it should not reappear.
Perhaps you have already updated your pom.xml but never cleared out your local maven repository, then it will not repopulate (you could check the timestamp of the directory to know when it was first/last downloaded).
You can also delete referenced portions of the repository by specifying mvn dependency:purge-local-repository and adding -DreResolve=false to avoid re-resolving. Of course, if you've already updated the pom.xml, it would remain since it's not referenced in the pom.xml` (yes, it would be nice if there was an option to purge all or most of a repository or all version of a given jar, but ...).

guava-parent 12th version jar is not downloading as expected

In pom.xml,for guava-parent 12 i was added dependency as
com.google.guava
guava-parent 12.0 pom
Build succeeded but jar is not downloaded as expected. While i check the repository path
i found the files as follows.
Maven repository path structure.
We tried to keep pom and jar.
The build got success, but the jar is not downloading. We did the same for guava-12 jar, the same jar has been downloaded as expected.
So, Can any one please help us to resolve such issue and give us a way to get the jar in the respective path.
Thanks in Advance.

Jenkins uDeploy failure

After creating a tar of the build from jenkins, I am trying to move the tar to the main server using uDeploy. But i get the following error even after using the proper application name, environment and process name. I am unable to debug any further.
Please find the uDeploy settings and the log in the images.
uDeploy Jenkins setup:
error in console:
This is a known issue, have you done this workaround
Open jenkins.war and navigate to META-INF
Delete JENKINS.SF and JENKINS.RSA
Open MANIFEST.MF and delete all of the lines that start with SHA1-Digest
Place the new Log4j with version greater or equal to 1.2.12 (e.g. Log4J 1.2.17) jar in WEB-INF/lib
Update MANIFEST.MF to point to the new version

wildfly:deploy-artifact with downloaded artifact from command line

I am trying to deploy a downloaded war file using the deploy-artifact goal in Wildfly. I would like to do this from the command line.
I am getting the following error
deploy-artifact must specify the artifactId
I have added the wildfly details to the pom.xml and tried to run following command:
mvn wildfly:deploy-artifact -DtargetDir=${project.build.directory}
-DartifactId=artifact-name
I think this goal is not intended to be used from the command line since it requires the artifact to be a dependency of the project. The goal documentation doesn't state any user property for the artifactId or groupId parameters so these are only settable in the configuration section of the plugin. I'm also struggling with our test setup and deployment of artifacts from our maven repo. But if you have already downloaded the artifact why don't you just use the cli to deploy it?

No POM for multimodule project

While releasing a project I am getting below error in jenkins. I have multimodule project where one directory contains 5 projects and each project has its own pom.xml. I have created a 6th project to create EAR ( using 5 projects binaries) and this ear needs to be checked in repository.
The goal you specified requires a project to execute but there is no POM in this directory (/dev/shm/jenkinsworkspaces/Project_EAR_Build/workspace/Project_EAR_Build/target/checkout.). Please verify you invoked Maven from the correct directory.
I have specify goal in jenkins job as -Dresume=false release:prepare release:perform.
What should I mention in goal so that maven will refer checkout/EAR_Project directory to locate
pom.xml instead of checkout directory ?

Resources