Open snicoll opened 3 years ago
this also cause the same error for me:
curl https://start.spring.io/starter.tgz -d dependencies=web,jpa,h2,lombok -d artifactId=service-school-name -d groupId=com.mikzuit.developer -d javaVersion=14 -d language=java -d type=maven-project -d baseDir=java-springboot-project -o java-springboot-project.tgz
thanks
Hi @snicoll , I am a first time contributor looking to submit a PR to help resolve issues in the spring initializer project. I discovered an easy fix for long filename support of tar archives using a POSIX configuration.
ProjectGenerationController.java
final TarArchiveOutputStream taos = new TarArchiveOutputStream(new GzipCompressorOutputStream(output));
taos.setLongFileMode(TarArchiveOutputStream.LONGFILE_POSIX);
return taos;
Let me know if this solution makes sense, but I wrote an integration test that proves that the config works on my Mac at least. If you agree, then I can open to PR and maybe you can guide me through the process a bit in the spirit of Hacktoberfest.
Hi @otheriault this issue is about reporting the issue properly, not fixing the actual issue but if you have a fix that's great! I think simulating long names in a test can be challenging but please push what you have and submit a PR. If you have troubles doing that, feel free to ask on our Gitter channel or here.
Submitted the following PR: https://github.com/spring-io/initializr/pull/1139.
The underlying issue has been fixed now but the lack of proper report remains. That being said, I can't reproduce it with the sample so I suspect that our Web UI arrangement is actually prevent the error to be reported properly.
Here is a sample command one can run against a local instance:
This leads to a 404 and the following in the logs:
This should be reported as a 500 with the relevant information or, better yet, we should find a way to handle such use cases with tgz format.