如何在 jar 中配置 maven:程序集根路径
2022-09-01 15:07:23
这是pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.webflow</groupId>
<artifactId>spring-js-resources-thin</artifactId>
<version>2.2.1.RELEASE</version>
<name>Spring js lib</name>
<description>Spring javascript library without dojo</description>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<descriptors>
<descriptor>src/main/assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
</plugin>
</plugins>
</build>
</project>
这是assembly.xml
<assembly>
<id>js-jar</id>
<formats>
<format>jar</format>
</formats>
<fileSets>
<fileSet>
<directory>src/main/resources/</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>META-INF/**/*</include>
</includes>
</fileSet>
</fileSets>
</assembly>
问题是,每次我打开生成的jar文件(spring-js-resources-thin-2.2.1.RELEASE-js-jar.jar)时,根文件夹总是被命名为(spring-js-resources-thin-2.2.1.RELEASE),然后是META-INF。artifactid-version
我想知道无论如何,我都可以使用文件名构建jar文件,但没有在类路径中,就像maven存储库中的每个jar一样。我认为应该有一个选项或方法来命名.artifactid-version.jar
artifactid-version
<outputDirectory>