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

Executable fat WARs e.g. from Spring Boot should work without requiring setting JAVA_APP_JAR with fixed version #123

Closed
vorburger opened this issue Mar 4, 2018 · 8 comments · Fixed by #224

Comments

@vorburger
Copy link
Collaborator

vorburger commented Mar 4, 2018

I'm finding that one currently has to put this e.g. into a .s2i/environment, e.g. to use this with Spring Boot:

ARTIFACT_COPY_ARGS=*-boot.war
JAVA_APP_JAR=alfio-1.14-SNAPSHOT-boot.war

when it would be much nicer (and avoid confusion on versin bumps) if we could support wildcard expansion in JAVA_APP_JAR, just like it is allowed in other environment variables:

ARTIFACT_COPY_ARGS=*-boot.war
JAVA_APP_JAR=*-boot.war
@rhuss
Copy link
Contributor

rhuss commented Mar 5, 2018

Actually, JAVA_APP_JAR handling is inherited from run-java.sh so we might should add this there. btw, you know that if you only have a single jar in the directory, it gets updated automatically ?

@vorburger would you mind to open an issue over there to track it ? It would be automatically picked up by this image (when the dep to run-java-sh block is updated) and also other images (like the plain java image) would benefit, too.

thanks !

@vorburger
Copy link
Collaborator Author

btw, you know that if you only have a single jar in the directory, it gets updated automatically ?

yup, I noticed that playing with it... but FYI it's quite typical e.g. in Spring Boot projects that some build produces some JAR and/or WAR and then some Maven / Gradle plugin post-processes that to be executable and what not - and, typically, leaves the original in place.

@vorburger would you mind to open an issue over there to track it ?

==> fabric8io-images/run-java-sh#65 ok?

@rhuss
Copy link
Contributor

rhuss commented Mar 17, 2018

perfect, thanks !

vorburger added a commit to vorburger/alf.io that referenced this issue Sep 30, 2018
@vorburger
Copy link
Collaborator Author

fabric8io-images/run-java-sh#79 is probably a better approach actually...

@vorburger vorburger changed the title JAVA_APP_JAR should allow wildcards Executable fat WARs e.g. from Spring Boot should work without requiring setting JAVA_APP_JAR with fixed version Feb 8, 2019
@vorburger
Copy link
Collaborator Author

fabric8io-images/run-java-sh#79 is probably a better approach actually...

so if/when @rhuss merges fabric8io-images/run-java-sh#80, and makes a new release of run-java-sh, then we can fix this here "just" by bumping the version ... what would be neat is to have our test.sh cover this as well with a (TBD) java/examples/springboot-gradle|maven ...

@vorburger
Copy link
Collaborator Author

would be neat is to have our test.sh cover this as well with a java/examples/springboot-gradle|maven ...

master...vorburger:example-spring-gradle

@rhuss
Copy link
Contributor

rhuss commented Feb 8, 2019

run-java PRs are merged and a v1.3.1 release released, so I think we are good with updating it here.

vorburger added a commit to vorburger/s2i that referenced this issue Feb 11, 2019
Now produces WAR instead of JAR, and self tests

TODO get test.sh to actually pass (it currently fails)

fabric8io-images#123
@vorburger
Copy link
Collaborator Author

vorburger commented Feb 12, 2019

run-java PRs are merged and a v1.3.1 release released, so I think we are good with updating it here.

Nope, it's actually broken... 😈 see fabric8io-images/run-java-sh#79 & fabric8io-images/run-java-sh#80.

vorburger added a commit to vorburger/s2i that referenced this issue Feb 16, 2019
test.sh currently fails with this - it's TDD to illustrate the problem;
the next commits fix the problem and make this example pass test.sh

fabric8io-images#123
vorburger added a commit to vorburger/s2i that referenced this issue Feb 16, 2019
vorburger added a commit to vorburger/s2i that referenced this issue Feb 16, 2019
vorburger added a commit to vorburger/s2i that referenced this issue Feb 16, 2019
This is only one part of and required by fabric8io-images#123,
but not the only problem and complete solution, yet.

fabric8io-images#123
vorburger added a commit to vorburger/s2i that referenced this issue Feb 16, 2019
vorburger added a commit that referenced this issue Feb 19, 2019
test.sh currently fails with this - it's TDD to illustrate the problem;
the next commits fix the problem and make this example pass test.sh

#123
vorburger added a commit that referenced this issue Feb 19, 2019
This is only one part of and required by #123,
but not the only problem and complete solution, yet.

#123
vorburger added a commit that referenced this issue Feb 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants