maven-plugin

component lookup exception with org.apache.maven.repository.RepositorySystem in Maven plugin testing

那年仲夏 提交于 2019-12-18 03:49:14
问题 I'm trying to use maven-plugin-testing-harness version 2.1 with the following test case: public class FooTest extends AbstractMojoTestCase { @Override protected void setUp() throws Exception { super.setUp(); } public void testSomething() throws Exception { // todo } } The test fails at the setUp() call: org.codehaus.plexus.component.repository.exception.ComponentLookupException: java.util.NoSuchElementException role: org.apache.maven.repository.RepositorySystem roleHint: at org.codehaus

How to tag a changeset in liquibase to rollback

☆樱花仙子☆ 提交于 2019-12-17 21:53:32
问题 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

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

流过昼夜 提交于 2019-12-17 19:19:20
问题 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 回答1: 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

Maven's jetty plugin SSL configuration issue

痞子三分冷 提交于 2019-12-17 18:59:25
问题 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

Jetty Maven Plugin is ignoring custom webdefault.xml

人走茶凉 提交于 2019-12-17 18:52:23
问题 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

Maven JaCoCo plugin error

喜你入骨 提交于 2019-12-17 18:09:26
问题 I have configured the Maven JaCoCo plugin as follows in my pom.xml file: <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <jacoco.version>0.5.9.201207300726</jacoco.version> </properties> <profiles> <profile> <id>jacoco4</id> <build> <plugins> <plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> <version>${jacoco.version}</version> <executions> <execution> <goals> <goal>prepare-agent</goal> </goals> <configuration <destfile>$

How to call testng.xml file from pom.xml in Maven

被刻印的时光 ゝ 提交于 2019-12-17 15:46:27
问题 I'm using Selenium WebDriver, Eclipse, TestNG and Surefire plugin. I am not able to run testng.xml file from pom.xml. While I'm running pom.xml using mvn test it directly run the file which is in the src/test/java . my pom.xml code is <groupId>angel</groupId> <artifactId>Angel</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <name>Angel</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties>

Plugin error: execution not covered by lifecycle configuration

我是研究僧i 提交于 2019-12-17 10:49:20
问题 I am trying to use the maven-warpath-plugin available here. But I keep getting an error in my pom.xml file that says: Plugin execution not covered by lifecycle configuration: org.appfuse.plugins:maven-warpath-plugin:2.1.0:add-classes (execution: default, phase: generate-sources) How do I resolve this? Here is my pom.xml snippet for the plugin: <plugin> <groupId>org.appfuse.plugins</groupId> <artifactId>maven-warpath-plugin</artifactId> <version>2.1.0</version> <extensions>true</extensions>

Maven assembly : add different version of the same artifact

本秂侑毒 提交于 2019-12-17 06:46:54
问题 I create my application archive with the maven assembly plugin. All the dependency present in my pom are included without any problem. Now I need to include two or more version of the same artifact. If in my pom I put <dependencies> [...] <dependency> <groupId>db.test</groupId> <artifactId>my-model</artifactId> <version>1.0.3</version> </dependency> <dependency> <groupId>db.test</groupId> <artifactId>my-model</artifactId> <version>1.1.0</version> </dependency> </dependencies> Of source the

Maven 3 warnings about build.plugins.plugin.version

谁都会走 提交于 2019-12-17 05:21:07
问题 Since I updated to Maven 3 I get the following warning messages at each build : How can I get rid of these warnings? [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for proj:id:jar:3.1 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. @ line 195, column 15 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 204,