Changes between Version 20 and Version 21 of PLATFORM_DEPLOYMENT_BUILD_ECLIPSE
- Timestamp:
- 12/21/08 16:51:58 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PLATFORM_DEPLOYMENT_BUILD_ECLIPSE
v20 v21 31 31 These are not the real OSGi containers but only emulations for running the application under Eclipse IDE - otherwise, you have to wait at least two minutes for Maven to build for every little change in the source code. 32 32 33 = Additional information = 34 * You have to be careful making new modules for the project. These are the steps: 35 * make new empty directory with org.sophie2.modulename name in sophie2-platform/modules and create its pom.xml file 36 * add it to repository and commit it. Also add it to base pom.xml of sophie2-platform in modules section. 37 * right click - '''Import...''' - Maven projects - choose the new created module 33 == Creating a new module == 38 34 39 * Keep in mind to use Maven options '''Update Project Configuration''' and '''Update Dependencies''' when you change the pom.xml files. They are available in Maven section when you right click on the project you want to update. 40 * If you don't see the working sets, use 41 * View Menu(in upper right corner of Package Tree) and Configure working sets option. 42 * Top Level Elements - choose Working Sets 43 44 = How to create a new module = 35 When you have to create a new module, follow these steps: 45 36 * Copy sophie2-platform/dev-tools/org.sophie2.proto.project to sophie2-platform/modules 46 * Edit pom.xml 37 * Right-click on the module in the new location, choose '''Refactor''' -> '''Rename''' and enter the name of the new module. 38 * Edit the following part of the pom.xml file of the new module: 47 39 {{{ 48 40 <artifactId>org.sophie2.proto.project</artifactId> … … 51 43 <packaging>bundle</packaging> 52 44 <description>Copy from this one to create a sophie2 module</description> 45 ... (some more lines) 46 <Export-Package>org.sophie2.proto.project.*</Export-Package> 53 47 }}} 54 and 55 {{{ 56 <instructions> 57 <Main-Class>org.sophie2.proto.project.ProtoModule</Main-Class> 58 <Export-Package>org.sophie2.proto.project.*</Export-Package> 59 <!-- <Private-Package>org.apache.felix.moduleloader.*,org.apache.felix.framework.*,org.apache.felix.main,org.osgi.*,org.apache.log4j.*</Private-Package>--> 60 <Bundle-Activator>org.sophie2.author.Activator</Bundle-Activator> 61 <Embed-Dependency>*;scope=compile|runtime</Embed-Dependency> 62 <Import-Package>*;resolution:=optional</Import-Package> 63 </instructions> 64 }}} 65 If you don't have main class you should remove <Main-Class> 66 * Rename the project - artifactId and the name of the project should be the same 67 * right click at sophie-working-set - '''Import...''' - Maven projects - choose the new created module 48 The <artifactId> should be the same as the module name. All other occurencies of org.sophie2.proto.project (for example in the <Export-Package> should be replaced with the new module name. You should also edit the <name> and <description> tags. You can look at the <instructions> tag if your module reqires a main class or a class extending SophieModule. 49 * Edit the pom.xml of sophie2-platform and add the name of the new module in the <modules> section. 68 50 69 = Comments = 70 * boyan 71 * There is duplicate information about creating a new module and the one in the Additional Information section is not correct. 51 == Updating the project with newly created modules == 52 53 * Keep in mind to use Maven options '''Update Project Configuration''' and '''Update Dependencies''' when you change the pom.xml files. They are available in Maven section when you right click on the project you want to update. 54 * If you don't see the working sets, use 55 * View Menu(in upper right corner of Package Tree) and Configure working sets option. 56 * Top Level Elements - choose Working Sets