Tag: java

how to get the list of jobs in Jenkins using java?

I have downloaded and configured Jenkins in a server, my problem is that i need to access Jenkins through Java to perform some process such as starting a job, returning the current working job and returning list of jobs in the server(all that using Json) i’ve tried several codes such as this but im getting […]

Maven build-helper-maven-plugin regex unable to use property as dependency.version

I’m trying to use the build-helper-maven-plugin regex to convert a default property before it is used in the dependency section. My pom.xml file property sections looks like this… <properties> <some.version>114.6.9</some.version> </properties> My pom.xml file build plugin section looks like… <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <version>1.9</version> <executions> <execution> <id>regex-property</id> <goals> <goal>regex-property</goal> </goals> <configuration> <name>some.version</name> <value>${P_SOME_VERSION_AS_PASSED_BY_JENKINS}</value> <regex>^dirtyPrefix-(\S*)</regex> <replacement>$1</replacement> […]

Jenkins: conditional trigger on the build step

We have a project with couple of subprojects in the same SVN repository. For example: svn://ip/svn/ trunk/subproject1 svn://ip/svn/ trunk/subproject2 Is it possible in Jenkins to create conditional trigger on the build step? I will clarify: I want to execute the Maven build step only if its SVN tree was changed. For example, svn://ip/svn/ trunk/subproject1 tree […]

Cannot execute external vb script from Java program through Jenkins Slave setup

Through Jenkins – Slave setup (running in Windows), we have created a ANT job which in internally calls the below JAVA Program, String[] command = {“cmd” , “/c”, System.getProperty(“user.dir”)+”/Read_email/ReadEmail.vbs”}; Process p = Runtime.getRuntime().exec(command); System.out.println(“Process Completed”); The ReadEmail.vbs file never gets called or executed. There is no error message or warning getting generated. When I run […]

Parallel Test Execution Jenkins

I have some automated tests that I’m running using Jenkins. I’ve Jenkins connected to my GitSwarm which pulls the code from my branch and then exectutes it. I have installed the “Parallel Test Job Execution Plugin” for Jenkins. In the plugin I have specified the tests to run in 3 batches Is there anything else […]

how to deploy jenkins on the jetty correctly?

I’m trying to deploy jenkins on the jetty application server as follows: Unpack the distribution [~]$ unzip jetty-distribution-9.3.2.v20150730 [~]$ cd jetty-distribution-9.3.2.v20150730 Copy your war into place [jetty-distribution-9.3.2.v20150730]$ cp ~/Projects/mywebapp.war webapps/ Run Jetty [jetty-distribution-9.3.2.v20150730]$ java -jar start.jar My version of java is: $ java -version java version “1.7.0_80” Java(TM) SE Runtime Environment (build 1.7.0_80-b15) Java HotSpot(TM) […]

How to run Selenium tests using TestNG framework and Jenkins

I want to run Selenium tests written in TestNG framework using Jenkins. The command configured in jenkins job (Freestyle project): java -cp J:\taf\testng\*;J:\taf\workspace\TestNGExamples\bin;J:\automation\* org.testng.TestNG J:\taf\workspace\TestNGExamples\testng1.xml Note: for -cp argument, given the directory paths to testng jar, test classes, and selenium jar When I run the job (Build Now option), it is getting struck on create […]

`class file has wrong version` after Jenkins upgrade

A couple of days ago, I upgraded Jenkins to version 1.643. Before, we were using Jenkins 1.593. Starting with Jenkins 1.612, Jenkins requires Java 7, see changelog, announcement and issue. Our Jenkins server has Java 8. I have a Maven project consisting of submodules. In the job configuration in Jenkins, I have configured the build […]

What's (by default) on the classpath when you run a Jenkins job?

When you kick off a maven test in Jenkins, what is Jenkins putting onto the Java classpath by default?

VM Could not reserve enough space for object heap

I have just upgraded to Jenkins 1.500 on a windows machine. I also have a windows slave with 8GB RAM. I have made a remote connection to this slave and started it from the Jenkins webinterface (using the JNLP launch button). It shows up just fine on Jenkins and I have assigned some jobs to […]

Git Baby is a git and github fan, let's start git clone.