Difference between revisions of "ADempiere/Equinox Integration 2"
From ADempiere
This Wiki is read-only for reference purposes to avoid broken links.
Line 44: | Line 44: | ||
== WebStart == | == WebStart == | ||
− | |||
* A new top-level project webstart has been created | * A new top-level project webstart has been created | ||
* This is a feature (equinox language). | * This is a feature (equinox language). | ||
** It wraps all plugins. | ** It wraps all plugins. | ||
+ | * If you do not have one, create a keystore | ||
+ | ** eg. using: keytool -genkey -alias adempiere -keystore equinox-target/dist/keystore | ||
* open webstart/feature.xml (should open in the eclipse feature editor) | * open webstart/feature.xml (should open in the eclipse feature editor) | ||
* Press the "export deployable feature" icon in the top-right corner | * Press the "export deployable feature" icon in the top-right corner | ||
− | ** Choose | + | ** Choose equinox-target/dist/webstart as output directory |
− | ** Under JAR signed, provide your | + | ** Under JAR signed, provide your keystore |
** Under Java Web Start, provide the location the JNLP will be downloaded from and the JVM spec | ** Under Java Web Start, provide the location the JNLP will be downloaded from and the JVM spec | ||
** Click Finish | ** Click Finish | ||
− | * in equinox-target/adempiere-equinox.jnlp, enter the correct download location either. | + | * in equinox-target/dist/webstart/adempiere-equinox.jnlp, enter the correct download location either. |
− | * in the jnlp file under equinox-target/features, you have to correct the tags under "information", copy those from equinox-target/adempiere-equinox.jnlp | + | * in the jnlp file under equinox-target/dist/webstart/features, you have to correct the tags under "information", copy those from equinox-target/dist/webstart/adempiere-equinox.jnlp |
− | * on the console, cd to equinox-target | + | * Run it using one of the following options: |
− | * | + | ** on the console, cd to equinox-target/dist/webstart and execute javaws adempiere-equinox.jnlp |
+ | ** in a web-container, link a webapp to equinox-target/dist/webstart and download the app from webstart/adempiere-equinox.jnlp | ||
Line 86: | Line 88: | ||
= See Also = | = See Also = | ||
+ | |||
* [[Equinox Integration]] | * [[Equinox Integration]] | ||
* [http://sourceforge.net/forum/forum.php?thread_id=2143547&forum_id=610546 SourceForge discussion] | * [http://sourceforge.net/forum/forum.php?thread_id=2143547&forum_id=610546 SourceForge discussion] | ||
* [[ADempiere/OSGi Integration]] | * [[ADempiere/OSGi Integration]] | ||
* [[RoadmapToModularization]] | * [[RoadmapToModularization]] | ||
+ | |||
+ | * Equinox webstart documentation: http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/java_web_start.htm | ||
+ | |||
[[Category:Projects and Tools]] | [[Category:Projects and Tools]] |
Revision as of 10:07, 10 March 2010
Approach 2: Embedding ADempiere in Equinox BEWARE: Install howtos currently are very short!
Contents
Status: Alpha Code - Review required
- Swing client can be fired up inside equinox.
- very few tests applied
- Webstart has been fired up with equinox.
- zkwebui runs inside OSGi through equinox servlet bridge
- Currently, deployment is in no way integrated in the standard adempiere setup!
Setup
- Code is in https://adempiere.svn.sourceforge.net/svnroot/adempiere/branches/osgi/approach2 - this is a "real" svn branch - check it out!
- Use multiple project setup
- Simple trick on slow sf.net to get into multiple project setup: Do one checkout, rename top-level .project file, import projects into workspace
Eclipse setup
- As usual: File/Import.../Existing Projects into Workspace
- You find a new top-level project equinox-target. It serves the following purposes:
- acting as an equinox-target, defining the eclipse dev environment
- providing ant-based setup for development environment for standalone swing client, webstart and web ui.
- Later: installing equinox runtime components in the ADempiere install process
- Open the file equinox-target/equinox.target and click "Set as target platform" in the upper right corner.
- Now eclipse knows about the specific equinox bundle configuration we are going to use.
Development Environment
- cd to equinox target and say "ant"
- This won't build anything but instead set up three development platforms under the folder "dist":
- dist/standalone is an (empty) Equinox 3.5.0-Container runtime
- dist/webstart is a webapp containing the JNLP and jars for the web-started app
- dist/web is an (empty) servlet-bridge accessible Equinox 3.5.0-Container webapp.
- After having these successfully set up, you have to deploy the adempiere plugins into these environments
Swing Standalone
- Open base/META-INF/MANIFEST.MF, press the "export deployable plugins and fragments" icon in the top-right corner
- select the plugins base, client and tools.
- choose equinox-target/dist/standalone as the output directory
- Finish
- on commandline, cd to copy of equinox-target
- ant run-standalone
WebStart
- A new top-level project webstart has been created
- This is a feature (equinox language).
- It wraps all plugins.
- If you do not have one, create a keystore
- eg. using: keytool -genkey -alias adempiere -keystore equinox-target/dist/keystore
- open webstart/feature.xml (should open in the eclipse feature editor)
- Press the "export deployable feature" icon in the top-right corner
- Choose equinox-target/dist/webstart as output directory
- Under JAR signed, provide your keystore
- Under Java Web Start, provide the location the JNLP will be downloaded from and the JVM spec
- Click Finish
- in equinox-target/dist/webstart/adempiere-equinox.jnlp, enter the correct download location either.
- in the jnlp file under equinox-target/dist/webstart/features, you have to correct the tags under "information", copy those from equinox-target/dist/webstart/adempiere-equinox.jnlp
- Run it using one of the following options:
- on the console, cd to equinox-target/dist/webstart and execute javaws adempiere-equinox.jnlp
- in a web-container, link a webapp to equinox-target/dist/webstart and download the app from webstart/adempiere-equinox.jnlp
ZK Web UI
- New top-level project equinox bridge provides bridging web-app.
- export all adempiere plugins to equinox-bridge/WebContext/WEB-INF/eclipse
- install a tomcat-5.5.28
- ln -s equinox-bridge/WebContent tomcat-5.5.28/webapps/equinox-bridge
- rm -rf tomcat-5.5.28/work/* (ensure using current build)
- fire up tomcat: catalina.sh jpda run (jpda for remote debugging)
- http://localhost:8080/equinox-bridge/index.zul
- Enjoy
Tutorials
Learning Points Encountered
- client code in base: this code has no access eg. on resources in client.
- First core interface defined: IResourceFinder
- Adempiere.class.getResource() converted to Adempiere.getResource() - which in turn uses IResourceHandler
- Postgres Driver in tools is java 1.6? - Have to use a 1.6 VM!
- ZK Servlets do not save ServletConfig - Workaround checked in
- Standard Equinox bridging webapp incompatible with up-to-date equinox - updated version provided.
See Also
- Equinox webstart documentation: http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/java_web_start.htm