Continuous integration of packaged configuration

1, IEDA packaged Maven project

(1) configure maven environment variables:

(2) modify the settings.xml in maven conf directory, configure local and remote warehouse warehouse Ali cloud [remote warehouse, or use the default configuration]

Remote repository

     <!-- 阿里云仓库-->
    <mirror>
        <id>alimaven</id>
        <mirrorOf>central</mirrorOf>          
        <name>aliyun maven</name>  
        <url>http://maven.aliyun.com/nexus/content/groups/public/</url>     
    </mirror>

 

(3) arranged in the maven jdk information, and activating the configuration

 

(4) POM file packaged JDK plugin configuration information required to be consistent configuration maven

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.1</version>
            <configuration>
                <verbose>true</verbose>
                <fork>true</fork>
                <executable>${JAVA_HOME}/bin/javac</executable>
            </configuration>
        </plugin>
    </plugins>
</build>

(5)常见问题

(5.1)该类问题,可尝试删除maven-compiler-plugin所有的jar包重新下载,或者检查远程仓库是否能访问到 clean、compiler

Error: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not b

CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not be resolved

(5.2)maven中jdk与打包编译使用jdk没有保持一致

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project ApiAutoTest
190728: Fatal error compiling: 无效的目标发行版: 1.8 -> [Help 1]

 

发布了17 篇原创文章 · 获赞 0 · 访问量 180

Guess you like

Origin blog.csdn.net/qq_37637691/article/details/99663281