maven-extension

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

微笑、不失礼 提交于 2019-12-18 14:51:20
问题 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

Maven3 : How to get all the project dependencies in a Custom Maven Extension

守給你的承諾、 提交于 2019-12-11 23:42:45
问题 In Maven 3.x , how I can get all the dependencies of a project including the transitive in a custom maven extension (By not using Aether) Currently I have this : @Component(role = AbstractMavenLifecycleParticipant.class, hint = "Test") public class sampleExtension extends AbstractMavenLifecycleParticipant implements LogEnabled { private Logger logger; @Override public void afterSessionStart(MavenSession session) throws MavenExecutionException { this.logger.info("Starting afterSessionStart()")

Enable maven3 extension only on specified profile(s)

こ雲淡風輕ζ 提交于 2019-12-10 15:26:05
问题 I have an extension I use in my Maven 3 build that outputs build information for me. It's a bit verbose so I would like to run it only in some build profiles. But <extensions> are only allowed in the main <build> and not in the profiles. So my question is two fold. First, is there already a way to limit the extension to run only in specific profile(s) with something I can do in the pom.xml ? Second, if not, then how should I implement this? My initial thought was to call mavenSession

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

Maven 3 profile with extensions

霸气de小男生 提交于 2019-11-29 03:58:47
My question had been addressed in this thread , but the explanation is not clear. I have this build definition in one of my pom.xml files: <build> <finalName>${my.project}</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.0</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> </plugins> <extensions> <extension> <groupId>org.kuali.maven.wagons</groupId> <artifactId>maven-s3-wagon</artifactId> <version>1.1.19</version> </extension> </extensions> <resources> <resource>

Maven 3 profile with extensions

半世苍凉 提交于 2019-11-27 18:01:31
问题 My question had been addressed in this thread, but the explanation is not clear. I have this build definition in one of my pom.xml files: <build> <finalName>${my.project}</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.0</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> </plugins> <extensions> <extension> <groupId>org.kuali.maven.wagons</groupId> <artifactId>maven