maven-2

Getting Errors and Warning to show In Eclipse via Maven

I'm using the m2eclipse plugin for eclipse to build my project, but I miss having the errors and warning of my build show up in the Problems tab. I use a maven project builder to build my project and don't use the default java builder in eclipse. I would really love a way to get all the errors and warnings that I can see when editing a...

Making HTTP post request (with an input type="file") from within Maven, using command line parameters if possible

Dear All: I would like to convert this bash script: #!/bin/bash if ! [ $# == 2 ]; then echo Usage: update-module admin-password module-file exit 1 fi if ! [ -f $2 ]; then echo Error: module file $2 does not exist exit 1 fi curl -c /tmp/cookie.txt -d uname=admin -d pw=${1} http://localhost:8080/openmrs/loginServlet curl -b /...

How to mange dependencies for a Glassfish JavaEE client application?

JBoss has the jbossall-client.jar which can be used in client applications for JNDI lookups and more... It is available in the JBoss maven repository. How should one do it when using Glassfish 3 in a dependency managed environment? The FAQ says in step 3 that one should refer directly to gf-client.jar in the installation directoy of gl...

Run a single Maven plugin execution?

I thought I was an experienced Maven user, but I am having a mental block on how to do this! I've been able to use the Maven sql plugin to drop, create, and install a schema in a database via plugin executions I've defined and bound to the pre-integration-test phase. However, now I'd like to use that same sql plugin to insert some samp...

Maven filter resources and adding project version

This is an easy filter approach to write the project version into a file. <build> <resources> <resource> <directory>src/main/webapp</directory> <includes> <include>**/*.version</include> </includes> <filtering>true</filtering> </resource> </resources> </build> This is the project structure (left out the uni...

maven : getting dependency details (Equinox)

Hello, New to maven and equinox. While going through a tutorial on OSGi, I issued the following commmand. pax-provision which gave the following error. -> Provision bundle [mvn:org.compass-project/compass/2.1.1, at default start level, bundle will be started, bundle will be loaded from the cache] -> Preparing framework [Equin...

GWT plugin for SBT / Using the Maven Plugin

Does anyone know of a GWT plugin for SBT? I can't seem to find one anywhere. If there isn't one, does anyone know how to use maven plugins from SBT for some tasks? I know this is possible, but can't figure out how. Can I just fit in the maven GWT plugin and use it? ...

strange error with maven dependency copy

I'm trying to setup my maven build to copy all the build artifacts and other generated files to a central directory for distribution. After reading docs, the assembly plugin and the dependency plugin seem to be the ones to use. but I cant get them to play well together. first - If I follow the directions here and add this to my top le...

In IntelliJ, how do i debug a maven test goal?

Using intellij and maven pom files, how do i debug tests run inside the maven test goal? When i run them directly in the code, it complains something about profiles missing, which i've ticked inside intellij's Maven Projects. ...

How to deny maven to use open projects in Eclipse instead of jar from repository

Currently if i have dependency project opened, then maven use it instead of specified jar from repo. Is there Eclipse setting (or conf for pom), so maven will always use specified dependencies non-regarding if corresponding project opened or not in eclipse? ...

Unable to use Apache Archiva as Mirror

Hi I think this was supposed to be a simple task, but I've been unable to accomplish it. I've set an archiva repository as this: 2 Internal Maven1 repos (old projects) 1 Internal Maven2 repo 7 Remote repos (central, java.net, jboss.org, etc.) For each internal repo I've created a proxy connection with each remote repo. I've adde...

how to debug maven surefire test more easily (using eclipse as debug server)

I'm using maven / surefire / eclipse to write some code and later test / debug it. Standard way to do it is by using maven.surefire.debug maven property. By default, when this property is enabled, maven starts listening on port 5005 and I can attach to the debugged process using remote debugger. When the test finishes remote debugger di...

Maven goal raises "Required goal not found"

I am trying to generate a maven plugin as described in the maven documentation. So I created a new plugin project with Eclipse, using the mvn archetype: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/x...

How well does m2eclipse deal with maven plugins?

In general, how well does m2eclipse deal with Maven plugins that modify or amend lifecycle phases? In particular, I have a project that has a maven-clean-plugin extension to remove an extra generated directory (not in target/) using the configuration filesets tag. This works when running mvn at the command line but not when doing a cle...

Should Maven package different WARs for different application servers?

I am just starting to package my web application project as a WAR file and am running into differences between the configuration for Tomcat vs Jetty vs JBoss vs Websphere, etc. Should I try to configure some super-smart an all-in-one WAR file, or should I create different Maven profiles to create different WARs for each app server? ...

maven antrun plugin

I have the following in my pom: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-ant-plugin</artifactId> <version>2.3</version> <configuration> <target> <echo message="hello ant, from Maven!" /> <echo>Maybe this will work?</echo> </target> </configuration> </pl...

multi-modules project with maven is not working as expected?

Hi I am trying to create a multi-modules project in eclipse with m2eclipse. I followed some tutorials but the way it work is not what i expect: Here is the structure of my project -Root - webapps - module1 - module2 I have pom.xml for Root and modules. (module 1 and 2 are independent to each other) In t...

With Maven2, why are transitive dependencies being unpacked into my jar?

I have the following 3 pom.xml files: My parent pom.xml: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt; <modelVersion>4.0.0</modelV...

How to create master install folder with maven

Im trying to setup maven to assemble all my build artifacts into a central distribution folder. to help with explainations, ive uploaded a sample project here This is a simple multi-module project with 2 j2ee components, each of those has a war, and ear sub-project. If you comment out the assembly plugin in the top level pom, everythi...

GWT project in eclipse with Maven as OSGi bundle

I tried to set up a Maven project, which supports the Google GWT tools and eclipse PDE integration. I was only able to accomplish this by adding "gwt-dev-2.x.x.jar" and "gwt-user-2.x.x" to the bundle classpath. For this, I had to change their scope from provided to compile, which is highly undesirable as this greatly increases the size...