maven-2

maven: Is it possible to override location of local repository via the use of command line option or env variable?

故事扮演 提交于 2019-12-17 10:25:41
问题 Currently we specify the location of local repository in the settings.xml. Is it possible to override this setting via command line or env variable, such that I can use an alternative location sometimes? 回答1: You would need to specify the maven.repo.local parameter to do this. mvn package -Dmaven.repo.local=/alternate/repo/location Here is a related SO question. 回答2: Use the localRepository setting in your settings.xml file. Example: <settings> <localRepository>/repo</localRepository> ... <

Maven and the JOGL library?

蹲街弑〆低调 提交于 2019-12-17 10:23:06
问题 I've been studying Maven in my free time over the last several days but can't seem to figure out how to organize a project so that the JOGL libraries are used. I would preferably like the following: Automatically download, if necessary, the OS-specific JOGL zip file from here (contains 4 jar files and some native library files (.so/.dll)); or depend on a Maven project which is a wrapper of one of the files. Unzip that zip file appropriately, so that: the jar files are added to the classpath

Is there a Maven alternative or port for the .NET world?

折月煮酒 提交于 2019-12-17 10:17:20
问题 Is there a Maven alternative or port for the .NET world? I would love to use a good dependency management system that the Java world has, but I don't find anything comparable for .NET projects... 回答1: NMaven has been the first/official effort to provide Apache Maven for .NET; the project failed to clear the high bar of requirements for an official Apache project and was retired from the Apache Incubator in November 2008. There have been several efforts to fork and survive the project, but

Maven GWT 2.0 and Eclipse

不羁岁月 提交于 2019-12-17 10:11:27
问题 Does anyone know of a good guide for creating a project with the new 2.0 release of GWT using maven and eclipse? I am running into a lot of problems getting them to play nicely together. For what it's worth, I can create a gwt project using the maven eclipse plugin which works fine, but porting it to maven doesn't work (so a guide for this would be great). Likewise, I can use the maven plugin (gwt-maven-plugin), but when I import it to eclipse (import -> materialize maven projects), it does

disable the execution: default-jar

非 Y 不嫁゛ 提交于 2019-12-17 09:50:58
问题 i am using maven assembly plugin to pack a jar file. But when i run mvn package , maven always trigger the [jar:jar {execution: default-jar}] to create a default jar file. So i will have 2 jar files (one created by assembly plugin and one created by maven jar which i dont want to be created). How can i turn off the execution: default-jar. in my pom.xml, i am using : <packaging>jar</packaging> . i dont want to change it to <packaging>pom</packaging> . 回答1: (...) So i will have 2 jar files (one

What's the difference between these Maven dependency scopes: provided/compile/system/import

旧街凉风 提交于 2019-12-17 09:29:14
问题 I have read the documentation and have some understanding. Please correct or inform me of the truth; as per my understanding: provided The dependencies must will be on the machine you run the code on, and must be included in the path compile The dependencies will not be on the machine that runs the code, so include them in the build system Exactly the same as provided, but you need the dependencies to be present in a jar file strictly import Seems like it should import the dependencies from

Setting default values for custom Maven 2 properties

帅比萌擦擦* 提交于 2019-12-17 09:16:11
问题 I have a Maven pom.xml with a plugin that I want to be able to control on the command line. Everything works otherwise fine, except even after searching the net a while I can't figure out how to set a default value for my control property: <plugin> ... <configuration> <param>${myProperty}</param> </configuration> ... </plugin> So if I run Maven with mvn -DmyProperty=something ... everything's fine, but I'd like to have a specific value assigned to myProperty also without the -DmyProperty=...

Unable to use Intellij with a generated sources folder

北战南征 提交于 2019-12-17 08:47:11
问题 Related question How to configure IntelliJ IDEA and/or Maven to automatically add directories with Java source code generated using jaxb2-maven-plugin? I have a custom plugin that generates sources under target/generated-sources (Note no toolname here). So I get sources like target/generated-sources/com/mycompany ...etc. This format cannot be changed at all, so will I be able to configure Intellij into adding it as a source folder. As of now, I can see that Intellij has added target/generated

Unable to use Intellij with a generated sources folder

对着背影说爱祢 提交于 2019-12-17 08:46:33
问题 Related question How to configure IntelliJ IDEA and/or Maven to automatically add directories with Java source code generated using jaxb2-maven-plugin? I have a custom plugin that generates sources under target/generated-sources (Note no toolname here). So I get sources like target/generated-sources/com/mycompany ...etc. This format cannot be changed at all, so will I be able to configure Intellij into adding it as a source folder. As of now, I can see that Intellij has added target/generated

Using maven to output the version number to a text file

[亡魂溺海] 提交于 2019-12-17 08:29:19
问题 I want to generate a zip file that will update an application with maven. The zip will be hosted on a server and I am using the assembly plugin to generate the zip. However I would like maven to automatically generate a text file that stores the current version number outside the zip. How is this possible? EDIT: I successfully did it using the maven Assembly Plugin and two descriptors to create two custom assemblies. One has a directory-single goal and it just creates a folder with the