- Eclipse Neon
- Check [
Eclipse Setup.md
](./Eclipse Setup.md) for further details on the setup of Eclipse - Read/Execute [
Glassfish Setup.md
](./Glassfish Setup.md) and consult [Deployment Setup.md
](./Deployment Setup.md)
-
cocome-maven-project
git clone https://github.com/cocome-community-case-study/cocome-cloud-jee-platform-migration.git
-
service-adapter
git clone https://github.com/cocome-community-case-study/cocome-cloud-jee-service-adapter.git
You can do this by using the Eclipse git plugin. Go to 'open persepective' -> select GIT -> clone a git repository -> enter both links mentioned above into URI https://github....
- You can directly check out and import the Maven Projects by selecting 'File' -> 'Import' -> 'Check out Maven Projects From SCM'
- Click on 'Next'
- In the next window, select 'git' as SCM. (If the 'git' option is not available, install the Sonatype m2e EGIT connector by clicking on 'm2e Marketplace' on the bottom left) In the URL field enter one of the above URLs.
- Click on 'Next' and then 'Finish'. The projects will now be imported into your workspace.
- You can now skip the 'Import Maven Projects' step
-
Choose 'File' -> 'Import' -> 'Existing Maven Projects'
-
Click 'Next'
-
Click 'Browse...' and select the root directory of the
cocome-cloud-jee-platform-migration
repository -
Click 'Ok' in the directory dialog
-
Make sure all projects are checked in the displayed list
-
Click 'Finish'
-
Re-iterate this process with the root directory of the
cocome-cloud-jee-service-adapter
repository. DO NOT start building CoCoME until you finished this process for the service-adapter!
-
Please consult
Glassfish Setup.md
andDeployment Setup.md
before configuring the two Maven-based CoCoME projects. -
In the main project
cocome-maven-project
you may find a file calledsettings.xml.template
-
Create a copy of this file and name it
settings.xml
-
Open
settings.xml
-
You find five groups of settings labeled
node deployment configuration
prefixed withregistry
,store
,enterprise
,web
andservice adapter
-
Define the correct values for each deployment configuration. These are specifically
domain
,host
,adminPort
,httpPort
,protocol
,user
,password
-
Normally the domain name has to be named after your Glassfish server, host should be changed to 'localhost' or the IP address of your Glassfish server, 'adminPort' should be portbase+48 (eg. portbase is 8400 -> 'adminPort' is 8448) , 'httpPort' should be portbase+80, 'user' should be admin and the 'password' should be blank, if you didn't choose one while creating the Glassfish domains (do not delete the password line).
-
However, in case you use one Glassfish server for multiple domains or you have configured you Glassfish servers with different admin and http ports, then you have to set these values properly.
-
In the
service-adapter
project, proceed in a similar way (You should have added a Glassfish domain for this one too). Therefore read the README in the cocome-cloud-jee-service-adapter project. -
Make sure you refer to the same domain for
service adapter
in this setting file and in the setting file of the service-adapter.Notice: the domain 'adapter' you propably created during glassfish setup is supposed to be the domain for the service-adapter project.
Don't forget to start the Glassfish servers. Go to 'Servers'- perspective -> Right-click -> Start. Very important: Whenever you start the glassfish domains, you have to do this in the following order: start database, start registry, start adapter, start the rest.
On command line you may build CoCoME as follows:
- Enter the
maven-cocome-project
foldermvn -s settings.xml clean compile package
You may execute these three steps also with separate Maven calls. - Switch to the other repository and run Maven
mvn -s settings.xml clean compile package
If you want to use the Maven commands from within Eclipse, create the following setup:
- Right-click on cocome-maven-project -> Run As -> Build...
- Set the following values:
- Goals: clean compile package
- Profiles: Leave empty
- User Settings: Use your settings.xml from the actual project
The resulting packages can now be deployed by hand, via
mvn -s settings.xml install
(in both projects), or via the deployment
script deployment.sh
. Please read the [Deployment Setup.md
](./Deployment Setup.md).
Eclipse may show errors in a few projects because of missing classes. This is because some classes are
only generated by a Maven build. These errors will disappear after running the Maven build process
and right-click on cocome-maven-project
-> 'Maven' -> 'Update Project' -> 'OK'.