Javascript 当用户指定-DskipTests=true时,不希望运行maven依赖插件
我们使用Jasmine规范测试来测试我们的JS代码。为了运行这些规范,我们使用maven依赖插件从Nexus下载openui5依赖项,并将它们解压缩到本地文件夹中。我们面临的问题是“zip”非常大,因此我们不希望在用户指定-DskipTests=true时运行此“maven依赖插件”执行步骤。有没有办法指定相同的。我们的pom看起来像:Javascript 当用户指定-DskipTests=true时,不希望运行maven依赖插件,javascript,maven,dependency-management,Javascript,Maven,Dependency Management,我们使用Jasmine规范测试来测试我们的JS代码。为了运行这些规范,我们使用maven依赖插件从Nexus下载openui5依赖项,并将它们解压缩到本地文件夹中。我们面临的问题是“zip”非常大,因此我们不希望在用户指定-DskipTests=true时运行此“maven依赖插件”执行步骤。有没有办法指定相同的。我们的pom看起来像: <groupId>org.apache.maven.plugins</groupId> <artifactId>ma
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-ui5</id>
<phase>process-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>xxxxx</groupId>
<artifactId>xxxxxx</artifactId>
<version>xxxxxx</version>
<classifier>static</classifier>
<type>zip</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/dependency/openui5</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
org.apache.maven.plugins
maven依赖插件
解包-ui5
过程资源
打开
xxxxx
xxxxxx
xxxxxx
静止的
拉链
假的
${project.build.directory}/dependency/openui5
任何指针都很好。的解包目标中有一个skip参数 您需要跳过项目属性,类似于:
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
...
<configuration>
<skip>${skipTests}</skip>
...
</configuration>
</execution>
</executions>
</plugin>
org.apache.maven.plugins
maven依赖插件
...
${skipTests}
...