Skip to content

Project Structure

Craig edited this page Mar 19, 2015 · 5 revisions

Data Sources

By design each project should be directly runnable through eclipse or gradlew by just checking out the source from a given repository. This means that there should be some sort of local database distributed with projects that require database access. When not available there should be a setup sql script provided. Access to databases should be independent of the dao class and should be made available through osgi as a DataSourceObject.java.

I have used h2 for an in memory sql database for unit testing the goss(core) and goss-fusion project. I chose h2 because it can read most sql statements that are used for mysql.

Files to Ignore

The root of each project should contain a .gitignore file with the following items filtered out.

/.gradle/
/reports/
/generated/
/RemoteSystemsTempFiles
/.metadata/
/.settings/

In addition files in the cnf/releaserepo, cnf/buildrepo, and cnf/cache should not be checked in other than the original index.xml and index.xml.sha. Files in cnf/localrepo should be checked in and should contain required dependencies for a specific project. For example for goss-powergrid there is a dependency on groovy so that jar will be in the cnf/localrepo for the goss-powergrid project. NOTE you can't just copy the file into cnf/localrepo. You must drag the bundle to the bndtools repository under Local. Doing so will add the proper entries to the index.xml and re-sha the file as well.

PackageInfo files should be committed for exported packages. This allows use to version the package information correctly across projects.

Clone this wiki locally