Deployment Jenkins is a summary of problems encountered.

Source: Internet
Author: User
Tags svn svn update

Jenkins is a very convenient automated build attack, in the actual use of the process still encountered a lot of problems.

1, Jsp-api packing problem.

Compile with mvn need to rely on JSP-API, but many times jsp-api in the presence of the LIB, such as Tomcat, so when packaged into the war file is repeated, this time often have problems

Solution: Set in MVN's Pom.xml

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jsp-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>

The last parameter indicates that it is participating in compilation and is not packaged.

2, in the new version of Jenkins every time the automatic build, found not every time the SVN warehouse update

Workaround: This is setup problem, in Check-out strategy, such as SVN, select Euse svn update as much as possible, with ' svn revert ' before update, which indicates that each time the Updat E after the package.

3. Automatically deploy to Tomcat

This requires plug-in support, the default installation is not included after the plugin, the name of the plug-in is deploy to container Plugin, in the plug-in management inside the installation.

Then in the job after the build operation Select Deploy War/ear to a container configuration on it, the only note is the relative path.

4, in the automatic deployment to Tomcat, the first is successful, the second will kill Tomcat, the reason is not clear, in Tomcat has a log, indicating a memory leak, the log is as follows:

Serious: the Web application [/mrc-web] registered the JDBC driver [Net.sf.log4jdbc.DriverSpy] but failed to unregister it when The Web application was stopped. To prevent a memory leak, the JDBC Driver has been, forcibly.
2013-2-20 15:06:35 Org.apache.catalina.loader.WebappClassLoader clearreferencesthreads
Serious: the Web application [/mrc-web] appears to have started a thread named [MySQL Statement cancellation Timer] but has FAI led to stop it. This is very likely to create a memory leak.
2013-2-20 15:06:36 Org.apache.catalina.startup.HostConfig checkresources
Info: undeploying context [/mrc-web]
2013-2-20 15:06:37 Org.apache.catalina.startup.HostConfig Deploywar
Info: Deploying Web Application Archive Mrc-web.war
2013-2-20 15:34:08 Org.apache.catalina.loader.WebappClassLoader Clearreferencesjdbc
Serious: the Web application [/mrc-web] registered the JDBC driver [Net.sf.log4jdbc.DriverSpy] but failed to unregister it when The Web application was stopped. To prevent a memory leak, the JDBC Driver has been, forcibly.
2013-2-20 15:34:09 Org.apache.catalina.startup.HostConfig checkresources

If anyone can fix it, by the way, thank you very much.


The final question did not find a solution, another way, but only if the Tomcat machine and Jenkins were deployed on a single machine.

is to execute a windos script after compiling

net stop TOMCAT7
rmdir/s/q D:\apache-tomcat-7.0.22\webapps\mrc-web
Del Mrc-web.war
Copy C:\progra~1\jenkins\workspace\mrc\target\mrc-web.war D:\apache-tomcat-7.0.22\webapps
net start TOMCAT7

The deployment is complete.


4. "Warning:clock of the Subversion server appears to is out of sync." This can be in the inconsistent check out behavior.

This is sometimes in the compilation of this warning, the main is SVN and other server clocks and the clock of the machine is biased, such as SVN clock faster, Jenkins clock slow, when you submit SVN, followed by Jenkins Construction, this time Jenkins SVN Update because of the clock is not updated just the data, but after a few minutes before the update, more than two machine time difference, in the Jenkins build, you can update to the data.

Sister method is very simple, the time of the two machines are set to the same.


5, MVN environmental problems, this does not know what the reason, the deployment will be in C disk with the directory generated. M2 folder, which also has a warehouse directory.

There is a place to note that when there is a private mvn warehouse, you need to configure the settings.xml file, or it will be an error.

this. M2 and native mavne warehouses are not one, and this machine is generally placed below the system user.


6, compile the C + + vs2008 project under Windows, other similar

To download the MSBuild plug-in, configure the following:


Then the widget is a free-style software project job

You can choose Build a Visual Studio project or solution using MSBuild in the Add builds step

Filling in MSBuild build file with a project that requires compilation can be SLN

Fill in the Parameters at command line arguments and select the project you want to build when there are multiple items in the SLN. /t:agent:rebuild is OK.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.