maven-plugin

Maven project is in a subfolder, can't get Eclipse integration to work

Inside the folder 'ProjectName' exists several subfolders, and of them contains java program: ProjectName Specifications JavaCode Gfx ... JavaCode folder contains pom.xml. I have installed m2eclipse (0.10.x) to Eclipse and imported whole ProjectName folder to Eclipse. Subfolders are displayed correctly but maven integration is not...

Issue on maven 2.2.1

I wrote a small maven plugin and everything seems to work well with prior version of maven (2.0.9) but my build fails on version 2.2.1 The stack trace does not show anything from my end of the code and was wondering if anyone has encountered this issue. .... .... [ERROR] FATAL ERROR [INFO] ---------------------------------------------...

Execute plugin on MojoExecutionException

Is there a way to catch the MojoExecutionException in a "global way"? Example: My plugin performs some tasks. Later the build phase proceeds and an error occurs so an exception is thrown. I would like to catch that exception somehow and perform a clean up, or execute another plugin, etc. Is there a way to do this? Can't find anything...

maven plugin goals

Hi, I'm developing a Maven plugin that will have provide 5 goals. You can either execute goals 1-4 individually, or execute goal5, which will execute goals 1-4 in sequence. I've been looking for a way to reuse (i.e. invoke) one Maven goal from within another, but haven't found it yet. Of course, I could just have goalX delegate to Clas...

Configuring hibernate.reveng.xml to detect a sequence PK generator with hibernate3-maven-plugin and Postgre

Hi, is there a way to configure hibernate3-maven-plugin so that a sequence generator is detected for a primary-key? I'm using a bottom-up approach for hibernate configuration (which means letting hibernate-tools generate the hibernate configuration using a jdbc-connection for you via reverse-engineering on an existing database schema). ...

Import system properties to maven plugin's Spring context

Hi All, I have in-house developed maven plugin(lets call it A) which uses spring IOC container and a maven project(call it B) that uses this plugin. I want to specify particular plugin configuration in B's pom.xml, so this property will be accessed in plugin's spring context I expect something like this, pom.xml (project B) <plugin>...

Is there a Maven plugin to generate AS3 classes from Java for BlazeDS ?

Hi, I'm looking for a maven plugin that would generate ActionScript3 classes from Java classes in order to access them by object remoting. I've seen FlexMojo but it uses the GraniteDS generator wich create some problems when it comes to map Enum objects (wich can be fix through a workaround that is describe here : http://dev.c-ware.de/c...

maven plugin configuration

Hi, When writing a Maven plugin, you can configure various parameters within the mojo class, e.g. /** * The path to the properties files. * * @parameter expression="${project.build.directory}" */ private File buildDir; Is there a reference that lists all the available project properties (e.g. ${project.build.directory})? For ex...

Maven-glassfish-plugin can't use <adminPassword> tag?

settings.xml I define to: <profile> <id>GlassFishv3</id> <activation> <activeByDefault>false</activeByDefault> <property> <name>glassfish.version</name> <value>3</value> </property> </activation> <properties> <glassfish.home>E...

How do I get my custom Maven Reporting Plugin to appear under the Project Reports in the generated site?

I have written a new maven reporting plugin and it executes when the site is generated and produces and output html file. How do i get the Project Reports section of the site to contain a link to it? ...

Detect maven build status (success/error) from a maven plugin

I am wondering how would one get the status of a build (ERROR/SUCCESS) from a maven plugin ? ...

How use the maven-jboss-plugin?If I want to deploy the war how to do?

I want to trying maven-jboss-plugin but I don't know what is this,and I want to deploy the war use the jboss-maven-plugin or maven-jboss-plugin?How to use? ...

How can a Maven plugin discover its own version during execution?

I'd like to be able to discover the version of my plugin during its execution; 0.0.1-SNAPSHOT, 0.0.1, 1.0-SNAPSHOT, etc. Can this be done? The AbstractMojo class doesn't really give you much information about the plugin itself. EDIT - I am using the following code as a workaround. It assumes that the MANIFEST for the plugin can be load...

Is there a Java library to convert a commandfile into parameters for main method

I am working on a (Codehaus) Maven 2 Mojo. Unfortunately the logic called has a not compatible license and I have to fork a separate process (as it is done for Cobertura maven plugin). Forking itself is easy using org.codehaus.plexus.util.cli.Commandline and friends. The fork needs to be able to set thousands of arguments to the main m...

Getting started with Maven plugin testing

I'm writing a very simple Maven plugin, and I am kind of lost with the testing part. Based on the plugin developers site, there are several different tools to achieve the same things, which documentation seem outdated... I found resources like this too, and took a look at the "core" plugins, but this is still very unclear to me. As ther...

Is there a maven plugin that can diff files and output the result to file?

Hi. I've been working on integration-tests for a Java web service. The integration test now sends SOAP-requests to the server which are asserted via the SoapUI-plugin and for each of the SOAP-requests an xml file is produced and saved (a part of the integration-test phase). Is there a plugin that allows me to diff the xml files that ha...

Logger Name in Maven2 MOJO

Hi all, From my observation, the logger name assigned to plugin seems to be auto-determined by maven, which is somthing like removing -maven- or -maven-plugin in the artifact name. Is there any way that I can declare the logger name my plugin will use? Because my plugin artifact id was something like foo-bar-maven-hello-world And th...

jaxb2-maven-plugin always prints warning when generating beans from XSD

I'm trying to generate beans from an xsd by using the jaxb2-maven-plugin maven plugin, however each time the beans are generated i get the following warning. Note that the result beans work. Does anyone know why this happens? --snip-- [INFO] task-segment: [deploy] [INFO] ---------------------------------------------------------------...

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...

Resolving maven dependencies

Inovking maven2 goal "mvn dependency:list" on an artifact pom causes to download the whole dependent artifact packages. i think only those pom files are necessary for resolving dependencies. Aren't they? ...