maven-assembly-plugin

Maven Shade Plugin to produce two Jars

混江龙づ霸主 提交于 2019-11-30 01:29:20
问题 Till now I was using maven assembly plugin to generate two JARs for each artifact - compiled sources and dependencies - the reason for this was simple - deploying only the compiled sources over network is significantly faster than deploying all-in-one-JAR with 40 MB of data. Because of overwriting of inner files I had to switch for maven shade plugin to be able to use the <transformers> feature. However I am unable to manage to run both of the two executions: <plugins> <plugin> <groupId>org

Maven - Include dependent libs in jar without unpacking dependencies?

大憨熊 提交于 2019-11-30 00:31:42
问题 We're trying to build a client jar that includes unpacked dependent jar's. And the manifest should have class-path entries to the dependent jars. The snippet below works but the jars are unpacked - how can we stop the jars from being unpacked? <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> <archive> <manifest> <addClasspath>true</addClasspath> </manifest> </archive> </configuration

Deploying assembly package with maven-release-plugin

孤街醉人 提交于 2019-11-29 22:23:48
We use Hudson and the maven-release-plugin to do the release builds. Now I have a project which contains an assembly that puts together all needed components and then packages them into a .tar.gz package with the desired directory structure. Now I'm trying to get the release-plugin to deploy this package to our Maven repository during the release:perform goal, but only the standard stuff (sources, javadoc, POM) are deployed. I've already bound the assembly goal to the maven package phase, and the .tar.gz gets build during the release, but not uploaded to the repository. Any hints what I'm

Using maven to build multiple resources assemblies that are very similar

你说的曾经没有我的故事 提交于 2019-11-29 19:27:21
问题 I'm having a problem with this very redundant maven configuration. The application I'm working on sometimes gets built for environments that need alternate resource bundles. The current way the resources are prepared for deployment is that they are added to a single .zip file. The build master then deploys the zipped resources to the server. For some environments, alternate versions of some of the resources need to be used. The folder structure in the project looks like this: src/main

I wish to exclude some class files from my jar. I am using maven-assembly-plugin. It still adds the files. I dont get any error

蓝咒 提交于 2019-11-29 19:13:14
问题 I dont get any error with this code. Just that the file that I want to exclude still gets added. I am using the maven plugin for eclipse <plugin> <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> <id>only</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <archive> <manifest> <mainClass>com.Main</mainClass> </manifest> </archive> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> <excludes> <exclude>**

How to assembly a project after using proguard-maven-plugin

点点圈 提交于 2019-11-29 14:49:39
I am trying to add an obfuscation step while packaging my app. I supposed that I had to insert the Proguard plugin between the compiler plugin and the assembly (the assembly just put all of my app and dependencies into one single jar). <build> <finalName>myApp</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.2</version> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> <plugin> <groupId>com.github.wvengen</groupId> <artifactId>proguard-maven-plugin</artifactId> <version>2.0.11

How to create zip target instead of jar in maven?

China☆狼群 提交于 2019-11-29 11:11:08
Can someone please help me in creating a zip target instead of jar in maven. I tried several ways but couldn't progress. Given descriptor file in the assembly path is as follows: <assembly> <formats> <format>zip</format> </formats> <fileSets> <fileSet> <directory>src/main</directory> </fileSet> </fileSets> </assembly> The assembly plugin section in my pom file is as follows: <build> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <descriptors> <descriptor>src/assembly/descriptor.xml</descriptor> </descriptors> </configuration> </plugin> </plugins> </build>

How do I include an empty directory in a maven assembly?

孤者浪人 提交于 2019-11-29 11:11:08
问题 In what must be a common occurence, I need to include an empty directory in an assembly. In my case it is logs/. I've tried different variations in the assembly descriptor like: <fileSet> <directory>${basedir}/target</directory> <includes> <include>doesntexist</include> </includes> <outputDirectory>/logs</outputDirectory> <fileMode>0644</fileMode> </fileSet> and the directory just gets pruned. I tried to exclude as well, but that still included lots of stuff: <fileSet> <directory>${basedir}

maven assembly include the current project jar in the final zip/tar

断了今生、忘了曾经 提交于 2019-11-29 10:50:22
问题 I am using maven assembly plugin to generate a .tar file contain several other files, dependent jars. All the files are being copied correctly to the given folders in the config assembly.xml . I would like to include the original project jar too in the final tar file, but not seeing it currently in it. I do get the following message when I issue assembly:single goal: [WARNING] Cannot include project artifact: com.my.newpkg.project1:jar:0.0.3.0; it doesn't have an associated file or directory.

Error reading assemblies: No assembly descriptors found

半世苍凉 提交于 2019-11-29 10:41:04
问题 I get Error reading assemblies: No assembly descriptors found when building my project. I'm trying to set permissions for my .sh files and exclude a nasty .jar file that makes my application crash...I don't think the problem is about that though.... My maven-assembly plugin is added like this in my pom.xml file: <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.2.1</version> <executions> <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>single</goal> <