maven-plugin

Difference between Maven source plugin jar and jar-no-fork goal?

烂漫一生 提交于 2019-11-30 11:54:13
问题 Could you give me a detail explanation about the difference between jar and jar-no-fork goal? I see it from official site, but I can not get a clear idea for this. 回答1: My interpretation: the jar goal is meant to be run from the command line ( mvn source:jar ), the jar-no-fork is meant to be bound to the lifecycle. If you look at the docs for the jar goal the key phrase is "Invokes the execution of the lifecycle phase generate-sources prior to executing itself." If you configure your POM to

Import maven plugin configuration by composition rather than inheritance. Can it be done with build extensions?

淺唱寂寞╮ 提交于 2019-11-30 11:39:27
Import maven plugin configuration by composition rather than inheritance. Can it be done with build extensions? I have used maven for more than 3 years and there's one shortcoming that has always bugged me. It's time to find a solution for that already. The problem: I have a "daddy" maven module with 3 children: "boy", "girl", and "kid". Each of these children must have its own distinct set of plugin configurations for a default "clean install" build. I don't want to put that configuration on the children's poms. I'd rather put it somewhere that I can reuse later. I have tried using profiles

Basic maven plugin project not working, Mojo plugin descriptors not generating

天涯浪子 提交于 2019-11-30 11:31:25
问题 I am following the tutorial for creating a maven plugin and cannot run mvn install without getting errors. The info complains that i don't have the required mojo descriptors when the annotations should be generating them for me. I am running maven 3.0.5 and using intellij as my ide. here is my Main class: @Mojo(name = "modify-connector") public class ComplianceMojo extends AbstractMojo { @Parameter private String artifactId; @Parameter private String version; @Override public void execute()

Gradle - plugin maven-publish: How to publish only specific publication to a repository

别说谁变了你拦得住时间么 提交于 2019-11-30 11:16:33
We have two different artifacts that is going to be published to two different maven repositories. " ProjectXMergedWar " should be published to " MyMavenRepo1 " (snapshots) " ProjectXJarRelease " should be published to " MyMavenRepo2 " (release) "ProjectXMergedWar" should never be published to "MyMavenRepo2" (release) "ProjectXJarRelease" should never be published to "MyMavenRepo1" (snapshots) We use the plugin maven-publish where you configure a set of publications and reposistories. The plugin then generates tasks for all combinations of publications and repositories (see tasks list at the

Configuring Logging for an Embedded Tomcat from Maven plugin

不羁的心 提交于 2019-11-30 11:09:54
I'm using the Tomcat7 Maven plugin: <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.0-beta-1</version> <configuration> <update>true</update> <contextFile>${basedir}/conf/context.xml</contextFile> <tomcatUsers>${basedir}/conf/tomcat-users.xml</tomcatUsers> </configuration> </plugin> I run my app as follows (which runs tomcat embedded) mvn tomcat7:run THE ISSUE: There is no catalina.out log file? I want to turn on logging for the Realms so I can debug something. In the ./target/tomcat/log dir there is only access_log.* no other log

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

混江龙づ霸主 提交于 2019-11-30 10:05:46
问题 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

Maven archetype problem

佐手、 提交于 2019-11-30 09:21:52
问题 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

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

假装没事ソ 提交于 2019-11-30 09:10:07
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: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema

java.lang.ClassNotFoundException: org.sonatype.aether.version.InvalidVersionSpecificationException

拟墨画扇 提交于 2019-11-30 08:28:40
I am using the maven indexer to fetch the maven index from the maven central repository. Since I updated from org.sonatype.aether to org.eclipse.aether and from maven 3.0.5 to maven 3.1.0 I am getting this Exception. Caused by: java.lang.ClassNotFoundException: org.sonatype.aether.version.InvalidVersionSpecificationException at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230) Maven

Maven - Generate Jar and War

情到浓时终转凉″ 提交于 2019-11-30 08:21:09
I have a CXF WS project that I would use it in another project, I would consume this WS in a Web Project but I don't know how to generate Jar file. Please have you any idea or an example? Thank you The maven-war-plugin supports creating a separate artifact that just contains the classes. http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html See the 'attachClasses' parameter. No need to add in the jar plugin or mess with the packaging. Just add the war plugin to pluginManagement and turn this on. However, I fear this this isn't what you want. To consume a CXF web service, you need a