maven-2

How to run an ant target from Maven2?

How do i run a specific target with the antrun-plugin from the command line? mvn antrun:run doesn't make it run. <project> ... <build> <plugins> ... <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> ...

Error creating bean with name 'sessionFactory' : MalformedParameterizedTypeException

ANY advice would be apprecated. I'm stumped... Problem On my laptop, anytime our application tries to load the application-config.xml, I get a java.lang.reflect.MalformedParameterizedTypeException. The EXACT same code works on my desktop and my coworker's desktop/laptop. But on my laptop it throws this error. Since my laptop and des...

How can I make Hudson automatically build & install release artifacts, rather than just snapshots?

I'm developing several mavenised projects on my laptop, and periodically pushing to github. I've set up a private hudson server in the cloud that polls the git repositories for updates, and thus performs builds - so far so good. Unfortunately, when I execute a 'mvn release:prepare' on my laptop to perform a release (say '1.5'), the two ...

Including Git Repo Contents As Subdir With Maven

I have a separate git repository for document templates that I have no control over but whose contents need to be included as a folder in my final WAR. The versioning of these do not matter and the latest ones should always be used when packaging the war. Is this possible with Maven or do I need to script something separately? I would v...

Multi-module deploy with Maven, JBoss and Eclipse

Is there a way to do incremental deployments with these three tools when in a multi-module project? Example of Maven project: project project-data project-service project-webapp The above are Maven modules with dependencies between them. The project-webapp module contains the .war file, but I don't want to create a new .war file eve...

Creating a Maven release containing multiple files & direcories

How can I create a multiple files release using Maven? I.e. the release of my application need to be given as a set of directories and files within them, e.g. like a installed JBoss directory structure. How it is possible to do this with Maven? I could produce the main jar file of the application. I have to give it inside a release direc...

How to bind maven antrun plugin to the clean phase

Hello, I have just translated an ant project into maven however since maven does not really deal with deployment I introduce some antrun into the build. However when I try to execute it the plugin skips my tasks. for exemple when I run mvn clean antrun:run I get the following message: No ant target defined - SKIPPED. the same happends...

Maven Plugin Logger Compatibility

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.L...

maven eclipse checkstyle plugin

I have custom checkstyle checks file (called checks.xml), and I'm trying to use that same file in both maven and eclipse. It all works well, except for the SuppressionFilter. In this checks.xml file, I have <module name="SuppressionFilter"> <property name="file" value="src/main/resources/checkstyle/checkstyle-suppressions.xml"/> ...

Maven and flex compile problem

I tried to compile using maven-flex2-plugin plugin with maven here is the error I got: D:\PROJECTS\flex\Reports>mvn clean install [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building Reports Maven Flex [INFO] task-segment: [clean, install] [INFO] -------------...

Where's the exception message ?

Hi all, I meet a weired problem when I use maven. I execute the following code using "maven exec:java". Obviously, it should throw a RuntimeException, but I did not see anything in console. But if I execute it in eclipse, I can see the error message. So where does the exception gone ? Thanks public class HelloWorld { public stati...

Maven release plugin with profile-dependent submodules

Hello, I am trying to perform a release using a multi-module maven project. My objective is to modify the version of all poms, and create a tag in the SCM, which is why I am using the maven release plugin. This project has a hierarchy that I have simplified as: example/ module1/ module2/ module-jni-linux/ modul...

How do I make a WAR archive produced with maven-assembly-plugin available for other projects' unit tests?

My problem consists of two maven projects, a server project A and a client project B. A uses maven-assembly-plugin to produce several variants of A, where one variant is a WAR archive. The problem I am facing relates to the test-driven development of B; how can I make the WAR archive produced in project A accessible/addressable from unit...

Annotation processing with Maven and Java 5 (JPA)

I would like to use Criteria API in my new project and from what I understood, I also need to do annotation processing. Since there Java 5 on the server, how is this possible using Java 5 and Maven? ...

List all of the possible goals in Maven 2?

I'm a newbie to Maven, coming from the Ant world. Is it possible to list all of the possible goals (including, say, all the plugins) that it is possible to run? I can see that there used to be a -g flag in Maven 1, but this isn't available in version 2. ...

Renaming resources in Maven

I am trying to find a way to copy a resource file to a new name in the target directory in a Maven build. Pretty much everything I have found while searching suggests workarounds involving multiple sub-directories in /src/main/resources and selecting among them via profiles. However, in my case, this does not solve the problem, namely th...

How to create my first Grails project in IntelliJ, with Maven?

The goal: create my first Grails project, in IntelliJ, with Maven support. Myself: Noob to Groovy/Grails, has some Maven experience but not too much The tooling: Groovy 1.7.5, IntelliJ 9.0.3 and Maven 2.0 What I've tried so far, is: File->New Project Create Module Maven Module Add & choose the Grails Archtype Right click on the proj...

How can I programmatically get SCM connection URL of a dependency?

I'm trying to write a custom Maven plugin that will parse the SCM changelog of the current Maven project, as well as any of its direct dependencies. I know that MavenProject.getScm().getConnection() returns the connection URL of the current project. However, I would also like to retrieve the connection URL of any direct dependencies. (T...

What is the latest official version of Google Guice and where should I get it from?

I downloaded the guice 2.0 source from http://code.google.com/p/google-guice/downloads/list but when I looked at the pom I saw the version was was marked as 1.0-RC2 and the target jar that was build by maven was named guice-1.0-RC2.jar. On the central maven repository under com.google.inject there is a jar named guice-2.0.jar. Under com....

Moving to Maven from GNUMake

I've been a long time user of the Make build system, but I have decided to begin learning the Maven build system. While I've read through most of the online docs, none seem to give me the analogies I'm looking for. I understand the system's lifecycle, but I have not see one reference to compile step dependencies. For example, I want to g...