private List < File > getRelativeIncludeDirectories ( VCProject vcProject ) throws MojoExecutionException { final List < File > relativeIncludeDirectories = new ArrayList < File > ( ) ; for ( File includeDir : vcProject . getIncludeDirectories ( ) ) { if ( includeDir . isAbsolute ( ) ) { relativeIncludeDirectories . add ( includeDir ) ; } else { try { File absoluteIncludeDir = new File ( vcProject . getFile ( ) . getParentFile ( ) , includeDir . getPath ( ) ) ; relativeIncludeDirectories . add ( getRelativeFile ( vcProject . getBaseDirectory ( ) , absoluteIncludeDir . getCanonicalFile ( ) ) ) ; } catch ( IOException ioe ) { throw new MojoExecutionException ( "Failed to compute relative path for directroy " + includeDir , ioe ) ; } } } return relativeIncludeDirectories ; }
Adjust the list of include paths to be relative to the projectFile directory