Difference between revisions of "Imeji Developer environment"

From MPDLMediaWiki
Jump to navigation Jump to search
m (Protected "Imeji Developer environment" (‎[edit=sysop] (indefinite) ‎[move=sysop] (indefinite)))
(Replaced content with "'''Please note:''' Content was moved to http://imeji.org/wordpress/development/")
Line 1: Line 1:
{{Imeji_Tech}}
'''Please note:''' Content was moved to http://imeji.org/wordpress/development/
 
This page describes how to develop the imeji software.
 
=Introduction=
The imeji software is developed and supported by the imeji community. If you want to participate to the project, please contact the [mailto:imeji-community@gwdg.de community].
 
=Install Java=
imeji supports java 6. Compatibility with Java 7 is not guarantee:
* [http://www.java.com/de/download/manual_v6.jsp Download Java 6]
 
=Install Eclipse=
For the development, we encourage to use the Eclipse IDE for JEE developers:
* [http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/junosr1 Download Eclipse]
 
=Install Maven=
imeji use Maven 2.2.1:
* [http://maven.apache.org/download.html Download Maven]
To install Maven, please follow [[Installation_of_maven | this guide]]. You can also use the Maven Eclipse plugin. To install it, please follow [[Maven_integration_in_eclipse | this guide ]]
 
=Install application Software=
imeji needs an application server to run. Currently, the supported servers are:
==JBoss==
* [http://www.jboss.org/jbossas/downloads/ Download JBoss 7.1.1]
=== Import JBoss in Eclipse ===
# Open Eclipse
# Since Jboss 7 is not in last default Eclipse, you need to import the jboss plugin: On the top menu, select help -> Eclipse Marketplace. Search for jboss. Install either JBoss Tools or JBoss developer studio.
# On the top menu, select Window -> Show View -> Server (If server is not displayed, select Other and then Server)
# Right click in Server View, select New -> Server
# Select JBoss -> JBoss 7 and click finish (or next if you want to change the default ports)
 
=== Config===
* Edit standalone.xml with (after the extensions):
    <system-properties>
        <property name="org.apache.catalina.connector.URI_ENCODING" value="UTF-8"/>
        <property name="org.apache.catalina.connector.USE_BODY_ENCODING_FOR_QUERY_STRING" value="true"/>
    </system-properties>
 
== Tomcat==
* [http://tomcat.apache.org/download-70.cgi Download Tomcat 7]
=== Import Tomcat in Eclipse ===
# Open Eclipse
# On the top menu, select Window -> Show View -> Server (If server is not displayed, select Other and then Server)
# Right click in Server View, select New -> Server
# Select Apache -> Tomcat v7.0 and click finish (or next if you want to change the default ports)
 
=== Configuration===
* Edit web.xml connectors with URIEncoding attribute, as following:
<code>
<Connector URIEncoding="UTF-8"/>
</code>
 
=Download source=
The imeji code source is hosted at [https://github.com/imeji-community/imeji Github]. We recommend to use the official Github client:
* [http://windows.github.com/ Download Github client for Windows]
* [http://mac.github.com/ Download Github client for Mac]
* [http://eclipse.github.com/ Download Github client for Eclipse]
===Clone imeji on Windows===
After having installed the Github client for Windows, go on [https://github.com/imeji-community/imeji imeji Github page] and click on "clone in Windows".
 
=Import imeji in Eclipse=
# open Eclipse
# Click on top menu "File"
# Select Import
# Select Maven: Existing Maven Project and click on next
# Browse file system, select the imeji directory and click on "Finish"
 
=Install jRebel=
jRebel is tool enabling automatic "hot deploy" to avoid to redeploy your application on the server for each changes. It can be downloaded [http://zeroturnaround.com/software/jrebel/download/prev-releases/ here]. To install it:
# Unzip jRebel, and copy it somewhere in your computer
# Add license (see notes) in jrebel_home directory
# Add it to your server (server -> double click on server -> Open launch configuration -> arguments) (replace JREBEL_HOME_PATH with your local path):
## for Tomcat: -javaagent:JREBEL_HOME_PATH\jrebel.jar
## for JBoss: -noverify -javaagent:JREBEL_HOME_PATH\jrebel.jar
# Check: that server publishing is set on "never publish automatically"  and that imeji is build automatically (top menu -> Project -> Build automatically)
 
Notes: jRebel is free for open source development. Ask for a license at http://zeroturnaround.com/.
 
=Compile imeji=
* Set credentials in your settings.xml of maven (for actual values, please contact [mailto:imeji-support@gwdg.de]):
<code>
<properties>
  <jboss.install.dir>YOUR_JBOOS_PATH</jboss.install.dir>
  <escidoc.framework_access.framework.url>YOUR_CORESERVICE_URL</escidoc.framework_access.framework.url>
  <imeji.tdb.path>YOUR_JENA_DIRECTORY</imeji.tdb.path>
  <imeji.sysadmin.email>admin_email</imeji.sysadmin.email>
  <imeji.sysadmin.password>a_password</imeji.sysadmin.password>
  <imeji.escidoc.user>an_escidoc_user</imeji.escidoc.user>
  <imeji.escidoc.password>a_password</imeji.escidoc.password>
  <framework.admin.username>coreservice_admin_login</framework.admin.username>
  <framework.admin.password>password</framework.admin.password>
  <imeji.email.server.smtp>YOUR_MAILSERVER</imeji.email.server.smtp>
  <imeji.email.user>mailserver_user</imeji.email.user>
  <imeji.email.password>mailserver_pwd</imeji.email.password>
  <imeji.email.auth>true/false</imeji.email.auth>
  <imeji.email.sender>sender_adress</imeji.email.sender>
</properties>
</code>
* Check properties in "''meta''" pom.xml
**  Attention: Some properties are related to the core service. If you install your own core service, you will have to adapt it. Please check the [https://www.escidoc.org/JSPWiki/en/DownloadInfrastructure eSciDoc core service page]. For problems with the core service please contact the eSciDoc developer [mailto:escidoc-dev-ext@gwdg.de mailing list]
** '''For more information about the properties see the [[imeji properties]] page'''
* If you want to use the [[ESciDoc_Services_FledgedDataService | Fledged Data Service]] you need to adapt the fds.properties
* Compile presentation: clean install
** For Tomcat users: Copy the generated war in TOMCAT_HOME/webapps and copy the imeji properties files (imeji.properties and vocabulary.properties) in TOMCAT_HOME/conf
** For jboss users: Compile ear: clean install jboss-as:deploy (use then jboss-as:redeploy)
* Add the properties (imeji.properties and vocabulary.properties) in:
** TOMCAT_HOME/conf
** JBOSS_HOME/standalone/configuration
* Start your server
* imeji is available at [http://localhost:8080/imeji/ http://localhost:8080/imeji/] (port is depending to your configuration. An Apache server can be used to hide the port)
 
[[Category:Imeji|Developer environment]]
[[Category:Imeji_Technical_Specification|Developer environment]]

Revision as of 10:27, 3 January 2014

Please note: Content was moved to http://imeji.org/wordpress/development/