diffplug / diffplug/spotless

Add Eclipse P2 repository customizable keystore/truststore configuration

オープン
#2,101 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
5.6k
フォーク
559
平均マージ
1日 14時間
マージ済み PR(30日)
43

説明

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
```

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Gradle の `eclipse().withP2Mirror(...)` 設定から始め、Eclipse formatter がミラーされた P2 リポジトリに接続する仕組みを追跡します。カスタムの keystore、truststore、パスワード設定をどのように公開すべきかを明らかにします。完了の条件は、設定した証明書ベースの mirror で、報告された SSL handshake failure を発生させずに formatter を読み込めることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
build-system
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。