microsoft / microsoft/vscode-java-pack
Enabling java.autobuild.enabled causes the spring.profiles.active to be set to the default profile irrespective of the profile used for the maven build
オープン
まだ誰も着手していません。
ai-triaged
bug
- 主要言語
- TypeScript
- スター
- 352
- フォーク
- 166
- 平均マージ
- 17時間 47分
- マージ済み PR(30日)
- 32
説明
Issue Type: Bug
- Create a Spring.Boot application
- Create two profiles in the pom.xml -
<profiles>
<profile>
<id>uat</id>
<properties>
<maven.test.skip>true</maven.test.skip>
<activatedProperties>uat</activatedProperties>
</properties>
<build>
<finalName>${project.artifactId}-${project.version}-uat</finalName>
</build>
</profile>
<profile>
<id>dev</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<activatedProperties>dev</activatedProperties>
<maven.test.skip>true</maven.test.skip>
</properties>
<build>
<finalName>${project.artifactId}-${project.version}-dev</finalName>
</build>
</profile>
</profiles>
- Create an application.properties file for the Spring.Boot application and add the following -
spring.profiles.active=@activatedProperties@ - Set "java.autobuild.enabled": true in settings.json
- Execute a maven build from within the VS Code environment -
mvn clean package -Puat - Note the contents of the target application.properties file which will contain -
spring.profiles.active=dev - Set "java.autobuild.enabled": false in settings.json
- Execute a maven build from within the VS Code environment -
mvn clean package -Puat - Note the contents of the target application.properties file which will contain -
spring.profiles.active=uat
Note: If VS Code is closed and the maven command is used from a command window then the issue does not occur.
Extension version: 0.10.0
VS Code version: Code 1.47.3 (91899dcef7b8110878ea59626991a18c8a6a1b3e, 2020-07-23T13:12:49.994Z)
OS version: Windows_NT x64 10.0.14393
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz (4 x 3592) |
| GPU Status | 2d_canvas: unavailable_software flash_3d: disabled_software flash_stage3d: disabled_software flash_stage3d_baseline: disabled_software gpu_compositing: disabled_software multiple_raster_threads: enabled_on oop_rasterization: disabled_off protected_video_decode: disabled_off rasterization: disabled_software skia_renderer: disabled_off_ok video_decode: disabled_software viz_display_compositor: enabled_on viz_hit_test_surface_layer: disabled_off_ok webgl: unavailable_software webgl2: unavailable_software |
| Load (avg) | undefined |
| Memory (System) | 10.00GB (6.20GB free) |
| Process Argv | |
| Screen Reader | no |
| VM | 0% |
| Extension | Author (truncated) | Version |
|---|---|---|
| vscode-tomcat | ada | 0.11.3 |
| file-templates | brp | 1.2.0 |
| xml | Dot | 2.5.1 |
| mssql | ms- | 1.9.0 |
| vs-keybindings | ms- | 0.2.0 |
| vscode-boot-dev-pack | Piv | 0.0.8 |
| vscode-concourse | Piv | 1.20.0 |
| vscode-manifest-yaml | Piv | 1.20.0 |
| vscode-spring-boot | Piv | 1.20.0 |
| vscode-jsp | pth | 0.0.3 |
| java | red | 0.65.0 |
| vscode-xml | red | 0.13.0 |
| vscode-iq-plugin | Son | 0.7.4 |
| vscodeintellicode | Vis | 1.2.10 |
| vscode-java-debug | vsc | 0.27.1 |
| vscode-java-dependency | vsc | 0.11.0 |
| vscode-java-pack | vsc | 0.10.0 |
| vscode-java-test | vsc | 0.24.0 |
| vscode-maven | vsc | 0.24.0 |
| vscode-spring-boot-dashboard | vsc | 0.1.10 |
| vscode-spring-initializr | vsc | 0.4.8 |
| markdown-all-in-one | yzh | 3.2.0 |
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
settings.json で java.autobuild.enabled を有効にし、Maven プロファイルを使用して、mvn clean package -Puat の実行後に生成された application.properties ファイルを比較することで、問題を再現します。VS Code の Java 自動ビルドのエントリポイントを追跡し、生成されたプロファイルが uat のままであり、VS Code 外で実行したビルドと一致することを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, spring-boot, vscode
- 領域
- build-system, tooling
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100