On 15 July 2013 18:18, Hady elsahar <[email protected]> wrote: > > Hello All, > > i'm trying to import scalax in order to use it in files IO , i have some > Questions > > 1- what's the common tradition way to import Scala libraries inside the > project ?
Add a Maven dependency to the pom.xml for the sub-module (core, scripts, ...). Additionally, you should add a dependency to the <dependencyManagement> section of the parent pom.xml if several modules have the same dependency. In this case you could add the dependency for http://repo1.maven.org/maven2/org/scalaforge/scalax/0.1/ . But I would advise against it. 1. You probably don't need it. :-) Scala's Source class is nice, and we have a few helper classes that make IO things even nicer. 2. The only version of scalax that I found in the main Maven repo is from 2008 and has number 0.1, which doesn't inspire confidence that it's production ready. 3. it looks like scalax is not maintained anymore and may be incompatible with recent Scala versions: http://stackoverflow.com/questions/4604237/how-to-write-to-a-file-in-scala "Edit (September 2011): since Eduardo Costa asks about Scala2.9, and since Rick-777 comments thatscalax.IO commit history is pretty much non-existent since mid-2009..." https://github.com/eengbrec/Scalax.IO/commits/master > > 2- i'm writing an individual Scala script that will be run by it's own from > Command line does that differ in a thing in the Question above ? I don't think so. So far, we put all such individual scripts into the 'scripts' module and added an entry in pom.xml. > > another unrelated question : > > for the sake of code reusability , what utils exist in the Extraction > framework that i can use for file accessing and for basic common tasks Most utility stuff is in the package https://github.com/dbpedia/extraction-framework/tree/master/core/src/main/scala/org/dbpedia/extraction/util For example, IOUtils.scala. On the dump branch, I added a few more methods for reading compressed files. Other classes that may be useful for you are in the packages 'sources' and 'destinations'. Cheers, JC > > thanks > Regards > ------------------------------------------------- > Hady El-Sahar > Research Assistant > Center of Informatics Sciences | Nile University > > email : [email protected] > Phone : +2-01220887311 > http://hadyelsahar.me/ > > > > > ------------------------------------------------------------------------------ > See everything from the browser to the database with AppDynamics > Get end-to-end visibility with application monitoring from AppDynamics > Isolate bottlenecks and diagnose root cause in seconds. > Start your free trial of AppDynamics Pro today! > http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk > _______________________________________________ > Dbpedia-developers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/dbpedia-developers > ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ Dbpedia-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dbpedia-developers
