Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "OFMP/Release 1.0.0M1"
(→Test infrastructure) |
(→TODO) |
||
(27 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
==Requirements== | ==Requirements== | ||
− | #Oracle XE 10.2 with system/system credentials | + | #[http://www.oracle.com/technology/software/products/database/xe Oracle XE 10.2] with system/system credentials |
#JDK 1.5 (not JRE as Maven requires a JDK) | #JDK 1.5 (not JRE as Maven requires a JDK) | ||
− | # | + | #Spring Tool Suite 2.3.1 |
− | # | + | #Subversive Plugin |
− | # | + | #[http://docs.codehaus.org/display/M2ECLIPSE/Integration+with+Subversive Subversive/M2Eclipse integration] |
− | + | ||
==SCM access== | ==SCM access== | ||
− | + | See http://code.google.com/p/ofmp/source/checkout | |
==Build Source== | ==Build Source== | ||
+ | #Ensure the default JRE in Eclipse Preferences -> Java -> Installed JREs is of version JDK5.x.y.z | ||
#At this stage OracleXE must be up and running | #At this stage OracleXE must be up and running | ||
− | #In | + | #Create an Eclipse Workspace in C:\dev\ofmp |
+ | #In SVN Repository view, browse to the ofmp project | ||
#Right click -> Checkout as Maven project... -> Choose HEAD | #Right click -> Checkout as Maven project... -> Choose HEAD | ||
#Let m2eclipse checkout and compile all the modules (ignore popup errors) => Might take 15 minutes if new Maven local repo | #Let m2eclipse checkout and compile all the modules (ignore popup errors) => Might take 15 minutes if new Maven local repo | ||
Line 21: | Line 22: | ||
In future runs, if you dont want datamodel to be reset: | In future runs, if you dont want datamodel to be reset: | ||
− | mvn - | + | mvn -Dno_database_setup=true clean install |
The Eclipse Target is built during the installation process as well with the core-runtime module. | The Eclipse Target is built during the installation process as well with the core-runtime module. | ||
Line 31: | Line 32: | ||
Then close all projects in the "dependencies" working set. | Then close all projects in the "dependencies" working set. | ||
+ | |||
+ | === Known Building issues === | ||
+ | ====Jencks==== | ||
+ | Bundles org.eclipse.ofmp.datasource.oracle and org.eclipse.ofmp.transaction wont compile due to the org.eclipse.ofmp.lib.jencks bundle project config. | ||
+ | |||
+ | Open the org.eclipse.ofmp.lib.jencks project, add all the JARs in the lib folder to the project's build path, go to Project -> Properties -> Java Build Path -> Order and Export, check all the JARs in the lib folder. | ||
+ | |||
+ | Edit org.eclipse.ofmp.datasource.oracle and org.eclipse.ofmp.transaction Manifest files, save them back. | ||
+ | |||
+ | Refresh org.eclipse.ofmp.common Manifest file | ||
+ | |||
+ | ====Spring file editor issues==== | ||
+ | * The file org.eclipse.ofmp.datasource.oracle\META-INF\spring\ds-context.xml [http://forum.springsource.org/showthread.php?p=289835#post289835 will contain an error]. (to be ignored) | ||
==OFMP bundles creation== | ==OFMP bundles creation== | ||
Line 39: | Line 53: | ||
===Procedure=== | ===Procedure=== | ||
*Right click on \org.eclipse.ofmp\core\bundles and create a new Maven module using New -> Other -> Maven -> Maven Module | *Right click on \org.eclipse.ofmp\core\bundles and create a new Maven module using New -> Other -> Maven -> Maven Module | ||
− | * | + | *Create the module using the spring-osgi-bundle-archetype |
− | + | ||
*Create an integrationtests Maven module if required in \org.eclipse.ofmp\core\integration-tests | *Create an integrationtests Maven module if required in \org.eclipse.ofmp\core\integration-tests | ||
Line 60: | Line 73: | ||
− | == | + | ==Integration Tests infrastructure== |
OFMP Test infrastructure is built on [http://static.springframework.org/osgi/docs/current/reference/html/testing.html#testing:integration Spring DM Test framework] | OFMP Test infrastructure is built on [http://static.springframework.org/osgi/docs/current/reference/html/testing.html#testing:integration Spring DM Test framework] | ||
Line 69: | Line 82: | ||
The org.eclipse.ofmp.test bundle expose the service required to cleanup/initialize the database before any tests. | The org.eclipse.ofmp.test bundle expose the service required to cleanup/initialize the database before any tests. | ||
− | + | See for instance org.eclipse.ofmp.currency.integrationtests\launch\AllCurrencyTests.launch | |
− | + | ==Open tasks== | |
− | + | ||
− | + | ||
− | + | ||
− | ==Open | + | |
− | + | ||
− | + | ||
− | + | ||
*Load time weaving of aspects using Equinox Aspect and Spring AOP. needed for some iBatis handlers. | *Load time weaving of aspects using Equinox Aspect and Spring AOP. needed for some iBatis handlers. | ||
*Remoting/Web infrastructure | *Remoting/Web infrastructure | ||
*BIRT integration | *BIRT integration | ||
− | * | + | *Replace OracleXE with Apache Derby |
+ | *Add [http://www.eclipse.org/legal/copyrightandlicensenotice.php File headers] using [http://code.google.com/p/maven-license-plugin/ proper tool] | ||
− | == | + | ===Backend bundles=== |
+ | *org.eclipse.ofmp.common (done) | ||
+ | *org.eclipse.ofmp.datasource.derby | ||
+ | *org.eclipse.ofmp.datasource.oracle (done) | ||
+ | *org.eclipse.ofmp.transaction (done) | ||
+ | *org.eclipse.ofmp.mail | ||
+ | *org.eclipse.ofmp.security (done) | ||
+ | *org.eclipse.ofmp.currency (done) | ||
+ | *org.eclipse.ofmp.date | ||
+ | *org.eclipse.ofmp.calendar | ||
+ | *org.eclipse.ofmp.counterparty | ||
+ | *org.eclipse.ofmp.deal | ||
+ | *org.eclipse.ofmp.history | ||
+ | *org.eclipse.ofmp.users | ||
+ | *org.eclipse.ofmp.reporting | ||
− | === | + | ===UI Bundles=== |
+ | *org.eclipse.ofmp.common (done) | ||
+ | *org.eclipse.ofmp.ui.users | ||
+ | *org.eclipse.ofmp.ui.deals | ||
+ | *org.eclipse.ofmp.ui.history | ||
+ | *org.eclipse.ofmp.ui.reporting | ||
− | + | ==Know Issues== | |
− | + | *Problem of [http://forum.springframework.org/showthread.php?t=62590 running Spring DM/Maven bundles inside an Eclipse OSGi framework run config] | |
− | + | *Problem with MailService: [http://www.opensubscriber.com/message/javamail-interest@java.sun.com/7570201.html javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed] | |
− | + | ||
− | + | ||
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Tips== | ==Tips== | ||
Line 107: | Line 124: | ||
*Always keep number of opened projects as low as possible | *Always keep number of opened projects as low as possible | ||
*MANIFEST.MF files do not always refresh properly after BND generation, open and press F5. | *MANIFEST.MF files do not always refresh properly after BND generation, open and press F5. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Troubleshooting== | ==Troubleshooting== | ||
Line 142: | Line 136: | ||
*[http://www.eclipse.org/aspectj/ Eclipse Aspectj] | *[http://www.eclipse.org/aspectj/ Eclipse Aspectj] | ||
*[http://martinlippert.blogspot.com/2008/07/dependency-injection-for-extensions.html Martin Lippert: Dependency Injection for Extensions, Third Edition] | *[http://martinlippert.blogspot.com/2008/07/dependency-injection-for-extensions.html Martin Lippert: Dependency Injection for Extensions, Third Edition] | ||
+ | |||
+ | ==Eclipse Procedures et Legal docs== | ||
+ | *[http://www.eclipse.org/org/documents/Eclipse_Policy_and_Procedure_for_3rd_Party_Dependencies_Final.pdf Eclipse_Policy_and_Procedure_for_3rd_Party_Dependencies_Final] | ||
+ | *[http://www.eclipse.org/legal/EclipseLegalProcessPoster.pdf Eclipse Legal Process] | ||
+ | |||
+ | ==Other== | ||
+ | * [[OFMP/Release 1.0.0M1/Dependencies|Dependencies]] |
Latest revision as of 06:32, 25 March 2010
Contents
Requirements
- Oracle XE 10.2 with system/system credentials
- JDK 1.5 (not JRE as Maven requires a JDK)
- Spring Tool Suite 2.3.1
- Subversive Plugin
- Subversive/M2Eclipse integration
SCM access
See http://code.google.com/p/ofmp/source/checkout
Build Source
- Ensure the default JRE in Eclipse Preferences -> Java -> Installed JREs is of version JDK5.x.y.z
- At this stage OracleXE must be up and running
- Create an Eclipse Workspace in C:\dev\ofmp
- In SVN Repository view, browse to the ofmp project
- Right click -> Checkout as Maven project... -> Choose HEAD
- Let m2eclipse checkout and compile all the modules (ignore popup errors) => Might take 15 minutes if new Maven local repo
- When done, close all modules except the "ofmp" module
- Run "mvn clean install" on the "ofmp" module => Might take 10 minutes if new Maven local repo
Datamodel will be setup in the same process
In future runs, if you dont want datamodel to be reset:
mvn -Dno_database_setup=true clean install
The Eclipse Target is built during the installation process as well with the core-runtime module.
- Go to Window -> Preferences -> Plugin Development -> Target
- In predefined Targets, load \org.eclipse.ofmp\runtime\server\core-runtime\org.eclipse.ofmp.server.core.target
To have a clearer view of your Eclipse workspace, import /ofmp/workingSets.psf Project Set file and choose Working Sets as Top Level elements in your Package Explorer. All workspace projects must be opened for this operation to work.
Then close all projects in the "dependencies" working set.
Known Building issues
Jencks
Bundles org.eclipse.ofmp.datasource.oracle and org.eclipse.ofmp.transaction wont compile due to the org.eclipse.ofmp.lib.jencks bundle project config.
Open the org.eclipse.ofmp.lib.jencks project, add all the JARs in the lib folder to the project's build path, go to Project -> Properties -> Java Build Path -> Order and Export, check all the JARs in the lib folder.
Edit org.eclipse.ofmp.datasource.oracle and org.eclipse.ofmp.transaction Manifest files, save them back.
Refresh org.eclipse.ofmp.common Manifest file
Spring file editor issues
- The file org.eclipse.ofmp.datasource.oracle\META-INF\spring\ds-context.xml will contain an error. (to be ignored)
OFMP bundles creation
For every service to be extracted from the org.eclipse.ofmp.service.core project we have to:
- extract bundle (scr and src.tests) from the core, mavenize and OSGify it
- create an integration test project based on Spring DM test framework and run integration tests on it.
Procedure
- Right click on \org.eclipse.ofmp\core\bundles and create a new Maven module using New -> Other -> Maven -> Maven Module
- Create the module using the spring-osgi-bundle-archetype
- Create an integrationtests Maven module if required in \org.eclipse.ofmp\core\integration-tests
- Setup pom.xml (org.eclipse.ofmp.security/pom.xml is a good example)
- Rename packages to org.eclipse.ofmp (dont use "service" prefix for bundles)
- Use Bnd to automate generation of Manifest.MF OSGi tags:
- replace Require-Bundle by Import-Packages as much as possible
- ensure proper bundles versioning AND dependencies versioning e.g.: Import-Package: osgitut.movies;version="[1.0.0,2.0.0)"
- Hide Implementation Details: ONLY export public API packages in Manifest
Put implementation details in separate packages from the public API
org.example.foo - exported API package org.example.foo.internal - private implementation package
- Remove any specific wordings (victoria/apsys) in source code
- Enable project Spring nature if required and enlist Spring files in project properties
Naming conventions
- every service bundle does not hold the ".service." acronym in its bundle name
- every lib bundle(like Jencks) should contain the ".lib." acronym in its bundle name
Integration Tests infrastructure
OFMP Test infrastructure is built on Spring DM Test framework
Have a look at
- org.eclipse.ofmp.test/src/main/java/org/eclipse/ofmp/test/AbstractOFMPDBUnitTest
- org.eclipse.ofmp.test/src/main/java/org/eclipse/ofmp/test/AbstractOFMSpringDMTest
The org.eclipse.ofmp.test bundle expose the service required to cleanup/initialize the database before any tests.
See for instance org.eclipse.ofmp.currency.integrationtests\launch\AllCurrencyTests.launch
Open tasks
- Load time weaving of aspects using Equinox Aspect and Spring AOP. needed for some iBatis handlers.
- Remoting/Web infrastructure
- BIRT integration
- Replace OracleXE with Apache Derby
- Add File headers using proper tool
Backend bundles
- org.eclipse.ofmp.common (done)
- org.eclipse.ofmp.datasource.derby
- org.eclipse.ofmp.datasource.oracle (done)
- org.eclipse.ofmp.transaction (done)
- org.eclipse.ofmp.mail
- org.eclipse.ofmp.security (done)
- org.eclipse.ofmp.currency (done)
- org.eclipse.ofmp.date
- org.eclipse.ofmp.calendar
- org.eclipse.ofmp.counterparty
- org.eclipse.ofmp.deal
- org.eclipse.ofmp.history
- org.eclipse.ofmp.users
- org.eclipse.ofmp.reporting
UI Bundles
- org.eclipse.ofmp.common (done)
- org.eclipse.ofmp.ui.users
- org.eclipse.ofmp.ui.deals
- org.eclipse.ofmp.ui.history
- org.eclipse.ofmp.ui.reporting
Know Issues
- Problem of running Spring DM/Maven bundles inside an Eclipse OSGi framework run config
- Problem with MailService: javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed
Tips
- Be patient, drink coffee or beers. On first OFMP installation, setting up your local Maven repository might take 30 minutes.
- Always keep number of opened projects as low as possible
- MANIFEST.MF files do not always refresh properly after BND generation, open and press F5.
Troubleshooting
References
- Spring DM Ref Guide
- Spring DM Archetype
- Maven Definitive Guide
- Importing Maven Projects from Version Control and from Maven POM Using Maven Integration for Eclipse
- Bundle Plugin for Maven
- Eclipse Aspectj
- Martin Lippert: Dependency Injection for Extensions, Third Edition