maven

Can I run a specific testng test group via maven?

I have several testng test groups, e.g. group1,group2,group3... These are defined in my pom.xml and all get run when I execute "mvn test". What do I need to run to only execute one group without having to modify the groups configured in the pom.xml. i.e mvn test group2 mvn test group1 mvn test group3 ...

Using Tycho behind a proxy that requires authentication

I need to use the Tycho plug-in for Maven behind a firewall that requires authentication. The workaround here: https://issues.sonatype.org/browse/TYCHO-279 Nearly works, I just need a way of providing a username and password. Can anyone help? ...

Setting up Maven for a team

I have used Maven extensively for my personal projects, but now I have to set it up for a small team of 5-7 developers. My main question is, what's the recommended approach for managing dependencies to commercial libraries that are not available in the Maven repos? How can I manage the dependency of these commercial libraries on the ope...

How do I build latest Tycho

I've tried to build Tycho now for a couple of hours and just can't get it to work. I've followed these instructions: https://docs.sonatype.org/display/TYCHO/BuildingTycho So, I've downloaded Eclipse 3.6RC2 and Delta-packs linked from this instruction (is it for 3.5 only?): http:// (remove space) aniefer.blogspot.com/2009/06/using-delt...

slf4j-log4j12 not packaged by maven with "runtime" scope

I have a project managed by maven with slf4j-api-1.5.8 and log4j-1.2.14 dependencies. In runtime , slf4j needs slf4j-log4j12-1.5.8.jar to "bridge" output to log4j. So in pom.xml , I add this dependency : <dependencyManagement> <dependencies> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf...

embedding maven into OSGi application

Hi, I am trying to call MavenCli from my OSGi plugin project. I have added the correct libraries to my build path and to the manifest. I believe that I have done everything correct so far because when I add a main method to the class that calls maven and run it in eclipse, everything works as expected. When I run it from my OSGi plugin,...

How to write something to surefire log with JUnit 4

Is it possible to write something from inside the test to surefire-reports/MyClass.txt ? Any kind of logger etc ? There is a Reporter in TestNG: Reporter.log("Something here"); and the message appears under test method in report. Is there something similiar in JUnit ...

I just need one dependent module, but don't need its dependencies

In my project , there is a spring XML config that utilizes ehcache to cache method returns. xml snippet : http://www.springmodules.org/schema/ehcache http://www.springmodules.org/schema/cache/springmodules-ehcache.xsd <ehcache:config configLocation="classpath:ehcache.xml"/> <ehcache:proxy id="explainRetriever" refId="explainR...

How to copy resources from other module to specific location ? (maven)

I have a maven-managed project with some modules. One module contains some native codes inside "src/main/resources/native" directory. Second module packages all related modules to a WAR file. Here comes the question : How to copy the "native/" directory (and its sub-directories) in first module to WEB-INF/native directory in the second ...

Hudson - Maven is failing (cannot create /dev/null/.m2) on Tomcat-6 - Gentoo

Hi there. I'm having major issues with getting Hudson up and running on a gentoo server with Tomcat 6. I'm able to deploy Hudson just fine, and I can browse the web-application, configure it and set up builds etc. However, when I try to run a build (in example "clean test" on a Maven2 project) I get this error ERROR: Failed to create...

How to keep hibernate3-maven-plugin HBM2DDL from printing to console

I used the hibernate3-maven-plugin to automatically create a SQL script I can use to create a database schema in a new database. I do this via the hbm2ddl tool. I thought that when I instructed it to write the SQL to a file it would stop cluttering up my maven builds with 50 pages of SQL. Anyway to make it stop writing to the console ...

Combine two or more persistence.xml(s) into one , when packaging (war) many modules (Maven)

I have a maven-managed project with some modules (with jar package) , each module contains its "persistence.xml" in its META-INF directory. Another module take responsibilities to package these modules into a war file . But I find no way to "combine" these "persistence.xml" into one file ... Is it possible ? Thanks in advanced. ...

Migrating from Maven to SBT

As you know, SBT is compatible with Maven in some way -- SBT recognizes simple Maven POMs and can use dependencies and repositories specified in them. However, SBT wiki says that, if inline dependency is specified in SBT project definition, POM will be ignored (so using both in this case is impossible): Maven and Ivy configurations (...

Maven2: Renaming provided dependecies at package phase?

Greetings I have an ear artifact with a finalName tag in its build definition in the POM. <artifactId>application-app</artifactId> ... <build> <finalName>application</finalName> This results in me getting the artifact application-app as the file application.ear when building. It is important that the ear file is named like this due ...

Maven: trigger custom command when Build is finished, dependent on outcome (successful/failed)

I'm using Maven on the command line, and my build takes a while to complete (1-2min). I'm looking for a possibility to hook into the END of the build and trigger a specific command (start a program by ant, etc.) when the build is finished - dependent to the outcome of my build (Successful/Failed). My goal is that my computer just plays...

Some sonatype nexus questions.

I deployed a sonatype nexus server inside my LAN , mapping some remote repositories to my public repositories : First question is , why these repositories not sync with the "real" repositories ? For example , I mapped maven central (http://repo1.maven.org/maven2) to "central" , but when I browse http://smallufo:8081/nexus/content/repo...

maven test cannot load cross-module resources/properties ?

I have a maven mantained project with some modules . One module contains one XML file and one parsing class. Second module depends on the first module. There is a class that calls the parsing class in the first module , but maven seems cannot test the class in the second module. Maven test reports : java.lang.NullPointerException at j...

Configuring hibernate.reveng.xml to detect a sequence PK generator with hibernate3-maven-plugin and Postgre

Hi, is there a way to configure hibernate3-maven-plugin so that a sequence generator is detected for a primary-key? I'm using a bottom-up approach for hibernate configuration (which means letting hibernate-tools generate the hibernate configuration using a jdbc-connection for you via reverse-engineering on an existing database schema). ...

0.20.2 API hadoop version with java 5

I have started a maven project trying to implement the MapReduce algorithm in java 1.5.0_14. I have chosen the 0.20.2 API hadoop version. In the pom.xml i'm using thus the following dependency: < dependency> < groupId>org.apache.hadoop< /groupId> < artifactId>hadoop-core< /artifactId> < version>0.20.2< /version> < /depend...

Hibernate search keeps trying to download wstx-asl-3.2.7.pom

Using Maven and Hibernate search I keep get the following info messages in my log: Downloading: http://repo1.maven.org/maven2//woodstox/wstx-asl/3.2.7/wstx-asl-3.2.7.pom ...