Skip to content

Consider supporting inline layer definition within maven plugin #49539

@krezovic

Description

@krezovic

I'm aware there are other issues regarding the layer tools and overriding the default layers via separate jars.

I would like to ask for something different entirely, inspired by maven assembly plugin inline descriptors [1]

This approach would allow to re-use the layers definition inside a <pluginManagement> block.

An example may be

<project>
	<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<configuration>
					<layout>
						<inline>
							<application>
								<into layer="spring-boot-loader">
									<include>org/springframework/boot/loader/**</include>
								</into>
								<into layer="application" />
							</application>
							<dependencies>
								<into layer="snapshot-dependencies">
									<include>*:*:*SNAPSHOT</include>
								</into>
								<into layer="company-dependencies">
									<include>com.acme:*</include>
								</into>
								<into layer="dependencies"/>
							</dependencies>
							<layerOrder>
								<layer>dependencies</layer>
								<layer>spring-boot-loader</layer>
								<layer>snapshot-dependencies</layer>
								<layer>company-dependencies</layer>
								<layer>application</layer>
							</layerOrder>
						</inline>
					</layout>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>

[1] https://maven.apache.org/plugins/maven-assembly-plugin/examples/using-inline-descriptors.html

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions