So, I just committed some change in Studio. Basically, I just removed all references to commons.io where I can, but in a coiple of places (ldapservers and tests). LdapServers is depending on commons.io because I can't use api-util here, due to some weird access restrictions. It has to be investigated. Test sare using one method taht is not in api-util (yet) : FileUtils.readLines. i'm considering adding it.
I think we are not that far to be able to completely remove the dependency on commons.io. Le 28/02/16 20:49, Emmanuel Lécharny a écrit : > Ok, I went a bit farther, but I'm now stuck with errors like : > > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD FAILURE > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 34.664 s > [INFO] Finished at: 2016-02-28T20:45:42+01:00 > [INFO] Final Memory: 198M/473M > [INFO] > ------------------------------------------------------------------------ > [ERROR] Failed to execute goal > org.eclipse.tycho:tycho-compiler-plugin:0.24.0:compile (default-compile) > on project org.apache.directory.studio.ldapservers: Compilation failure: > Compilation failure: > [ERROR] > /Users/elecharny/apacheds/studio/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/LdapServersManager.java:[35] > [ERROR] import org.apache.directory.api.util.FileUtils; > [ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > [ERROR] Access restriction: The type 'FileUtils' is not API (restriction > on classpath entry > '/Users/elecharny/.m2/repository/p2/osgi/bundle/org.apache.directory.api.util/1.0.0.M34-SNAPSHOT/org.apache.directory.api.util-1.0.0.M34-SNAPSHOT.jar') > [ERROR] > /Users/elecharny/apacheds/studio/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/LdapServersManager.java:[309] > [ERROR] String content = FileUtils.readFileToString( tempStore, "UTF-8" > ); //$NON-NLS-1$ > [ERROR] ^^^^^^^^^ > [ERROR] Access restriction: The type 'FileUtils' is not API (restriction > on classpath entry > '/Users/elecharny/.m2/repository/p2/osgi/bundle/org.apache.directory.api.util/1.0.0.M34-SNAPSHOT/org.apache.directory.api.util-1.0.0.M34-SNAPSHOT.jar') > [ERROR] > /Users/elecharny/apacheds/studio/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/LdapServersManager.java:[309] > [ERROR] String content = FileUtils.readFileToString( tempStore, "UTF-8" > ); //$NON-NLS-1$ > [ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > [ERROR] Access restriction: The method 'FileUtils.readFileToString(File, > String)' is not API (restriction on classpath entry > '/Users/elecharny/.m2/repository/p2/osgi/bundle/org.apache.directory.api.util/1.0.0.M34-SNAPSHOT/org.apache.directory.api.util-1.0.0.M34-SNAPSHOT.jar') > [ERROR] > /Users/elecharny/apacheds/studio/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/LdapServersManager.java:[310] > [ERROR] FileUtils.writeStringToFile( store, content, "UTF-8" ); > //$NON-NLS-1$ > [ERROR] ^^^^^^^^^ > [ERROR] Access restriction: The type 'FileUtils' is not API (restriction > on classpath entry > '/Users/elecharny/.m2/repository/p2/osgi/bundle/org.apache.directory.api.util/1.0.0.M34-SNAPSHOT/org.apache.directory.api.util-1.0.0.M34-SNAPSHOT.jar') > [ERROR] > /Users/elecharny/apacheds/studio/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/LdapServersManager.java:[310] > [ERROR] FileUtils.writeStringToFile( store, content, "UTF-8" ); > //$NON-NLS-1$ > [ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > [ERROR] Access restriction: The method > 'FileUtils.writeStringToFile(File, String, String)' is not API > (restriction on classpath entry > '/Users/elecharny/.m2/repository/p2/osgi/bundle/org.apache.directory.api.util/1.0.0.M34-SNAPSHOT/org.apache.directory.api.util-1.0.0.M34-SNAPSHOT.jar') > [ERROR] -> [Help 1] > [ERROR] > [ERROR] To see the full stack trace of the errors, re-run Maven with the > -e switch. > [ERROR] Re-run Maven using the -X switch to enable full debug logging. > [ERROR] > > ... > > > At this point, I'm not sure we want to get rid of commons.io in Studio, > because there are way more usage of other functions in Studio... >
