maven-2

Run Ant task from Maven

Hi, I'm using Ant to build a custom jar library, which then I'm using in Maven as dependency. <dependency> <groupId>test-lib</groupId> <artifactId>test-lib</artifactId> <version>1.0.0system</scope> <systemPath>${basedir}/src/main/webapp/WEB-INF/lib/test-lib-1.0.0.jar</systemPath> </dependency> So, basically what I d...

Maven Unable to use archetype:generate if local repository of is changed from .m2

I am facing a strange issue. I have edited Maven settings.xml file in M2_HOME/conf and want the jars to get download to a place other than {users.home}/.m2. I have pasted <localRepository>G:/m2Repo</localRepository> into settings.xml. Now when I type mvn archetype:generate, I get following error: [INFO] Scanning for projects... [IN...

Release problems with Nexus + Maven + Hudson

When using the release plug-in for Maven on Hudson(1.368), I am getting an error that my distributionManagement section is missing during the deployment phase to our Nexus Maven Repository Manager. If I deploy without using release It woks just fine so should not be a misconfiguration with the server, the section or the settings. It is ...

Maven-surefire-plugin and forked mode

So I have some classes that rely on a jar file that has native methods in them. I am running into issues when mocking the objects in this jar file...so I have found a solution that works. Using forkedmode pertest seems to fix this issue. However, there are 5 files affected by needing to be run in forkedmode...there are 130 other tests...

Maven doesn't generate the "persistence.xml" file

Hi everybody, I read this article on the maven project web page that lists the different directory layouts (like: src/main/resources which is for Application/Library resources). The problem is that when I run the following command (found here): mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactI...

is there a jboss parent maven project for the 6.x release?

im trying to get familiar with the new JBoss 6 and having a really tough time piecing together all the different sub-projects that comprise it. basically what i want is to compose the list of maven artifacts that form jboss 6 (6.0.0.M4, to be specific), so i could add them as runtime dependencies to my demo project - that way it would be...

What are Best Practices for Maven Modules Naming?

Assuming that we have a project named project and modules module1 and module2, earlier I tend to use the following naming strategy: -- project -- projectModule1 -- projectModule2 Now I use another: -- project -- project-module1 -- project-module2 What are best practices for Maven modules naming? ...

Make netbeans attach maven sources to artifacts

I'm having some issues with a third party library that I'd like to step into. Netbeans provides a "Download Sources" option when the libraries node is right clicked. This downloads the sources from svn correctly, a source icon is attached to the dependency node, all is peachy. However, when I open one of the classes it gives me a generat...

Why can't jdk 1.5 load a jar created with maven? (Bad version number)

I'm using solaris, I created a maven app on jdk 1.6 but using the maven-compiler-plugin to specify the target as 1.5. Here is the snippet of my pom.xml: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.5</source> <target>1.5</target> ...

hudson + git + maven

I will be moving to git for my version control soon. My continuous build system is Hudson and I use maven to build my artifacts. Anyone have a best practice for setting up git to work best with these other tools. recommendations on how packages and plugins should be managed in git to most easily pull down into Hudson would also be ap...

How to check pom.xml for updated dependencies

I am fairly new to Maven and pom.xml. Is there a way I can find out which of my dependencies that are outdated, so that I can update version numbers in my pom.xml. In other languages, for instance, Ruby has the command gem list outdated that gives me a list of dependencies (rubygems) I can update I am using IntelliJ Idea if that can he...

Exporting eclipse maven project as a non-maven eclipse project with dependencies

Is it possible to export my maven Java project on Eclipse to users that do not have maven or the eclipse maven plugin? The first question that comes to my mind is how to force all the dependencies to be included with the export. I want to make it easier for people who are not using Maven to import my project on Eclipse and use it, in ot...

maven, wsgen and dynamic url

After implementing a test solution described here : http://stackoverflow.com/questions/2158175/use-maven-to-trigger-a-wsgen-wsimport-in-a-row-using-wsdllocation I wonder if there is a way to generate the client jar without knowing the WS URL, so that it would be usable against any similar ws deployed somewhere else. Any idea? ...

Oracle Jar causing warning in Maven packaging.

I have added my Oracle JDBC driver to my Maven repository and everything is working fine however I am still receiving warnings whenever I package my project. E.g. [INFO] Unable to find resource 'com.oracle:ojdbc14:pom:10.2.0' in repository central (http://repo1.maven.org/maven2) How can I stop those warnings from showing up? ...

Update a Maven project version from script

Hi, First of all, I do have some sort of understanding that the following might not be the generally accepted way to do things. We have a Maven 2 project that has a version number which should be updated each week or so, during a new release. During this process, I've tried to eliminate all the things one has to remember and I've made ...

How to enable maven to deploy the ear to the app. server automatically

Hi all, I am using maven2 with a struts-hibernate jee project and developing with myEclipse. When I run a maven build, clean&install, it generates myProject.ear under the myProject_ear\target folder as usual. However, I have to copy this ear file from that folder to the ..jboss-4.2.2.GA_2\server\default\deploy folder in order to deploy...

Maven and the " is not a known entity type" error

Hi everybody, I generated a maven project with the quickstart archetype. So I obtained the following project structure: |-- src | |-- main | | |-- java | | |-- resources | |-- test | | |-- java | | |-- resources |-- pom.xml I modified the "pom.xml" file : <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:...

Exclude directory from src/main/webapp from copying to target/app-SNAPSHOT directory

I have project which builds .war file with maven. There is standard src/main/webapp directory. I have also some GWT code there which is compiled by GWT maven plugin. Sometimes I run GWT application from Eclipse, then GWT Eclipse plugin compiles it to src/main/webapp/app.policy (app.policy is name of my GWT module). This is OK. app |-src...

Pojos in Maven 2, filtering classes

I'm deploying a web application to a service which requires me to package some of the classes to a Jar file. So in example having the following source tree: com.enterprise |------ package1 |------ package2 |------ package3 How can I create a jar including only classes from package1 and package3 but not package2? ...

Connecting maven with putty

I'm having issues using putty with the mvn-deploy-plugin. I execute: mvn deploy This is what my settings.xml look like: <server> <id>website</id> <username>user</username> <!--<privateKey>c:\putty\id_rsa</privateKey> --> <configuration> <sshExecutable>c:\putty\plink</sshExecutable> <scpExecutable>c:\putty\pscp</scpExec...