小编arc*_*sha的帖子

Maven:将zip工件解压缩到SPECIFIC文件夹名称

我正在尝试下载tomcat zip artifact并将其解压缩到一个名为tomcat的文件夹中.我得到的是tomcat/apache-tomcat-7.0.19 /如何摆脱恼人的中间目录?

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-dependency-plugin</artifactId>
<version>2.4</version>
<executions>
    <execution>
        <id>unpack-tomcat</id>
        <phase>process-sources</phase>
        <goals>
            <goal>unpack</goal>
        </goals>
        <configuration>
            <artifactItems>
                <artifactItem>
                    <groupId>org.apache</groupId>
                    <artifactId>tomcat</artifactId>
                    <version>7.0.19-win64</version>
                    <type>zip</type>
                    <overWrite>false</overWrite>
                    <outputDirectory>tomcat</outputDirectory>
                    <excludes>webapps/**</excludes>
                </artifactItem>
            </artifactItems>                            
        </configuration>
    </execution>
</executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)

tomcat unpack maven maven-dependency-plugin

10
推荐指数
2
解决办法
8241
查看次数

基于os家族的maven条件

我正在尝试执行以下操作:

                <execution>
                    <id>copy-jre</id>
                    <phase>package</phase>
                    <goals>
                        <goal>unpack</goal>
                    </goals>
                    <configuration>
                        <artifactItems>
                            <artifactItem>
                                <groupId>com.sun</groupId>
                                <artifactId>jre</artifactId>
                                <version>${jdk.version}-${os.family}-x64</version>
                                <type>zip</type>
                            </artifactItem>                             
                        </artifactItems>
                        <outputDirectory>${target-deployer.cnc.dir}/java/${os.family}/x86_64/</outputDirectory>
                    </configuration>
                </execution>
Run Code Online (Sandbox Code Playgroud)

我希望在我的情况下基于os-windows或linux复制依赖.但我找不到正确的参数

parameters operating-system maven

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