GitHub user chenlica closed a discussion: Guidelines for Organizing Data Files (from old wiki)
>From the wiki page >https://github.com/apache/texera/wiki/Guidelines-for-Organizing-Data-Files >(may be dangling) ===== Authors(s): [Kishore Narendran](http://www.github.com/kishore-narendran), [Shiladitya Sen](http://www.github.com/shiladityasen) Here are some guidelines on where to put data files. 1. All data files should go into the directories present in `src/main/resources` or `src/test/resources`. Please create them if they are not already present. By default these folders are made into source folders when maven build happens. Please create the directories inside these source folders so that the files are organized properly. 2. If the data files are used by the test classes, put them in `src/test/resources` folder. If the data files are used by the main classes, put them in `src/main/resources` folder. 3. As an example, if `DictionaryMatcher` is using a file `dictionary.txt`, then the file should be put in `src/main/resources/dictionatyMatcher` folder. If `DictionaryMatcherTest` is reading some sample data from `dmTest.txt`, then that file should go to `src/test/resources/dictionaryMatcher` folder. Notice that maven doesn't preserve the structure of `src/main/resources` or `src/main/java` when it packages the files into jar or war. So it is important not to use the path "src/main/resources" while opening the files. The relative path should start from the classpath. We can use the methods `getResource()` or `getResourceAsStream()` present in `java.util.Class` for reading the files. GitHub link: https://github.com/apache/texera/discussions/3968 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
