maven-2

maven - use generics in a eclipse's maven project

I have a maven website project generated by archtype plugin with eclipse IDE. The problem is when i need to use generics or any thing of java 5 or 6, i changed the project compiler to 1.6 and i got a error mark on the project icon in the package explorer but everything is fine. I think it is cause by maven but I dont know how to get rid ...

How do I get Maven 2 to build 2 separate WAR files

when doing a mvn install I want to end up with 2 WAR files in my target dir. One will contain the production web.xml and one will contain the test/uat web.xml. I've tried this: <build> <finalName>cas-server</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> ...

Maven downloads corrupted Jars

I am running into a maven problem that's killing all my hairs. So at the beginning all my maven project works fine. And then when I switched to a new computer today and trying to compile them all. The first error I see from Eclipse is IO error reading jar files from the local maven repository. Then I googled and someone suggested thi...

Which dependency do I need for this import in Maven

I am trying to convert a Java project which uses Ant into a Maven project, but am having difficulties finding out which dependencies to include. How do I find out dependency settings for a particular import? ...

Maven compilation: removing obsolete class files from target

We are using Maven to compile our project on a build server. We update our sources from SVN and then run "mvn install" from the project folder, building a jar we then deploy to our production servers. To save time on compilation, we keep the compiled classes before we recompile (in the target/classes folder maven creates). This way, Mav...

Maven: How to get all transitive dependencies programatically in a MOJO

Possible Duplicate: How to get access to Mavens dependency hierarchy within a plugin. The dependency:tree plugin:goal has an option 'verbose' which displays all conflicts & duplicates in the dependency tree. I am trying to reuse that information in my own mojo to generate reports, however - I can't seem to figure out exactly how...

How do I reinstall Eclipse without losing my projects and plugins?

My Eclipse recently broke completely and I have upgraded to Galileo. I have created a fresh workspace (say foo/workspace) and created a trivial project. I have then copied an old project from (bar/workspace/myproject) to foo/workspace/myproject. It is mavenised and has a pom.xml. How do I tell Eclipse to build it (it does not seem to rec...

Maven GWT 2.0 and Eclipse

Does anyone know of a good guide for creating a project with the new 2.0 release of GWT using maven and eclipse? I am running into a lot of problems getting them to play nicely together. For what it's worth, I can create a gwt project using the maven eclipse plugin which works fine, but porting it to maven doesn't work (so a guide for ...

How can I download a specific Maven artifact in one command line?

I can install an artifact by install:install-file, but how can I download then, for example: mvn download:download-file -DgroupId=.. -DartifactId=.. -Dversion=LATEST any idea? ...

How to merge module jars to a single jar in Maven2?

I have a maven2 project with several jar modules, build the project will get .jar archives for each module in the directory modules/XYZ/target/XYZ-x.x.x.jar Now, if my project P is of version P-p.q.r, and I want to generate a single jar P-p.q.r-all.jar with all sub-modules included in, how should I do? ...

Filtering of values using a small databases instead of settings.xml in maven

Correct me if I'm wrong but one normally puts deployment or user-specific properties (e.g. development/testserver settings) inside settings.xml. And by specifying which profiles to use, we can change the behaviour of the maven build. However there are usually settings in the profiles (settings.xml) which should be shared. Since I don't ...

building cocoa project with maven

i have a cocoa project and i'd like to build it with maven. is there any maven plugin for building objective-c code? ...

Build system that allows sharing modules amongst different binaries

I'm trying to choose the most appropriate build system to work in enterprise with a common source repository, emphasizing sharing of common code. I'd like the source hierarchy to look something like this: - src - java - common - net - database - team1 - team2 - team3 - lib - tests - jav...

Debug Maven project in Eclipse with third party sources

I am currently developing a maven project in eclipse. The m2eclipse plugin works beautifully. It even works out of the box with debugging. But when I am debugging open source third party libarries. It seems maven could automatically pull the source code down, but the eclipse debugger cannot resolve the currently execution point to the ...

How do you embed XHTML into APT file when using Maven to generate a site?

I am using maven to generate a website for a Java project, which uses APT "Almost Plain Text" as a wiki like markup. Maven takes this and turns it into XHTML. I already have a custom template/skin that I am using for the site, but the index page will have a couple of extra custom design elements that are beyond the capabilities of APT. ...

Maven Java Source Code Generation for Hibernate

Hi, I´m busy converting an existing project from an Ant build to one using Maven. Part of this build includes using the hibernate hbm2java tool to convert a collection of .hbm.xml files into Java. Here's a snippet of the Ant script used to do this: <target name="dbcodegen" depends="cleangen" description="Generate Java source from ...

Create self extracting archive with autorun on linux for windows platform

Our application is distributed as a zip file, with a small bat/shell script that the user runs after extracting the archive to install the application. This zip file is currently created via mavens assembly plugin. The zip file we distribute contains a lib folder with an executable jar, as well as all the files we need as part off the d...

Compile scala classes with debug info through Maven

I have a scala project that I use Maven and the maven-scala-plugin to compile. I need to include debug information in the compiled classes and I was wondering is there a way to ask Maven or the scala plugin to do this. I found this page that makes it sound possible but it's not clear where to put the params in the pom.xml. If possible I...

In Maven2, is there a way to scope a dependency to "package only" and keep it off the test classpath?

Setup I'm packaging a WAR with a number of legacy jar dependencies in it (for the sake of keeping this simple, they can not possibly be altered or excluded from the deployed WAR). Issue Including either or both of two of these jars will cause inexorable errors at test-time. If I exclude the dependencies altogether, the tests pass happil...

Maven 2: How to package current project version in a WAR file?

I am using Maven 2 to build my Java project and I am looking for a way to present the current version number of the pom.xml to the user (using a Servlet or JSP for example). As far as I can see, the best way would be that Maven packages the version number as a text file into the WAR. This allows me to read the version from that file and...