maven-assembly-plugin

Regular expression not working Maven fileset

瘦欲@ 提交于 2020-01-03 16:50:10
问题 I am trying use regular expression in maven-assembly-plugin which is shown below. There are files with the names starts with ABC502. I am trying to copy only the rpms with the 3 or 4 in suffix. Below one is not working. rpm names are given below ABC5023-buildnumber.rpm ABC5024-buildnumber.rpm ABC5025-buildnumber.rpm ABC5026-buildnumber.rpm <fileSet> <directory>${project.build.directory}/tar_content/stackcontents/</directory> <outputDirectory>scripts/data/rpms/</outputDirectory> <includes>

How can I use Maven to build a jar with required libraries in a sub-folder (like Eclipse)

跟風遠走 提交于 2020-01-01 06:09:26
问题 In Eclipse, you can create a project jar with its required dependencies in an adjacent sub-folder by doing ... Export->Java->Runnable JAR file Select Library handling option: Copy required libraries into a sub-folder next to the generated JAR Is there a way to do this with the Maven assembly plugin? Or is there another Maven plugin that would be more appropriate for this task? Thanks! 回答1: yes you can use assembly plugin. pom.xml: <build> <!-- final name set the jar name, if left it will give

Trouble getting started with maven assembly plugin

我怕爱的太早我们不能终老 提交于 2020-01-01 04:31:06
问题 I'm sorry to sound ignorant here, but I'm new to Maven, and have been banging my head against something that I'm sure is quite simple. The docs say: [...] a project could produce a ZIP assembly which contains a project's JAR artifact in the root directory, the runtime dependencies in a lib/ directory, and a shell script to launch a stand-alone application. which is exactly what I want to do! But I can't seem to make it happen. My POM is as follows: <project> <modelVersion>4.0.0</modelVersion>

java maven rebuild dependency

老子叫甜甜 提交于 2019-12-30 08:12:18
问题 I have a project which has dependency A. Project is packing into WAR and dependency A - into jar. And another dependency B, which also depends on A. I want to pack project and when project B is packing it must rebuild its dependency A instead of getting compiled dependency. Please help, how can i achieve this 回答1: Always perform a clean when doing an install, ie mvn clean install . This will make sure that all modules in the project are rebuilt, packaged, and installed in the local .m2

java maven rebuild dependency

淺唱寂寞╮ 提交于 2019-12-30 08:12:11
问题 I have a project which has dependency A. Project is packing into WAR and dependency A - into jar. And another dependency B, which also depends on A. I want to pack project and when project B is packing it must rebuild its dependency A instead of getting compiled dependency. Please help, how can i achieve this 回答1: Always perform a clean when doing an install, ie mvn clean install . This will make sure that all modules in the project are rebuilt, packaged, and installed in the local .m2

How to use Maven assembly plugin with multi module maven project

感情迁移 提交于 2019-12-30 00:59:30
问题 I am new to maven and spent ~3 days in generating the zip file with assembly plugin refering to http://www.petrikainulainen.net/programming/tips-and-tricks/creating-a-runnable-binary-distribution-with-maven-assembly-plugin/ My project is multi module, so I also referred to Managing multi-module dependencies with Maven assembly plugin Still I have several inefficiencies. Below is assembly.xml (which I inherited from 1st link) <assembly> <id>bin</id> <!-- Generates a zip package containing the

Deploying assembly package with maven-release-plugin

不羁岁月 提交于 2019-12-29 14:15:33
问题 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

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

走远了吗. 提交于 2019-12-29 08:50:08
问题 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>

How can I force maven to package my project against 1.5?

回眸只為那壹抹淺笑 提交于 2019-12-29 06:50:08
问题 I am trying to compile a maven project, the source code uses Generics and other featuers of Java 1.5, thus causing my build to fail In my POM.xml I have configured the build configuration against 1.5 for the source and target properties, but this doesn't solve my issue Is my POM.xml correct, or am I missing something? Thanks <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http:/

maven-assembly-plugin doesn't add dependencies with system scope

痞子三分冷 提交于 2019-12-28 03:05:40
问题 This is my pom file: <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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.sia.g7</groupId> <artifactId>sia</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <name>sia</name> <url>http://maven.apache.org</url> <dependencies> <dependency> <groupId>log4j</groupId> <artifactId