Skip to content

Mark starter jars as Spring-Boot-Jar-Type: dependencies-starter #195

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

Open
spencergibb opened this issue Sep 10, 2020 · 3 comments
Open

Mark starter jars as Spring-Boot-Jar-Type: dependencies-starter #195

spencergibb opened this issue Sep 10, 2020 · 3 comments

Comments

@spencergibb
Copy link
Member

Add Spring-Boot-Jar-Type: dependencies-starter to manifest.

spring-projects/spring-boot#22036

spring-projects/spring-boot@fa1d4a4

/cc @wilkinsona

I'm hoping we can configure things here so starter poms have minimal if any changes.

@spencergibb
Copy link
Member Author

Manifest currently looks like

Manifest-Version: 1.0
Implementation-Title: Spring Cloud Starter Netflix Eureka Client
Implementation-Version: 3.0.0-SNAPSHOT
Build-Jdk-Spec: 1.8
Created-By: Maven Jar Plugin 3.2.0
Implementation-Vendor: Pivotal Software, Inc.

Current maven plugin configuration

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-jar-plugin</artifactId>
	<version>${maven-jar-plugin.version}</version>
	<configuration>
		<archive>
			<manifest>
				<mainClass>${start-class}</mainClass>
				<addDefaultImplementationEntries>true
				</addDefaultImplementationEntries>
			</manifest>
		</archive>
	</configuration>
</plugin>

Put the configuration in a profile that is active if a property is set and then we'd only have to set that property in the starter poms. Does that sound reasonable @marcingrzejszczak?

@spencergibb
Copy link
Member Author

@david-vana
Copy link

david-vana commented Mar 11, 2025

@spencergibb The above described solution with property-based profile activation will not work. Maven profile activation works with the system property - not with the Maven POM property.

I found just these options:

  • implement a plugin similar to this one used in Spring Boot project
  • create a specific parent pom for starters with maven-jar-plugin configuration adding a manifest entry
  • manually add a manifest entry to each starter pom

What would you prefer? I'd be happy to prepare a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants