maven-assembly-plugin

Maven can't compile java 1.8

主宰稳场 提交于 2019-12-20 11:56:15
问题 I'm trying to use maven to build a jar but I keep getting the error ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project Application: Fatal error compiling: invalid target release: 1.8 -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible

Maven - 'all' or 'parent' project for aggregation?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-19 03:21:19
问题 For educational purposes I have set up a project layout like so (flat in order to suite eclipse better): -product | |-parent |-core |-opt |-all Parent contains an aggregate project with core, opt and all. Core implements the mandatory part of the application. Opt is an optional part. All is supposed to combine core with opt, and has these two modules listed as dependencies. I am now trying to make the following artifacts: product-core.jar product-core-src.jar product-core-with-dependencies

Maven: Making Jars With Dependencies: Example From Book Doesn't Work

人盡茶涼 提交于 2019-12-19 03:12:08
问题 I am a complete beginner with Maven. I've been following the book Maven By Example. In the section 6.13 the author demonstrates making a JAR with the dependencies included via the command mvn install assembly assembly I followed the example in chapter 6, except I skipped the parts with unit testing. I went back through them to make sure I didn't skip a step. However when I tried the above command I got this error output: [INFO] [INFO] --- maven-jar-plugin:2.3.2:jar (default-jar) @ simple

Log4j2 custom plugins - annotation processing with Maven Assembly Plugin

纵饮孤独 提交于 2019-12-19 02:08:31
问题 I am not very familiar with Maven, I started using it just yesterday, but I like it. In my project I use Log4j2 library for logging and because of insufficiecy of advanced plugins (like appenders, converters) I need to use custom plugins . log4j-api and log4j-core (also with a bunch of other libraries) are added as dependencies in pom.xml associated with my project. Actually I am using version 2.0 of Log4j. Log4j uses annotation processing to pre-load classes marked as @Plugin . As far as I

Maven assembly plugin warning “The assembly descriptor contains a filesystem-root relative reference”

梦想与她 提交于 2019-12-18 13:52:26
问题 Starting from some assembly plugin version maven builds issue the following warning: [WARNING] The assembly descriptor contains a filesystem-root relative reference,which is not cross platform compatible / Is there any recommended ready-to-use solution for this? Direct googling provided me with lot of trash and no real help. Re-check of Maven assembly plugin help did not provide answer for me, maybe someone else has better search skill and can help. UPDATE Yes, this is probably because of

How to have maven-assembly-plugin respect the exclusions defined in pom.xml?

雨燕双飞 提交于 2019-12-18 13:16:14
问题 TL;DR When some (specific) transitive dependencies are excluded in the POM file but the assembly descriptor is set to fetch all dependencies , the excluded dependencies will be included in assembly. How can I prevent this? A bit of background Some dependencies may be tricky to handle because their groupIds and artifactIds change at almost each version (in my case, bouncycastle). I am retrieving several versions of bouncycastle (138, 1.38, 1.45 and 1.50). My purpose is to eliminate all

Custom maven assembly

喜你入骨 提交于 2019-12-18 11:58:01
问题 I'm starting to work with Maven but am not yet successfully thinking in Maven's terms. I have a specific requirement and the docs aren't giving me enough clues, so I could use a bit of help: I'd like to create an assembly that builds a jar-with-dependencies like the "standard" target of this name, but excluding a couple of the resources. I want log4j.properties and a couple of other configuration files to not be in the jar. builds a .ZIP file containing in its root directory the .jar from

How to assemble multimodule maven project into one WAR?

柔情痞子 提交于 2019-12-18 11:56:54
问题 Similar question here. I would like to get ONE resulting WAR to be deployed from 3 different maven modules. The war modules are absolutely non-conflicting : First one that has Java classes and some WEB-INF/artifacts Second one are just API - interfaces - that must be either already present in container or part of the resulting war (that's what I want) Third one with Implementation classes, WEB-INF/artifacts ( spring infrastructure, web.xml, etc) First one depends on interfaces and

Maven. How to include specific folder or file when assemblying project depending on is it dev build or production?

坚强是说给别人听的谎言 提交于 2019-12-18 04:54:25
问题 Using maven-assembly-plugin <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.1</version> <configuration> <descriptors> <descriptor>descriptor.xml</descriptor> </descriptors> <finalName>xxx-impl-${pom.version}</finalName> <outputDirectory>target/assembly</outputDirectory> <workDirectory>target/assembly/work</workDirectory> </configuration> in descriptor.xml file we can specify <fileSets> <fileSet> <directory>src/install</directory> <outputDirectory>/</outputDirectory> <

Maven - resource filtering : implications of the @ symbol in resource files

試著忘記壹切 提交于 2019-12-18 03:56:25
问题 I am using the Maven assembly plugin to prepare some configuration artifacts for different environments, and I am using resource filtering to substitute parameter values. I came across a weird behaviour where I had a property file with the contents as follows: ########################### # author.name@company.com # ############################ env.name=${replacement.value} The presence of the '@' symbol for the author's e-mail was causing all property references to be ignored. I have tried