Setting up the Development Environment

Prerequisites

A development environment for the factory should be set up before you try to install the development environment for the user interface. Follow this tutorial to set up your factory development environment. The following software packages are necessary for the development of GWT Views for the Qualipso Factory. Information on how to install each package is beyond the scope of this documentation; their respective web sites should provide enough information about that task.

Although not mandatory, the use of Eclipse as a development environment is advised. There are plugins available for both Maven and GWT integration, which provide advantages such as the GWT Development Mode (automatic refresh, debugger, etc), templates, code completion between resources, etc. A great deal of work has been done to make the Maven process compatible with Eclipse. This means that you can compile everything only with Maven, but you can also use Eclipse and use all the pretty features of GWT integrated with Eclipse (with the GWT plugin).

About the development environment for the factory, more detailed informations are available in the developer section. In this tutorial, you will see how to checkout the development repository with:

Get the Sources

The "Factory UI" is a Maven project stored in the INRIA Subversion repository located at:

    https://scm.gforge.inria.fr/svn/qualipso/trunk/factory-ui/

It contains all the Maven modules (code) necessary for the development of Qualipso Factory views. To start your development, you have to first checkout this project from the repository.

One point: it shouldn't be necessary to download and compile the whole factory UI just to develop and test one service. So at one near point in time, you will just have to download one pom project (factory-assembly) and a template to develop a view, same procedure as to develop an abstract service.

Server Configuration

  • Download & unzip JBoss v.6.0.0.M2
  • Create an environment variable JBOSS_HOME
  • Create two files in the conf folder of the default server ($JBOSS_HOME/server/default/conf) :
    • factory.config (download here):
      root.username=root
      root.password=root
      
      server.host=localhost
      server.port=8080
      
      http.host=localhost
      http.port=8080
      
      naming.host=localhost
      naming.port=1099
      
      xacml.policy.repository.classname=org.qualipso.factory.security.repository.file.FilePolicyRepository
    • login-config.xml (download here) if you already had this file you can simply add an application policy for 'qualipso' and modify the one for 'JBossWSDigest':
      ...
      
      <application-policy name="qualipso">
        <authentication>
          <login-module code="org.jboss.security.ClientLoginModule" flag="required">
             <!-- Any existing security context will be restored on logout -->
             <module-option name="restore-login-identity">true</module-option>
          </login-module>
        </authentication>
      </application-policy>
      
      ...
      
      <application-policy name="JBossWSDigest">
        <authentication>
          <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag="sufficient">
            <module-option name="usersProperties">props/jbossws-users.properties</module-option>
            <module-option name="rolesProperties">props/jbossws-roles.properties</module-option>
            <module-option name="unauthenticatedIdentity">guest</module-option>
          </login-module>
        </authentication>
      </application-policy>
      
      ...

Compile

  • Generating a WAR file (which will be included in the overall EAR file) can be done if the 'factory-parent' project has been checked out (cf. Development guide)
    • Modify the pom.xml file in the 'factory-ui-assembly' project as wanted to include or exclude some of external services
    • For the whole UI, use the following maven command on each of these modules (a batch can be downloaded here):
      mvn clean install
      Module nameDescriptionExternal toolCompilation
      factory-ui-parentParent moduleN/Arequired
      factory-ui-service-parentParent module for external servicesN/Arequired
      factory-ui-shared-OpenPartsOpenParts framework allowing composite integration (every project should inherit it)N/Arequired
      factory-ui-shared-QGWTQGWT framework allowing to use a common graphical style (every project should inherit it)N/Arequired
      factory-ui-shared-skinSkin framework allowing to customize the styleN/Arequired
      factory-identity-managerUser management moduleN/Arequired
      factory-ui-coreCore moduleN/Arequired
      factory-ui-service-projectProject moduleNorequired
      factory-ui-service-bugtrackerBug tracker moduleMantisoptional
      factory-ui-service-gitGit moduleNo (JGit included)optional
      factory-ui-service-svnSvn moduleSubversionoptional
      factory-ui-service-issuetrackerIssue tracker moduleNooptional
      factory-ui-service-mailingMailing list module??optional
      factory-ui-service-forumForum moduleMermigoptional
      factory-ui-service-chatChat moduleChatOSoptional
      factory-ui-service-voip-conferencesVOIP moduleAsteriskoptional
      factory-ui-assemblyWAR generator moduleN/Arequired
    • Generating an EAR file can be done by checking out some required projects of the factory: 'factory-parent' and 'factory-assembly' (cf. Development guide)
      • Modify the pom.xml file in the 'factory-assembly' project as wanted to include or exclude some of external services
      • Use the following maven command on the 'factory-assembly' project:
        mvn clean package
      • The 'qualipso-factory-0.6-SNAPSHOT.ear' file can be found in the target folder of the 'factory-assembly' project

Deploy

  • Paste the EAR file in the deploy folder of the default server ($JBOSS_HOME/server/default/deploy)
  • If you are using external services, copy/paste those properties files inside the conf folder ($JBOSS_HOME/server/default/conf) cf. bugtracker-service.properties and subversion-service.properties
  • Inside the bin folder ($JBOSS_HOME/bin), run the server with an argument to specify the custom configuration via that command line:
    run -Dqualipso.factory.config=$JBOSS_HOME/server/default/conf/factory.config
  • The UI can be accessed at the URL:
    http://localhost:8080/factory

Frequently Asked Questions

Question: I'm not really sure, but if you use the eclipse gwt plugin, you don't really need to install GWT sdk, right?

  • In fact, you will still need to install the GWT sdk. You don't need it to compile or to deploy, but eclipse needs it for development mode.

Question: Maybe it's best to download the Eclipse JEE package, which already comes with server integration.

  • Yes, absolutely. In fact, as said before, you should base this part (Eclipse) on the documentation for factory core, but don't forget that you need to install maven 2.2.1 and not use the version from eclipse or you won't be able to compile the factory-ui.

Question: I've seen on the mailing list that the server jetty was required to deploy the factory UI. Why is'nt it a prerequisite ?

  • Since the factory updated to JBoss AS 6.0.0.M2 we don't need a different server to deploy the user interface : both factory and factory-ui will be deployed in JBoss.

Question: Tests on generate lots of warnings about missing resources like 'dummyService_partloaderXX/..nocache.js' or 'dummyService_shellpartloadingXX/...nochace.js' or 'INEXISTENT_SERVICE/...' like on this build, but they seem harmless.

  • Yes, they are harmless, in fact they are necessary, they correspond to test about trying to load services that don't exist. So it's not a bug, it's a feature :)

Question: Is there any easier way to do step 4 other than running maven in each modules' dirs?

  • We are working on a script that will compile the whole UI.

Question: Factory-ui-test tries to run Selenium tests... it should be 'mvn install'ed only after deploying?

  • In fact no, factory-ui-test should only be ran through "mvn test", as it's just selenium "integration" tests. Even no need to compile it for deploying, as it should be ran AFTER UI is deployed.