maven-assembly-plugin

Why Maven assembly works when SBT assembly find conflicts

非 Y 不嫁゛ 提交于 2020-01-22 13:56:08
问题 The title could also be: What are the differences between Maven and SBT assembly plugins. I have found this to be an issue, while migrating a project from Maven to SBT. To describe the problem I have created an example project with dependencies that I found to behave differently, depending on the build tool. https://github.com/atais/mvn-sbt-assembly The only dependencies are (sbt style) "com.netflix.astyanax" % "astyanax-cassandra" % "3.9.0", "org.apache.cassandra" % "cassandra-all" % "3.4",

How to create maven uber jar which includes dependencies with scope provided

你说的曾经没有我的故事 提交于 2020-01-21 15:27:06
问题 <plugin> <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> <configuration> <archive> <manifest> <mainClass>com.XXXX.XXXXOfflineApp</mainClass> </manifest> </archive> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> </configuration> </plugin> </plugins> I have the above code piece to create an jar with dependencies, but in my pom i also have some

converting existing web project using maven

前提是你 提交于 2020-01-17 02:20:47
问题 I have been trying to convert a web project that produces a war file to maven. my existing project structure is as follows - MyWebProject | -- WEB-INF/src - contains a bunch of packages like com.myweb.client, com.myweb.server etc -- WEB-INF/test - contains 1 package com.myweb.tests -- web-scripts - contains bunch of scripts (just a folder; not on classpath) -- misc-files1 - contains misc files sets 1 -- misc-files2 - similar to above presently a war file is being created using ant script with

Mule: Maven excluding certain mule jars while creating mule runnable jar

时间秒杀一切 提交于 2020-01-16 20:06:32
问题 Need to create a runnable jar of a mule service using maven-assembly plugin. Its creating a zip file but excluding certain mule jars. When trying to run it from console getting classnotfound exception for mule-core jar. How can i include these jars as well as create a jar rather than zip. Message on console while packaging using maven clean package command from anypoint studio maven plugin is [INFO] Using exclusions definition for Mule ESB Server version 3.6.0 [INFO] Using as WTP server :

Mule: Maven excluding certain mule jars while creating mule runnable jar

孤街醉人 提交于 2020-01-16 20:05:14
问题 Need to create a runnable jar of a mule service using maven-assembly plugin. Its creating a zip file but excluding certain mule jars. When trying to run it from console getting classnotfound exception for mule-core jar. How can i include these jars as well as create a jar rather than zip. Message on console while packaging using maven clean package command from anypoint studio maven plugin is [INFO] Using exclusions definition for Mule ESB Server version 3.6.0 [INFO] Using as WTP server :

How to include custom files in JAR with Maven assembly plugin jar-with-dependencies

只谈情不闲聊 提交于 2020-01-15 11:16:26
问题 I need to include custom file (/com/app/log4.properties) in a final JAR. How can I add one file to my JAR when using jar-with-dependencies? Now there are only class files in that JAR. I'm using: mvn assembly:assembly My pom.xml: <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.0</version> <configuration> <encoding>UTF-8</encoding> <source>1.6</source> <target>1.6</target> </configuration> </plugin> <plugin>

Maven: Distribute source code with with jar-with-dependencies

旧街凉风 提交于 2020-01-12 13:57:44
问题 I am using the Maven assembly plugin to package binaries of my Java project into a fat jar (with the jar-with-dependencies descriptor). This works pretty well. Question : How can I also include the source files of my project alongside the compiled class files? I tried to look into the Maven documentation to find out how to do so but couldn't find anything. Thanks! My pom.xml looks like this: <project> ... <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven

maven assembly plugin使用

可紊 提交于 2020-01-08 06:36:36
使用场景 在使用maven来管理项目时,项目除了web项目,还有可能为控制台程序,一般用于开发一些后台服务的程序。最近在工作中也遇到了这种场景,使用quartz开发一个任务调度程序。程序中依赖很多jar包,项目的启动时只需要初始化spring容器即可。 使用方法 使用一个简单的基于spring框架的demo来做程序示例,来介绍maven assembly插件的使用方法。 项目中的代码目录如下: 在以上代码目录中,assembly目录下为打包的描述文件,下面会详细介绍该文件,bin目录下为启动脚本以及readme等文件,main下为maven标准中建立的文件,java代码以及配置文件位于该目录下。 打包完成后压缩包目录如下: 打包完成后,我们可以看到bin目录来存放启动脚本等文件,config为配置文件,lib下为运行时依赖的jar包。 使用maven assembly插件需要在pom文件中配置,添加这个插件 <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.4.1</version> <executions> <execution> <id>make-zip</id> <!-- 绑定到package生命周期阶段上 --> <phase>package</phase> <goals> <!--

How to create a single library jar from maven project with multiple submodules?

百般思念 提交于 2020-01-06 04:56:09
问题 I have a quite large java maven project with over 200 modules, it is OK as is. I am trying to merge all of those modules to single jar. In some cases it would be very handy to declare just one new maven dependency eg. my-library-5.2.4-SNAPSHOT-bundle.jar or something similar in new projects. I have tried to use maven assembly-plugin. I can create new jar file, jar contains all the module jars and it goes properly to local .m2 -folder if I install it. Jar can be declared as dependency in other

create an EAR with maven assembly plugin [closed]

拈花ヽ惹草 提交于 2020-01-05 03:03:25
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 7 years ago . I try to create an EAR with the maven assembly plugin but I got an error message instead of EAR file... [ERROR] Failed to execute goal org.apache.maven