maven-2

m2eclipse multiple dependencies on classpath

Hi folks, it might be a duplication, but in eclipse, how can I deal with various dependency versions of the same library in my local maven repository ? The problem is that dependency versions specified in pom definition are the libraries I need to use (they have sources/javadoc available etc.), but maven puts all the available library...

Errors when compiling a java program with maven on windows

I'm attempting to compile javabot on windows using maven 2. I've compiled java programs in the past ( so I know the default JDK is working correctly), and this is my first time using maven. The error I'm getting is: [INFO] Compilation failure \evanchooly-javabot-dbea131\apt-tools\src\main\java\javabot\maven\Indexer.java:[23,37] ...

Why does MVN return -1 on successful build?

I'm running Maven 2.2.1 and it's returning an exit code of -1 even though it states that the build is successful. Anyone know what causes this exit code to occur as it's breaking our build process? As a further tidbit of information MVN is being called from our MS TFS build server which is where this problem occurs. If I can MVN from th...

maven 1 source artifact in maven 2/3 ?

I have a large base of maven 1 artifacts with their source jars named as app-0.0.1-src.jar. This repository is converted with nexus to a maven 2 view. Unfortunately the m2 convention on source jars is "...-sources.jar", so none of our m1 artifacts has sources. Is there any way in nexus or otherwise to make maven 2 (esp. m2eclipse) down...

Recursively defining maven properties

Hello there. We are attempting to re-factor our modularized maven building. We've introduced a property DEPLOYMENT_ENV which might be "prod", "dev", "staging", or what not. The mentality we had going in was that we could then define, say: dev.jdbc.username = yoyodyne dev.jdbc.password = 0verthruster staging.jdb.username = cavaliers...

Testng terminal report

I run test cases from maven, that is from command line. Is there a way to see a reason why test failed in terminal output? I've tried raising verbosity in testng.xml to 4,hoping that it will activate TextReporter, which seems like class that prints, well, text reports, but it didn't help. ...

Having Maven2 copy resources to the build directory, but NOT bundle them in the JAR

I've started a new Maven project in NetBeans, accepting all the defaults. The POM, with all the JAR dependencies stripped out, is cut-n-pasted at the bottom of this question. The application reads in various properties files (e.g. logging and config). It also reads in external resources such as fonts, images, and sounds. I do NOT wan...

How to set "build" dependencies between Maven projects in Eclipse?

Hello, I'm rather new to Maven and I couldn't find a solution to this little (IMHO) problem. In my Eclipse workspace I have a Maven project for an OSGi bundle (a regular one, not an Eclipse plugin). It depends upon several artifacts (JAR libraries); I need one of them to be built from another Maven project in the workspace. When I rebui...

specify pom.xml in mvn command and mix goals of other project

I have multiple questions. Can I specify the pom.xml in mvn command? Can I mix the goals of another project while executing mvn command on current project ? Eg: mvn clean-otherproject comple-otherproject instal-otherproject compile-thisproject I can do this with multiple mvn commands, but Can I do this in single maven command. ...

Strange Maven out of memory error

I am currently trying to build my project using hudson to call maven. I keep getting the problem of out of memoery error. I set the xmx and xms in all environmental variable, hudson configuration and hudson project config. I set the xmx to 1500 mb which should be more than enough as the whole project is less than 1000mb. the machine used...

Copy gdata jars to root dir: `WEB-INF/lib` or to subdirs: `WEB-INF/lib/gdata/blogger/2.0`, etc?

I'm using Google's gdata library. I installed it in my local Maven repository because it is not available from Maven Central using a pom. I want to move it to my WEB-INF/lib directory so that I do not have to wait for the dozens of "Downloading" messages from Maven each time I restart the server. However, they are currently in a direct...

Is there any automated metrics collector for my Java project?

I'm trying to collect software code metrics in my Java project on every cycle of continuous integration. I'm interested mostly in size-related metrics like number of classes, number of methods, function points, lines of code, etc. I would like to get a summary report with these metrics in some XML file. Later I will use it in project rep...

Maven + Hibernate annotations schema generation

I have a bunch of classes annotated with hibernate annotations. I'm using Maven, Hibernate and Spring. How can I generated the DB schema using hibernate3-maven-plugin's hbm2ddl? ...

How to convert Ant project to Maven project

How to convert a Ant project to Maven project? A sample project that would link (a Wicket project) Thanks ...

How to create new Eclipse RCP project using maven2?

How to create new Eclipse RCP project using maven2 (preferably m2eclipse)? I read that there's plug-in for Maven that have idea about Eclipse. (Maven Eclipse Plugin) And then it looks like I need to find some Maven Archetype to create Eclipse RCP project, but I could not. At this point I am in doubt if I go right way. I just want to u...

How to upload sources to local Maven repository

Suppose I do have maven 2 java project in my local machine, when I'm doing mvn install, I'm build project jar and push it to my local maven repo, how can I force maven to push to local repo project sources jar also? This is useful if I'll use above mentioned project as dependency while developing new project, and can use mvn eclipse:ecli...

Using Maven as build tool for Lua programs

Hello, I need a build tool for compiling,testing, reporting and the deployment of Lua programs. I chose Maven 2 because of our Polarion version supports it. Unfortunately, I couldn't find any Maven plugins/archetypes for Lua. As I am a newbie in Maven I want to know whether it is difficult to write a customized Lua plugin for Maven. ...

DB Connection with MySQL via Hibernate on Embedded Glassfish

Hi! I have a problem to connect my MySQL Database via Hibernate/ JPA2 on a Embedded Glassfish. My Environment: Maven 2 Embedded Glassfish (integrated via Maven Plugin) Eclipse + M2Plugin Hibernate 3.5.6 MySQL (@localhost) (runs and can be connected without container via Hibernate Sessionfactory) Here is my Exception Stacktrace duri...

Why does maven site:site fail in a multi-module project?

I have a Maven-3 multi-module project: /root pom.xml /bar pom.xml /foo pom.xml Module foo depends on module bar, and they both have the same parent: root. Everything works fine, until I decided to clean my local repository and run mvn site:site. Build fails with a message: Failed to resolve artifact. Missing: 1) com.XXX...

Findbugs Maven plugin - findbugs-exclude with multiple projects

I've got a multiple project setup, using Maven and the Findbugs plugin. I need to exclude some files in one of the child projects, so I added it to findbugs-exclude.xml. That works when I build in the subproject. My issue comes when I try to build at top level. Maven is not finding the findbugs-exclude.xml in the subproject. So it d...