diffplug / diffplug/spotless

Add Eclipse P2 repository customizable keystore/truststore configuration

Aperta
#2,101 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
5.6k
Fork
559
Merge medio
1g 14h
PR unite (30g)
43

Descrizione

If you are submitting a **bug**, please include the following:

- [X] summary of problem
- [X] Gradle or Maven version
- [X] spotless version
- [X] operating system and version
- [X] copy-paste your full Spotless configuration block(s), and a link to a public git repo that reproduces the problem if possible
- [X] copy-paste the full content of any console errors emitted by `gradlew spotless[Apply/Check] --stacktrace`

If you're just submitting a feature request or question, no need for the above.

* Summary:
Hello, I was running into a situation where I couldn't find any configuration to designate a specific truststore, keystore, and keystore password path for a P2 Mirror host for my eclipse code styles. I'm running on a closed off system during my pipeline builds, which requires a P2 mirror as the normal eclipse one is unreachable. The mirror I can reach requires some SSL handshake with the proper certificate from some custom CA. I wasn't able to figure out a way to point the spotless check to a JKS or P12 I generated with my pipeline's cert or point to a specific cacert store either. Is there proper documentation on this that I potentially missed somewhere?
* Gradle Version: 8.7
* Spotless Version: 6.25.0
* OS: RHEL 9
* Configuration:

```groovy
spotless {
java {
target fileTree('.') {
include '**/*.java'
exclude '**/build/**'
}
eclipse()
.withP2Mirror(['https://download.eclipse.org':'https://mirror_p2_host'])
.configFile("$rootDir/eclipse-code-style.xml")
removeUnusedImports()
formatAnnotations()
indentWithSpace(4)
trimTrailingWhitespace()
endWithNewline()
toggleOffOn()
licenseHeaderFile("$rootDir/license")
}
}
```

* Related Error:

```bash
> Could not determine the dependencies of task ':spotlessCheck'
> Could not create task ':spotlessJavaCheck'
> Could not create task ':spotlessJava'
> java.io.IOException: Failed to load eclipse jdt formatter: java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_required
```

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start from the Gradle `eclipse().withP2Mirror(...)` configuration and trace how the Eclipse formatter connects to the mirrored P2 repository. Determine how custom keystore, truststore, and password settings should be exposed; done means the configured certificate-based mirror can load the formatter without the reported SSL handshake failure.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
build-system
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.