Configure Development Environment

Configure Development Environment

This is the first blog post in a series on installing and configuring development environment for Pixel Core Framework. The next article could be found here.

Overview

Pixel Core is a development framework that provides basic common functionality out of the box. Framework could come in two types of distributions: source or binary. Both distributions are exactly the same except source distribution contains Java source files and could be used for deep customization of the framework.

Although it is possible to modify distribution and use it as main project, we recommend to create separate project and use links to PixelCore3 project as it is easier to update distribution to newer versions.

Initial Configuration

Framework is designed as web project. We recommend using Eclipse IDE for Java EE Developers as main development IDE.

Eclipse and Tomcat Installation and Configuration

    1. Install latest Eclipse JavaEE for Web Developers (Neon at the time of writing)
    2. SVN
      1. If using SVN as main repository, add the following arguments to ini file:
        -Xverify:none-Djsse.enable
                 SNIExtension=false
      2. Install SVN via menu Help->Eclipse Marketplace (Subversive – SVN Team Provider 2.0)
      3. Install SVNKit 1.7.* connector
    3. Install AJDT Plugin http://download.eclipse.org/tools/ajdt/46/dev/update
    4. Install TestNG for Eclipse via menu Help->Eclipse Marketplace
    5. Import project into workspace
      1. If Pixel Core Framework is delivered with sources – in sample project ProductManagement modify path variable PNI_LOC to reflect current project location
    6. Apache Tomcat
      1. Install Apache Tomcat 8.x and configure Eclipse Server to use is for the project
      2. Add project to the server
      3. Generate keystore in ${user.home}/.keystore if not generated yet
      4. Configure Tomcat to use https. Add the following to the server.xml changing the password (keystorePass)
        <Connector SSLEnabled="true" clientAuth="false" keystoreFile="${user.home}/.keystore" keystorePass="secret" maxThreads="150" port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" scheme="https" secure="true" sslProtocol="TLS"/>
      5. With Tomcat8 default target for JSP is Java7. If JSP scriplets should contain Java8 features following is necessary: In ${TOMCAT_HOME}/conf/web.xml insert appropriate init parameters
            <servlet>
                <servlet-name>jsp</servlet-name>
                <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
                <!-- BEGING TO SUPPORT JAVA8 -->
                <init-param>
                    <param-name>compiler</param-name>
                    <param-value>modern</param-value>
                </init-param>
                <init-param>
                    <param-name>compilerSourceVM</param-name>
                    <param-value>1.8</param-value>
                </init-param>
                <init-param>
                     <param-name>compilerTargetVM</param-name>
                     <param-value>1.8</param-value>
                </init-param>
                <!-- END TO SUPPORT JAVA8 -->
                <init-param>
                    <param-name>fork</param-name>
                    <param-value>false</param-value>
                </init-param>
                <init-param>
                    <param-name>xpoweredBy</param-name>
                    <param-value>false</param-value>
                </init-param>
                <load-on-startup>3</load-on-startup>
            </servlet>

    Import Project into Eclipse

    Bring PixelCore3 into Eclipse as an existing project

    And as a result we can see PixelCore3 in Package Explorer

    At this point your environment is ready. Next blog post will describe how to create a new project and link appropriate resources from Core project.