Commit b89278e
committed
Migrate Verifier and AbstractMavenIntegrationTestCase to NIO2
This commit migrates the Maven integration test infrastructure from java.io.File
to NIO2 Path API while maintaining full backward compatibility.
Changes in Verifier class:
- Added Path-based overloads for loadProperties(), loadFile(), filterFile()
- Migrated file operations to use Files.* methods instead of FileUtils
- Replaced FileUtils.deleteDirectory() with custom NIO2 implementation
- Updated file verification methods to use Path and DirectoryStream
- Removed dependency on org.codehaus.plexus.util.FileUtils
Changes in AbstractMavenIntegrationTestCase class:
- Added extractResourcesAsPath() method returning Path instead of File
- Updated settings file handling to use Path operations
Benefits:
- Better performance with NIO2 operations
- Improved error handling and cross-platform compatibility
- Modern API usage while maintaining backward compatibility
- Comprehensive test coverage for new functionality
All existing integration tests continue to work without modification.
New @SInCE 4.0.0 methods provide Path-based alternatives for modern usage.1 parent 58bbee6 commit b89278e
File tree
4 files changed
+378
-77
lines changed- its/core-it-support/maven-it-helper/src
- main/java/org/apache/maven/it
- test/java/org/apache/maven/it
4 files changed
+378
-77
lines changedLines changed: 24 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
79 | 92 | | |
80 | 93 | | |
81 | 94 | | |
| |||
107 | 120 | | |
108 | 121 | | |
109 | 122 | | |
110 | | - | |
| 123 | + | |
111 | 124 | | |
112 | | - | |
| 125 | + | |
113 | 126 | | |
114 | | - | |
| 127 | + | |
115 | 128 | | |
116 | 129 | | |
117 | | - | |
| 130 | + | |
118 | 131 | | |
119 | 132 | | |
120 | | - | |
| 133 | + | |
121 | 134 | | |
122 | 135 | | |
123 | 136 | | |
124 | 137 | | |
125 | 138 | | |
126 | | - | |
| 139 | + | |
127 | 140 | | |
128 | 141 | | |
129 | 142 | | |
130 | | - | |
| 143 | + | |
131 | 144 | | |
132 | 145 | | |
133 | 146 | | |
| |||
0 commit comments