maven-2

How to script the "Convert to AspectJ" action when creating a new Eclipse project?

I have a command line script that creates a (mostly) ready-to-go Eclipse project for me. It uses Maven's eclipse plugin, and has some other scripted steps such as copying our code standard settings from our repo into .settings. This is very handy, since I need to spin up new projects often, from this one template. (For branch work, one-o...

Java maven development slow

I am developing a war/java website that is built via maven. Currently, I have to make changes... tell maven to build them... then deploy to Tomcat. This is around 40seconds. So every change I make, I have to wait >=40seconds to see the change. This is becoming very frustrating, so I have tried to speed up the deployment. I deployed ...

Unable to read TLD "META-INF/c.tld"

Hi everyone... there's this issue with JSTL I'm stuck with for the past couple of days. Any help is appreciated. Tomcat: 6.0.28 Eclipse: Helios pom.xml : <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> <version>1.1.2</version> </dependency> <dependency> <groupId>javax.servlet</groupId> ...

Netbeans & Maven: different compilation behavior

Hi all. I am using Netbeans and Maven projects. In some case Netbeans show me compilation failures (red ballon) BUT Maven compile everything without any problem! What can be the reason of this difference. I already checked that both are using the same JDK version. ...

Passing extra properties to maven archetype:generate

Hi chaps, I've created a Maven archetype for a custom project setup, which is working wonderfully, but I was wondering if it's possible to pass extra parameters so that I can do some more interesting templating. I tried something like mvn archetype:generate -DarchetypeCatalog=local -DdbHost=localhost and put ... <option name="db.host...

many "META-INF/ already added, skipping" warnings when building assembly

Hi, when building a jar-with-dependencies with the assembly plugin, I get many, many messages like this: META-INF/ already added, skipping It seems to mee, that maven is warning me, that I already have a META-INF in my to-be-created jar, and therefore the META-INF of the to-be-included dependant jar file is not included in my to-be-c...

maven resources not placed in jar file

I want to add to a jar file some resources. I "profiled" it and added them in the build section. But the resources aren't in the final jar file. Here it goes the profile section of my pom.xml: <profile> <id>myProfile</id> <build> <finalName>name</finalName> <resources> <resource> <targetPath>.</targetPath> ...

Running a specific Maven plugin goal from the command line in a sub-module of a multi-module reactor project

I'm looking for a general technique here, but let's give a specific example.  I have a multi-module project and I'd like to run the exec:java plugin from the command-line against one of the sub-modules of my project. I know one approach is that I can run "mvn install" on the whole project and then just go into the sub-module directory, ...

How to calculate code coverage in Hudson using emma for a multi-module maven project but only run tests once

We have several multi-module projects which I want to run emma against, but I don't want the tests to be run twice, because this results in misleading statistics on the Hudson project home page as unit tests are counted twice. For a single module project, we can ommit the install goal and just use clean emma:emma to run the tests once, ...

Strategies for java webapp configuration

Part of my webapp involves uploading image files. On the production server, the files will need to be written to /somepath_on_production_server/images. For local development, I want to write the files to /some_different_path/images. What's the best way to handle these configuration differences? One important requirement is this: I don'...

Wrong working directory used when tagging Maven release

When I run release:prepare on my Maven project, it fails when attempting the scm-tag phase. My Maven project uses Bazaar for its SCM. My plugin versions are maven-release-plugin 2.0 and maven-scm-plugin 1.4 [INFO] EXECUTING: cmd.exe /X /C "bzr tag myproj-pathway-0.0.2" [ERROR] Not a branch: "D:/proj/". The problem of course, is that...

Iam writing a pom.xml in maven2 for buillding a jar can i include all dependencies?

Hi Experts, I am writing a pom.xml for my project to build a jar file. Now for my source to compile i need to set-up some dependencies which are my common libraries for my entire project at about 100 jar files. All these common lib's i have in a single directory (CommonLib). So is there any way where i can set dependencies all for ...

maven-jar-plugin addClasspath scoping

Hi All; Is there anyway to get the maven-jar-plugin to use scope when adding a classpath to a jar manifest? I have a project where I want to create 2 jars - runtime and test. The runtime jar should have a classpath of only the runtime dependencies. The test jar should have a classpath of the test dependencies. I have not been able t...

Maven - format code and check-in

I am using Hudson to build my projects periodically. I want Hudson to format my code (using Jalopy) and then check-in the changes to github.com. I already have Jalopy configured the way I like, I just need to configure the scm plugin to check-in the changes. ...

Reference an XSD file from different XMLs sitting in different project modules?

I have an XSD file that is referenced in three different XML files in different project modules using: <item-groups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xml_schemas/item_groups.xml.xsd"> I have been trying to figure how to avoid manually copying the XSD into every module that needs it, s...

How can I test command-line applications using maven?

I work on a complex, multi-module maven project. One of the modules is an executable jar that implements a command-line application. I need to integration test this application. I need to run it several times, with several different command-lines and validate the exit status and stdout/err. However, I can't find a plugin for maven that c...

The plugin 'org.apache.maven.plugins:maven-tomcat-plugin' does not exist or no valid version could be found

I keep getting this error when I call 'tomcat:run'. The plugin 'org.apache.maven.plugins:maven-tomcat-plugin' does not exist or no valid version could be found My company hosts mvn repositories locally via 'activeprofile'. Is this preventing mvn from acquiring the plugin from the WWW location? If so, how can I activate that too... ...

What do I need to use Markdown in a Java webapp?

I'm thinking on adding Markdown to a Java project with using: Tapestry 5 Spring Maven ( Among other technologies ) Q1. What javascript library can I use for the client side? I'm thinking on using Cletus' port of MarkDownSharp for the backend. Q2. What strategy should I follow to add JMD to my project? My code it's a Maven pr...

problem using Hibernate annotation with JodaTime

Hi,i am coming back because i still have problem using JodaTime. After the previous comments, i modified my pom and the @Type annotation is fixed. Here is my new pom : <properties> <org.springframework.version>3.0.3.RELEASE</org.springframework.version> <hibernate.version>3.6.0.Beta1</hibernate.version> </properties> <dependenci...

cannot rename or delete File instances

Hi, I'm writing a Maven plugin that deletes and renames various files using the File.delete() and File.renameTo(File) JDK methods. Roughly every second time I run the plugin, one of these operations fails, and each time it fails it's a different file that cannot be deleted or renamed. An obvious explanation for why a file cannot be del...