我是Maven的新手。我下面的pom.xml如果使用下面的cmd可以完美地创建具有依赖项的jar:
mvn clean compile assembly:single
但是如果我在下面使用cmd jar,就会创建没有依赖项。我的pom.xml出了什么问题
mvn install or mvn package
<build>
<finalName>TestProcess</finalName>
<pluginManagement><!-- lock down plugins versions to avoid using Maven
defaults (may be moved to parent pom) -->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>com.ge.db.extract.ExtractDBProcess</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>