maven-plugin

How to determine what artifacts are built from a maven reactor plan (ie: including sub modules)?

六月ゝ 毕业季﹏ 提交于 2019-12-04 14:51:07
(Note: this question was originally posed by Dan Allen on Google+ here: https://plus.google.com/114112334290393746697/posts/G6BLNgjyqeQ ) If I ran 'mvn install', what artifacts would it install? Or, if I ran 'mvn deploy', what artifacts would it deploy? This would likely be a fairly straightforward plugin to write, but I don't want to re-invent this if it's already available somewhere programmatically. It seems like this should be readily available somewhere. Jörn Horstmann As Andrew Logvinov already commented, any maven plugin could attach additional artifacts. So I don't think this would be

automate deployment to sonatype's oss maven repository

假如想象 提交于 2019-12-04 12:14:29
问题 I've got several github java projects. One of them I've manually deployed to sonatype's repository so that it gets published in maven central. This has been a somewhat painful process in the sense that it seems to involve too many hoops to jump through and a lot of manual work and I'd like to automate that. So I actually stopped doing that because it was just too much work. There's plenty of documentation that suggests this is possible and quite a bit that suggest that it somehow involves

Best way to auto compile compass-style SASS via maven

纵然是瞬间 提交于 2019-12-04 11:18:34
问题 referring to SASS implementation for Java? : What is the best way to auto-compile compass-style.org stylesheets in maven goal compile respectively package? I would not like to ship too many self-compiled libraries nor do I want to dynamically ship compiled files via filters like https://code.google.com/p/sass-java ( https://github.com/darrinholst/sass-java ) Any alternatives than hooking up shellscripts / ant scripts which requires installed ruby and compass on the client? What is the

unit-testing maven plugins

主宰稳场 提交于 2019-12-04 10:48:47
问题 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 the book "The Definitive Guide to Maven", but it doesn't even mention the subject. I'd like to write my unit tests in either Groovy or Java, and would appreciate

maven can't find archetype in my repository

安稳与你 提交于 2019-12-04 10:41:58
I'm trying to create my own maven archetype. For now, I'm going through this tutorial [here][1] without success. I'm able to build the archetype project okay, but when I try to generate a project from that archetype I get the error below. Maven can't seem to find the archetype I created . Can any one spot my problem? Is there some other recomended tutorial for createing a maven archetype? Thanks. Maven version 3.0.3 Build Error: AR3Y35-LAPTOP:EclipseWS Albert$ mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeGroupId=com.myarch.archetypes -DarchetypeArtifactId

Using maven 3, how to use project classpath in a plugin?

三世轮回 提交于 2019-12-04 09:54:44
I'm writing a maven 3 plugin, for which I would like to use project classpath. I've tried using the approach mentionned in Add maven-build-classpath to plugin execution classpath , but it seems the written component is not found by maven. (I have a ComponentNotFoundException at plugin execution start). So, what is the "reference" way to use project classpath in a maven 3 plugin ? Or if the component way is the right one, is there any configuration step beside adding the component as configurator property of the @Mojo annotation ? You can retrieve the classpath elements on the MavenProject by

How to populate parameter “defaultValue” in Maven “AbstractMojoTestCase”?

一笑奈何 提交于 2019-12-04 07:35:51
I have a Maven plugin that I am attempting to test using a subclass of the AbstractMojoTestCase . The plugin Mojo defines an outputFolder parameter with a defaultValue . This parameter is not generally expected to be provided by the user in the POM. @Parameter(defaultValue = "${project.build.directory}/someOutputFolder") private File outputFolder; And if I use the plugin in a real scenario then the outputFolder gets defaulted as expected. But if I test the Mojo using the AbstractMojoTestCase then while parameters defined in the test POM are populated, parameters with a defaultValue that are

Best Repository Management for Maven

自闭症网瘾萝莉.ら 提交于 2019-12-04 06:26:05
I am working on Automated Build using maven and Jenkins. I am looking for best open source Repository Management for Maven. So that I can have an integaration between Maven and jenkins via respository manager. You have at least three choices that I know of Nexus Artifactory Apache Archiva I have used all the three and each has pros and cons. I would go with Nexus since it is backed by Sonatype who are also involved in maven development. I liked the Artifactory User Interface though Both Nexus and Artifactory have supported professional editions as well. These are linked from the maven site as

Automatic update of generated css files via m2e

北战南征 提交于 2019-12-04 05:29:39
I'm using the lesscss-maven-plugin to generate different css files to the target directory ( target\generated-sources ) and then use maven-war-plugin to add this directory as an webResouce. Those files will generate perfectly fine. However the m2e-plugin (version 1.0.0) won't copy those files in the according web-resources folder ( m2e-wtp\web-resources ), when they have changed . Only when I run a eclipse "maven/update project" changes will be updated. But I want the changes to take affect automatically, when the files have changed. Here is my pom configuration: <plugin> <groupId>org.eclipse

How do I override a Maven Plugin's log4j Configuration?

我怕爱的太早我们不能终老 提交于 2019-12-04 05:23:04
I'm using the Cargo Maven plugin to deploy a WAR to a remote server, and I'm having problems. I'll probably create a second question for that problem, but this one is about overriding a Maven plugin's log4j configuration. Cargo uses JBoss' client libraries to ship stuff to JBoss servers (which I'm trying to do.) The JBoss library uses log4j. Cargo doesn't set up any sort of mapping layer that I know of. So, essentially, log messages are occurring in the dependent library of a Maven plugin. I tried setting -Dlog4j.debug and got this information: log4j: Trying to find [log4j.xml] using