maven-assembly-plugin

How to get maven assembly plugin to copy artifact?

一个人想着一个人 提交于 2019-12-23 22:52:25
问题 I have a Maven assembly script that copies resources to build our app. I need to copy some war files from separate, external projects into a /webapps directory in the output. Can't seem to find the magic commands to do it. I tried adding a dependencySet to the assembly with <include com.mygroup:mywarfile> . This works if I add 'mywarfile' as a war dependency in the project with a scope of compile or runtime. Unfortunately, my project produces a war, and the maven-war-plugin includes the

A zip file cannot include itself - Maven-assembly plugin

岁酱吖の 提交于 2019-12-23 07:49:51
问题 I'm building a project using maven assembly plugin. But the process fail with the following error,(Here I pasted the error in jenkins. I checked without jenkins too.) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2:29.792s [INFO] Finished at: Fri Mar 14 10:26:58 IST 2014 [INFO] Final Memory: 26M/75M [INFO] -----------------------------------

Transitive dependencies brought by provided scope and compile scope are computed as compile scope

白昼怎懂夜的黑 提交于 2019-12-23 03:45:49
问题 We face an issue when a same artifact-X is transitively brought by a dependency-1 with provided scope, and another dependency-2 with default (compile) scope. This artifact-X will be computed as compile scope, while we expect it to be explicitly provided by dependency-1 . For example, dependency-1 pom contains: <dependencies> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>3.7</version> </dependency> <dependency> <groupId>org.apache.commons<

maven assembly create jar with dependency and class path

人走茶凉 提交于 2019-12-22 09:36:41
问题 I have a maven project with a lot of dependencies. I want to pack all in a jar with dependency using assembly plugin, but I don't won't all the dependencies jars unpacked in a big mess. I want all of them do go into lib folder, but I don't know how to add the class path. my pom: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

How to make jetty-maven-plugin deploy a war that is retrieved from a repository?

天涯浪子 提交于 2019-12-22 08:38:33
问题 I'm setting up an integration test module for a good sized web project. The integration test module is separated from the web project itself, and it has it's own pom. The idea is to use the maven-soapui-plugin to send requests and verify the response. Setting up the soapui-plugin is no hassle. However, I'm having trouble with figuring out how I can tell the jetty-maven-plugin to deploy a war from a remote repository. If I have understood correctly, the jetty-maven-plugin has a property called

No source jar attached with maven-assembly-plugin

别来无恙 提交于 2019-12-21 20:57:35
问题 I have the following project maven (3.10) multi project: my-mvn -> my-mvn-a -> my-mvn-b -> my-mvn-assembly my-mvn-a and my-mvn-b build source jars using: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>my.group</groupId> <artifactId>my-mvn</artifactId> <version>1.0.0-SNAPSHOT</version>

Spring Boot webserver works fine in Eclipse, fails to start on Server : missing EmbeddedServletContainerFactory bean

喜夏-厌秋 提交于 2019-12-21 20:00:24
问题 Following the model of the Spring Documentation I created a very simple Hello World like application. It spun right up on Eclipse and everything looked great. Sweet! I ran it and could browse to the URL. Fastest development ever. But this has to run on a server, and looking at the jar, it was only about 4K so I knew that it wasn't going to work without a bunch of classpath configuration. To avoid that, I figured I needed a jar-with-dependencies jar. So this is my pom.xml, basically identical

Creating a tar.gz archive with Maven

半世苍凉 提交于 2019-12-21 07:30:46
问题 I have a Maven project, where under src/main directory there is a sub dir called output. this folder needs to be packaged into tar.gz. when using the assembly plugin as follows: From the pom.xml: <build> <finalName>front</finalName> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.2-beta-5</version> <configuration> <descriptors> <descriptor>src/main/assembly/assembly.xml</descriptor> </descriptors> </configuration> </plugin> </plugins> </build> the assembly.xml:

Manually attach main artifact if built by maven-assembly-plugin

a 夏天 提交于 2019-12-21 04:27:28
问题 I am having problems building a maven project. I have a requirement to produce deterministic jar files, which must be binary-consistent across different builds and versions, in case there are no source code changes in between these builds. For the purpose, I have used this article for guidance. I have successfully managed to build my jars and they are consistent up to my requirements. Here is my configuration: <plugin> <artifactId>maven-antrun-plugin</artifactId> <version>1.7</version>

Exclude unused parts of dependencies from jar (Maven)

只谈情不闲聊 提交于 2019-12-21 03:32:35
问题 We have a small project with some heavy-weight dependencies (e.g. Spring) of which we only use small parts. Therefore, the JAR we get when packing with all dependencies weighs several megabytes, even for out two-class-server. This seems unnecessary. Is there a way to restrict JAR assembly to actually used (class) files? 回答1: You can use the maven-shade-plugin to create a Jar-with-dependencies (your project and the dependencies merged into one big jar) while limiting the classes or packages