maven

Missing archetype.xml in new archetype created from project.

Hi, I am using Maven 2.2.1. and am new to Maven. I am trying to create an archetype based on an existing project. I have been using this blog post as a guide: http://blog.inflinx.com/category/m2eclipse/ Step 7 says "The next step is to verify that the generated archetype.xml (located under srcmainresourcesMETA-INFmaven (sic)) has all...

Maven Mojo & SCM Plugin: Check for a valid working directory

Hi there. I'm using maven-scm-plugin from within a Mojo and am trying to figure out how to determine if a directory D is a valid working directory of an SCM URL U (i.e. a checkout of U to D already happened). The context is that I want to do a checkout of U if D is a working set or do an update if it isn't. The plan is to check out U...

How to set the build.xml for the Groovy Antbuilder?

I want to execute a build.xml (Ant buildfile) from using GMaven (Maven Plugin for inline execution of Groovy in a POM). Since I have to execute the buildfile several times using the maven-antrun-plugin is not an option. The buildfile is evolving and taken from a partner project with little changes. That's why I don't want to put the logi...

Maven Mojo: Taking complete control over logging / Forbid other plugins to log

Hi there. I don't know if this is actually possible, but can I take complete control over logging from inside a Maven Mojo? With complete control I mean that only messages from my Mojo are logged or that I can decide wether a given message shall be logged. The context is that I'm using the maven-scm-plugin in my plugin to do some SCM a...

Incremental build with NetBeans and Maven for jetty hot deployment

After my unsuccessful attempt to run Tomcat with hot deployment from NetBeans with Maven, I've tried jetty. The jetty-maven-plugin doc gave me an important hint: The plugin will automatically ensure the classes are rebuilt and up-to-date before deployment. If you change the source of a class and your IDE automatically compile...

Jetty embedded: How to run the same config as with `mvn jetty:run-exploded`?

Hi, I'd like to have the same Jetty server configuration, created programatically. When I run mvn jetty:run-exploded, my app works fine. When I run it from my code, the static content is not loaded. I know that I have to add a static content Servlet, so I tried: Server server = new Server(8080); Context ctx = new Context( server, "/", ...

Maven: Re-use a POM file in every project.

My goal is pretty simple actually but since there are multiple (and seemingly complex ways to do this) I wonder what I need to do... So I have certain runtime libraries (ADF libraries in particular) that are needed to be added to every project. This parent pom file will just have JAR dependencies in it. How can I use this pom file from a...

Problem installing Maven plugin (m2eclipse) in Eclipse (Galileo)

I have Eclipse Galileo (for Java EE Developers) installed, and I'm now trying to get the m2eclipse Maven plugin installed as well. I follow the basic steps described at http://m2eclipse.sonatype.org/installing-m2eclipse.html, and it seems to be installing just fine. However, after restarting Eclipse after the install it doesn't seem to ...

maven-release-plugin: Perform fails with 'working directory "...workspace\target\checkout\workspace" does not exist!'

Hi, I have maven project that fails when release:perform is called, though release;prepare works as expected. I have found the bug report (below) which certainly seems to resemble the issue I have but not entirely sure I understand the problem: MRELEASE516 The last few lines of output I get: [INFO] Executing: cmd.exe /X /C "p4 -d E:\...

Newbie question about maven

Is it true that the only configuration file I need to bother with is pom.xml ? It seems to me that Java guys live xml more than any other stuff,is that true? ...

How can editing maven Pom at runtime?

I need editing POM at runtime. I used Dom4j for read pom and after that set some data. But i need know if exist another form for to do this. Exist a maven utilities for this? ...

Maven Mojo & SCM Plugin: Add file to ignore list / set SVN property

Hi there. I'm using maven-scm-plugin from within an own Maven Mojo via an injected ScmManager object and am trying to figure out how to add a file to the SCM ignore list. The methods that ScmManager provides don't seem to support this. An ideal solution would work in all SCM systems that maven-scm-plugin supports. I'm not sure though i...

Maven - 'all' or 'parent' project for aggregation?

For educational purposes I have set up a project layout like so (flat in order to suite eclipse better): -product | |-parent |-core |-opt |-all Parent contains an aggregate project with core, opt and all. Core implements the mandatory part of the application. Opt is an optional part. All is supposed to combine core with opt, and ...

How to inherit the current path when invoking Maven's exec-maven-plugin?

I have an <exec-maven-plugin> which calls an external command (in this case, svnversion). The command is in the path for the current user. However, when a separate shell is spawned by the plugin, the path is not initialized. I don't want to hardcode or define a variable for each external command (there would be too much to maintain, esp...

Using maven to generate an ear file for ADF...?

I am noticing that Oracle ADF has its own EAR structure. There is an adf folder created like so, inside the EAR, along with the WAR file and standard META-INF directory is this 'adf' directory: adf /com /companypackagehere bc4j.xcfg /META-INF adf-config.xml connections.xml Must I recreate this using file moves.....

Maven/Spring/Java: ClassNotFoundException - but I know class is there...

I have 2 maven projects set up like this: -com.wuntee.rsaAuthenticationManager (jar) -com.wuntee.taac (pom) --taac-backend-gui (jar) --taac-web (war) And 'com.wuntee.rsaAuthenticationManager' is a dep in 'taac-backend-gui'. When running a test case in taac-backend-gui, everything executes fine, but when trying to start the taac-we...

Why does Maven 3 give up supporting application $version declaration?

As you see from the title, I want to ask that the case of in Maven 3 there is no support for $version in pom.xml anymore. Do we have to really write a constant every time in each project in every pom.xml and related configuration files again and again? How can we avoid doing this? How can we use a versioning method like $version? ...

How to make a custom ear file in maven

Here is my challenge, I need to make an ear file for a specific container. To be more specific on how this ear will be created: This is a standard j2ee ear file, with 1 WAR in it. The container it is deployed to will expect certain xml files (which can easily be found (somewhere) inside the source project). Here are my obstacles Th...

maven compile fails because i have a non-maven jar

I have a couple of internal libraries which I haven't/don't know how to add to my local maven repository. I've added them to the project's classpath but my maven-compile fails stating that it can't find the classes in the external jars (as expected): [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:com...

Problem with dependencies in m2eclipse

Hi, I have a problem with m2eclipse and Nexus. Normally, when you create a new Maven Project in Eclipse, you can select an Archetype like maven-archetype-quickstart from the Nexus Indexer. Unfortunately, the Nexus Indexer doesn't show anything at all. But the worst part about all this is, that the "Add Dependency" menue doesn't work. (F...