RFR: JDK-8325441: IGV: update pom.xml such that IntelliJ can import as maven project

Tobias Holenstein tholenstein at openjdk.org
Thu Feb 15 12:05:14 UTC 2024


Currently IntelliJ does not import the pom.xml correctly:
- Java version in Module settings is not correct
- The the source roots (src/main/java) are not set correctly
- the pom.xml shows formating errors in IntelliJ

This PR fixes the pom.xml that it can be imported directly into an IDE as a modular maven project

### Intellij
Open IGV in Intellij:
1. "Open..." -> `src/utils/IdealGraphVisualizer/pom.xml` -> "Open as Project"
   - Right-click `IdealGraphVisualizer` -> "Open Module Settings"
   - Add Modules should be imported with the following settings
      - Langauge Level: `17`
      - Source Folders: `src/main/java`
      - Resource Folders: `src/main/resources`
      - Excluded Folders: `target` 
<img width="364" alt="modules" src="https://github.com/openjdk/jdk/assets/71546117/365cd355-5c51-44e7-a7fa-6fc36c983073">
      
2. "Add New Configuration" -> "Maven"
   - Run: `--batch-mode nbm:run-platform -f application/pom.xml` 
   - "Modify options" -> "Add before launch task" -> `clean install`
   - Java Options: choose a RFE version 17 - 21
<img width="921" alt="config" src="https://github.com/openjdk/jdk/assets/71546117/a272ef2e-e243-4d79-8ae2-ed6feb62fc96">
   
3. Run the configuration to start IGV

### NetBeans IDE
1. Open Project -> `src/utils/IdealGraphVisualizer`
2. Right-click on `IdealGraphVisualizer-app` -> "Run"
3. IGV should start up

### Eclipse 
1. "File" -> "Import..." -> "Maven" -> "Existing Maven Projects"
2. All modules should be imported 
3. Right-click on `IdealGraphVisualizer-parent/pom.xml` -> "Run As" -> "Maven build..." 
   - Goals: `--batch-mode nbm:run-platform -f application/pom.xml`
   - Run

-------------

Commit messages:
 - <maven.compiler.release>17
 - upgrade maven-compiler-plugin to 3.12.1
 - opens in IntelliJ as Project

Changes: https://git.openjdk.org/jdk/pull/17754/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17754&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8325441
  Stats: 149 lines in 20 files changed: 56 ins; 34 del; 59 mod
  Patch: https://git.openjdk.org/jdk/pull/17754.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/17754/head:pull/17754

PR: https://git.openjdk.org/jdk/pull/17754


More information about the hotspot-compiler-dev mailing list