在我的项目中,我创建了许多程序集(4-5)并将它们输出到target.1/2这些程序集中没有采用它们的最终名称(或程序集ID),而是按照artifactID-version.jar格式.这非常令人困惑为什么会这样?
我的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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.apple</groupId>
<artifactId>maven</artifactId>
<name>maven_XX</name>
<version>0.0.1-SNAPSHOT</version>
<build>
<plugins>
<!-- Added to avoid the compilation issue wrt Annotations -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4.2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-4</version>
<executions>
<execution>
<id>clientjar</id>
<phase>compile</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>XX_client</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>
${basedir}/src/main/resources/assemblies/clientjar.xml
</descriptor>
</descriptors>
</configuration>
</execution>
<execution>
<id>11***</id>
<phase>compile</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>11server</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>
${basedir}/src/main/resources/assemblies/11server.xml
</descriptor>
</descriptors>
<outputDirectory>assemblies-target</outputDirectory>
</configuration>
</execution>
<execution>
<id>cache</id> …
Run Code Online (Sandbox Code Playgroud) 我的pom.xml用于生成大约8个程序集.因此,当我运行mvn assembly:assembly时,所有都生成.有没有办法有选择地一次生成1/2程序集?
我想从命令行运行maven命令.
在运行mvn命令时,获取错误 -
Error reading settings.xml: only whitespace content allowed before start tag and not \ufffd (position: START_DOCUMENT seen \ufffd... @1:1)
Line: 1
Column: 1
Run Code Online (Sandbox Code Playgroud)
我的问题是什么settings.xml
?
我正在创建一个程序集packaging=war
.我需要包含一些jar,这些jar已经在我的war(web-inf/lib
)中的pom.xml中被声明为项目依赖项
我怎样才能做到这一点?
编辑于15/10-我的项目创建了几个组件,其中一个组件应该提供类型战争的包装.一些jar文件,它们是项目的依赖项(并已在pom.xml中声明)需要包含在WEB-INF下的war中.我如何包含它们或如何指出它们到我的本地nexus存储库路径的路径?
在 Ant 中,我们可以通过将日志文件指定为参数来将构建详细信息发送到日志文件,同时调用 Ant 构建,如 ant -l $BUILDLOG 我们在 Maven 中有类似的功能吗?