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

Outputs corrupt jars when in a spring boot executable project #42

Closed
adeptues opened this issue Aug 7, 2019 · 6 comments
Closed

Outputs corrupt jars when in a spring boot executable project #42

adeptues opened this issue Aug 7, 2019 · 6 comments
Milestone

Comments

@adeptues
Copy link

adeptues commented Aug 7, 2019

Hi,
When running the strip-jar command after maven has build the jar file for the spring boot project the jar is corrupt when the following configuration is added to the spring boot plugin.

  <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <executable>true</executable>
                </configuration>
            </plugin>
            <plugin>
                <groupId>io.github.zlika</groupId>
                <artifactId>reproducible-build-maven-plugin</artifactId>
                <version>0.10</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>strip-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

this only occurs when the executable field is set

@Zlika
Copy link
Owner

Zlika commented Aug 7, 2019

Hi,
Thank you for reporting this issue. Can you give a sample oroject to reproduce this issue? Do you know what is the problem with the jar?

@adeptues
Copy link
Author

adeptues commented Aug 7, 2019

Hi, project to reproduce is here https://github.com/adeptues/boot-reproducible-build the ouput is always somthing like 12k in size. The spring boot build puts an executable script at the front of the jar during its build process not sure if this affects it.

@Zlika
Copy link
Owner

Zlika commented Aug 7, 2019

Thanks. I'll have a look at it next weekend.

@Zlika Zlika added this to the 0.11 milestone Aug 10, 2019
@Zlika
Copy link
Owner

Zlika commented Aug 10, 2019

Hi!
I added a new feature to detect spring-boot generated "executable" JAR/WAR/ZIP files, split the launch script from the actual ZIP file, strip the ZIP file and then re-add the spring boot launch script.
Can you compile the HEAD version of the plugin and test it on your spring boot project to check if it is ok now?

@adeptues
Copy link
Author

adeptues commented Sep 2, 2019

Hi, Sorry for the delay in testing this. I can confirm this now works and fixes the issue.

Any plans to release a new version?

@Zlika
Copy link
Owner

Zlika commented Sep 3, 2019

I've just released version 0.11.

@Zlika Zlika closed this as completed Sep 3, 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

2 participants