maven-2

how to release a project which depends on a 3rd party SNAPSHOT project in maven

空扰寡人 提交于 2019-12-18 10:22:27
问题 i would like to release a snapshot project 'foo-1.0-SNAPSHOT' using the maven release plugin. The project depends on a 3rd party module 'bar-1.0-SNAPSHOT' which is not released yet. I use the option 'allowTimestampedSnapshots' in my project's pom.xml to allow timestamped snapshots but i assume that the 3rd party module (bar) is not timestamped unless i build it myself as maven still complains about unresolved SNAPSHOT dependencies. Is there a way to release the project foo regardless of

How can I change the war name generated by maven assembly plugin

喜夏-厌秋 提交于 2019-12-18 10:20:04
问题 How can I change the name from 1.0.snapshot-jar-with-dependencies to something else, below are contents of my POM: <build> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.2-beta-5</version> <configuration> <archive> <manifest> <mainClass>com.package.example.MainClass</mainClass> </manifest> </archive> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> </configuration> </plugin> </plugins> </build> 回答1: Use the following in the

Why is there no need for Maven in .NET?

人盡茶涼 提交于 2019-12-18 10:19:24
问题 I have the impression, that in the .NET-world, there is no real need for a Maven-like tool. I am aware that there is Byldan and NMaven (is it still alive?), but I have not yet seen a real-world project that uses them. Also in most .NET projects I have worked on, there never was voiced an need for a Maven-like tool. The problems Maven maven is addressing (automatic dependency-resolution, conventions based build structure ...) seem not to be so important in .NET. Is my perception correct? Why

Maven doesn't use Java 7

巧了我就是萌 提交于 2019-12-18 10:14:58
问题 I want to package a maven-(multi)module, the parent POM includes: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>${maven.compiler.source}</source> <target>${maven.compiler.target}</target> <encoding>${project.build.sourceEncoding}</encoding> </configuration> </plugin> I'm using Java 1.7 and the properties are specified as follows: <properties> <project.build.sourceEncoding>UTF-8</project

Maven: Including a META-INF folder in the classes folder

巧了我就是萌 提交于 2019-12-18 10:13:48
问题 I have a very simple WAR project and I want to include a directory named META-INF at the top of the classes output folder where all the compiled Java classes are. I'm using Maven, but it seems that by default Maven won't include anything that is not a Java class. So it ignores my META-INF directory that is sitting at the top of the src directory. The META-INF directory contains a file named persistence.xml . Any quick pointers on how to instruct Maven to put this directory and file into the

A cycle was detected in the build path of project xxx - Build Path Problem

别来无恙 提交于 2019-12-18 10:12:26
问题 I'm in the process of converting my projects to OSGI bundles using maven and eclipse. Maven builds the stuff just fine, only I get the above error now within Eclipse. How can I find out which project causes this? Is there a special view or something? How can this happen, I would expect that maven can detect cyclic dependencies as well? Update Ok, I found something here and here Could this be caused by the felix maven-bundle-plugin which does for each export also an import? 回答1: Mark circular

Where in maven project's path should I put configuration files that are not considered resources

白昼怎懂夜的黑 提交于 2019-12-18 10:11:40
问题 I have a simple java maven project. One of my classes when executing needs to load an xml configuration file from the classpath. I don't want to package such xml file when producing the jar but I want to include a default xml file in a zip assembly under a conf subfolder and I also want this default xml to be available in the unit tests to test against it. As I see it there are 2 possible places of this default xml: src/main/resources/conf/default.xml src/main/conf/default.xml Both solutions

What are unused/undeclared dependencies in Maven? What to do with them?

风流意气都作罢 提交于 2019-12-18 10:06:52
问题 Maven dependency:analyze complains about the dependencies in my project. How does it determine which are unused and which are undeclared? What should I do about them? Example: $ mvn dependency:analyze ... [WARNING] Used undeclared dependencies found: [WARNING] org.slf4j:slf4j-api:jar:1.5.0:provided [WARNING] commons-logging:commons-logging:jar:1.1.1:compile [WARNING] commons-dbutils:commons-dbutils:jar:1.1-osgi:provided [WARNING] org.codehaus.jackson:jackson-core-asl:jar:1.6.1:compile ...

Best “General Purpose” Maven plugins [closed]

本秂侑毒 提交于 2019-12-18 09:58:06
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . We are just moving to Maven, and I understand there is a world of different plugins & extensions. Which are the best ones you

List all of the possible goals in Maven 2?

我与影子孤独终老i 提交于 2019-12-18 09:57:24
问题 I'm new to Maven, coming from the Ant world. Is it possible to list all of the possible goals (including, say, all the plugins) that you can run? I can see that there used to be a -g flag in Maven 1, but this isn't available in version 2. 回答1: The goal you indicate in the command line is linked to the lifecycle of Maven. For example, the build lifecycle (you also have the clean and site lifecycles which are different) is composed of the following phases: validate : validate the project is