maven-2

hudson -- weekend builds vs. continuous builds (short time)

I have Hudson to run builds as soon as changes have been made to any of the repositories. There are some builds that I want to run once a week during the weekends, but with more special tests which take longer and I wouldn't want to run every time there is a change in one of the source repositories. Is there a way to pick and choose w...

Best practice for multiple project setup with m2eclipse

Example scenario: I have 2 projects, "common-project" and "application-project". The application-project depends on the API provided by common-project. There are also 3rd party jars (example guava) used by both projects. I am trying convert to using maven and m2eclipse, but am unclear on the best approach. Currently, my maven-free setup...

Setting up a standard directory layout using Maven

I'm new to Maven and have skimmed over the documentation as I am following the Hibernate tutorial at http://docs.jboss.org/hibernate/stable/core/reference/en/html_single/#tutorial-firstapp-mvn. I have installed Maven and successfully setup a web-app but this does not contain all of the standard directories mentioned in the tutorial. Am ...

how to integrate TODO handling into the maven test phase ?

suppose i have a project with lots of todos, some unintentionally left there, some no longer relevant, some represent future possible features etc. i know that most IDEs can show/filter/sort them, but im looking for a way to enforce a more strict policy. what im looking for is some maven plugin that i can bind to the test phase that lo...

How to compile scala sources via maven integration in intellij idea?

I am learning circumflex orm and using maven with idea for the first time. I expected that my sources in src will compile to build directory. But it doesn't happen. And if I specify sourceDirectory and outputDirectory like ${basedir}/src or ${project.basedir}/build I get intellij idea's inspections that such folders doesn't exist (sic!) ...

Store java 5 and java 6 JARs in Maven Repo

I think I need to store both Java 5 and Java 6 versions of the same jar in our internal Maven repository (Nexus). How? I thought that I might be able to specify a classifier in the deploy plugin config ... <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-deplo...

how to get a dependency tree for an artifact?

dependency:tree can be used to see the dependency tree for a given project. But what I need is to see the dependency tree for a 3rd party artifact. I guess I can create an empty project, but I'm looking for something easier (I need to do this for several artifacts). ...

Maven: Aggregation vs. Dependency

I'm very new to Maven and am just now trying to set up my first project tree. I'm struggling to understand the difference between two alternatives: I have jar and war projects (two each) that i want to bundle. Traditionally I'd just create an ear project that has all four of them as dependencies. Now I read about the aggregation of pom...

Why version matching doesn't work in Maven?

This is my pom.xml (fragment of it): ... <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-entitymanager</artifactId> <version>[3.0,)</version> </dependency> ... This is what mvn tells me: Couldn't find a version in [3.2.0.cr2, 3.2.0.ga, 3.3.1.ga] to match range [3.0,) Why? ...

How to use artifact:writepom and artifact:pom?

I've been trying to use writepom using this http://maven.apache.org/ant-tasks/examples/write-pom.html as a reference and have been having problems. I'm essentially just trying to test whether it will actually work so the POM file is quite bare. See below. <project name="CreatePOMStructure" basedir="./test" xmlns:artifact="antlib:org.ap...

Eclipse org.eclipse.wst.common.component file re-written during 'mvn clean'

Hi I have manually configured my org.eclipse.wst.common.component to deploy my web-app via Eclipse WTP from my project's target directory (so my deployment includes the result of JSP pre-compilation). But now every time I run an "mvn clean" build (command-line or in M2Eclipse, the file reverts to a previous state. Anyone know why this...

Hibernate projects and Building with maven

I'm trying to build a relative easy project and include Hibernate with maven. I'm trying to use the latest version of Hibernate (3.5.4-Final). It seems that the JBoss folks have changed their maven repository recently, and I'm having some problems getting my maven build to work. I have found a lot of information on the web and here, but...

Why maven ignores my JAVA_HOME?

This is what I'm getting when mvn is executed from CruiseControl: Unable to locate the Javac Compiler in: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/../lib/tools.jar Please ensure you are using JDK 1.4 or above and not a JRE (the com.sun.tools.javac.Main class is required). In most cases you can change the location of your Ja...

what's wrong with my profiles.xml?

This is a portion of my profiles.xml for mvn: <profilesXml> <profiles> <profile> <id>production</id> <build> <plugins> .. </plugins> </build> </profile> </profiles> </profilesXml> This is what mvn says: Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: Unrecognised tag: 'build...

How to create a subdirectory within target with Maven2

Hi. I need to create a subdirectory within the target directory when compiling with maven2. The reason is that I'm using a plugin which grabs responses to SOAP-requests and store them in /target/xml in the integration-test phase. The problem is that if I specify the plugin's savepath to (in example): ${basedir}/target/xml the plugin t...

Reference artifacts uploaded by Maven Assembly Plugin

Hi, We have configured our maven assembly plugin to create individual jars files that are uploaded to our local maven repo via the deploy plugin. However we need to reference those jar files (the ones created by the assembly plugin) within other projects as maven dependencies. Any ideas on how we can accomplish that would be greatly a...

jspc-maven-plugin - inconsistent genereated class directory

Hi I have a web-app with the configuration below (inherited from a parent's pluginManagement). JSPC precompiles my JSPs just fine but there is some really weird behaviour: In my web-app, if I run of mvn clean install, the compiled JSP class gets placed in target/classes just like I want. If I then run mvn install without cleaning, the...

What are the minimum dependencies and plugin configuration I need to create a web service client using Axis2 and Maven from a WSDL file?

Hi, I'm trying to create a web service client using Axis2. I would like to use Maven 2 to generate the necessary classes from the WSDL I have but the documentation for the wsdl2code plugin isn't helping me. Does anyone have a working example of a basic pom.xml that will generate classes from a WSDL? ...

Hot deployment to GlassFish using cargo-maven2-plugin, how to configure?

Did I understand right from this page that Cargo Maven plugin doesn't support hot remote deployment to GlassFish 3.x? If I'm wrong, how can I configure it to support such type of operation? Maybe I should use some other plugin? I'd like to deploy to GlassFish remote installation, through HTTP, in "hot" mode. ...

I want to include some wsdl files in a jar file

Hi experts, I have compiled some class files and a jar file. Now i want to include some wsdl into the jar file . Can you please tell me how can amend pom.xml in maven for achieving the same. Regards Gnash--85 ...