-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Description
Feature Request: Add Maven Project Support
Add Maven project import support to kotlin-lsp, enabling the Language Server to work with Maven-based Kotlin/Java projects in addition to the currently supported Gradle projects.
Currently, kotlin-lsp only supports Gradle JVM projects out-of-the-box (as noted in the README). Many JVM projects, use Maven as their build system.
Key Use Cases:
- Enterprise projects with established Maven infrastructure
- Mixed Java/Kotlin codebases using Maven
- Java projects migrating to Kotlin incrementally
- Projects that prefer Maven's declarative approach
- Legacy Java codebases adding Kotlin support
Trying to fill a need (knowing the repo doesn't accept direct contributions now)
1. Leverages Existing IntelliJ APIs
- Uses
org.jetbrains.idea.maven.project.MavenProjectReaderfor POM parsing - Adapts patterns from IntelliJ's
KotlinMavenImporterandKotlinMavenImporterEx - Ensures compatibility with IntelliJ Platform's Maven support
2. Follows GradleWorkspaceImporter Pattern
- Same entity structure (
ModuleEntity,LibraryEntity,KotlinSettingsEntity) - Same naming convention (
.mainand.testmodules) - Same error handling approach (
WorkspaceImportException)
3. Importer Order
Placed before GradleWorkspaceImporter because:
- Some projects have both
pom.xmland Gradle files - If Maven is present, it's typically the primary build system
- Users can override with
workspace.jsonif needed
4. Testing Approach
Follows existing test pattern:
- Imports Maven project → converts to
WorkspaceData - Compares with expected
workspace.json - Validates round-trip conversion
Related Issues/PRs
This addresses the roadmap item from README.md:
* [ ] Project import
* [x] Gradle JVM project import
* [ ] Maven/Amper import <-- This feature requestvsahav, idelice and miles-crightonAbertBenjaminvsahav
Metadata
Metadata
Assignees
Labels
No labels