maven-2

Gradle: Make a 3rd party jar available to local gradle repository

自闭症网瘾萝莉.ら 提交于 2019-12-17 15:28:13
问题 currently, I'm testing Gradle as an alternative to Maven. In my projects, there are some 3rd party jars, which aren't available in any (Maven) repositories. My problem is now, how could I manage it to install these jars into my local .gradle repository. (If it's possible, I don't want to use the local Maven repository, because Gradle should run independently.) At the moment, I get a lot of exceptions because of missing jars. In Maven, it's quite simple by running the install command. However,

Configure Maven to use different JDK for different J2SE versions?

坚强是说给别人听的谎言 提交于 2019-12-17 15:24:48
问题 I want to configure Maven2 to use sun-java6-jdk to build Java SE 1.6 modules, and use openjdk-7 to build Java SE 1.7 modules. Is it possible? Maven2 should then auto choose the correct JDK to build different modules in one command. For example, it should be $ mvn package instead of $ cd module1 $ update-alternatives ... jdk6 ... $ mvn package ... $ cd module2 $ update-alternatives ... jdk7 ... $ mvn package P.S. It's nothing about pom.xml files, which have already been setup maven-compiler

How can I change a .properties file in maven depending on my profile?

核能气质少年 提交于 2019-12-17 15:18:06
问题 How can I change a .properties file in maven depending on my profile? Depending on whether the application is built to run on a workstation or the datacenter parts of the file my_config.properties change (but not all). Currently I manually change the .properties file within the .war file after hudson builds each version. 回答1: As often, there are several ways to implement this kind of things. But most of them are variations around the same features: profiles and filtering . I'll show the most

The following artifacts could not be resolved: javax.jms:jms:jar:1.1

隐身守侯 提交于 2019-12-17 15:14:14
问题 I am trying to compile a maven project, but I systematically get the following error message: [ERROR]Failed to execute goal on project ...: Could not resolve dependencies for project ...:war:1.0.0: The following artifacts could not be resolved: javax.jms:jms:jar:1.1, com.sun.jdmk:jmxtools:jar:1.2.1, com.sun.jmx:jmxri:jar:1.2.1: Failure to find javax.jms:jms:jar:1.1 in http://mirrors.ibiblio.org/maven2/ was cached in the local repository, resolution will not be reattempted until the update

How to get the Maven local repo location?

时光怂恿深爱的人放手 提交于 2019-12-17 15:13:51
问题 Is there a way to get the Maven local repo location? Using the following command you can force Maven to use a specific setting file: mvn -s < path to settings file > I know you can edit settings.xml file to set a repository location, but can I get the current default value with some Maven command? 回答1: If you want just the local repo, try this: mvn help:evaluate -Dexpression=settings.localRepository | grep -v '\[INFO\]' 回答2: Yes, you can get it with the -X or --debug option, e.g. mvn -X ...

How to Avoid Maven builds stall on ssh host authenticity problem?

橙三吉。 提交于 2019-12-17 12:12:51
问题 What's the right way to keep ssh host authenticity from being a problem for maven and hudsno builds? I have hudson building my maven project on a VM. When the ESX server with my VMs on it is taxed some of my jobs will stall out stuck in a loop of ssh host authenticity problems. The hosts were in the known hosts file, but during these times the clocks on the slave VMs have drifted far from those of my maven repo. [INFO] Retrieving previous build number from snapshots The authenticity of host

Can I make one maven profile activate another?

牧云@^-^@ 提交于 2019-12-17 10:47:42
问题 I have 2 maven2 profiles, selenium and jspc. Now for "selenium" id'd like to have an implicit activation of "jspc", so that I don't have to write mvn -Pselenium,jspc from the command line. Is this possible ? 回答1: You can't "chain" profile activations (maven reference) but you can activate them both through the same property: <activation> <property> <name>profile.selenium</name> </property> </activation> And the run mvn -Dprofile.selenium 来源: https://stackoverflow.com/questions/943411/can-i

Can maven projects have multiple parents?

不打扰是莪最后的温柔 提交于 2019-12-17 10:34:09
问题 We have Java and Flex projects. We currently have 1 base pom that contains the configurations we want to use for both projects. Problem with this is: Flex projects inherit configuration, for example, for javadoc and pmd plugins, which is not desirable. I want to clean it up and have a real base pom, and then a java-base-pom and a flex-base-pom . But how does this work in a multi-module that has both a Flex part and a Java part? We have plugins to our own application where we use the following

maven2: excluding directory from WAR

那年仲夏 提交于 2019-12-17 10:33:36
问题 I tried this to exclude whole directory (${basedir}/src/main/webapp/webscripts) from my WAR file but it failed. What is wrong? this doesn't work: <configuration> <webResources> <resource> <directory>${basedir}/src/main/webapp/webscripts</directory> <excludes> <exclude>**/*.*</exclude> </excludes> </resource> </webResources> </configuration> this too: <configuration> <webResources> <resource> <directory>${basedir}/src/main/webapp</directory> <excludes> <exclude>**/webscripts</exclude> <

Maven - Error Releasing Code to GitHub (Hangs After Push)

依然范特西╮ 提交于 2019-12-17 10:29:10
问题 I'm attempting to run the mvn release:prepare goal and it's hanging after the push. Any idea what I could be doing wrong? [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [INFO] BUILD SUCCESSFUL [INFO] [INFO] ------------------------------------------------------------------------ [INFO] [INFO] Total time: 8 seconds [INFO] [INFO] Finished at: Tue Jul 13 23:54:59 PDT 2010 [INFO] [INFO] Final Memory: 55M/294M [INFO] [INFO] ---------------------------