Tag: java

Jenkins building for different environments

I currently have a Jenkins instance installed on a Development box. This builds fine and deploys to our development environment without any issues. During the build process my project makes use of a single properties file containing details such as a database connection URL (Details such as these will obviously vary depending on the environment […]

Maven/Jenkins java.lang.UnsupportedClassVersionError: Unsupported major.minor version 51.0

I have a Jenkins server having JDK & JRE 6 and 7 installed together. All of the projects are built on 1.6 except one which is 1.7 dependent. I’ve configured the maven pom file to use the Java compiler from the JAVA_HOME_7 environment PATH. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.0</version> <configuration> <source>1.7</source> <target>1.7</target> <showDeprecation>true</showDeprecation> <showWarnings>true</showWarnings> **<executable>${env.JAVA_HOME_7}/bin/javac</executable>** <fork>true</fork> […]

“aapt” IOException error=2, No such file or directory” why can't I build my gradle on jenkins?

I have a little problem. The Problem: I am trying to build a gradle of my Android Project on Jenkins and now I am standing on this problem i can’t resolve. During the Building I have this Error message: :Client:mergeDebugResources /var/lib/jenkins/workspace/LMA-Client/Client/build/exploded-aar/com.google.android.gms/play-services/3.1.59/res/drawable-hdpi/common_signin_btn_text_focus_light.9.png: Error: Cannot run program “/opt/android-sdk/build-tools/19.0.1/aapt”: java.io.IOException: error=2, No such file or directory :Client:mergeDebugResources FAILED […]

Is there anything like branch/jump table in Java?

Does Java have something similar to a branch or jump table? A branch or jump table table is, according to wikipedia, a term used to describe an efficient method of transferring program control (branching) to another part of a program (or a different program that may have been dynamically loaded) using a table of branch […]

Jenkins inject environment variable

In a Jenkins job I’m doing a couple of actions that reside in the pre-step build, such as executing a shell script. With the use of the Jenkins plugin “EnvInject” I want to inject environment variables into my maven build (Unit tests) so that those can be used inside my Java unit tests. Inside the […]

Jenkins / Maven: Could not resolve default JAVA_HOME path, Build failing

I’ve got a problem regarding Java Builds in Jenkins. The Error I resolve is the following one: Unable to locate the Javac Compiler in: C:\Jenkins\jre\..\lib\tools.jar Please ensure you are using JDK 1.4 or above and not a JRE (the com.sun.tools.javac.Main class is required). In most cases you can change the location of your Java installation […]

How to use Jenkins parameterized builds?

Jenkins allows you to parameterize builds, but I can’t figure out how to actually make use of it: Say I would normally kick my Ant build off from the command-line like so: ant -buildfile /path/to/my/build.xml -DpackageType=jar package This would invoke the build.xml‘s package target, and make a property named packageType available to it, with a […]

java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity

I’m getting this error when trying to run my android application. The strange thing: It only happens when the android application was built (and signed) with Jenkins. When I use the local apk file from eclipse and push it to my device (or emulator), everything works fine Any ideas? Edit: AndroidManifest.xml <application android:name=”at.my.test.App” android:allowBackup=”true” android:icon=”@drawable/ic_launcher” […]

I get java.net.SocketException: Permission denied: connect when sending an email in Jenkins

My Configuration: Windows 7 machine Java 7 Jenkins 1.511 running as Service on Local Account My jenkins.xml file <service> <id>jenkins</id> <name>Jenkins</name> <env name=”JENKINS_HOME” value=”%BASE%”/> <executable>C:\Program Files\IBM\SDP8.5\jdk\bin\java.exe</executable> <arguments>-Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar “%BASE%\jenkins.war” –httpPort=8080 -Djava.net.preferIPv4Stack=true</arguments> </service> My hudson.tasks.Mailer.xml file <hudson.tasks.Mailer_-DescriptorImpl plugin=”mailer@1.4″> <defaultSuffix>@example.com</defaultSuffix> <hudsonUrl>http://localhost:8081/</hudsonUrl> <adminAddress>Jenkins Build Server &lt;do-not-reply@example.com&gt;</adminAddress> <smtpHost>smtp.example.com</smtpHost> <useSsl>false</useSsl> <charset>UTF-8</charset> </hudson.tasks.Mailer_-DescriptorImpl> Note: “example.com” substituted for my real […]

Tomcat 7: Connection reset by peer or Software caused connection abort

I have a problem when I’m trying to deploy Java-application. Cannot invoke Tomcat manager: Connection reset by peer: socket write error or Cannot invoke Tomcat manager: Software caused connection abort: socket write error In pom.xml I have this: <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> <configuration> <url>http://localhost:8085/manager/html</url> <server>tomcat7</server> <path>/java_web</path> <username>admin</username> <password>admin</password> </configuration> </plugin> In tomcat-users.xml I have this: […]

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