maven-plugin

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

走远了吗. 提交于 2019-11-28 18:28:17
问题 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

How do I download a Maven artifact at the command line without using dependency:get or maven-download-plugin?

元气小坏坏 提交于 2019-11-28 18:16:41
I'd like to download an artifact and its dependencies at the command line. I.e. mvn [some plugin]:[goal] -DartifactId=[artifactId] -DgroupId=[groupId] -Dversion=[version] I've tried mvn dependency:get but this seems to require a list of remote repositories. I want mvn to use what's already specified in settings.xml I've also tried the maven-download-plugin but this doesn't seem to work properly (it tried downloading xerces-impl as a transitive dependency of ant and failed to resolve it. Neither xerces-impl nor ant are dependencies of my artifact). Your help would be appreciated. Try using the

How to tag a changeset in liquibase to rollback

Deadly 提交于 2019-11-28 17:04:00
I have configured the maven pluggin for liquibase as specified in maven configuration . Now created a changeset like :- <changeSet id="changeRollback" author="nvoxland"> <createTable tableName="changeRollback1"> <column name="id" type="int"/> </createTable> <rollback> <dropTable tableName="changeRollback1"/> </rollback> </changeSet> Created the sql to update DB using command line :- mvn liquibase:updateSQL But just want to know how to rollback using a "rollbackTag" parameter. i.e. If run the command " mvn liquibase:rollbackSQL ", what should be the value of "rollbackTag" parameter. And is it

maven archetype:generate failure caused by org.apache.maven.plugin.MojoFailureException

心不动则不痛 提交于 2019-11-28 14:04:12
I have installed maven 2 and following the tutorial as mentioned in the below link maven.apache.org/guides/getting-started/maven-in-five-minutes.html But while executing the archetype:generate command, mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false" I am getting the below error [INFO] Trace org.apache.maven.BuildFailureException: Error merging velocity templates at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:715) at org.apache.maven.lifecycle

Include xml files in maven project

为君一笑 提交于 2019-11-28 11:51:26
I have a maven pom file to build from a structure like: package1 --1.java --2.java --packageMetaInfo.xml package2 --21.java --22.java --packageMetaInfo.xml When I do a maven compile, the xml files don't come in the target. maven-compiler-plugin 3.5.1 - Unless I exclude the xmls through <exclusions> , I get an error that "Fatal error compiling: All compilation units must be of SOURCE kind ->" maven-compiler-plugin 2.0.1 - compiles but skips the xmls Is there a way I can have the xmls included in my jar. The structure would be x.jar package1 --1.class --2.class --packageMetaInfo.xml package2 -

aspectj-maven-plugin, declare soft how to compile

耗尽温柔 提交于 2019-11-28 10:52:51
问题 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<

Invoking Actions other than Build and Clean & Build

自闭症网瘾萝莉.ら 提交于 2019-11-28 09:59:40
I am new to NetBeans and am trying to define and run various custom goals for my Maven proj. My Maven proj uses a number of plugins; once for building the Java classes, another for pre-compiling JSPs, another for building an OSGi bundle, and another for deploying to my dev app server. It seems that by default, NetBeans has Build, and Clean & Build as easily accessible "build options" in the main toolbar bar. These trigger the install goal which runs through the entire build processes (compiles everything and deploys to my dev). In NetBeans, I can edit the Properties for the project, and define

Is there a way to capture user input in maven and assign it to a maven property?

删除回忆录丶 提交于 2019-11-28 09:53:55
Is there a way to pause the maven execution flow to provide a command prompt so user can input text. Then I would like the provided text to be stored in a maven properties. If the user input could be masked that would be a bonus. This would be really useful to avoid storing passwords in pom. Many Thanks jurevert You can catch a user input using maven-antrun-plugin . The following example show how ask current user the new project version. <profile> <id>change-version</id> <build> <defaultGoal>validate</defaultGoal> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven

Maven's jetty plugin SSL configuration issue

纵然是瞬间 提交于 2019-11-28 09:28:28
I'm using Jetty's plugin for Maven, version 7.0.0.pre5, but I have issues configuring it to have a SSL Connector. Whenever I start the application, it fails stating that the requested implementation is not found. This is the plugin's configuration within my pom.xml <plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>7.0.0.pre5</version> <configuration> <connectors> <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector"> <port>8080</port> </connector> <connector implementation="org.mortbay.jetty.ssl.SslSelectChannelConnector">

Jetty Maven Plugin is ignoring custom webdefault.xml

我们两清 提交于 2019-11-28 09:09:51
I'm trying to get around the common issue of Jetty locking static files on Windows with the technique of setting useFileMappedBuffer to false in webdefault.xml. Unfortunately, every time Jetty is not picking up my customized webdefault.xml. I'm using Apache Maven 3.0.2. I've tried using the maven-jetty-plugin (v6.1.26) and jetty-maven-plugin (v8.0.0.M2) but with no difference. I've tried running clean and rebuilding as well before running Jetty. I've verified each time that my webdefault.xml was taken from the same version as the plugin and has the correct settings, namely, only changing this