maven

Maven dependency

Hi guys, i have a little misunderstanding with one problem. I use Maven 2.0.9 Currently my project consists of several internal modules: module1 (jar) module2 (war) module3 (ear) So i need to copy to war file in specific folder module1 jar. So what i do now : i included it via maven-dependency-plugin in package stage (copy goal). But...

Use windows drive letters in maven install:install-file

When I try to install a custom jar with the following maven command then it will fail misirably: mvn -X install:install-file -Dfile=D:\Work\... Howerver the following does work: mvn -X install:install-file -Dfile=\Work\... You might now ask: So where is the problem? Well, I want to import from a script file and there I have the pat...

How to run a maven-packaged clojure application from the jar

I have the following contents in src/main/clojure/za/co/pb/maven_test/test.clj file: (ns za.co.pb.maven-test.test (:gen-class)) (defn -main [] (println "Hello world!")) I also have a POM that has the necesary dependencies on clojure-maven-plugin with the compile execution. If I execute a mvn package command, I get a target/maven...

Lazy dependencies on a multi-project Maven project

We're considering using Maven for a large multi project build, to give you an idea of the size, some of the sub-projects have several million lines of code. The ideal structure would be something like: projectA module1 module2 projectB moduleAlpha (depends on moduleBeta) moduleBeta (depends on projectA:module1) ... Wh...

Getting m2eclipse to match maven's classpath

I've got project with a few sub modules. mvn clean install works absolutely fine. But in Eclipse with the parent project open none of the maven dependencies are available and so all my Java source files are full of indicated compilation errors (they're not listed in the build path for the project). If I open one of the sub modules as ...

Best approach to integration test a Flex/Java web application via Maven?

I am working on a project that is developing a webapp with a 100% Flex UI that talks via Blaze to a Java backend running on an application server. The team has already created many unit tests, but have only created integration tests for the persistence module. Now we are wondering the best way to integration test the other parts. Here...

Maven Javadoc problem

I'm trying to create the Javadoc for a file, Maven keeps wanting to do this in UTF-8, while some of the characters can't be parsed like that. Gedit also doesn't want to open the file in UTF-8, but does display it in ISO-8859-1. How do I get Maven(version 2.2.1) to properly generate the JavaDoc? ...

Is it possible to use Embed-Dependency in the maven bundle plugin for WAR files, specifically to inline jars or export embedded packages?

Perhaps I am missing something simple. I am looking here: http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html and here: http://wiki.ops4j.org/display/ops4j/Getting+the+benefits+of+maven-bundle-plugin+in+other+project+types I would like to a export a package in a transitively-included JAR. However, no matter what I d...

Logging from EJB module in JavaEE, maven configuration

I have tried for hours to get my project working but the EJB part is still failing with a java.lang.ClassNotFoundException: org.slf4j.LoggerFactory (I want to output some log in my EJB). The layout of the project is the following: |-- nnWeb-ear | |-- pom.xml | `-- src | `-- main | |-- application | | `-...

Multi-webapp Maven 2 project -- how to build a single webapp?

I have the following source layout: . ├── pom.xml ├── modules (has pom) │ ├── module1 (has pom) │ └── module2 (has pom) │ └── moduleN (has pom) └── webapp1 (has pom) └── webapp2 (has pom) webapp1 and webapp2 depends on all of the modules (the modules being DAO, services, etc). At the moment, I build everything from the root and...

Maven Cargo Deploy During Release Perform

Is it possible to have maven do a cargo:redeploy while I am doing a release:perform? Currently, we do a release:perform which removes -SNAPSHOT from the version, builds, commits, and then increments the version. This places the final version WAR in the target/ directory but running cargo:redeploy sees the new version number in the pom.x...

Maven beginner question, get m2eclipse to download jar and add to build path?

From what I have read, after adding the relevant maven repositories, maven should automatically download the necessary jars to satisfy dependencies in the pom.xml file. However, no jars ever get downloaded for me after I add dependencies in eclipse. Am I missing some glaringly obvious step? ...

m2eclipse wont download maven artifacts

I recently installed eclipse 3.6.1, and the m2eclipse plugin to use with my existing maven build, but im running into a lot of problems trying to get it working. My existing maven project builds fine from the commandline. After importing my project tree into eclipse, I ran a build on one of the projects. It eventually died with this e...

Maven plugin for versioning and minifying javascript

Single Page Javascript Application I have built a sophisticated ajax-driven single page webapp that uses a RESTful backend web service serving JSON. The javascript is split into many different files, each file representing some sort of feature or component. While the service has been in alpha testing, I've just be serving all these fil...

Programmatically generating pom.xml

Hi all, I am creating a new maven project from an eclipse plugin. As it seems to me a bad idea to hardcode pom.xml to my plugin. Is there any way to generate this programmatically such that the plugin will be more maintainable ? Also creating the maven project structure from the plugin on my own seems to be a bad idea too ! Is there an...

Is there a way to force maven to copy resource folder changes incrementally?

I'm using Maven 2.2.1 and m2eclipse. I have two resource folders. When I save a change to any file in any of the resource folders, the Maven incremental build kicks off and re-copies ALL files in both resource folders to the target folders. This behavior would be fine if there were a relatively small number of files in the resource fo...

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

maven, eclispse and wtp broke for no reason: it stopped putting the mvn depentent jars in the WEB-INF/lib

Ive been running eclipse (Helios Build id: 20100617-1415), sonotype maven for eclipse version 2 (0.1.0.20100xxx) for many months without issue. I can do "mvn install" on the command line, and get a perfect war, and I could run the webapp in eclipse local tomcat no problem. Then this morning, I started tomcat in eclipse, hit the serlvet...

Why does maven copy subversion directories to target

It does not happen all the time but sometimes I find stuff like this : >dir /SF target\.svn …\target\Zeiterfassung-web\WEB-INF\.svn\. …\target\Zeiterfassung-web\WEB-INF\.svn\.. …\target\Zeiterfassung-web\WEB-INF\.svn\lock How could this happen as Maven as is supposed to ignore the .svn directories by default? Can I explicitly exclud...

AspectJ is not getting added to classpath with eclipse:eclipse

I'm executing the following command, mvn org.apache.maven.plugins:maven-eclipse-plugin:2.6:clean \ org.apache.maven.plugins:maven-eclipse-plugin:2.6:eclipse My all the dependencies are coming in classpath but AspectJ is not added to the classpath. I have them declared in pom.xml dependencies list Where as it is working if I use ...