дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-03 16:51:16 +02:00
feat(java): project-level Maven compile goals to ignore (#7479)
A goal bound to the compile phase that local runs don't need (maven-jar-plugin:jar and the like) made the build fall back from the built-in incremental javac to Maven. languages.java.maven.ignoredCompileGoals lists exact groupId:artifactId:goal entries to skip in that decision; the default empty list keeps the old behaviour, and Gradle, dependency and compiler checks are unchanged. Covered by a real Maven reactor test and documented in the Java build README. Co-authored-by: rolicon <[email protected]>
Цей коміт міститься в:
1 джерело
0f359ddf3b
коміт
90f9d4ffd0
10 files changed
+201
-12
No files matched your search
@@ -26,6 +26,26 @@ The IDE's own build of Maven and Gradle modules (`ide_build::jbuild`). The jar h
|
||||
OpenIDEA runs `mvn process-resources resources:testResources` with the extension when the POMs,
|
||||
settings or generator inputs change, then compiles the launch's modules with the server.
|
||||
|
||||
### Ignoring Maven goals during IDE compilation
|
||||
|
||||
When the project binds a goal to a compile phase and local runs can skip its output, add the
|
||||
goal to the project's `.openidea/settings.toml`. For example, local runs may not need a release JAR.
|
||||
|
||||
```toml
|
||||
[languages.java.maven]
|
||||
delegateBuild = false
|
||||
ignoredCompileGoals = ["org.apache.maven.plugins:maven-jar-plugin:jar"]
|
||||
```
|
||||
|
||||
The list defaults to empty. Each entry matches all executions of exactly one `groupId:artifactId:goal`
|
||||
in `compile`, `process-classes`, `test-compile` or `process-test-classes`. The IDE's javac build skips
|
||||
those executions. Leave out goals whose output local runs require, including bytecode enhancement,
|
||||
compilation of another language and source generation.
|
||||
|
||||
The IDE reads the list on every build, including builds that use a cached model. The project list
|
||||
overrides the global list. Set `ignoredCompileGoals = []` to clear inherited entries. This applies
|
||||
only to the IDE's Maven javac build. Dependency and resource preparation can still invoke Maven.
|
||||
|
||||
Gradle builds get the same model from an init script instead
|
||||
(`crates/ide-build/src/jbuild/gradle-build.init.gradle`, task `openideaBuildModel`, with
|
||||
`-Popenidea.build.output` and `-Popenidea.build.model`), when Settings › Gradle › Build and run
|
||||
|
||||
Reference in new issue
Заблокувати користувача