@@ -166,6 +166,17 @@ void whenAotRunsWithClassProxyClassesAreCopiedToTargetClasses(MavenBuild mavenBu
166
166
});
167
167
}
168
168
169
+ @ TestTemplate
170
+ void whenAotRunsWithDevtoolsInClasspathItIsExcluded (MavenBuild mavenBuild ) {
171
+ mavenBuild .project ("aot-exclude-devtools" ).goals ("package" ).execute ((project ) -> {
172
+ Path aotDirectory = project .toPath ().resolve ("target/spring-aot/main" );
173
+ assertThat (aotDirectory ).exists ();
174
+ Path sourcesDirectory = aotDirectory .resolve ("sources" );
175
+ assertThat (sourcesDirectory ).exists ();
176
+ assertThat (collectRelativePaths (sourcesDirectory )).isNotEmpty ();
177
+ });
178
+ }
179
+
169
180
@ TestTemplate
170
181
void whenAotTestRunsSourcesAndResourcesAreGenerated (MavenBuild mavenBuild ) {
171
182
mavenBuild .project ("aot-test" ).goals ("test" ).execute ((project ) -> {
@@ -180,6 +191,17 @@ void whenAotTestRunsSourcesAndResourcesAreGenerated(MavenBuild mavenBuild) {
180
191
});
181
192
}
182
193
194
+ @ TestTemplate
195
+ void whenTestAotRunsWithDevtoolsInClasspathItIsExcluded (MavenBuild mavenBuild ) {
196
+ mavenBuild .project ("aot-test-exclude-devtools" ).goals ("process-test-classes" ).execute ((project ) -> {
197
+ Path aotDirectory = project .toPath ().resolve ("target/spring-aot/test" );
198
+ assertThat (aotDirectory ).exists ();
199
+ Path sourcesDirectory = aotDirectory .resolve ("sources" );
200
+ assertThat (sourcesDirectory ).exists ();
201
+ assertThat (collectRelativePaths (sourcesDirectory )).isNotEmpty ();
202
+ });
203
+ }
204
+
183
205
List <Path > collectRelativePaths (Path sourceDirectory ) {
184
206
try (Stream <Path > pathStream = Files .walk (sourceDirectory )) {
185
207
return pathStream .filter (Files ::isRegularFile )
@@ -195,26 +217,4 @@ protected String buildLog(File project) {
195
217
return contentOf (new File (project , "target/build.log" ));
196
218
}
197
219
198
- @ TestTemplate
199
- void whenAotRunsWithDevtoolsInClasspathItIsExcluded (MavenBuild mavenBuild ) {
200
- mavenBuild .project ("aot-exclude-devtools" ).goals ("package" ).execute ((project ) -> {
201
- Path aotDirectory = project .toPath ().resolve ("target/spring-aot/main" );
202
- assertThat (aotDirectory ).exists ();
203
- Path sourcesDirectory = aotDirectory .resolve ("sources" );
204
- assertThat (sourcesDirectory ).exists ();
205
- assertThat (collectRelativePaths (sourcesDirectory )).isNotEmpty ();
206
- });
207
- }
208
-
209
- @ TestTemplate
210
- void whenTestAotRunsWithDevtoolsInClasspathItIsExcluded (MavenBuild mavenBuild ) {
211
- mavenBuild .project ("aot-test-exclude-devtools" ).goals ("process-test-classes" ).execute ((project ) -> {
212
- Path aotDirectory = project .toPath ().resolve ("target/spring-aot/test" );
213
- assertThat (aotDirectory ).exists ();
214
- Path sourcesDirectory = aotDirectory .resolve ("sources" );
215
- assertThat (sourcesDirectory ).exists ();
216
- assertThat (collectRelativePaths (sourcesDirectory )).isNotEmpty ();
217
- });
218
- }
219
-
220
220
}
0 commit comments