redhat-developer / redhat-developer/vscode-java
Maven and Java Build Status Colliding
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 2.3k
- フォーク
- 546
- 平均マージ
- 20時間 1分
- マージ済み PR(30日)
- 11
説明
I'm not entirely sure when this started happening or if reporting this issue on the wrong Java extension, but I believe it has been at least a week or two, maybe longer. I use versions-maven-plugin from org.codehaus.mojo to automatically change my versions whenever I package my project. Up until recently, this has never been an issue.
The issue I'm experiencing is that I frequently (not always) run into an error while trying to package my project. What I believe is happening, is that vscode is automatically rebuilding as soon as it registers that the version has changed. The problem with this is I think is that Maven is still building, and they sometimes run into the issue of each messing with the same class file at the same time.
Example error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:2.4:jar (default-jar) on project osrs-core: Error assembling JAR: java.lang.reflect.InvocationTargetException: /Users/palidino/Desktop/BattleScape/server/osrs-core/target/classes/com/palidinodh/osrscore/model/item/ItemArray.class -> [Help 1]
2nd package attempt, no changes:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project osrs-core: Execution default-compile of goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile failed.: NullPointerException -> [Help 1]
3rd attempt:
No errors. Sometimes takes more attempts, sometimes less.
Environment
- Operating System: MacOS Catalina
- JDK version: 1.8.0_191-b12
- Visual Studio Code version: 1.42.1
- Java extension version: 0.57.0
Steps To Reproduce
- Use org.codehaus.mojo build-helper-maven-plugin and versions-maven-plugin in build plugins during package phase to update versions.
- When the versions get changed, the java build status server is activated while maven is still working.
- Sometimes get an error.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
報告されている macOS、JDK、VS Code、Java 拡張機能のバージョンで、まず build-helper-maven-plugin と versions-maven-plugin を使って Maven の package フェーズを再現します。Maven の実行中にバージョン変更後の Java ビルドステータスサーバーの有効化を調査します。繰り返し packaging を実行しても、クラスファイルの同時実行エラーが発生しなくなれば issue は完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, vscode
- 領域
- build-system, devtools
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 30/100