要查看它们的详细定义,可以到maven-assembly-plugin.jar里去看,例如对应 bin 的assembly descriptor 原始文件如下: <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org...
在Maven Build 的配置中,我们引入了 maven-resources-plugin、maven-jar-plugin、maven-dependency-plugin 和 maven-assembly-plugin 这几个插件,并对它们进行了相应的配置。 总结 当我们执行 mvn package 命令进行打包时,Maven 会按照配置文件 package.xml 和插件的配置来生成最终的分发包。Maven Assembly Plugin 会根...
-<assembly xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"> <id>bin</id> -<formats> <format>zip</format> </formats> -...
所以这里可以看出,它最终在11行新建InputStreamReader,并在第19行读取assembly descriptor文件,最终读取的结果存储在Assembly对象模型中,而Assembly这个模型是有includeBaseDirectory这个成员变量的: /** * Set includes a base directory in the final archive. For * example, * if you are creating an assembly named...
http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 "><!--常用路径: 工程路径-${basedir};--><!--id则是添加到打包文件名的标识符,用来做后缀--><id>${project.version}</id><!--<baseDirectory>${project}</baseDirectory>--><formats><format>zip</format><!--打包的文件格式...
--有Main函数的类:为了生成的jar包使用命令执行时的入口函数,可灵活增加活删除-->org.example.App</manifest></archive></configuration><executions><execution><id>make-assembly</id><phase>package</phase><goals><goal>single</goal></goals></execution></executions></plugin></plugins></build></proje...
另外一个Demo : Creating fat JARs using the Maven Assembly plugin 1.Go to the pom.xml file and make sure the main application class is specified: <properties>com.example.ApplicationKt</properties> 2. If you use EngineMain without the explicit main function, the application’s main class depen...
-- jar --><dependencySets><dependencySet><useProjectArtifact>true</useProjectArtifact>lib<scope>runtime</scope></dependencySet></dependencySets></assembly> linux下启动 java-server-cp conf:.:lib/*com.example.demo.DemoApplication 小窍门,可通过如下命令拼依赖的jar...
maven-assembly-plugin:2.2-beta-5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-assembly-plugin:jar:2.2-beta-5 [INFO] [INFO] --- [INFO] Building adaptive_concurrency_control 1.0-SNAPSHOT [INFO] --- [WARNING] Failed ...
使用assembly.xml要求你必须依赖一些包。 基本上包括下面这些都是必须的: <dependencies> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.1</version> </dependency> <dependency> <groupId>org.slf4j</groupId> ...