相关疑难解决方法(0)

Maven - 跳过建筑测试课程

有没有一种不构建测试类的简单方法?

mvn clean install -Dmaven.test.skip=true
Run Code Online (Sandbox Code Playgroud)

沃尔特

maven-2

61
推荐指数
4
解决办法
5万
查看次数

Maven:在生命周期中跳过test-compile?

test-jar使用此设置设置了使用普通jar 构建的项目:

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <executions>
                <execution>
                    <goals>
                        <goal>test-jar</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
Run Code Online (Sandbox Code Playgroud)

这个问题是每当我升级pom中的项目版本时,我需要使用测试进行构建,否则maven将无法在test-compile短语中找到具有正确版本的测试jar .很多时候我只想跳过测试,但是由于测试罐丢失,这个test-compile短语会失败.

我尝试使用-Dmaven.test.skip=true,但似乎没有跳过这test-compile句话.有没有办法跳过这个?

testing compilation build skip maven

21
推荐指数
4
解决办法
4万
查看次数

标签 统计

build ×1

compilation ×1

maven ×1

maven-2 ×1

skip ×1

testing ×1