Hi everyone, For anyone working in a branch off of master (1.11), I will be merging my recent changes into master today. My changes are designed to consolidate all of the configuration file handling code in one package (opennms-config) and move all of the configuration model objects themselves into a new opennms-config-model project. This change should facilitate conversion of the opennms-config JAR into a reusable OSGi component, although this is not 100% done yet. This refactoring had ripples all over the system but mostly it just changed the Java package names of several heavily-reused test classes. Here is the full list of high-level changes:
- Moved common test execution listeners into the core/test-api/lib project - Moved database table installer classes (including org.opennms.core.db.install.InstallerDb) and related tests into the core/db-install project. This project will eventually be migrated to use liquibase to create test databases instead of using a static create.sql file. - Created the core/db package to hold the classes that are used to connect to the database (like org.opennms.core.db.DataSourceFactory), including dependencies on the C3P0 connection pool classes. - Moved org.opennms.core.utils.DBUtils, org.opennms.core.utils.JDBCTemplate and other core utility classes to core/lib. - Created core/test-api/db. Like the other test-api projects, it contains a listeners/annotations (org.opennms.core.test.db.annotations.JUnitTemporaryDatabase) and test classes (org.opennms.core.test.db.MockDatabase, org.opennms.core.test.db.TemporaryDatabase) that are used to create temporary test databases. This code was originally scattered inside opennms-dao. - Because so many test classes were refactored out into the core/test-api projects, I tried to remove the opennms-dao and opennms-services test-jar dependencies and builds since test-jar builds are basically just a hack to expose test resources from one project to another. In the end, I had to leave the test-jar dependency on opennms-dao because of the org.opennms.netmgt.dao.DatabasePopulator class and its Spring context. It has cross-dependencies on other classes in the opennms-dao project that cannot be factored out easily so I'm leaving it for now. - Moved configuration model objects, most of which are generated by Castor, into the opennms-config-model project. - Created a new opennms-config project and moved all of the org.opennms.netmgt.config classes into this project. - Moved the org.opennms.netmgt.model.events.EventIpcManager interface into opennms-model so that test classes can implement the interface for unit testing. If you have any branches based on master, I recommend that you merge these changes in and rebuild from the top directory by using './compile.pl clean install' since there are several new projects which are reused heavily as test dependencies. If you have any problems after updating, please contact me and we can work out any merging headaches. If you have problems, I recommend trying to use Eclipse to resolve broken imports first. If you still have problems, you may need to add new test dependencies to your POM files since a lot of reused code that used to be in the opennms-dao and opennms-services test-jar artifacts is now in separate projects. Seth Leger The OpenNMS Group ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Please read the OpenNMS Mailing List FAQ: http://www.opennms.org/index.php/Mailing_List_FAQ opennms-devel mailing list To *unsubscribe* or change your subscription options, see the bottom of this page: https://lists.sourceforge.net/lists/listinfo/opennms-devel