maven-plugin

Why does the Maven command “mvn sonar:sonar” work without any plugin configuration in my “pom.xml”?

梦想与她 提交于 2019-11-29 22:49:55
I have a Maven web project in my repo. I am a Maven noob but still I understand the fact that there are plugins which we need to configure only then we could run plugin specific commands. Facts: I have a sonar server running on my local machine at port 9000. I have not added any sonar specific plugin in my POM.xml Reference: http://www.sonarsource.org/we-had-a-dream-mvn-sonarsonar/ Observation: But still when I run mvn sonar:sonar in my project from command line it works fine. Matter of the fact is I have NOT configured sonar plugin in my POM.xml Even then from where the hell Maven is picking

Maven 2.1.0 not passing on system properties to Java virtual machine

余生颓废 提交于 2019-11-29 22:11:29
We use the command line to pass on system properties to the Java virtual machine when running our Hudson builds on a Linux box. It used to work quite well in 2.0.9 by since we upgraded to 2.1.0 it has stopped working altogether. The system properties just never make it to the Java virtual machine. I have created a small test project and indeed it does not work at all. This should work just fine with Maven 2.0.9: mvn2.0.9 -Dsystem.test.property=test test But this will fail: mvn2.1 -Dsystem.test.property=test test The Java code simply does this assertTrue( System.getProperty("system.test

How to get an Artifact download URL via Maven API?

*爱你&永不变心* 提交于 2019-11-29 21:13:01
问题 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 information for all the dependencies. I haven't been able to find documentation on the resolution logic, so that I can call it form my plugin. I can use an

Maven: Including a META-INF folder in the classes folder

自作多情 提交于 2019-11-29 20:17:07
I have a very simple WAR project and I want to include a directory named META-INF at the top of the classes output folder where all the compiled Java classes are. I'm using Maven, but it seems that by default Maven won't include anything that is not a Java class. So it ignores my META-INF directory that is sitting at the top of the src directory. The META-INF directory contains a file named persistence.xml . Any quick pointers on how to instruct Maven to put this directory and file into the output folder? Rich Seller In general, for a Java-based Maven project, non-source files should go in the

What are the URLs of all the Maven Archetype catalogs that you know about?

巧了我就是萌 提交于 2019-11-29 18:45:12
Maven Archetypes are the "templates" by which you can quickly generate a running example of a given framework or project type. I am trying to compile a list of all the Maven archetype catalogs currently active on the net. From the Maven documentation about catalog files : Knowledge about archetypes are stored in catalogs. The catalogs are xml files. The Archetype Plugin comes bundled with an internal catalog. This one is used by default. The Archetype Plugin can use catalogs from local filesystem and from HTTP connections. So far, I've gathered this list of repositories that do publish

aspectj-maven-plugin, declare soft how to compile

自古美人都是妖i 提交于 2019-11-29 16:49:26
Is it possible to compile project with softened Exceptions (e.g.: declare soft: Exception : execution(* *.*()); ) aspects in it using only aspectj-maven-plugin ? I can't handle it... I am still getting compilation error unreported exception Exception; must be caught or declared to be thrown So it is compiled without taking aspects in account. I am using this command to compile: mvn clean aspectj:compile and my pom.xml is: <project> <modelVersion>4.0.0</modelVersion> <groupId>pl.group.id</groupId> <artifactId>aop</artifactId> <version>1.0.0</version> <dependencies> <dependency> <groupId>org

Maven “versions” plugin - how to exclude alpha/beta versions from response?

本秂侑毒 提交于 2019-11-29 16:24:21
问题 I have an issue concerning the plugin versions. When it generates a report with the goal: mvn versions:display-dependency-updates It suggest is a lot of libraries that with beta or alpha versions. org.hibernate:hibernate-validator ......... 4.2.0.Final -> 4.3.0.Beta1 The issue is that event if the goal of this plugin is to show the very latest versions of each dependency, I don't want to use beta/alpha versions for production code. But I don't want to search manually the last stable version

Maven archetype problem

血红的双手。 提交于 2019-11-29 15:10:20
I am a newbie to maven. I have installed apache archiva in my machine to use as maven-proxy. My purpose is that I want to generate a sample project structure using maven archiva plugin. I have uploaded required artifact using archiva for that. When I run mvn archetype:generate it should ask me for the rest of the parameters. But instead it is giving me the following errors. Which indicates I have means maven shared plugin. But I have also uploaded the maven shared plugin artifact using archiva. Here is the stack trace F:\MavenTests\simple>mvn archetype:generate [INFO] Scanning for projects...

Maven - Why after “mvn clean” I need to execute “Maven Update Project” before “mvn package”?

走远了吗. 提交于 2019-11-29 12:39:41
问题 I'm making some tests and I would like to understand why after execute the command mvn clean I need to execute "Maven > Update Project" before run mvn package , otherwise I get a compilation error in one of my dependencies during the packaging. It looks like my project doesn't compile correctly my project before running "Maven > Update Project", but I'm not sure. Is this normal? I'm using Eclipse and run the commands {mvn clean} and {mvn package} via "Run as > Maven Build". Here is my pom.xml

“cannot find symbol” error in maven

こ雲淡風輕ζ 提交于 2019-11-29 12:16:55
问题 I see a lot of questions on stackoverflow on this. But still I'm not able to know what is the issue in my way of building projects. I've two spring boot projects: we-data and we-web. we-web is dependent on we-data. we-data compiles fine on maven. But we-web gives me above error. we-data pom: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http:/