Skip to content

Commit 18750e5

Browse files
committed
simplify "Compiling" info message: display relative path
1 parent 3a4d8bd commit 18750e5

File tree

2 files changed

+6
-2
lines changed
  • plexus-compilers

2 files changed

+6
-2
lines changed

plexus-compilers/plexus-compiler-aspectj/src/main/java/org/codehaus/plexus/compiler/ajc/AspectJCompiler.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,11 @@ public CompilerResult performCompile( CompilerConfiguration config )
320320
return new CompilerResult();
321321
}
322322

323+
String to = ( config.getWorkingDirectory() == null ) ? config.getOutputLocation() :
324+
config.getWorkingDirectory().toPath().relativize( destinationDir.toPath() ).toString();
323325
System.out.println(
324326
"Compiling " + sourceFiles.length + " " + "source file" + ( sourceFiles.length == 1 ? "" : "s" ) + " to "
325-
+ destinationDir.getAbsolutePath() );
327+
+ to );
326328

327329
// String[] args = buildCompilerArguments( config, sourceFiles );
328330
AjBuildConfig buildConfig = buildCompilerConfig( config );

plexus-compilers/plexus-compiler-javac/src/main/java/org/codehaus/plexus/compiler/javac/JavacCompiler.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,11 @@ public CompilerResult performCompile( CompilerConfiguration config )
143143

144144
if ( ( getLogger() != null ) && getLogger().isInfoEnabled() )
145145
{
146+
String to = ( config.getWorkingDirectory() == null ) ? config.getOutputLocation() :
147+
config.getWorkingDirectory().toPath().relativize( destinationDir.toPath() ).toString();
146148
getLogger().info( "Compiling " + sourceFiles.length + " " +
147149
"source file" + ( sourceFiles.length == 1 ? "" : "s" ) +
148-
" to " + destinationDir.getAbsolutePath() );
150+
" to " + to );
149151
}
150152

151153
String[] args = buildCompilerArguments( config, sourceFiles );

0 commit comments

Comments
 (0)