maven-jar-plugin

How to disable jar creation in commandline in a maven project?

允我心安 提交于 2021-02-11 16:32:05
问题 I have a maven project for which I'm running two separate builds. In one build I want to save the build time by disabling the jar creation of maven modules in it.(There are 45 maven modules). There is a Maven-Jar-Plugin that is being used to create the jars. I want to conditionally disable the jar creation at the command line, that is, looking for something similar to -Dskiptests used to skip the unit tests though there is a surefire plugin by default. 回答1: The maven-jar-plugin does not

How to disable jar creation in commandline in a maven project?

不问归期 提交于 2021-02-11 16:31:22
问题 I have a maven project for which I'm running two separate builds. In one build I want to save the build time by disabling the jar creation of maven modules in it.(There are 45 maven modules). There is a Maven-Jar-Plugin that is being used to create the jars. I want to conditionally disable the jar creation at the command line, that is, looking for something similar to -Dskiptests used to skip the unit tests though there is a surefire plugin by default. 回答1: The maven-jar-plugin does not

Maven: The packaging for this project did not assign a file to the build artifact

我的梦境 提交于 2020-01-27 08:54:05
问题 I'm using Maven 3.0.3 on Mac 10.6.6. I have a JAR project and when I run the command "mvn clean install:install", I'm getting the error, [ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.3.1:install (default-cli) on project StarTeamCollisionUtil: The packaging for this project did not assign a file to the build artifact -> [Help 1] What does this mean and how can I fix it? Below is my pom.xml. Let me know what other info would be helpful and I'll edit this post.

Maven: The packaging for this project did not assign a file to the build artifact

蓝咒 提交于 2020-01-27 08:53:21
问题 I'm using Maven 3.0.3 on Mac 10.6.6. I have a JAR project and when I run the command "mvn clean install:install", I'm getting the error, [ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.3.1:install (default-cli) on project StarTeamCollisionUtil: The packaging for this project did not assign a file to the build artifact -> [Help 1] What does this mean and how can I fix it? Below is my pom.xml. Let me know what other info would be helpful and I'll edit this post.

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

maven-jar-plugin Exclusions Failing

旧城冷巷雨未停 提交于 2019-12-23 17:19:15
问题 We are trying to build two jars from the same pom file (and yes, I have read this Sonotype blog post saying not to) because we need one with all our resources and one without for internal political reasons. We have configured the maven-jar-plugin with a configuration that we think should work, but the resources are always included. Here is the relevant part of our pom file: <plugins> <plugin> <artifactId>maven-jar-plugin</artifactId> <executions> <execution> <id>package-consumer</id> <phase

Maven (Eclipse plugin and mvn) not including main class with pom.xml setup

泄露秘密 提交于 2019-12-23 00:51:44
问题 I've been trying to work this out for the last few hours and I've got nowhere. I've just installed the Maven for Eclipse plugin (M2E, I think) and also the maven too, mvn. I've created a very simple Hello World project and am trying to get the built jar to run on using: java -jar pimidi-0.0.1-SNAPSHOT.jar Regardless of what I try, I always get the same error: no main manifest attribute, in target/pimidi-0.0.1-SNAPSHOT.jar Here is my pom.xml: <project xmlns="http://maven.apache.org/POM/4.0.0"

Change maven dependency for artifact using classifier

五迷三道 提交于 2019-12-21 04:15:53
问题 With the maven jar plugin I build two jar: bar-1.0.0.jar and bar-1.0.0-client.jar. Actually in my POM I have the following dependency: <dependency> <groupId>de.app.test</groupId> <artifactId>foo</artifactId> <version>1.0.0</version> </dependency> This artifact exist also in two version bar-1.0.0.jar and bar-1.0.0-client.jar I want to make bar-1.0.0-client.jar dependent of foo-1.0.0-client.jar and bar-1.0.0.jar dependent of foo-1.0.0.jar . ================ ->First (wrong) solution: define the

Maven : add external resources

 ̄綄美尐妖づ 提交于 2019-12-18 11:13:13
问题 I am building an executable jar file with maven, meaning that you run it with "java -jar file.jar". I want to rely on user defined properties (just a file containing keys/values), during developpement phase I was putting my "user.properties" file in maven /src/main/resources/ folder. My property file is loaded with: final Properties p = new Properties(); final InputStream resource = IOParametres.class.getResourceAsStream("/user.properties"); p.load(resource); Now, I want to keep that file