maven-assembly-plugin

Create a large zip assembly with maven-assembly-plugin

偶尔善良 提交于 2019-12-11 08:49:03
问题 I'm having a problem with creating a larger zip assembly (uncompressed takes over 3GB) using maven-assembly-plugin. The problem occurs when building the output zip file (compressed less than 1GB). Running maven with option -e gives me a more detailed info: [INFO] Building zip: xxx/HG19-UCSC-dist.zip [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total

Maven: Output JAR with arbitrary extension

半世苍凉 提交于 2019-12-11 04:33:19
问题 I have a Java project that, when mvn install is executed on it, generates a JAR file. So far so good. After that generation, I'd like to rename the resultant JAR file to something with an arbitrary extension. For example, say the resultant JAR that is generated is called "Foo.jar", I'd like to rename it to "Foo.baz" I'm trying to ascertain the magical plugin combo that will allow me to do this. So far, I've tried the following, based on this SO answer: <project> ... <build> <finalName>Foo<

Using maven-rpm-plugin how do I to replace text in files similar to the assembly plugin

时光总嘲笑我的痴心妄想 提交于 2019-12-10 19:22:50
问题 I have a maven project where I create two packagings. One is a tar.gz file (for some targets) and an RPM for linux targets that can use RPM. I use the maven-assembly-plugin for the tar.gz file. I use maven-rpm-plugin for the RPM packaging. The assembly plug allows the specification of a true option that will replace any maven properties in the target files. For example (from my pom): <fileSet> <directory>${basedir}/src/resources/</directory> <outputDirectory>/</outputDirectory> <filtered>true

Maven maven-assembly-plugin build with profile

三世轮回 提交于 2019-12-10 14:25:17
问题 I am trying to use maven-assembly-plugin to build a lite and fat web application, the application will have different content later. I thought that I actually can use two profiles mvn -Pliteweb,fatweb package so it will create two build assembly for each profile. But when I run it, it actually only create one assembly that is in the bottom position in the pom ( the liteweb ) I already tried when I build it one by one its okay. I also check with mvn help:active-profiles -P fatweb,liteweb and

Overwrite resource file with maven assembly plugin

怎甘沉沦 提交于 2019-12-10 04:13:37
问题 I use maven-assembly-plugin with "jar-with-dependencies" to package jar. There are 2 dependencies artifact having log-back.xml. The second artifact is depend on the first one. I want to have log-back.xml of the second artifact in final jar, but it always contain log-back.xml of the first one. So how can I control this? Thanks 回答1: You can use the unpackOptions to achieve this. Try something like the following: <assembly> ... <dependencySets> <dependencySet> <outputDirectory>/</outputDirectory

How to preserve symlinks when unpacking tar using maven assembly plugin

允我心安 提交于 2019-12-08 16:59:56
问题 I am writting a maven assembly descriptor and one of the task is to download a tar file, unpack it before creating a final tarball out of many components. I cant figure out how to preserve symlinks from the tar using the maven assembly plugin. Has anybody seen this issue before? <assembly> <id>myassembly</id> <formats> <format>dir</format> </formats> <includeBaseDirectory>false</includeBaseDirectory> <dependencySets> <dependencySet> <useProjectArtifact>false</useProjectArtifact>

maven assembly, avoiding full path in zip file?

笑着哭i 提交于 2019-12-08 15:51:42
问题 I have a multi-module project which contains 2 modules (each with its own pom.xml) and a parent pom.xml pointing to those modules. When I run "mvn clean package" on the parent pom, each project ends up with a zip file under it's own target folder. I would like to package a zip file containing each module zip file under the zip file's root folder but I am having some issues doing so. I have created an assembly file in the parent pom.xml folder: <!-- Release distribution --> <assembly> <id

Maven jar-with-dependencies without target\classes (build artifacts)

。_饼干妹妹 提交于 2019-12-08 11:35:33
问题 I want to create an executable jar (with all the *.class of my code in it). However, I don't want the Jar to include the resources that during compilation are in my src/main/resources path. my project hierarchy is: project -src -main -resources -resources_setting.xml -target -classes -resources_setting.xml I want my jar to include only the classes of main and the dependencies, not the resources inside target\classes or inside resources. How do I do that? I am using maven-assembly-plugin, like

generate multiple artifacts in maven

不打扰是莪最后的温柔 提交于 2019-12-08 07:38:01
问题 I have to create multiple packages for a single application built by Maven. At first I use the -Denv to generate different packages by Maven arguments and I use the resource to include/exclude the resources: <resources> <resource> <directory>src/main/resources</directory> <includes> <include>**/*.properties</include> <include>**/${env}.ini></include> </includes> <filtering>true</filtering> </resource> </resources> Then I can use mvn clean package -Denv=dev mvn clean package -Denv=prod1 mvn

maven assembly plugin is not working with pluginManagement

懵懂的女人 提交于 2019-12-08 06:15:10
问题 Below is my configuration of maven-assembly-plugin and it's working fine.but when i am adding my all plugins inside the pluginManagement parent tag it's not working. I am not sure why it's not working <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.2</version> <executions> <execution> <id>MyId</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <descriptor>assemblyFile.xml</descriptor> <appendAssemblyId>false</appendAssemblyId> </configuration>