public static String getLocalResources ( File basedir , boolean test , ProjectScanner scanner ) { final String basePath = basedir . getAbsolutePath ( ) ; String target = "target/classes" ; if ( test ) { target = "target/test-classes" ; } Set < String > files = scanner . getLocalResources ( test ) ; Set < String > pathSet = new LinkedHashSet <> ( ) ; for ( String name : files ) { String path = target + ' ' + name ; // make relative to project if ( path . startsWith ( basePath ) ) { if ( path . length ( ) == basePath . length ( ) ) { path = "." ; } else { path = path . substring ( basePath . length ( ) + 1 ) ; } } // replace windows backslash with a slash // this is a workaround for a problem with bnd 0.0.189 if ( File . separatorChar != ' ' ) { name = name . replace ( File . separatorChar , ' ' ) ; path = path . replace ( File . separatorChar , ' ' ) ; } // copy to correct place path = name + ' ' + path ; pathSet . add ( path ) ; } return Joiner . on ( ", " ) . join ( pathSet ) ; }
Gets local resources .