maven-2

Where do I put weblogic-application.xml in my Maven 2 project?

萝らか妹 提交于 2019-12-03 08:55:53
问题 Where do I put weblogic-application.xml in my Maven 2 project so that Maven places it in META_INF in the target EAR artifact? 回答1: The weblogic-application.xml should be packaged in the META-INF directory of your final EAR (next to the standard application.xml ). With the Maven EAR Plugin, the default location for extra files to include in the EAR (that you can control with the earSourceDirectory parameter) is src/main/application . So the following would work (using the defaults): myear |--

Trouble importing multi module maven project in to Eclipse (STS 2.5.2)

99封情书 提交于 2019-12-03 08:48:09
I've just spent the last hour looking at threads on Stackoverflow.com , trying to import a Maven project in to Spring ToolSuite 2.5.2. The Maven project has multiple modules, when I use the Import... wizard in STS to import the project All the Modules are listed in the Package Explorer and some of the modules dependencies are not resolved. Can any advise on the proper way to import a Multi-Module Maven project in to STS/Eclipse such that all the modules appear under a Parent directory? And so all the modules dependencies are resolved? The project is in a hierarchy on the file system, I've

How to get rid of maven snapshot versions

放肆的年华 提交于 2019-12-03 08:45:38
I have been using maven for a while now. But I've never learnt how to get rid of the snapshot version. Please share some articles on how to do a release of the artifacts. i.e. how do I publish my 0.0.1-SNAPSHOT versions to (say) 1.0.0 Use the mvn:release plugin. mvn release:prepare mvn release:perform That's about all you need to do, in the general case. See here for the more complete documentation. 来源: https://stackoverflow.com/questions/758921/how-to-get-rid-of-maven-snapshot-versions

Use an alternative Maven Profile during test phase

旧巷老猫 提交于 2019-12-03 08:43:40
I'm trying to build an application starting from an Appfuse Archetype, but I get some strange problems. For once I'd like to use a hsqldb for automated unit tests and integration tests, and a mysql db for my manual testing so that I can easily manipulate the data when I need to, so it would be nice to automatically switch profiles during the testing phases. Is there a way to do that? I'm not sure if this is exactly what you are asking for, but you can do the following to setup multiple filters for your Maven project. <filters> <filter>/your/path/filter-${env}.properties</filter> </filters>

Installing maven2 without openjdk

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 08:42:20
问题 by default ubuntu comes with openjdk. I installed jdk from sun, and removed openjdk, but with openjdk I had to remove maven2. How can I reinstall it without installing openjdk? ~$ java -version java version "1.7.0_03" Java(TM) SE Runtime Environment (build 1.7.0_03-b04) Java HotSpot(TM) Server VM (build 22.1-b02, mixed mode) ~$ sudo apt-get install maven2 (...) The following extra packages will be installed: (...) openjdk-6-jdk openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-lib (...) The

Maven Plugin Logger Compatibility

假装没事ソ 提交于 2019-12-03 08:18:56
I am writing a Maven plugin (Mojo) that imports a Jar library used by other projects. At least one of the classes in that library use Apache Log4j for logging, but Log4j is not going to be properly configured by the logger that Maven provides to the Mojo. Is there any simple way to bridge between these? Unfortunately, org.apache.log4j.Logger and org.apache.maven.logging.Log do not share a common superinterface or superclass, so I can't simply have a setLog() type function. Any suggestions would be welcome; currently I am planning to either just ignore it, or write a bridge class that can use

Maven findbugs:check - Output Summary Of Bugs

人盡茶涼 提交于 2019-12-03 08:13:19
Does anybody know how to configure the maven findbugs plugin to output a summary of the bugs to the console (similar to the pmd plugin)? At present findbugs:check just prints out how many bugs there are in total and I need to check the individual modules target/findbugs directory and each findbugs.xml file to fix the issues. <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>findbugs-maven-plugin</artifactId> <version>2.0.1</version> <configuration> <xmlOutput>true</xmlOutput> <xmlOutputDirectory>findbugsreports</xmlOutputDirectory> <findbugsXmlOutput>true</findbugsXmlOutput>

Removing version number from file name with Maven

一笑奈何 提交于 2019-12-03 08:06:26
问题 I have a project with 5 modules in maven. Right now, when I do a "mvn clean install", it generates an ear containing the two jars, one war and one sar from the other modules. All the file names contain the version, e.g., projectx-ear-2.0.0.ear, projectx-client-2.0.0.jar, etc. I need to rename one of the jars and the final ear to omit the version in the file name. It should look like this: projectx-ear.ear | +-- projectx-client.jar | +-- projectx-misc-2.0.0.jar | +-- projectx-sar-2.0.0.sar | \

Setting the generated source directory for annotation processors in Maven

倖福魔咒の 提交于 2019-12-03 07:55:36
I'm trying to move a build which generates sources using an annotation processor to Maven. I've tried configuring the maven-compiler-plugin as follows: <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <fork>true</fork> <compilerArgument>-s ${project.build.directory}/target/generated-sources/annotation-processing</compilerArgument> </configuration> </plugin> </plugins> But javac fails with [INFO] Compilation failure Failure executing javac, but could not parse the error: javac: invalid flag: -s /home/robert/workspaces

IntelliJ IDEA debugger skips breakpoints when debugging Maven tests

烂漫一生 提交于 2019-12-03 07:50:20
问题 I am trying to debug Maven tests in IntelliJ IDEA. When I open IDEA's Maven Projects view and right-click on test goal, I get an option to debug it. Clicking it executes this goal but the execution never stops at any breakpoints. What am I missing? Thanks. 回答1: One solution would be to use remote debugging: configure the surefire plugin: <debugForkedProcess>true</debugForkedProcess> ; run the test (will wait for a remote debugger to connect) create and run a remote debug configuration in