maven-plugin

maven, execution tag, id tag missing

随声附和 提交于 2019-12-03 08:52:51
I'm looking at the plugin section of a pom I'm inspecting and found this: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-docck-plugin</artifactId> <version>1.0</version> <executions> <execution> <phase>pre-site</phase> <goals> <goal>check</goal> </goals> </execution> </executions> </plugin> If you observe the execution section you will notice that it does not have an id tag. My question is how is the id tag used by Maven and how the absence of one influences the observed behavior. I looked into Maven tutorials and could infer that id's of different execution phases must

Maven findbugs:check - Output Summary Of Bugs

人盡茶涼 提交于 2019-12-03 08:13:19
Does anybody know how to configure the maven findbugs plugin to output a summary of the bugs to the console (similar to the pmd plugin)? At present findbugs:check just prints out how many bugs there are in total and I need to check the individual modules target/findbugs directory and each findbugs.xml file to fix the issues. <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>findbugs-maven-plugin</artifactId> <version>2.0.1</version> <configuration> <xmlOutput>true</xmlOutput> <xmlOutputDirectory>findbugsreports</xmlOutputDirectory> <findbugsXmlOutput>true</findbugsXmlOutput>

Best way to auto compile compass-style SASS via maven

末鹿安然 提交于 2019-12-03 07:01:58
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 detailed difference between SASS and Compass Stylesheets, any problems with "sass-tools" when regularly using

automate deployment to sonatype's oss maven repository

孤者浪人 提交于 2019-12-03 06:59:10
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 doing something with the nexus-staging-maven-plugin . Unfortunately all of that documentation is (in

How to put maven project version in war file manifest?

ε祈祈猫儿з 提交于 2019-12-03 06:46:08
问题 I need to have Maven insert the version number from the POM file into the manifest located in the WAR file under /WEB-INF/manifest.mf. How do I do this? I was able to easily file documentation for doing this in a JAR file using the maven-jar-plugin, but that does not work on a WAR file. Thanks for the help! 回答1: Figured it out using the maven-war-plugin. See the configuration below: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.1.1<

Programmatically resolving Maven dependencies outside of a plugin - get RepositorySystemSession and RepositorySystem

浪子不回头ぞ 提交于 2019-12-03 06:06:59
问题 Maybe this is going to be a larger task than I had originally thought, but regardless, I'm trying to load a MavenProject from a file and then resolve its dependencies. I've got the code for both bits but I'm missing some object references that I need; specifically I need to get instances of RepositorySystemSession and RepositorySystem . Any tips? Note: I have tagged this question with maven-plugin, but this is not a Maven plugin. I am happy to mandate Maven 3 (think I already have anyway..)

Maven plugin version not specified

孤者浪人 提交于 2019-12-03 05:01:33
I have just noticed that plugin's version is optional in maven. I can still build my module without specifying it. Let's take an example with maven-bundle-plugin. <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <extensions>true</extensions> .... </plugin> I have written a simple pom.xml without a parent to try this out, so pluginManagement is not involved. I have also checked the super super pom-4.0.0.xml in maven-model-builder to confirm that maven-bundle-plugin isn't there. This plugin version is not specified anywhere. How does maven determine which

Maven build number plugin, how to save the build number in a file?

穿精又带淫゛_ 提交于 2019-12-03 04:56:06
问题 I've a Java project using Spring Framework and Git and I wanted to display a build number. I found the Build Number Maven plugin. With Git the build number is a Git hash. I dislike that and I thought a date was much more expressive. I found this excellent blog article explaining how to use build number plugin with a different profile for SVN and Git. Since I just use Git, instead of creating a new profile, I just copied the plugin part in my build tag. When I run "mvn package" it tells me:

Send maven output to file

让人想犯罪 __ 提交于 2019-12-03 04:43:00
问题 On Windows 7, I am trying to send the output of a maven-3 command to a text file. I call the command from the root of the project I am trying to analyze. The command is: mvn dependency:tree -Dverbose -Dincludes=commons-collections -DoutputFile=C:\Users\myname\Documents\output.txt When I run the command without the outputFile parameter, I see the output sent to the console. But when I use it with the outputFile parameter, the output file is empty. Any idea what I am missing here? 回答1: Try mvn

Why can Maven not find my custom Mojo?

自闭症网瘾萝莉.ら 提交于 2019-12-03 04:39:50
I have an own Mojo class. @Mojo(name="mojo", threadSafe=true) public class MyMojo extends AbstractMojo { @Component private MavenProject project; public void execute() throws MojoExecutionException, MojoFailureException { getLog().info("Execute"); } } After that I install it in local repository. [INFO] Applying mojo extractor for language: java-annotations [INFO] Mojo extractor for language: java-annotations found 0 mojo descriptors. [INFO] Applying mojo extractor for language: java [INFO] Mojo extractor for language: java found 0 mojo descriptors. [INFO] Applying mojo extractor for language: