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 2.1.4 does not resolve placeholder #418

Closed
darrenbkl opened this issue May 10, 2019 · 3 comments
Closed

Spring Boot maven plugin 2.1.4 does not resolve placeholder #418

darrenbkl opened this issue May 10, 2019 · 3 comments
Milestone

Comments

@darrenbkl
Copy link

darrenbkl commented May 10, 2019

I'm using Spring Boot 2.1.4.RELEASE, it comes with spring-boot-maven-plugin of the same version, however, this version does not resolve ${git.commit.time}.${git.commit.id.abbrev}.

When I change spring-boot-maven-plugin back to 2.1.3.RELEASE, it works.

<properties>
		<version.number>${git.commit.time}.${git.commit.id.abbrev}</version.number>
	</properties>

	<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<!-- <version>2.1.3.RELEASE</version> -->
			</plugin>
            <plugin>
                <groupId>pl.project13.maven</groupId>
                <artifactId>git-commit-id-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>revision</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <dateFormat>yyyyMMdd-HHmmss</dateFormat>
                    <dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
                    <failOnNoGitDirectory>false</failOnNoGitDirectory>
                </configuration>
            </plugin>
        </plugins>
</build>

Using spring-boot-maven-plugin 2.1.3, it produces
demo-20190510-223456.a922def.jar

Using spring-boot-maven-plugin 2.1.4, it produces
demo-${git.commit.time}.${git.commit.id.abbrev}.jar

Please see uploaded simple project to reproduce this.

demo.zip

@TheSnoozer
Copy link
Collaborator

Hi,
thanks for reporting this issue and providing a sample demo where i can reproduce the issue.

To be fair this looks like the issue reported in spring-projects/spring-boot#16456

By reading the comments I currently don't think it's a problem with this plugin. In fact based on this spring-projects/spring-boot#16456 (comment) it seems that build/finalName should be immutable and it just happens to work.

In honesty I'm not sure if I can do anything to address this issue. For me it appears that spring-boot needs to apply a fix (again based on the discussion in the issue).

Let me know if I understand anything wrong.

@snicoll
Copy link

snicoll commented May 10, 2019

I agree with the analysis and also believe this issue should be closed.

@TheSnoozer
Copy link
Collaborator

Thanks for the confirmation.

Please follow the linked issue for a resolution.

I'm going ahead and close this as 'non issue' in regards for this plugin.

@TheSnoozer TheSnoozer added this to the 3.0.1 milestone May 11, 2019
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

3 participants