Skip to content
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
358 commits
Select commit Hold shift + click to select a range
dad8a56
fix: change test atomization target group from 'verification' to 'test'
FrozenPandaz Sep 8, 2025
a9dab02
feat: implement CI targets with test atomization
FrozenPandaz Sep 8, 2025
6a94b1b
fix: remove parent POM task dependencies from dependency resolution
FrozenPandaz Sep 9, 2025
d0317ed
feat: add child module dependencies to parent POM tasks
FrozenPandaz Sep 9, 2025
3d4303a
feat: ensure dependencies use install phase for local repository avai…
FrozenPandaz Sep 9, 2025
196f4ea
fix: change install task dependencies to parent instead of dependencies
FrozenPandaz Sep 9, 2025
64f204a
fix: parent POMs should depend on children's install phase
FrozenPandaz Sep 9, 2025
b2ca2b8
fix: apply parent-child dependency logic to all packaging types
FrozenPandaz Sep 9, 2025
182ae3f
fix: restore compile-time dependencies and extend parent dependency l…
FrozenPandaz Sep 9, 2025
127219c
feat: replace hardcoded phase lists with dynamic phase detection
FrozenPandaz Sep 9, 2025
f6c08fb
refactor: simplify MavenDependencyResolver to match Maven's actual model
FrozenPandaz Sep 9, 2025
33832b8
feat: regenerate analysis with simplified dependency resolver
FrozenPandaz Sep 9, 2025
db92adc
refactor: simplify to just use install for all dependencies
FrozenPandaz Sep 9, 2025
4c6b848
cleanup: remove unused code from MavenDependencyResolver
FrozenPandaz Sep 9, 2025
ba35d0a
chore: update project files and dependencies
FrozenPandaz Sep 9, 2025
1b31997
fix: restore Maven wrapper detection logic
FrozenPandaz Sep 10, 2025
b83d112
feat: integrate mvnd (Maven Daemon) for faster builds
FrozenPandaz Sep 10, 2025
6fa42e4
fix: improve mvnd CI reliability and debugging
FrozenPandaz Sep 10, 2025
cd05439
feat: optimize nx verify performance by 90%
FrozenPandaz Sep 10, 2025
738de54
Revert "feat: optimize nx verify performance by 90%"
FrozenPandaz Sep 10, 2025
de2bfcb
fix: replace failing tests with new implementation-based tests
FrozenPandaz Sep 10, 2025
dbe245c
fix: make all tests pass
FrozenPandaz Sep 10, 2025
ecb027a
feat: add real integration tests that run analyzer on actual workspace
FrozenPandaz Sep 10, 2025
7cc698d
feat: optimize Maven analyzer performance by 95%
FrozenPandaz Sep 10, 2025
5ac11fd
feat: remove unused MinimalTestMojo
FrozenPandaz Sep 11, 2025
c7ed80e
refactor: use constructor injection for NxProjectAnalyzerSingleMojo d…
FrozenPandaz Sep 11, 2025
4b2ffb7
feat: parallelize project analysis using separate analyzer instances
FrozenPandaz Sep 11, 2025
845f239
refactor: include log and project in constructor injection
FrozenPandaz Sep 11, 2025
860b72e
refactor: rename analyzeProjectInMemory to analyze
FrozenPandaz Sep 11, 2025
3aa483b
fix: handle nullable destructuring in parallel analysis
FrozenPandaz Sep 11, 2025
97a943f
refactor: remove double null filtering with explicit cast
FrozenPandaz Sep 11, 2025
b6a1019
refactor: use filterNotNull for cleaner null handling
FrozenPandaz Sep 11, 2025
15c429a
refactor: eliminate intermediate collection with direct toMap()
FrozenPandaz Sep 11, 2025
c5608ec
refactor: rename NxProjectAnalyzerSingleMojo to NxProjectAnalyzer and…
FrozenPandaz Sep 11, 2025
0ad4394
feat: remove redundant NxWorkspaceGraphMojo and simplify to single an…
FrozenPandaz Sep 11, 2025
9747eba
feat: add target generation back to NxProjectAnalyzer
FrozenPandaz Sep 11, 2025
15d5902
refactor: combine analyzeSingleProject and generateNxProjectConfig me…
FrozenPandaz Sep 11, 2025
96d1619
refactor: eliminate method duplication by having generateNxProjectCon…
FrozenPandaz Sep 11, 2025
fce2cbb
refactor: reverse method call order so analyze() is called first, the…
FrozenPandaz Sep 11, 2025
d1e6a8d
refactor: restore original functionality while maintaining clean stru…
FrozenPandaz Sep 11, 2025
1ad06c8
refactor: make analyze() return complete analysis with Nx config
FrozenPandaz Sep 11, 2025
018eed0
refactor: simplify analyze() to return only Nx project config
FrozenPandaz Sep 11, 2025
eee8847
refactor: combine analyzeSingleProject and generateNxProjectConfig in…
FrozenPandaz Sep 11, 2025
9cdce61
refactor: simplify analyze() method complexity
FrozenPandaz Sep 11, 2025
405555a
refactor: extract plugin goals discovery into separate method
FrozenPandaz Sep 11, 2025
c5887de
refactor: trust Maven's phase discovery completely
FrozenPandaz Sep 11, 2025
da5a376
feat: add -am
FrozenPandaz Sep 11, 2025
ca5dd64
feat: inherit from Maven parent pom for better IDE support
FrozenPandaz Sep 11, 2025
9ece051
feat: ensure essential Maven lifecycle phases are always available
FrozenPandaz Sep 11, 2025
86c21e4
refactor: clean up MavenLifecycleAnalyzer with extracted methods
FrozenPandaz Sep 11, 2025
cd6d808
refactor: separate phase and goal discovery into focused methods
FrozenPandaz Sep 11, 2025
505090f
feat: ensure essential Maven lifecycle phases are always available
FrozenPandaz Sep 11, 2025
f503797
chore: refactor by hand
FrozenPandaz Sep 11, 2025
8329976
chore: refactor by hand
FrozenPandaz Sep 11, 2025
c4c2601
feat: optimize plugin analysis caching
FrozenPandaz Sep 12, 2025
70a4d34
refactor: organize plugin analysis classes into plugin package
FrozenPandaz Sep 12, 2025
29f7692
refactor: move getPlugins to PluginExecutionFinder as getExecutablePl…
FrozenPandaz Sep 12, 2025
5fec8b8
feat: add findExecutionsForPhaseFromPlugins method
FrozenPandaz Sep 12, 2025
c8dfd87
refactor: rename MavenLifecycleAnalyzer to NxTargetFactory and improv…
FrozenPandaz Sep 12, 2025
f4bb90f
chore: fix config
FrozenPandaz Sep 12, 2025
853dc89
fix: resolve test compilation errors in Maven analyzer plugin
FrozenPandaz Sep 12, 2025
66b467c
fix: resolve Maven analyzer plugin dependency issues
FrozenPandaz Sep 12, 2025
d316fb7
refactor: remove unused dependencies from analyzer plugin
FrozenPandaz Sep 12, 2025
48f4c93
delete tests
FrozenPandaz Sep 12, 2025
81da46f
fix: remove Maven 4.1.0 version prerequisite from analyzer plugin
FrozenPandaz Sep 12, 2025
dd37417
refactor: migrate from Maven logging to SLF4J
FrozenPandaz Sep 12, 2025
4317705
refactor: create TestClassInfo data class
FrozenPandaz Sep 12, 2025
f0d7556
refactor: improve TestClassDiscovery method naming
FrozenPandaz Sep 12, 2025
6fa99c0
refactor: improve PhaseAnalyzer parameter detection logic
FrozenPandaz Sep 13, 2025
47689c2
refactor: simplify parameter analysis by removing confidence scoring
FrozenPandaz Sep 13, 2025
5983414
feat: add cacheability detection and refactor parameter analysis
FrozenPandaz Sep 13, 2025
90b1110
refactor: remove unnecessary ParameterAnalysis wrapper class
FrozenPandaz Sep 13, 2025
3adbef9
Configure Maven analyzer plugin for debugging
FrozenPandaz Sep 13, 2025
70c0e84
feat: add comprehensive unit testing infrastructure for PhaseAnalyzer
FrozenPandaz Sep 13, 2025
a8820b2
feat: implement working unit tests and improve NxTargetFactory
FrozenPandaz Sep 13, 2025
3b460fb
feat: integrate JGit-based gitignore classification for Maven parameters
FrozenPandaz Sep 13, 2025
c71efc6
fix(analyzer-plugin): remove maven-compat dependency
FrozenPandaz Sep 13, 2025
c1ab302
wip
FrozenPandaz Sep 15, 2025
c02cd71
wip
FrozenPandaz Sep 15, 2025
7414fbb
perf: optimize Maven analysis with parallel processing and caching
FrozenPandaz Sep 16, 2025
988fa3a
cleanup
FrozenPandaz Sep 16, 2025
f04ab3e
cleanup
FrozenPandaz Sep 16, 2025
7a60535
cleanup
FrozenPandaz Sep 16, 2025
7474322
fix: remove parent inheritance from analyzer plugin to avoid SNAPSHOT…
FrozenPandaz Sep 16, 2025
ebd5e9c
cleanup
FrozenPandaz Sep 16, 2025
067c863
cleanup
FrozenPandaz Sep 16, 2025
e852f5f
cleanup
FrozenPandaz Sep 16, 2025
b3b03ad
wip
FrozenPandaz Sep 16, 2025
cb53b00
wip
FrozenPandaz Sep 16, 2025
4c0deb4
wip
FrozenPandaz Sep 16, 2025
95cb654
wip
FrozenPandaz Sep 16, 2025
b3e087f
add plugin knowledge base
FrozenPandaz Sep 16, 2025
9d768ce
cleanup
FrozenPandaz Sep 16, 2025
5cac1ed
cleanup
FrozenPandaz Sep 16, 2025
9df7be6
add clean command
FrozenPandaz Sep 16, 2025
970f5f4
refactor
FrozenPandaz Sep 16, 2025
4fc862f
cleanup
FrozenPandaz Sep 16, 2025
4913b4b
refactor
FrozenPandaz Sep 16, 2025
5031143
refactor
FrozenPandaz Sep 16, 2025
925326c
fix phase
FrozenPandaz Sep 16, 2025
08a642f
start utilizing goals in task graph
FrozenPandaz Sep 16, 2025
a44bc47
keep utilizing goals in task graph
FrozenPandaz Sep 17, 2025
2cd72fa
try not using goals
FrozenPandaz Sep 17, 2025
1eb863c
wip
FrozenPandaz Sep 17, 2025
43caab9
use goal prefix
FrozenPandaz Sep 17, 2025
82b55c7
Add -X -e flags to Maven goal commands for better debugging
FrozenPandaz Sep 18, 2025
0e04f8c
wip
FrozenPandaz Sep 18, 2025
32c2f1d
attachment goal
FrozenPandaz Sep 18, 2025
14854f3
feat: add build state recording and reapply mojos
FrozenPandaz Sep 18, 2025
81490aa
feat: implement cumulative build state merging and goal configurations
FrozenPandaz Sep 18, 2025
6b65e94
docs: update goal prefix and document recent implementations
FrozenPandaz Sep 18, 2025
08a430d
refactor: simplify build state configuration using sets
FrozenPandaz Sep 18, 2025
39a67c6
feat: add japicmp:cmp to goals requiring build state apply
FrozenPandaz Sep 18, 2025
8c577ef
feat: add resources and generated sources to build state
FrozenPandaz Sep 19, 2025
17993eb
feat: enhance build state with output directories and classpaths
FrozenPandaz Sep 19, 2025
6807f18
fix: remove cumulative build state merging to prevent duplicates
FrozenPandaz Sep 19, 2025
9d00f67
refactor: transform individual goal targets to bundled phase targets
FrozenPandaz Sep 19, 2025
4b879be
feat: add individual goal targets alongside bundled phase targets
FrozenPandaz Sep 19, 2025
523a8e2
chore: remove attach mojo
FrozenPandaz Sep 19, 2025
3cc0e93
comment out caching for now
FrozenPandaz Sep 19, 2025
ce791bc
misc fixes
FrozenPandaz Sep 19, 2025
b6792fc
add more phase aliases
FrozenPandaz Sep 19, 2025
1e4bebc
refactor: rename nx-maven-analyzer-plugin to nx-maven-plugin
FrozenPandaz Sep 19, 2025
06cf883
feat: enhance nx maven plugin with automatic dependency build state a…
FrozenPandaz Sep 19, 2025
01d6056
fix: apply build state to all projects instead of just dependencies
FrozenPandaz Sep 19, 2025
95f43d1
fix: use full plugin coordinates for apply and record goals
FrozenPandaz Sep 20, 2025
c80b50a
refactor: integrate Maven build cache extension format for plugin ana…
FrozenPandaz Sep 20, 2025
265f6f7
refactor: eliminate PhaseAnalyzer by moving logic directly to NxTarge…
FrozenPandaz Sep 20, 2025
f08f777
feat: enhance caching with Maven conventions and encapsulate analysis…
FrozenPandaz Sep 20, 2025
ee6e902
refactor: clean up parameter analysis and simplify API
FrozenPandaz Sep 20, 2025
bcb1565
refactor: simplify NxTargetFactory constructor by removing expression…
FrozenPandaz Sep 20, 2025
f9623e5
refactor: centralize mojo descriptor helpers
FrozenPandaz Sep 20, 2025
2309bb1
refactor: consolidate mojo analysis pipeline
FrozenPandaz Sep 21, 2025
d385021
Aggregate phase analyses for Nx targets
FrozenPandaz Sep 21, 2025
e3de4b1
refactor: localize mojo descriptor lookup
FrozenPandaz Sep 21, 2025
67885cb
refactor: internalize mojo descriptor lookup
FrozenPandaz Sep 21, 2025
384fab8
refactor: split fallback paths into constants
FrozenPandaz Sep 21, 2025
c3d35bf
feat: enrich nx cache metadata with maven defaults
FrozenPandaz Sep 22, 2025
ba6cf00
remove unsupported inputs
FrozenPandaz Sep 22, 2025
3f75220
refactor: eliminate duplicate build state application
FrozenPandaz Sep 22, 2025
a28bd84
fix: resolve Maven build cache dependency injection errors
FrozenPandaz Sep 22, 2025
2d7e012
Revert "fix: resolve Maven build cache dependency injection errors"
FrozenPandaz Sep 22, 2025
a3ddf4a
misc fixes
FrozenPandaz Sep 22, 2025
52d693b
revert: restore working nx-maven-plugin with build cache limitation
FrozenPandaz Sep 22, 2025
bb16e9b
cleanup
FrozenPandaz Sep 22, 2025
1e26635
cleanup
FrozenPandaz Sep 22, 2025
8e84ead
refactor: replace PluginKnowledge with MojoAnalyzer and implement cus…
FrozenPandaz Sep 22, 2025
94036e4
cleanup: remove unused components and reorganize build state classes
FrozenPandaz Sep 22, 2025
a87ea6d
refactor: organize target creation classes into targets package
FrozenPandaz Sep 22, 2025
1319a85
refactor: organize Maven utility classes into utils package
FrozenPandaz Sep 22, 2025
0168297
cache inputs wip
FrozenPandaz Sep 23, 2025
3ef62e4
cleanup
FrozenPandaz Sep 23, 2025
435fbf4
fix: GitIgnoreClassifier to work with non-existent paths
FrozenPandaz Sep 23, 2025
dcd0866
cleanup
FrozenPandaz Sep 23, 2025
816e63a
Rework cache config
FrozenPandaz Sep 23, 2025
0ae59e1
Update cache config
FrozenPandaz Sep 23, 2025
3e85de2
fix: improve parallel stream error handling with detailed logging
FrozenPandaz Sep 24, 2025
e885ff2
Stop tracking .tsbuildinfo files
FrozenPandaz Sep 24, 2025
4139e57
fix: improve CI phase dependency resolution and target generation
FrozenPandaz Sep 24, 2025
87c593d
fix: update nx version workflow and package dependencies
FrozenPandaz Sep 24, 2025
10fd34d
feat: generate complete CI phase targets for Maven projects
FrozenPandaz Sep 24, 2025
0941c1a
cleanup(gradle): post import fixes
FrozenPandaz Sep 26, 2025
1208e92
fix(maven): sort executions so that goals are in priority order
FrozenPandaz Sep 26, 2025
5fb20ce
docs(maven): add docs for maven
FrozenPandaz Sep 27, 2025
732ab42
cleanup(maven): run prettier
FrozenPandaz Sep 27, 2025
46aa5cc
chore(repo): avoid modifying maven during release
FrozenPandaz Sep 27, 2025
ff97144
fix(maven): fix caching?
FrozenPandaz Sep 27, 2025
c00f66d
fix(maven): update generator to use correct 1.0.0-SNAPSHOT version
FrozenPandaz Sep 27, 2025
dbfc4bf
chore(maven): add maven e2e tests
FrozenPandaz Sep 29, 2025
6418155
feat(maven): prepare maven plugin for release
FrozenPandaz Sep 29, 2025
1b700cd
chore(maven): add setup and teardown to e2e tests
FrozenPandaz Sep 30, 2025
f1deee2
chore(maven): fix logging and e2e tests
FrozenPandaz Oct 1, 2025
11ad480
chore(maven): rename analyzer-plugin to maven-plugin and improve e2e …
FrozenPandaz Oct 2, 2025
48ea8f3
chore(maven): refactor test suite and add analyzer tests
FrozenPandaz Oct 2, 2025
cea0515
chore(maven): configure Maven Central publishing
FrozenPandaz Oct 3, 2025
ace72ca
fix(maven): ensure modello-generated sources are properly cached and …
FrozenPandaz Oct 3, 2025
a908889
chore(maven): update version to 0.0.1
FrozenPandaz Oct 3, 2025
eecdbd6
fix(misc): improve output path resolution for local build executor
barbados-clemens Oct 3, 2025
72bb6a1
fix(maven): copy generators.json and executors.json to dist folder
FrozenPandaz Oct 6, 2025
b427f0f
fix(maven): add Maven Central required metadata and explicit dependen…
FrozenPandaz Oct 6, 2025
e892960
fix(maven): replace revision property with explicit version for Maven…
FrozenPandaz Oct 6, 2025
dda458e
fix(maven): add flatten-maven-plugin to resolve version properties fo…
FrozenPandaz Oct 6, 2025
57ee8ce
fix(maven): replace maven-javadoc-plugin with dokka for Kotlin docume…
FrozenPandaz Oct 6, 2025
3ec5d88
chore(repo): checkout nx-release.ts from master
FrozenPandaz Oct 6, 2025
7e4251c
fix(maven): add missing npm package metadata fields
FrozenPandaz Oct 6, 2025
cd9d373
chore(repo): add mvn wrapper
FrozenPandaz Oct 6, 2025
7aa6498
feat(core): add Maven detection to nx init
FrozenPandaz Oct 6, 2025
2d918bf
docs(nx-dev): restructure Java sidebar to include both Gradle and Maven
FrozenPandaz Oct 6, 2025
fa5e788
docs(nx-dev): reorganize Java docs to treat Gradle and Maven equally
FrozenPandaz Oct 6, 2025
f9bfea0
fix(nx-dev): correct links in Java introduction page
FrozenPandaz Oct 6, 2025
21aa0b3
fix(nx-dev): add index pages for Gradle and Maven subdirectories
FrozenPandaz Oct 6, 2025
5205283
chore(misc): fix publishing
FrozenPandaz Oct 6, 2025
fa5ac66
docs(nx-dev): add java introduction page to sidebar
barbados-clemens Oct 7, 2025
848ddf7
feat(maven): skip noop phases in CI task graph
FrozenPandaz Oct 15, 2025
5ae552b
chore(maven): add maven-flatten-plugin for distribution
FrozenPandaz Oct 15, 2025
ad9b315
chore(maven): output flattened POM to target directory
FrozenPandaz Oct 15, 2025
0056d95
feat(maven): remove version from plugin invocation
FrozenPandaz Oct 15, 2025
a242a1f
feat(maven): always include verify-ci as structural phase
FrozenPandaz Oct 15, 2025
a9612f3
chore(repo): update maven projects version
FrozenPandaz Oct 15, 2025
6d9e1d6
fix(maven): fix test tasks
FrozenPandaz Oct 15, 2025
89f67b1
chore(maven): bump version
FrozenPandaz Oct 15, 2025
285d360
fix(maven): ensure test-ci depends on phase targets and atomized tests
FrozenPandaz Oct 15, 2025
6289a57
chore(maven): bump version to 0.0.4
FrozenPandaz Oct 15, 2025
6d757d8
fix(maven): ensure test-ci is always a noop target
FrozenPandaz Oct 16, 2025
1f9de32
chore(maven): bump version to 0.0.5
FrozenPandaz Oct 16, 2025
f688f2a
fix(maven): include all compile source roots in target inputs
FrozenPandaz Oct 16, 2025
19fc762
fix(maven): include generated sources in compiler:compile inputs
FrozenPandaz Oct 16, 2025
41ad504
fix(maven): include all classpath elements, not just JARs
FrozenPandaz Oct 16, 2025
397c84e
chore(maven): bump version to 0.0.6-SNAPSHOT
FrozenPandaz Oct 16, 2025
55d38a0
feat(maven): add performance timing to build state mojos
FrozenPandaz Oct 16, 2025
43b9f53
feat(maven): optimize build state apply to only scan dependencies
FrozenPandaz Oct 16, 2025
a8e59ae
fix(maven): apply artifacts without file existence check
FrozenPandaz Oct 16, 2025
2236c25
fix(maven): add back isFile check for attached artifacts
FrozenPandaz Oct 16, 2025
3c0396c
fix(maven): only record attached artifacts that have files
FrozenPandaz Oct 16, 2025
90c9fa5
fix(maven): revert to checking all projects for faster build state apply
FrozenPandaz Oct 16, 2025
9234f17
fix(maven): only record main artifacts that exist on disk
FrozenPandaz Oct 16, 2025
d9d2c7b
fix(maven): only record and apply artifacts that exist on disk
FrozenPandaz Oct 16, 2025
049055d
fix(maven): update tests to use dynamic version and add Maven CI setup
FrozenPandaz Oct 16, 2025
896eb74
chore(repo): fix e2e failures
FrozenPandaz Oct 16, 2025
d315663
feat(maven): re-enable mvnd detection in maven command resolver
FrozenPandaz Oct 17, 2025
30ecc98
fix(maven): mock execSync in tests to handle mvnd detection
FrozenPandaz Oct 17, 2025
5f4e57f
feat(maven): record build state with relative paths and apply as abso…
FrozenPandaz Oct 17, 2025
bdc627e
chore(repo): remove docs/generated
FrozenPandaz Oct 17, 2025
c61c99b
chore(maven): add maven to astro-docs build
FrozenPandaz Oct 17, 2025
a92fbd9
chore(maven): fix e2e tests
FrozenPandaz Oct 17, 2025
103f2e7
chore(repo): add debug
FrozenPandaz Oct 18, 2025
6d89322
fix(maven): add chmod to make mvnw files executable in e2e tests
FrozenPandaz Oct 18, 2025
0a3d646
chore(maven): format create-maven-project.ts
nx-cloud[bot] Oct 18, 2025
616ba1f
chore(repo): add nx-maven-plugin:install dependency to e2e targets
FrozenPandaz Oct 18, 2025
4f5357d
chore(repo): format nx-release.ts with trailing comma
nx-cloud[bot] Oct 18, 2025
d74b51e
docs(maven): document Java 17 and Maven 3.6.0 requirements
FrozenPandaz Oct 20, 2025
f62a9ee
chore(maven): clean up NxBuildStateApplyMojo
FrozenPandaz Oct 20, 2025
ca7e958
chore(maven): clean up NxBuildStateRecordMojo
FrozenPandaz Oct 20, 2025
7f46995
chore(maven): clean up PathUtils
FrozenPandaz Oct 20, 2025
691b3a6
chore(maven): refactor createNxTargets with pure helper functions
FrozenPandaz Oct 20, 2025
8f2217c
chore(maven): extract processLifecyclePhases method
FrozenPandaz Oct 20, 2025
e88fa0a
chore(maven): fix comment in createNxTargets
FrozenPandaz Oct 20, 2025
7a28d9e
chore(maven): split processLifecyclePhases into separate concerns
FrozenPandaz Oct 20, 2025
6690b45
chore(maven): update TestClassDiscovery comments
FrozenPandaz Oct 20, 2025
a8a290f
chore(maven): clean up MavenCommandResolver
FrozenPandaz Oct 20, 2025
7ad922a
chore(maven): clean up code across analyzer utilities
FrozenPandaz Oct 20, 2025
5a5b7d0
fix(maven): replace vulnerable xmldom with @xmldom/xmldom
FrozenPandaz Oct 20, 2025
054f1af
chore(maven): clean up plugin files
FrozenPandaz Oct 20, 2025
24e9d5d
chore(maven): clean up nodes.ts
FrozenPandaz Oct 20, 2025
e6aa0c1
chore(repo): temporarily remove changes to nx-release.ts
FrozenPandaz Oct 20, 2025
7d92a69
Revert "chore(repo): temporarily remove changes to nx-release.ts"
FrozenPandaz Oct 20, 2025
a3f8721
docs(maven): update README files
FrozenPandaz Oct 20, 2025
40fe113
chore(maven): clean up PathFormatter and type definitions
FrozenPandaz Oct 20, 2025
c324395
feat(maven): add conditional analyzer build on SKIP_ANALYZER_BUILD en…
FrozenPandaz Oct 20, 2025
ab33bbc
chore(maven): add maven package reviewers to CODEOWNERS
FrozenPandaz Oct 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ jobs:
with:
distribution: temurin
java-version: 17
cache: maven

- name: Setup Gradle
uses: gradle/actions/setup-gradle@48b5f213c81028ace310571dc5ec0fbbca0b2947 # v4.4.3
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ out
.profile
.rustup/
target
.flattened-pom.xml
*.wasm
/wasi-sdk*

Expand Down Expand Up @@ -111,6 +112,8 @@ node_modules/

astro-docs/.netlify

coverage

# Angular Rspack Specific Options
packages/angular-rspack/coverage
packages/angular-rspack-compiler/coverage
Expand All @@ -119,6 +122,7 @@ packages/angular-rspack-compiler/coverage
packages/angular-rspack/README.md
packages/angular-rspack-compiler/README.md
packages/dotnet/README.md
packages/maven/README.md

test-output
test-results
Expand Down
3 changes: 3 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
wrapperVersion=3.3.4
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
4 changes: 2 additions & 2 deletions astro-docs/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"continuous": true,
"dependsOn": [
{
"projects": ["devkit", "create-nx-workspace", "dotnet"],
"projects": ["devkit", "create-nx-workspace", "dotnet", "maven"],
"target": "build"
}
],
Expand All @@ -19,7 +19,7 @@
"build": {
"dependsOn": [
{
"projects": ["devkit", "create-nx-workspace", "dotnet"],
"projects": ["devkit", "create-nx-workspace", "dotnet", "maven"],
"target": "build"
}
],
Expand Down
18 changes: 16 additions & 2 deletions astro-docs/sidebar.mts
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,22 @@ export const sidebar: StarlightUserConfig['sidebar'] = [
{
label: 'Java',
collapsed: true,
// when we have maven this will change to not have gradle as the top docs for Java
items: getPluginItems('gradle', 'java'),
items: [
{
label: 'Introduction',
link: 'technologies/java/introduction',
},
{
label: 'Gradle',
collapsed: true,
items: getPluginItems('gradle', 'java'),
},
{
label: 'Maven',
collapsed: true,
items: getPluginItems('maven', 'java'),
},
],
},
{
label: '.NET',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Gradle
sidebar:
hidden: true
description: Using Gradle with Nx
pagefind: false
---

{% index_page_cards path="technologies/java/gradle" /%}
Original file line number Diff line number Diff line change
@@ -0,0 +1,301 @@
---
title: Overview of the Nx Plugin for Gradle
description: This plugin allows Gradle tasks to be run through Nx.
sidebar:
label: 'Introduction'
filter: 'type:References'
---

[Gradle](https://gradle.org/) is a fast, dependable, and adaptable open-source build automation tool with an elegant and extensible declarative build language. Gradle supports Android, Java, Kotlin Multiplatform, Groovy, Scala, Javascript, and C/C++.

The Nx plugin for Gradle registers Gradle projects in your Nx workspace. It allows Gradle tasks to be run through Nx. Nx effortlessly makes your [CI faster](/docs/guides/nx-cloud/setup-ci).

Nx adds the following features to your workspace:

- [Cache task results](/docs/features/cache-task-results)
- [Distribute task execution](/docs/features/ci-features/distribute-task-execution)
- [Run only tasks affected by a PR](/docs/features/ci-features/affected)
- [Interactively explore your workspace](/docs/features/explore-graph)

{% aside type="note" title="Java Compatibility" %}
This plugin requires Java 17 or newer. Using older Java versions is unsupported and may lead to issues. If you need support for an older version, please create an issue on [Github](https://github.com/nrwl/nx)!
{% /aside %}

## Setup @nx/gradle

### Install Nx

You can install Nx globally. Depending on your package manager, use one of the following commands:

{% tabs syncKey="package-manager" %}
{% tabitem label="npm" %}

```shell {% frame="none" %}
npm add --global nx@latest
```

{% /tabitem %}
{% tabitem label="Homebrew (macOS, Linux)" %}

```shell {% frame="none" %}
brew install nx
```

{% /tabitem %}
{% tabitem label="Chocolatey (Windows)" %}

```shell {% frame="none" %}
choco install nx
```

{% /tabitem %}
{% tabitem label="apt (Ubuntu)" %}

```shell {% frame="none" %}
sudo add-apt-repository ppa:nrwl/nx
sudo apt update
sudo apt install nx
```

{% /tabitem %}
{% /tabs %}

### Add Nx to a Gradle Workspace

In any Gradle workspace, run the following command to add Nx and the `@nx/gradle` plugin:

```shell {% frame="none" %}
nx init
```

Then, you can run Gradle tasks using Nx. For example:

```shell {% frame="none" %}
nx build <your gradle library>
```

## How @nx/gradle Infers Tasks

The `@nx/gradle` plugin relies on a companion Gradle plugin, `dev.nx.gradle.project-graph`, to analyze your Gradle build structure. When using `nx add`, the Gradle plugin is added as a dependency to the root Gradle build file. In most cases, the generator will add the task definition to trigger the plugin but if it's missing, add the following configuration to your Gradle configuration:

{% tabs syncKey="java-lang" %}
{% tabitem label="build.gradle.kts" %}

```kotlin
// build.gradle.kts
plugins {
id("dev.nx.gradle.project-graph") version("+")
}

allprojects {
apply {
plugin("dev.nx.gradle.project-graph")
}
}
```

{% /tabitem %}
{% tabitem label="build.gradle" %}

```groovy
// build.gradle
plugins {
id 'dev.nx.gradle.project-graph' version '+'
}

allprojects {
apply plugin: 'dev.nx.gradle.project-graph'
}
```

{% /tabitem %}
{% /tabs %}

The `dev.nx.gradle.project-graph` plugin introduces a task named `nxProjectGraph`. This task analyzes your Gradle projects and their tasks, outputting the structure as JSON. The `@nx/gradle` plugin then uses this JSON data to accurately build the Nx project graph. If Nx has any issue generate the project graph JSON, you can run the `nxProjectGraph` task manually:

{% tabs syncKey="os" %}
{% tabitem label="Mac OS/Linux" %}

```shell {% frame="none" %}
./gradlew nxProjectGraph
```

{% /tabitem %}
{% tabitem label="Windows" %}

```shell {% frame="none" %}
.\gradlew.bat nxProjectGraph
```

{% /tabitem %}
{% /tabs %}

## View Inferred Tasks

To view inferred tasks for a project, open the [project details view](/docs/features/explore-graph#explore-projects-in-your-workspace) in Nx Console or run `nx show project my-project` in the command line.

## Setting Up @nx/gradle in a Nx Workspace

In any Nx workspace, you can install `@nx/gradle` by running the following command:

```shell {% frame="none" %}
nx add @nx/gradle
```

## @nx/gradle Configuration

The `@nx/gradle` is configured in the `plugins` array in `nx.json`.

```json
// nx.json
{
"plugins": [
{
"plugin": "@nx/gradle",
"options": {
"testTargetName": "test",
"classesTargetName": "classes",
"buildTargetName": "build",
"ciTestTargetName": "test-ci",
"ciIntTestTargetName": "intTest-ci"
}
}
]
}
```

Once a Gradle configuration file has been identified, the targets are created with the name you specify under `testTargetName`, `classesTargetName` or `buildTargetName` in the `nx.json` `plugins` array. The default names for the inferred targets are `test`, `classes` and `build`.

### Test Distribution

Nx provides powerful features for distributing tasks in CI, including test splitting (also known as atomization) and optimized build targets. For Gradle projects, this is facilitated by the `@nx/gradle` plugin, allowing you to run your tests and builds more efficiently in your Continuous Integration (CI) environment.

#### How to Set Up Test Distribution (Atomizer) in CI

To enable test distribution for your Gradle projects in CI, follow these steps:

1. **Generate CI Workflow**: Run the `ci-workflow` generator to set up the necessary CI configurations. This generator creates a GitHub Actions workflow file that integrates with Nx's distributed task execution capabilities.

```shell {% frame="none" %}
nx g @nx/gradle:ci-workflow
```

This command will generate a workflow file (e.g., `.github/workflows/ci.yml`) tailored for your Nx workspace with Gradle projects.

2. **Configure `nx.json` for Atomizer**: Add or ensure the presence of `ciTestTargetName` or `ciIntTestTargetName` in the `@nx/gradle` plugin options within your `nx.json`.

```json {% meta="{7,8}" %}
// nx.json
{
"plugins": [
{
"plugin": "@nx/gradle",
"options": {
"ciTestTargetName": "test-ci",
"ciIntTestTargetName": "intTest-ci"
}
}
]
}
```

Setting these options turns on the atomizer feature in CI. Nx will automatically split your testing tasks (unit and integration tests, respectively) by test class, allowing them to be run in a distributed fashion across your CI agents.

3. **Update CI Workflow Command**: In your generated CI workflow file, modify the command used to run affected tasks. Instead of using a generic `build` target, leverage the `build-ci` target provided by the `@nx/gradle` plugin:

```shell {% frame="none" %}
# Before:
# ./nx affected --base=$NX_BASE --head=$NX_HEAD -t build

# After:
./nx affected --base=$NX_BASE --head=$NX_HEAD -t build-ci
```

This ensures that your CI pipeline utilizes the optimized `build-ci` target, which is designed to integrate seamlessly with Nx's test distribution and caching mechanisms.

#### The `ci-workflow` Generator

The `@nx/gradle:ci-workflow` generator is a utility that automates the setup of a CI workflow for your Nx workspace containing Gradle projects. It creates a `.github/workflows` file (or equivalent for other CI providers) that includes steps for checking out code, setting up Java and Gradle, restoring caches, and running affected Nx tasks. Its primary purpose is to streamline the integration of Nx's CI features, such as distributed task execution and caching, into your existing CI pipeline.

#### The `build-ci` Target

The `@nx/gradle` plugin can create a `build-ci` target that is specifically designed for use in CI environments. This target allows for a more optimized and consistent build process by ensuring that the `check` task is rewired to its CI counterpart (`check-ci`), which also implies that test tasks (`test` and `intTest`) are rewired to their atomized `test-ci` and `intTest-ci` counterparts respectively.

##### What is it?

The `build-ci` target is a synthetic Nx target that acts as a placeholder for your Gradle `build` task in a CI context. Instead of directly running the `build` task, the `build-ci` target ensures that the `check` task (a dependency of `build`) first executes its CI-optimized version (`check-ci`), which in turn uses the split/atomized test tasks (`test-ci`, `intTest-ci`). This allows for distributed execution of tests and efficient caching in CI.

##### How to Enable?

To enable the `build-ci` target, you need to configure `ciTestTargetName` or `ciIntTestTargetName` in the `@nx/gradle` plugin options in your `nx.json`.

For example:

```json
// nx.json
{
"plugins": [
{
"plugin": "@nx/gradle",
"options": {
"ciTestTargetName": "test-ci",
"ciBuildTargetName": "build-ci"
}
}
]
}
```

When `ciTestTargetName` (or `ciIntTestTargetName`) is set, the `build-ci` target is automatically created if the `build` task exists for a given Gradle project.

##### Expected Behavior

When you run `nx build-ci <your-gradle-project>`, Nx will:

1. Execute the `check-ci` task (if defined) instead of the standard `check` task.
2. The `check-ci` task will, in turn, trigger the atomized test tasks (`test-ci` and `intTest-ci`) if they are configured.
3. The `build-ci` target itself will use the `nx:noop` executor, meaning it doesn't execute a direct Gradle command, but rather relies on its dependencies (`check-ci`) to orchestrate the build process in a CI-friendly manner.
4. The `build-ci` target is cacheable.

This setup ensures that your build process in CI leverages Nx's caching and distribution capabilities effectively.

##### How to Turn it Off?

To disable the `build-ci` target, simply remove the `ciBuildTargetName` option from the `@nx/gradle` plugin configuration in your `nx.json` file. If `ciTestTargetName` and `ciIntTestTargetName` are also removed, then the special CI targets for tests and check will also be turned off.

### Continuous Tasks

Gradle doesn't have a standard way to identify tasks which are [continuous](/docs/reference/project-configuration#continuous), like `bootRun` for serving a Spring Boot project. To ensure Nx handles these continuous tasks correctly, you can explicitly mark them as continuous.

{% tabs %}
{% tabitem label="nx.json" %}

In the `nx.json`, you can specify the target default configuration like so:

```json {% meta="{5}" %}
// nx.json
{
"targetDefaults": {
"someTask": {
"continuous": true
}
}
}
```

{% /tabitem %}
{% tabitem label="project.json" %}

In a `project.json`, you can specify the target configuration like so:

```json {% meta="{4}" %}
// project.json
{
"someTask": {
"continuous": true
}
}
```

{% /tabitem %}
{% /tabs %}
Loading
Loading