maven-2

Does Maven surefire plugin run tests using multiple threads?

时间秒杀一切 提交于 2019-12-18 18:52:19
问题 I'm wondering if the Maven surefire plugin either runs tests multi-threaded by default (and if so can the number of threads be controlled? ) or if it runs tests from the Test classes in a random order or predictable order, or if the order can dictated by some means. I haven't verified this yet (I'll do so tomorrow just looking for some heads up guidance and verification at this point), but it looks as if my various JUnit Test classes are getting the tests run in some intermixed order. Which

maven-buildnumber-plugin svn revision available only when not using format

与世无争的帅哥 提交于 2019-12-18 16:07:58
问题 While using the maven-buildnumber-plugin 1.0 beta 4, it seems that I can get the svn revision unless I use a <format> tag within the configuration. Once I use <format> and <item>buildnumber</item> tag, I get an auto-incrementing number, but it no longer corresponds to svn revision and I don't know how to get it back. Is there a way to use the svn revision number within the <format> ? The documentation isn't very clear. 回答1: The buildnumber-maven-plugin is pretty darn quirky, which is probably

Execute my groovy script with ant or maven

人盡茶涼 提交于 2019-12-18 15:53:15
问题 I have the following: 1 java class 1 bat file (starts the groovy script) 1 groovy file All in the same folder. Now I want to use Maven or Ant to run the groovy file but I can't get it to work. Is there someone who can show me how to write this pom.xml or build.xml? I don't want to use the bat file anymore. 回答1: With Maven, use the gmaven plugin. From its documentation: Execute a Local Groovy Script <plugin> <groupId>org.codehaus.gmaven</groupId> <artifactId>gmaven-plugin</artifactId> <version

find pom dependencies by classname

寵の児 提交于 2019-12-18 14:33:33
问题 How can I found the dependency by classname? In particular, I want to include this class org.mortbay.jetty.testing.ServletTester in my project, how do I do that? And how did you find the answer? 回答1: since version 6.1, Netbeans can add to pom.xml the dependency you need for a given class 回答2: Nexus allows you to search for artifacts by class name as well as GroupId, ArtifactId, and Version. Nexus uses Lucene to index artifacts. The Sonatype public repository allows you to search the major

find pom dependencies by classname

▼魔方 西西 提交于 2019-12-18 14:32:42
问题 How can I found the dependency by classname? In particular, I want to include this class org.mortbay.jetty.testing.ServletTester in my project, how do I do that? And how did you find the answer? 回答1: since version 6.1, Netbeans can add to pom.xml the dependency you need for a given class 回答2: Nexus allows you to search for artifacts by class name as well as GroupId, ArtifactId, and Version. Nexus uses Lucene to index artifacts. The Sonatype public repository allows you to search the major

Pick up native JNI files in Maven test (lwjgl)

拜拜、爱过 提交于 2019-12-18 13:35:06
问题 I'm creating a program with LWJGL and Maven, and I'm writing unit tests for the graphical code. My problem is getting Maven to put the native binaries on the classpath so that the tests can pick it up. I can't get past the error: java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path I've gotten the binaries to unpack to target/libs/native/, but the tests won't pick them up. Here's my pom: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema

Running a task post maven install

橙三吉。 提交于 2019-12-18 13:19:56
问题 I want to run a simple exec command post maven install phase. What is the simplest way possible to achieve this? (without adding new plugins) 回答1: If you want to run this command as part of the normal build lifecycle, there is no other way than binding the exec goal on the install phase: <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.1.1</version> <executions> <execution> <id>my-exec</id> <phase>install</phase> <goals>

Is is possible to modify the maven console output to hide the [INFO] logging?

时光怂恿深爱的人放手 提交于 2019-12-18 12:48:11
问题 I was wondering if it was possible to modify the output from maven to for example hide the lines that start with [INFO] or to be able to see lines that start with [DEBUG]? 回答1: I don't think there is a way to configure it as a logger but mvn -q hides the [INFO] lines and mvn -X shows the debug messages. Update in 2015: newer versions of maven have added a config file where this is finally possible although as a global per install configuration, check on your $mavenInstallationDir/conf/logging

Exclude folder in intellij idea using Maven

限于喜欢 提交于 2019-12-18 12:45:54
问题 We are using maven to manage our idea projects but I'm having a problem excluding a directory from the idea project. Using idea, I would just go to Project Settings | Modules | Sources and select the folder I wanted to exclude and click on the "Excluded" button. When loading the project from the pom, target is excluded automatically. I want to exclude a logs folder as well. In maven I'm using an idea maven plugin and it says I can exclude folders. I'm using this code but it doesn't seem to

How to install Clojure on Ubuntu 10.04 from Github repo with no clojure.jar

半腔热情 提交于 2019-12-18 12:37:30
问题 I've been trying to install Clojure on my computer to learn and use. I'm running Ubuntu 10.04, and have installed the latest Sun Java SDK and environment from Synaptic. Searching with Google, I found multiple guides that give pretty clear guides on how to go about installing all the dependencies and useful tools and builders like ant, maven, leiningen, and emacs with SLIME. Some of the guides are a bit dated, especially considering how fast Clojure development moves, so I searched for the