maven-plugin

Maven: Cannot get the help goals working (clean:help, compiler:help, etc)

I am new in Maven. Do you know what I am doing wrong (see below)? mvn -e clean:help. + Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'clean'. [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] --...

WSIT, Maven, and wsimport -- Can They Work Together?

Hi all, I'm working on a small-ish multi-module project in Maven. We've separated the UI from the database layer using Web Services, and thanks to the jaxws-maven-plugin, the creation of the WSDL and WS client are more or less handled for us. (The plugin is essentially a wrapper around wsgen and wsimport.) So far so good. The problem ...

Maven Plugin - Restart Jetty with new WAR?

Hi all, What I would like to do is automatically test against several different maven build profiles. I want to write a maven plugin that iterates through each profile so I don't have to manually list them for the CI process. I just want to verify that the code works in all development, testing, staging, and production once deployed t...

Why 2 versions of jetty maven plugins ?

Hello, I set up a new webapp maven project and wanted to test it with jetty's maven plugin. So issuded in the console the command: mvn jetty:run After defining the pluginGroup in Maven's setting file I ran once again the command. Unfortunately, it failed because i was using one of the below mentioned versions of the plugin. The first h...

Maven: trying to get my submodule's poms to NOT inherit a plugin in the parent

My project has a parent pom and several submodule poms. I've put a plugin in the parent that is responsible for building our installer distributables (using install4j). It doesn't make sense to have this plugin run on the submodules, so I've put false in the plugin's config, as seen below. The problem is, when I run mvn clean install ins...

Maven War Plugin - add external resources from another jar

Hi all, If I wanted to pull out a resource from another jar, say an image or XML file, is that possible? Would I use the Maven Assembly Plugin or the War Plugin to do this? I want it to end up in a WAR file. Walter ...

Can I package a single text file as a text file in a maven repo?

I have a single configuration file which I would like to include as a dependency in a maven pom.xml. I want to keep around several versions of this, and have it appear in the classpath. I realize I could wrap it in a jar, but others in my team would like to easily inspect its contents. Looking at the types allowed in the pom.xml, I o...

Add additional path to exec-maven-plugin

I would like to add an additional class path to the exec-maven-plugin. Besides the %classpath, I would like to add an extra path to a directory containing resources (/Users/kornp/resources). Currently, my pom looks like this: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.1.1</v...

Which Maven Plugin did you write by yourself?

that is not available on public repository. Why or for what purpose did you write it? ...

Add maven-build-classpath to plugin execution classpath

Hi All I am writing some coge-gen maven-plugin. I need my project classpath be injected in to my plugin execution classpath. I found this article. The solution there works but is quite long. Maybe someone of you know an out of the box solution. ...

properties-maven-plugin: Error loading properties-file

I want to extract all the properties from my pom.xml into a properties-file. These are the common properties like dependency-versions, plugin-versions and directories. I'm using the properties-maven-plugin, but its not working as i want it to. The essential part of my pom.xml: <plugin> <groupId>org.codehaus.mojo</groupId> <artifact...

Maven Embedded Glassfish Plugin - how to set the temporary directory?

Hi all, I am using the Maven Embedded Glassfish Plugin and it works great, but unfortunately it creates a temporary directory in my main project directory. I would like it to use target so that every time I clean the project, the embedded directory also gets wiped. Is there a setting for that? Walter ...

is appassembler plugin broken for java service wrapper on windows 64bit?

Hi I'm developing on 32bit windows and am using appassembler to create a java service wrapper assembly, and it works ok. But I need to also create a 64bit assembly for deployment to a dev server. In the following config I have substituted the 32bit platform with the 64bit, see the <includes> section. But it no longer places the wrapper ...

How to rename goals in Maven?

In the Maven document Introduction to the Build Lifecycle, a goal of display:time is described that outputs the current time. The plugin is as follows: ... <plugin> <groupId>com.mycompany.example</groupId> <artifactId>maven-touch-plugin</artifactId> <version>1.0</version> <executions> <execution> <phase>process-test-r...

activemq-maven-plugin ignore files in classpath?

I have been trying to get activemq-maven-plugin to run activemq with configuration in classpath of the bundle. However, I don't have much luck. It seems that the activemq-maven-plugin just ignore resources (resources/main/conf/activemq.properties) the local bundle. I checked the jar and target/classes and they are built into the right l...

unit-testing maven plugins

Hi, I'm looking for information about how to write unit tests for Maven plugins. Although there's a page on the Maven site about this topic, there's only one example unit test, which does nothing useful. I also found this wiki page, but it hasn't been updated for more than 4 years, so I'm reluctant to invest any faith in it. I checked ...

Reliably finding annotations on class loaded with URLClassLoader

I have a code generator that uses URLClassLoader to load classes on a specified path, scan them for annotations, and then using Reflection on the fields/methods, generate DTOs. It works great, in the test app. When I put it into the Maven MOJO, I suddenly lose the ability to see the javax.persistence.Entity annotations on the classes....

Why does the Maven goal "package" include the resources in the jar, but the goal "jar:jar" doesnt?

Hi, when I package my project with the Maven goal "package", the resources are included as well. They are originally located in the directory "src/main/resources". Because I want to create an executable jar and add the classpath to the manifest, I'm using maven-jar-plugin. I've configured it as the following likes: <plugin> <group...

Maven Plugin - are plugins executable within plugins?

Hi all, Is it possible to execute a plugin from a plugin? For instance, if I want to programmatically call another plugin from within a plugin, not via static XML. Is this possible, how would I do that? Thanks, Walter ...

How to get an Artifact download URL via Maven API?

I'm trying to create a maven plugin to generate a file with the URL to all the dependencies in a project. I have been able to get the dependencies and their artifact, but I'm having trouble getting the download URL. Using ArtifactResolver and ArtifactMetadataSource I get some of the artifact information. However I fail to get all the in...