Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Plugin <configuration> missing on active Profile #5

Closed
VenaNocta opened this issue Jun 13, 2023 · 1 comment
Closed

Bug: Plugin <configuration> missing on active Profile #5

VenaNocta opened this issue Jun 13, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@VenaNocta
Copy link
Member

Plugin configuration doesn't get implemented when injecting with active profiles.

@VenaNocta VenaNocta added the bug Something isn't working label Jun 13, 2023
VenaNocta added a commit that referenced this issue Jun 13, 2023
…ecycleExecutionPlanCalculator.setupMojoExecution
@VenaNocta VenaNocta self-assigned this Jul 3, 2023
@VenaNocta
Copy link
Member Author

VenaNocta commented Jul 3, 2023

Why does it happen / difference to maven default

This Bug is an unintended side effect of cutting out and moving goal activations from pom executions to pem. As such all default executions don't get generated either. The Example below shows the maven default - so if you left out the execution definition in the first place it would also ignore the basic configuration. But only when the goal is launched via lifecycle, on the other hand should you run it explicitly the basic configuration will be used!

Fix

This behavior will be reimplemented with a flag to disable it - should one wish to use strict maven behavior

Edit: added flags

<r4m.generate-plugin-executions />
<r4m.generate-plugin-executions-on-fork />

Example

<profile>
	<id>dev-install</id>
	<build>
		<defaultGoal>clean dev/+install</defaultGoal>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-toolchains-plugin</artifactId>
				<configuration>
					<toolchains>
						<jdk>
							<version>openjdk-1.8.0</version>
						</jdk>
					</toolchains>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>toolchain</goal>
						</goals>
					</execution>
					<execution>
						<id>pipeline</id>
						<goals>
							<goal>toolchain</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</profile>

GENERATES / EQUALS

<profile>
	<id>dev-install</id>
	<build>
		<defaultGoal>clean dev/+install</defaultGoal>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-toolchains-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>toolchain</goal>
						</goals>
						<configuration>
							<toolchains>
								<jdk>
									<version>openjdk-1.8.0</version>
								</jdk>
							</toolchains>
						</configuration>
					</execution>
					<execution>
						<id>pipeline</id>
						<goals>
							<goal>toolchain</goal>
						</goals>
						<configuration>
							<toolchains>
								<jdk>
									<version>openjdk-1.8.0</version>
								</jdk>
							</toolchains>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</profile>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant