#219 closed (fixed)
Restructure directory layout
Reported by: | Gregory Vincic | Owned by: | olle |
---|---|---|---|
Milestone: | Proteios 2.0 | Keywords: | |
Cc: |
Description
As the project is growing our directory layout feels cluttered. Restructuring the layout(see attached file) should simplify our test, build and distribution processes. See the suggested initial structure.
Attachments (1)
Change History (87)
comment:1 follow-up: 4 Changed 16 years ago by
comment:2 Changed 16 years ago by
How to compile the io class trunk/org/proteios/io/SpectrumFileImpl.java which depends on plugins. Should io have its own build.xml? Preferably the mzData functions should be moved to io and these get into the core jar. Then the plugin classes can depend on that, but the io classes don't need the plugins. Are there more dependencies like this that need to be restructured?
comment:3 Changed 16 years ago by
Yes, I would put the io package inside of core and let your plugin depend on core.jar. I added to the structure a /plugin directory with it's own build file. See the updated layout file.
comment:4 Changed 16 years ago by
To each build.xml file we should also add the target
- test
Runs all tests
Replying to gregory:
Each build file should contain at least the following targets
- clean
Remove everything that targets compile and/or dist generate
- compile
- dist
Generate a package e.g. .jar or .war files
- doc
Generate javadoc
The global build.xml file should have the above targets linking to each corresponding target building a complete package. There should not be any cross references between the sub build.xml files e.g. servlet/build.xml should not depend on core/build.xml. It should however depend on the package that core/build.xml -> dist target generates.
comment:5 Changed 16 years ago by
comment:6 Changed 16 years ago by
comment:7 Changed 16 years ago by
comment:8 Changed 16 years ago by
comment:9 Changed 16 years ago by
(In [1744]) Refs #219. Major restructure is done. There are still files that need to be moved, I'll do this shortly. Then compiling an installable proteios will work much like before though the ant command has changed. A complete proteios is build and copied to the /dist directory when running
ant clean compile hibernate dist
Each target has been made independent because dependencies would make it impossible to combine ant targets with the fact that eclipse compiles code on the fly. If you configure eclipse to compile files as the build.xml files specify, then you only have to run ant dist in the root directory to get a working package.
Please be patient as I move the remaining files into their right places.
comment:16 Changed 16 years ago by
comment:17 Changed 16 years ago by
comment:22 Changed 16 years ago by
comment:24 Changed 16 years ago by
comment:25 Changed 16 years ago by
comment:26 Changed 16 years ago by
comment:27 Changed 16 years ago by
comment:28 Changed 16 years ago by
comment:31 Changed 16 years ago by
comment:32 Changed 16 years ago by
comment:33 Changed 16 years ago by
comment:34 Changed 16 years ago by
comment:35 Changed 16 years ago by
comment:36 Changed 16 years ago by
comment:37 Changed 16 years ago by
comment:38 Changed 16 years ago by
comment:39 Changed 16 years ago by
(In [1786]) Refs #219. Added dependency between client/servlet/test building and api/core/test. Because the PropertiesFile? is used in most of our tests it's part of the core/test suite.
comment:41 Changed 16 years ago by
priority: | blocker → minor |
---|---|
Status: | new → assigned |
Tests still haven't been moved.
comment:43 Changed 16 years ago by
comment:45 Changed 16 years ago by
Owner: | changed from Gregory Vincic to olle |
---|---|
Status: | assigned → new |
comment:47 Changed 16 years ago by
comment:48 Changed 16 years ago by
comment:49 Changed 16 years ago by
(In [1810]) Refs #219. Class/file PropertiesFile?.java in client/servlet/test/ renamed PropertiesFile2.java, as a file named PropertiesFile?.java in the same package exists in api/core/test/. The alternative solution of using the same file was rejected, in order to decrease dependencies between client/servlet/test/ and api/core/test/. Class/file action/Login.java in client/servlet/test/ updated to use PropertiesFile2 instead of PropertiesFile?.
comment:50 Changed 16 years ago by
(In [1811]) Refs #219. Update of plugin/test/:
- Added ant build file build.xml.
- Class/file plugins/TestRobotFileImportTest.java in
api/core/test/ moved to plugin/test/.
- Added copy of PropertiesFile?.java from api/core/test/ to
plugin/test/ with new name PropertiesFile3.java. The alternative solution of using the same file was rejected, in order to decrease dependencies between plugin/test/ and api/core/test/. Class/file plugins/TestRobotFileImportTest.java in plugin/test updated to use PropertiesFile3 instead of PropertiesFile?.
comment:51 Changed 16 years ago by
(In [1812]) Refs #219. Added copy of plugins/mzdata/ApplicationTestSetup.java from api/core/test/ to plugins/ in plugin/test/. The new class was changed from package org.proteios.plugins.mzdata to org.proteios.plugins. The alternative solution of using the same file was rejected, in order to decrease dependencies between plugin/test/ and api/core/test/. Class/file plugins/TestRobotFileImportTest.java in plugin/test updated to use the new ApplicationTestSetup?.
comment:52 Changed 16 years ago by
(In [1825]) Refs #219. Added class/file PropertiesFile?.java to api/core/test, equal in functionality to PropertiesFile2.java in client/servlet/test/ and PropertiesFile3.java in plugin/test/.
comment:53 Changed 16 years ago by
comment:54 Changed 16 years ago by
comment:55 Changed 16 years ago by
comment:56 Changed 16 years ago by
(In [1829]) Refs #219. Class/file plugins/TestRobotFileImportTest.java in plugin/test/ updated to obtain test data from directory given by url set in property test.data.url. This url is used for testing methods taking an input stream as argument. If the url points to a directory on the local system, this directory is also used to construct file paths for testing methods taking a file path as argument.
comment:57 Changed 16 years ago by
(In [1834]) Refs #219. Ant build file build.xml in plugin/test/ updated in class path:
- Directory "../conf" added, in order for XML Schema Definition file
plugin/conf/spot.xsd to be accessible.
- Directory "../../api/core/test/build" excluded, as plugin/test now
uses its own PropertiesFile? class, PropertiesFile3.java in plugin/test/src/org/proteios/. Keeping "../../api/core/test/build" early in the class was problematic, as a property file test.properties in this directory may override plugin/test/build/test.properties.
comment:58 Changed 16 years ago by
(In [1835]) Refs #219. Test properties template files test.properties.in in api/core/test/ and plugin/test/ updated to only recommend use of "file://" + absolute path for url to resource on local system. Added test properties template file test.properties.in to client/servlet/test/, identical to the ones for api/core/test/ and plugin/test/.
comment:59 Changed 16 years ago by
Correction of subversion commit message: In the last sentence in the text for changeset [1834], "class" should be exchanged for "class path". The sentence should read: Keeping "../../api/core/test/build" early in the class path was problematic, as a property file test.properties in this directory may override plugin/test/build/test.properties.
comment:60 Changed 16 years ago by
(In [1837]) Refs #219. Core test classes/files in api/core/test/ updated by creation of ItemFactory? object in method setUp().
comment:61 Changed 16 years ago by
(In [1845]) Refs #219. Ant build file build.xml in api/core/test/ updated for target "compile". Properties file src/test.properties is now copied to build directory after compiling the source code, in addition to before running tests via ant. This allows tests to be run without using ant target "test", e.g. for running single tests.
comment:62 Changed 16 years ago by
(In [1846]) Refs #219. Ant build file build.xml in api/core/ updated by moving target "hibernate", so targets "clean", "compile", and "hibernate" come in order. If ant is used from an IDE where the default target order is used, this will work as a reminder to rebuild the hibernate mapping after a successful compilation.
comment:63 Changed 16 years ago by
comment:64 Changed 16 years ago by
(In [1848]) Refs #219. Classes/files plugins/mzdata/*.java in api/core/test/ related to test of mzData import and export updated to obtain test data from directory given by url set in property test.data.url. This url is used for testing methods taking an input stream as argument. If the url points to a directory on the local system, this directory is also used to construct file paths for testing methods taking a file path as argument.
comment:65 Changed 16 years ago by
(In [1849]) Refs #219. Class/file plugins/mzdata/TestMzDataExportPlugin.java in api/core/test/ updated in method setUp() by rearrangement of some method calls and addition of comments, in order to increase source code similarity between this and other classes related to test of mzData import and export.
comment:66 Changed 16 years ago by
(In [1850]) Refs #219. Class/file plugins/mzdata/TestXMLValidator.java in api/core/test/ updated to obtain test data from directory given by url set in property test.data.url. The url is expected to point to a directory on the local system, as it will be used to construct file paths for testing methods taking a file path as argument.
comment:67 Changed 16 years ago by
(In [1851]) Refs #219. Class/file plugins/mzdata/io/XMLValidator.java in api/core/ updated in public static method Schema compileSchema(String xsdFilePath) by allowing the path for the XSD file to be outside the installation directory. As in the original version, first is tested if a url can be found relative to the installation directory using XMLValidator.class.getResource(xsdFilePath). If this does not succeed, an attempt is made to obtain a uri based on the file path being an absolute path on the local system.
comment:68 Changed 16 years ago by
(In [1852]) Refs #219. Class/file plugins/mzdata/io/XMLValidatorErrorHandler.java updated to fix a bug in public static method boolean validate_w_error_output(String xsdFilePath, StreamSource? xmlStreamSource) in class/file plugins/mzdata/io/XMLValidator.java. The metod uses an instance of XMLValidatorErrorHandler as error handler, but failed to return "false" for an invalid XML stream, as XMLValidatorErrorHandler did not propagate the SAXExceptions thrown. Now non-warning SAXExceptions are propagated, in addition to error information being printed. This change of functionality of the class was made as it is currently only used by method validate_w_error_output(String xsdFilePath, StreamSource? xmlStreamSource) in XMLValidator, and this method did not work correctly with the previous version.
comment:69 Changed 16 years ago by
comment:70 Changed 16 years ago by
comment:71 Changed 16 years ago by
(In [1874]) Refs #219. Classes/files io/TestPeakListFileImpl.java and io/TestRobotFileImpl.java in api/core/test/ updated to obtain test data from directory given by url set in property test.data.url. The url is expected to point to a directory on the local system, as it will be used to construct file paths for testing methods taking a file path as argument.
comment:72 Changed 16 years ago by
(In [1880]) Refs #219. Removal of obsolete files from old test directory.
- Ant build file test/build.xml and test properties template file
test/src/test.properties.in removed as test files have been moved to new locations in api/core/test/, api/waf/test/, client/ftpd/test/, client/manager/test/, client/servlet/test/, and plugin/test/.
- Test data files in directory test/testData/ removed, as they have
been made available for download via anonymous ftp (current link ftp://bioinfo.thep.lu.se/proteios/testData/).
comment:73 Changed 16 years ago by
comment:74 Changed 16 years ago by
comment:75 Changed 16 years ago by
comment:76 Changed 16 years ago by
comment:77 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:78 Changed 16 years ago by
comment:81 Changed 15 years ago by
Traceability note: Next ticket related to JUnit tests and restructuring is Ticket #280 (Fix problems with JUnit tests).
comment:82 Changed 15 years ago by
Milestone: | 2.0 beta 1 → Proteios 2.0 |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
Ticket reopened to remove library file(s).
comment:83 Changed 15 years ago by
comment:84 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Ticket closed as the selected library file has been removed.
comment:85 Changed 15 years ago by
(In [2350]) Refs #219. Refs #1. Sun Java Streaming XML Parser library file sjsxp.jar in api/external/ was corrupt, and has therefore been replaced by a new copy obtained from web site http://www.java2s.com/Code/Jar/wsit/Downloadsjsxpjar.htm.
- Library file api/external/sjsxp.jar for Sun Java Streaming XML
Parser has been replaced by a new copy obtained from web site http://www.java2s.com/Code/Jar/wsit/Downloadsjsxpjar.htm, as the original jar file was corrupt.
- Added license for sjsxp.jar library.
comment:86 Changed 15 years ago by
severity: | → 16 |
---|
Severity set after closing of ticket; if set when the ticket was created, the severity would probably have been set to 16, due to the many design choices that had to be made.
Each build file should contain at least the following targets
The global build.xml file should have the above targets linking to each corresponding target building a complete package. There should not be any cross references between the sub build.xml files e.g. servlet/build.xml should not depend on core/build.xml. It should however depend on the package that core/build.xml -> dist target generates.