maven-2

Finding the root directory of a multi module maven reactor project

允我心安 提交于 2020-01-09 06:04:32
问题 I want to use the maven-dependency-plugin to copy EAR-files from all sub-modules of my multi-module project to a directory that is relative to the root directory of the entire project. That is, my layout looks similar to this, names changed: to-deploy/ my-project/ ear-module-a/ ear-module-b/ more-modules-1/ ear-module-c/ ear-module-d/ more-modules-2/ ear-module-e/ ear-module-f/ ... And i want all the EAR-files to be copied from the target-directories of their respective modules to my-project/

Gradle alternate to mvn install

元气小坏坏 提交于 2020-01-09 02:53:27
问题 I have 2 different project build on mvn. I am trying to replace to Gradle. project 1 is SDK and project 2 is uses the sdk (example) In the time of maven it creates artifact using mvn install which adds the whole project into local repository. I like to work in gradle like that. I like project 1 build.gradle need to post it as a gradle local repository and then example project need to use it. In maven we do mvn install which adds a project artifact into .m2 folder but how to do in gradle so

m2e lifecycle-mapping not found

谁说我不能喝 提交于 2020-01-08 19:42:24
问题 I am trying to use the solution described here to solve the annoying "Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:build-helper-maven-plugin:1.7:add-source (execution: default, phase: generate-sources)" when I place the following plugin on my pom.xml: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <executions> <execution> <phase>generate-sources</phase> <goals><goal>add-source</goal></goals> <configuration>

m2e lifecycle-mapping not found

不羁的心 提交于 2020-01-08 19:40:35
问题 I am trying to use the solution described here to solve the annoying "Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:build-helper-maven-plugin:1.7:add-source (execution: default, phase: generate-sources)" when I place the following plugin on my pom.xml: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <executions> <execution> <phase>generate-sources</phase> <goals><goal>add-source</goal></goals> <configuration>

Maven 2 - define dependency version from transitive dependency version

烈酒焚心 提交于 2020-01-07 09:15:02
问题 I'll explain the question with my real situation. I use logback 1.0.1 for logging, and it includes SLF4J 1.6.4 as a dependency. I also use the SLF4J API bridges for legacy logging API's (java.util.logging, log4j and commons-logging), which are not explicit dependencies. These must also (preferrably) be version 1.6.4. Trying to make my pom.xml as neat and error-free as possible, I'd like to enforce that these API bridges be the same version as SLF4J. The only way I know is to manually define

Maven 2 - define dependency version from transitive dependency version

*爱你&永不变心* 提交于 2020-01-07 09:12:20
问题 I'll explain the question with my real situation. I use logback 1.0.1 for logging, and it includes SLF4J 1.6.4 as a dependency. I also use the SLF4J API bridges for legacy logging API's (java.util.logging, log4j and commons-logging), which are not explicit dependencies. These must also (preferrably) be version 1.6.4. Trying to make my pom.xml as neat and error-free as possible, I'd like to enforce that these API bridges be the same version as SLF4J. The only way I know is to manually define

Maven - custom packaging extension?

試著忘記壹切 提交于 2020-01-06 21:10:56
问题 Is it possible to create a maven plugin, which would package my project using a custom file extension? I know that there's a bunch of pre-defined ones like jar, ear, war etc. but I want my own. I also know how to create my own packaging type (using the components.xml), but I still have to tell it what extension it should use. Do I have to implement my own archiver or something? (basically it will be something like a war but with a different name) 回答1: Well just as I said in the comment above

maven snapshot repositories

醉酒当歌 提交于 2020-01-06 07:09:32
问题 My project depends on a 3rd party library that only has snapshots in its maven repository (no releases, which seems strange, but that's how it is). Every time I do a full build (and clean my local .m2 repository) maven will obviously go and grab the latest build. My repository proxies the one with the snapshots in it, is there anyway to tell my repository to stop pulling new versions and basically just keep the current version? I really don't want to be pulling a new build every night. The

How to run a set of classes under single test tag in testng suite?

泪湿孤枕 提交于 2020-01-06 05:40:06
问题 I have this testng suite segregated under test tag. This is different interms of other issues (TestNG surefire, run suite with maven command line). Here I need to execute set of classes under test tag not specific class nor specific package. <suite name="Suite1" verbose="1" > <test name="set-1" > <classes> <class name="com.test.ejb.AdminServiceTest" /> .... </classes> </test> <test name="set-2"> <classes> <class name="com.test.ejb.ServiceTestBase" /> ... </classes> </test> <test name="set-3">

How to run a set of classes under single test tag in testng suite?

◇◆丶佛笑我妖孽 提交于 2020-01-06 05:40:05
问题 I have this testng suite segregated under test tag. This is different interms of other issues (TestNG surefire, run suite with maven command line). Here I need to execute set of classes under test tag not specific class nor specific package. <suite name="Suite1" verbose="1" > <test name="set-1" > <classes> <class name="com.test.ejb.AdminServiceTest" /> .... </classes> </test> <test name="set-2"> <classes> <class name="com.test.ejb.ServiceTestBase" /> ... </classes> </test> <test name="set-3">