有没有办法让maven程序集插件接受元素中的“$ {}”?
<assembly>
..
<fileSets>
<fileSet>
<directory>${project.build.outputDirectory}</directory>
<includes>
<include>**/${item}*.class</include>
</includes>
<outputDirectory>/</outputDirectory>
</fileSet>
</fileSets>
..
</assembly>
答案 0 :(得分:0)
请尝试:
<modelVersion>4.0.0</modelVersion>
<groupId>1.2.3</groupId>
<artifactId>a</artifactId>
<version>src</version>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<descriptor>assembly.xml</descriptor>
<finalName>sdm</finalName>
</configuration>
<executions>
<execution>
<id>create-archive</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-
<id>arch</id>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>${basedir}/src/main/resources</directory>
<outputDirectory>/</outputDirectory>
</fileSet>
</fileSets>
</assembly>