maven-2

maven tomcat plugin with mysql driver in $catalina_home/lib

百般思念 提交于 2019-12-12 08:36:26
问题 i am trying to use a container managed datasource (via context.xml) in tomcat. The corresponding jar file needs to go in $catalina_home/lib, otherwise tomcat can't find it. (not in webapp/WEB-INF/lib, because it is managed by the webserver, not by the application itself) the problem is: I am using maven with the maven-tomcat-plugin, so I don't have a $catalina_home (everything is distributed in my .m2 -repository). So the question is: how can I add the mysql driver jar to the classpath of the

Ignoring report generation for specific classes in cobertura maven plugin

谁都会走 提交于 2019-12-12 08:25:21
问题 I've been using Cobertura plugin for report generation and instrumentation (with surefire). Here is the issue I am facing: I am unable to make the plugin ignore report generation for specific classes in my project. PF below the related excerpt from pom.xml, I have added the ignore tag, but that just ignores instrumentation for the ignored classes. I want the report for specific projects to not be generated at all. Firstly, due to my limited knowledge of both Maven and Conberture, I want to

one-jar remove verbose warning information on application load

南楼画角 提交于 2019-12-12 08:22:06
问题 I am using Maven, with the one-jar pluggin, but when I run the one jar executable, I'm greeted with a wall of warnings, this is unacceptable for use I've looked at every available resource on one-jar and see no instruction on how to keep the jar for spewing out tons of warnings when run, has anyone solved this? JarClassLoader: Warning: META-INF/LICENSE.txt in lib/commons-io-1.4.jar is hidden by lib/commons-collections-3.2.1.jar (with different bytecode) JarClassLoader: Warning: META-INF

Organize imports with Maven2, Eclipse-style?

柔情痞子 提交于 2019-12-12 07:39:20
问题 I'm a lone Emacs user in a group that's hung up on Eclipse. Time and again, code diffs are made larger by imports that have been "organized" or "cleaned up" by Eclipse. I don't have a strong opinion on the subject of import style in Java, but I do want to minimize our diffs. What can I do? We use Maven2 for builds; is there a plugin that can help me? Can a piece of Eclipse be abstracted out & turned into a Maven plugin? I currently use ImportScrubber and have encountered a few other stand

Is there a Scala unit test tool that integrates well with Maven?

假如想象 提交于 2019-12-12 07:14:26
问题 My company is beginning to write some code using Scala. I've been moved onto this project, and am a big fan of TDD, so I would like to get a unit-testing framework in place. However, the build system we're using for this project is Maven, and that's not going to change, for a variety of reasons. I've looked at both ScalaTest and ScalaCheck, and both seem to have issues with Maven integration. Various forum posts I've seen in Google searches indicate that some of the Suites included with

How to stop Maven's verify phase rebuilding the artifact?

谁说胖子不能爱 提交于 2019-12-12 07:12:48
问题 Imagine a Java project built using Maven for which I have: some fast-running unit tests that: developers should run before committing my CI server (Hudson, FWIW) should run upon detecting a new commit, giving almost instant feedback in case of failures some slow-running automated acceptance tests that: developers can run if they choose, e.g. to reproduce and fix failures my CI server should run after successfully running the unit tests This seems like a typical scenario. Currently, I'm

How to execute mvn command using IntelliJ IDEA?

不打扰是莪最后的温柔 提交于 2019-12-12 07:07:15
问题 I am trying to add Oracle JDBC driver in my local Maven repo. I have found this link to do so. I want to do the same from Inside IntelliJ IDEA. Is there any way to execute mvn commands from IntelliJ IDEA? 回答1: There is a button in maven menu of Intellij IDEA: Also you can always use "Terminal" 回答2: You can check the Image : If you don't fine the Maven Projects there then you can open it from Bottom Left part of Intellij IDEA, there's one Square Button there. click on it. If You don't have

Can't deploy Maven jar (MDB) on Jboss 6

风格不统一 提交于 2019-12-12 06:04:13
问题 I am using jboss6, message driven bean, hibernate and maven2 in my application when i try to compile my mdb using maven2 and deploy on jboss6 i get the following error: Failed to create Resource MessageBean.jar - cause: java.lang.Exception:Failed to start deployment [vfs:///opt/jboss6/server/default/deploy/MessageBean.jar] during deployment of 'MessageBean.jar' - cause: java.lang.RuntimeException:org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments

ClientBundle Resources Path in GWT

浪子不回头ぞ 提交于 2019-12-12 04:54:29
问题 I have a maven gwt project, and I'm using ClientBundle to package my image resources within the project. I would like to place the images in /src/main/resources as should be done in maven instead of src/main/java/com/mycompany/myproject/client as gwt wants. Is there any way I can achieve this? Thank you, Sammy 回答1: I got it; I can place the image at src/main/resources/com/mycompany/myproject/client and it will be resolved correctly ;) 来源: https://stackoverflow.com/questions/2027408

Deploying a Maven web project on Jetty

你说的曾经没有我的故事 提交于 2019-12-12 04:21:00
问题 when I try to run my project on Jetty I get this exception: java.lang.ClassNotFoundException: Default The full stack: Launching Jetty with port 8080, context / and webapp path src/main/webapp 2011-07-19 16:49:56.832:INFO::Logging to STDERR via org.mortbay.log.StdErrLog 2011-07-19 16:49:56.841:INFO::jetty-6.1.26 2011-07-19 16:49:57.181:WARN::EXCEPTION java.lang.ClassNotFoundException: Default at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native