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

Spring Boot Maven Plugin adds version to JAR filename #16457

Closed
mpalourdio opened this issue Apr 4, 2019 · 3 comments
Closed

Spring Boot Maven Plugin adds version to JAR filename #16457

mpalourdio opened this issue Apr 4, 2019 · 3 comments
Labels
status: invalid An issue that we don't feel is valid

Comments

@mpalourdio
Copy link
Contributor

Hello,

I have just updated from Spring Boot 2.1.3 to 2.1.4. We heavily use spring-boot-maven-plugin to build executable jar. Before 2.1.4, we were able to build jar whose file name did not contain the project version with this configuration :

<build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <executable>true</executable>
                    <finalName>${project.artifactId}</finalName>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

From 2.1.4, the generated jar always contain the version (ex : myapp.2.1.0-SNAPSHOT.jar), what breaks our CI. Before, it would always have been myapp.jar with this configuration.

I didn't see anything relevant in the changelog about this.

Thanks for feedback.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 4, 2019
@mpalourdio
Copy link
Contributor Author

mpalourdio commented Apr 4, 2019

Looks related to this : #16202

Applying this recommandation fixes the problem

@snicoll
Copy link
Member

snicoll commented Apr 4, 2019

@mpalourdio the finalName attribute is read-only (and therefore not advertized in the doc) as of Spring Boot 2.1.0.M1, see #12608 - It's a mystery to me why Maven would allow you to set the value anyway. This should have been done as part of the upgrade to 2.1.0 but it looks like you're all set now.

@snicoll snicoll closed this as completed Apr 4, 2019
@snicoll snicoll added status: invalid An issue that we don't feel is valid and removed status: waiting-for-triage An issue we've not yet triaged labels Apr 4, 2019
@mpalourdio
Copy link
Contributor Author

Thanks for feedback, I had totally missed this change !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

3 participants