The pit encountered in the process of jekins integration maven publishing project

Background:
   After building a project with maven, every time the integration test environment needs to be deployed, the user experience environment needs to stop the current work, change the environment configuration in pom. It is possible to accidentally submit the changed pom.xml to SVN. Jenkins can be continuously deployed. It is worth a try. The problems I encountered during the installation will be recorded below.

1.jenkins installation
  https://jenkins.io/index.html
  jenkins official website to download the latest war package, use java -jar jenkins.war to start the service
  , the problem is coming, when I start under windows, it prompts me that the mail plugin environment is too old , even regardless of this error, after entering the jenkins main interface, there will be an error prompt in the upper right corner. Follow the prompts to install the corresponding jenkins plugin
  . Install the plugin location jenkins->system management->management plugins->advanced, there is an upload under this page For plugins, download the plugins to be installed at https://plugins.jenkins.io/, upload them and restart jenkins.

2. New project
  If I need to create a new maven project, but no relevant options are found, this is because there is no maven plugin. The
  Maven Integration plugin
  cannot find the relevant svn options when configuring svn, and the Subversion Plug-in
  build command needs to be installed
  clean yuicompressor:compress -P test install tomcat7:deploy -Dmaven.test.skip=true
   This command can also publish the war package to tomcat8, why? Because I tried it!
 
3. Publishing to the server
  after the build operation If there is no option to publish to tomcat, it is the reason for the lack of plugins.
  deploy to container plugin
  needs to configure the tomcat user and open the management console before publishing. The configured user format is as follows
    <role rolename="admin" />
    <role rolename="manager-script"/>
    <role rolename="manager-gui"/>
    <role rolename="manager-jmx"/>
  <user username="username" password="password" roles=" manager-gui,manager-script,manager-jmx,manager-status"/>
  When the war file is released, fill in target/App.war, and if the Context Path is filled in, the ROOT.war file will be generated.

4. The phenomenon of memory overflow often occurs when publishing , you need to adjust the startup parameters of tomcat, modify catalina.sh, find echo "Using CATALINA_BASE: $CATALINA_BASE" and add   JAVA_OPTS="
  below this line



  在pom.xml中配置远程发布的配置如下
  <!-- 远程部署tomcat -->
<plugin>
                    <groupId>org.apache.tomcat.maven</groupId>
                    <artifactId>tomcat7-maven-plugin</artifactId>
                    <version>2.2</version>
                    <configuration>
                        <url>${package.deployUrl}</url>
                        <server>TomcatServer</server>
                        <path>/</path>
                        <username>username</username>
                        <password>password</password>
                        <update>true</update>
                    </configuration>
                </plugin>
  The deployUrl interface is inconsistent with the management console interface (ends with a text suffix)
  http://localhost:8080/manager/text
 
  If it is prompted that it cannot be found during operation, you can configure
  <pluginGroups> in the maven configuration file
    <!-- pluginGroup
     | Specifies a further group identifier to use for plugin lookup.
    <pluginGroup>com.your.plugins</pluginGroup>
    -->
<pluginGroup>org.apache.tomcat.maven</pluginGroup>
  </pluginGroups>


Maven packages report "java. lang.StackOverflowError" error solution
1. Execute on the command line:

Platform: windows
In the bin directory of the maven installation directory, find mvn.bat or mvn.cmd (different versions have different suffixes), open and add
set MAVEN_OPTS=-Xss4096k
 
2. In the jenkins console -> System Management -> System Settings -> Global MAVEN_OPTS, adjust the Xss parameters
 
 
 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326285049&siteId=291194637