Closed cyfax closed 6 years ago
Is that fixed now?
Hello. I do not know how to proceed.
This my plan:
./mvnw clean install
I do not know how to do step 3. In my build.gradle file I have
buildscript {
ext {
springBootVersion = '2.0.3.RELEASE'
wrapperVersion = '1.0.12.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("org.springframework.boot.experimental:spring-boot-thin-gradle-plugin:${wrapperVersion}")
}
I do not know how to specify a non maven available plugin/dependency. Do you have a hint ?
That's not really a question about this project, and I don't know enough Gradle to help you. Try looking at the samples in this repo. Or use Maven.
Note that snapshots are published to repo.spring.io, so you don't need to build locally (but it won't hurt).
Hello. I did not know there was public snapshot repository. The gradle config was obvious (add snapshot repo and change dependency version) :
buildscript {
ext {
springBootVersion = '2.0.3.RELEASE'
wrapperVersion = '1.0.14.BUILD-20180814.125412-3'
}
repositories {
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("org.hidetake:gradle-ssh-plugin:2.9.0")
classpath("org.springframework.boot.experimental:spring-boot-thin-gradle-plugin:${wrapperVersion}")
}
The fix is working fine. There is only one subtle thing to note.
ThinJarWrapper does not use Maven mecanism to download artifact : https://github.com/dsyer/spring-boot-thin-launcher/blob/a6da361db954f178018f4e6c37144ec4114c44c7/wrapper/src/main/java/org/springframework/boot/loader/wrapper/ThinJarWrapper.java#L307
So you must specify -D args for networking as well : cf. https://docs.oracle.com/javase/8/docs/api/java/net/doc-files/net-properties.html
to download org.springframework.boot.experimental:spring-boot-thin-launcher:jar:exec:1.0.14.BUILD-SNAPSHOT.
I guess a little doc would be enough. Would you please make a release with this fix ? Regards cyfax
1.0.14 should be available now (as soon as the artifacts are synched with Maven Central).
My settings.xml is basic :
Then I run :
java -Dthin.profile=exclude_Shared -Dthin.classpath=path -Dthin.root=. -jar MyJar.jar --thin.dryrun
and I get :
This is my analysis :
In lines 125 & 138 of https://github.com/eclipse/aether-core/blob/4cf5f7a406b516a45d8bf15e7dfe3fb3849cb87b/aether-transport-http/src/main/java/org/eclipse/aether/transport/http/HttpTransporter.java#L125 we can see httpclient proxy is configured from RemoteRepository.proxy
And from https://github.com/dsyer/spring-boot-thin-launcher/blob/561d2e4b8a17addfbba75d4bfca36f4dd3cde4f8/launcher/src/main/java/org/springframework/boot/loader/thin/DependencyResolver.java#L359 we can see builder is not invoking setProxy method (https://github.com/eclipse/aether-core/blob/4cf5f7a406b516a45d8bf15e7dfe3fb3849cb87b/aether-api/src/main/java/org/eclipse/aether/repository/RemoteRepository.java#L472)
in conjunction of https://github.com/dsyer/spring-boot-thin-launcher/blob/561d2e4b8a17addfbba75d4bfca36f4dd3cde4f8/launcher/src/main/java/org/springframework/boot/loader/thin/MavenSettings.java#L255
Thank you for taking time to see whether my analysis is good.