= Platform deployment build in Eclipse =
To deploy Sophie 2.0 project in Eclipse you have to follow these steps:
* choose '''Import...''' option from the File menu or with right click on the Package tree.
* Select General->Maven Projects and click Next (Or use the search box to search for Maven)
* Choose sophie2-platform directory for Root Directory, browsing to your imported repo.
* (recommended) Choose '''Add Project to working set''' and
* make '''New...''' working set with '''Java elements'''
* choose the name for the working set (i.e. sophie2-working-set)
* click '''Finish'''
* note: do not worry about the mistakes in Maven Console
* right-click on the project in Eclipse, and click Maven/Update Dependencies to finish integration.
Now you have Eclipse working set containing the Sophie 2.0 modules.[[BR]]
The base project is sophie2-platform. You can run the project by:
1. Right click on "org.sophie2.author "
1. Choose "Run As->Java Application"
1. Choose "FakeAuthorMain - org.sophie2.author"[[BR]]
This is not the real OSGi container, it is only an emulation for running the application under Eclipse IDE - otherwise, you have to wait at least two minutes for Maven build for every little change in the source.
= Additional information =
* You have to be careful making new modules for the project. These are the steps:
* make new empty directory with org.sophie2.modulename name in sophie2-platform/modules and create its pom.xml file
* add it to repository and commit it. Also add it to base pom.xml of sophie2-platform in modules section.
* right click - '''Import...''' - Maven projects - choose the new created module
* 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.
* If you don't see the working sets, use
* View Menu(in upper right corner of Package Tree) and Configure working sets option.
* Top Level Elements - choose Working Sets
= How to create a new module =
* Copy sophie2-platform/dev-tools/org.sophie2.proto.project to sophie2-platform/modules
* Edit pom.xml
{{{
org.sophie2.proto.project
2.0-SNAPSHOT
Sophie 2 Author Component
bundle
Copy from this one to create a sophie2 module
}}}
and
{{{
org.sophie2.proto.project.ProtoModule
org.sophie2.proto.project.*
org.sophie2.author.Activator
*;scope=compile|runtime
*;resolution:=optional
}}}
If you don't have main class you should remove
* Rename the project - artifactId and the name of the project should be the same
* right click at sophie-working-set - '''Import...''' - Maven projects - choose the new created module
= Comments =
* boyan
* There is duplicate information about creating a new module and the one in the Additional Information section is not correct.