how to install jenkins and how to run pom.xml through jenkins

0 votes
Feb 12 in Jenkins by charu
• 160 points
1,442 views
Are you trying to install Jenkins on windows or ubuntu?

1 answer to this question.

0 votes

The complete process to install Jenkins can be summarized in five steps:

  1. Install Java Version 8
  2. Install Apache Tomcat Version 9
  3. Download Jenkins war File
  4. Deploy Jenkins war File
  5. Install required plugins

For a detailed explanation, have a look at this blog.

To execute a pom.xml file through jenkins:

Go to Manage -> Configure System 

In the build section you'll find an option for adding your pom.xml file. Add the path of your pom.xml file and then apply and save.

Build the project and it'll use your project-oriented model configurations. 

example:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ma... http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <groupId>com.easy</groupId>
   <artifactId>mavenparameterize</artifactId>
   <version>0.0.1-SNAPSHOT</version>
   <name>My Maven Project</name>
   <description>This is a simple Maven Project</description>
   <properties>
      <jre.level>1.8</jre.level>
      <jdk.level>1.8</jdk.level>
   </properties>
   <build>
      <plugins>
         <!-- Compiler plug-in -->
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.5.1</version>
            <configuration>
               <source>${jdk.level}</source>
               <target>${jdk.level}</target>
            </configuration>
         </plugin>
         <!-- Added Surefire Plugin configuration to execute tests -->
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.19.1</version>
            <configuration>
               <suiteXmlFiles>
              <suiteXmlFile>patienttests.xml</suiteXmlFile>
               </suiteXmlFiles>
               <systemPropertyVariables>
                  <browserName>firefox</browserName>
               </systemPropertyVariables>
            </configuration>
         </plugin>
      </plugins>
   </build>
   <dependencies>
      <dependency>
         <groupId>org.testng</groupId>
         <artifactId>testng</artifactId>
         <version>6.9.8</version>
         <scope>test</scope>
      </dependency>
   </dependencies>
</project>
answered Feb 12 by Kalgi
• 40,540 points

Related Questions In Jenkins

0 votes
1 answer

I’m facing a login error when I try to run Jenkins on Docker. How do I solve this?

You have to open the /var/log/jenkins/jenkins.log file to ...READ MORE

answered Jul 24, 2018 in Jenkins by Sophie may
• 9,530 points
243 views
0 votes
1 answer

What are parameterized jobs in jenkins and how to configure it?

Hey @Hannah, Parameterized jobs/builds are the ones ...READ MORE

answered Dec 16, 2018 in Jenkins by Kiyara
822 views
0 votes
2 answers

How to create backup and copy files in jenkins?

You would require to copy and take ...READ MORE

answered Aug 1 in Jenkins by Sirajul
• 26,320 points
362 views
0 votes
1 answer
0 votes
2 answers

how to manually install plugins in Jenkins?

You can download the plugin (*.hpi file) ...READ MORE

answered Aug 1 in Jenkins by Sirajul
• 26,320 points
57 views
0 votes
1 answer

Jenkins and Docker: How can I customize my jenkins pipeline to use docker?

Jenkins Pipeline is designed to easily use ...READ MORE

answered Aug 26 in Jenkins by Sirajul
• 26,320 points
289 views
0 votes
1 answer

How to configure and use third party tools in jenkins?

The procedure to utilize a third party ...READ MORE

answered Aug 27 in Jenkins by Sirajul
• 26,320 points
80 views
0 votes
1 answer

How to serve Jenkins with Caddy?

Using the transparent preset fixes this: jenkins.example.com { ...READ MORE

answered Aug 8, 2018 in Jenkins by Kalgi
• 40,540 points
64 views
0 votes
2 answers

How to connect Bitbucket to Jenkins properly

In order to build your repo after ...READ MORE

answered Aug 8 in Jenkins by Sirajul
• 26,320 points
214 views