Skip to content

Migration Guide 1.0.2

atshushi yoshikawa edited this page Feb 18, 2016 · 5 revisions

Migrating from 1.0.1 to 1.0.2

.. only:: html

 .. contents:: Table of contents
    :depth: 2
    :local:

Main changes in 1.0.2

Main changes in version 1.0.2 are following.

  • Updated the Spring Framework to 3.2.13
  • Changed some specifications in common library according to fixing bugs
  • Fixed bugs about blank projects
  • Improved blank projects

Updated the Spring Framework to 3.2.13

From version 1.0.2, Spring has been updated to 3.2.13.RELEASE to fix important bugs.

  • [SPR-12354] Directory traversal with static resource handling (CVE-2014-3625)

Note

SPR-12354 has been resolved at 3.2.12.RELEASE.

Changed some specifications in common library according to fixing bugs

From version 1.0.2, some specifications in common library have been changed according to fixing the following bugs in 1.0.1.RELEASE.

  • [#148] QueryEscapeUtils does not work on Oracle 11g Release2(11.2) later
  • [#149] f:u() (EL Function) perform wrong encoding for query parameter
  • [#167] Modify CompositeRequestDataValueProcessor
  • [#256] ValidationMessages.properties should not be included in terasoluna-gfw-common

Fixed bugs about blank projects

From version 1.0.2, some setting files in blank projects have been changed to fix the following bugs in 1.0.1.RELEASE.

[Application configuration files]

  • [multi#50] TilesViewResolver and BeanNameViewResolver is same order(priority)
  • [single#39] ResultMessagesLoggingInterceptor does not define in domain.xml (JAP & MyBatis)
  • [single#45] Remove removeValue settings in UserIdMDCPutFilter

[Project configuration files(POM,etc...)]

  • [multi#8] "distributionManagement" element seems unnecessary.
  • [multi#36] [single#46] Add <relativePath /> in pom.xm
  • [multi#59] findbugs-maven-plugin's configuration parameter is wrong.

Improved blank projects

From version 1.0.2, some setting files in blank projects have been improved.

[Application configuration files]

[Project configuration files(POM,etc...)]

  • [multi#47] Unnecessary property(jasperreports.version) exists in pom.xml
  • [multi#92] Improve JDBC driver dependency settings
  • [single#6] add dependencies to support unit test!
  • [single#60] Modify scope of artifact dependency

Migration procedures from 1.0.1 to 1.0.2

Migration procedures are as follows.

Note

Legend

Required : This procedure is mandatory.
Required by case : This procedure is mandatory, if conditions match.
Optional : This procedure is recommended. Perform it if you feel the need.
- : This procedure is not required.

[General]

.. tabularcolumns:: |p{0.10\linewidth}|p{0.30\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|
Step Procedure MavenMultiple Projects MavenSingle Project EclipseWTP Project
Update dependency libraries Required Required Required

[Bug fix of Common Library]

.. tabularcolumns:: |p{0.10\linewidth}|p{0.30\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|
Step Procedure MavenMultiple Projects MavenSingle Project EclipseWTP Project
Apply the changes in specification of QueryEscapeUtils's methods Required by case Required by case Required by case
Apply the changes in specification of f:u() Required by case Required by case Required by case
Apply the changes in specification of CompositeRequestDataValueProcessor Required by case Required by case Required by case
Add the ValidationMessages.properties into your project Required by case Required by case Required by case

[Fixing bugs of Blank project]

.. tabularcolumns:: |p{0.10\linewidth}|p{0.30\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|
Step Procedure MavenMultiple Projects MavenSingle Project EclipseWTP Project
Apply the fixes of ViewResolver setting into spring-mvc.xml Required by case - -
Apply the adding of ResultMessagesLoggingInterceptor setting into xxx-domain.xml - Required by case Required by case
Apply the fixes of UserIdMDCPutFilter setting into spring-security.xml - Required by case Required by case
Apply the fixes of <distributionManagement> setting into pom.xml Optional - -
Apply the fixes of <relativePath> setting into pom.xml Optional Optional -
Apply the fixes of findbugs-maven-plugin's setting into pom.xml Optional - -

[Improving Blank project]

.. tabularcolumns:: |p{0.10\linewidth}|p{0.30\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|
Step Procedure MavenMultiple Projects MavenSingle Project EclipseWTP Project
Apply the fixes of JdbcCodeList setting into xxx-codelist.xml Optional Optional Optional
Apply the fixes of code list import setting into xxx-domain.xml Optional Optional Optional
Apply the fixes of CodeListInterceptor setting into spring-mvc.xml Optional Optional Optional
Apply the fixes of properties setting into pom.xml Optional - -
Apply the fixes of dependency settings of JDBC driver into pom.xml Optional - -
Apply the fixes of dependency settings for test into pom.xml - Optional Optional
Apply the fixes of dependency scope settings into pom.xml - Optional -

[Step 1] Update dependency libraries

Please update TERASOLUNA Global Framework Common Library and dependency libraries.

.. tabularcolumns:: |p{0.35\linewidth}|p{0.25\linewidth}|p{0.25\linewidth}|p{0.15\linewidth}|
Library Name From version To version Remarks
TERASOLUNA Global Framework Common Library 1.0.1.RELEASE 1.0.2.RELEASE  
Spring Framework 3.2.10.RELEASE 3.2.13.RELEASE  

[Procedure's required cases]

This procedure is required.

[Step 1-1] Using Maven Multiple Projects

This update procedure is for the projects which are generated by using mvn archetype.

Update pom file in your parent project. ($YOUR_MULTIPLE_PROJECT_ROOT/pom.xml)

<parent>
    <groupId>org.terasoluna.gfw</groupId>
    <artifactId>terasoluna-gfw-parent</artifactId>
    <version>1.0.2.RELEASE</version> <!-- ### Need to edit ### -->
</parent>

[Step 1-2] Using Maven Single Project

This update procedure is for projects that are generated by using mvn archetype or downloaded from the release site.

Update pom file in your project. ($YOUR_SINGLE_PROJECT/pom.xml)

<parent>
    <groupId>org.terasoluna.gfw</groupId>
    <artifactId>terasoluna-gfw-parent</artifactId>
    <version>1.0.2.RELEASE</version> <!-- ### Need to edit ### -->
</parent>

[Step 1-3] Using Eclipse WTP Project

This update procedure is for Eclipse WTP project which is downloaded from the release site.

Please refer to Update libraries for using Eclipse WTP Project about update procedures.

[Step 2] Apply the changes in the specification of QueryEscapeUtils's methods

From version 1.0.2, the specification of QueryEscapeUtils's methods has been changed for the bug fix. Please see the GitHub issues#148 about bug information. With this specification change, the wrong escaping issue is resolved for wildcard characters of the LIKE phrase in the SQL(or JPQL).

Note

About wildcard characters(escape target characters)

Until version 1.0.1, wildcard characters is as follows:

  • % , _ , , _

Since version 1.0.2, default wildcard characters is as follows:

  • % , _

[Procedure's required cases]

If all of following cases are matched, please apply next modification.

  • If using QueryEscapeUtils's methods to escape the wildcard characters.
  • If using the database supporting '%' and '_' as wildcard characters (full width wildcard characters). e.g. Oracle 11g.

[Modification method]

Please modify to use option usage (compatibility option with 1.0.1).

  • Get a LikeConditionEscape instance for escaping full width wildcard characters using QueryEscapeUtils.withFullWidth() method.
  • Call same signature method with QueryEscapeUtils.

Modified code will be as follows:

String escapedWord = QueryEscapeUtils.withFullWidth().toLikeCondition(query);

[Step 3] Apply changes in the specification of f:u()

From version 1.0.2, the specification of f:u() has been changed for the bug fix. Please see the GitHub issues#149 about bug information. With this specification change, the wrong URL encoding issue is resolved in parameter values of query string.

Note

About encode target

  • Until version 1.0.1, f:u() was EL function to encode the URI string(e.g. http://localhost:8080/path?param=value#fragment).
  • Since version 1.0.2, f:u() is EL function to encode the request parameter values.

[Procedure's required cases]

If the following case is matched, please apply next modification.

  • If using to encode the URI string.

[Modification method]

Please modify to use JSP tag library following.

  • <c:url>
  • <spring:url>
<a href="<c:url value="${url}" />">Link Name</a>

[Step 4] Apply the changes in specification of CompositeRequestDataValueProcessor

From version 1.0.2, the specification of CompositeRequestDataValueProcessor#getExtraHiddenFields 's method has been changed for the bug fix. Please see the GitHub issues#167 about bug information.

Note

About output order of hidden tags generated by RequestDataValueProcessor

With this specification change, there is a possibility that output order of hidden tags generated by RequestDataValueProcessor (CSRF token, Transaction token, etc...) is changed.

[Procedure's required cases]

If match to one of following cases, please apply next modification.

  • If accessing hidden tags generated by RequestDataValueProcessor using the JavaScript.
  • If accessing hidden tags generated by RequestDataValueProcessor in automated E2E test cases(at Selenium,etc ...).

[Modification method]

If the problem occurs related to the output order of hidden tag, please change the accessing method to the hidden tag generated by RequestDataValueProcessor.

[Step 5] Add the ValidationMessages.properties into your project

From version 1.0.2, the ValidationMessages.properties has been excluded from terasoluna-gfw-common's jar file for the bug fix. Please see the GitHub issues#256 about bug information.

Related issues are [multi#99], [single#75].

Note

About displayed message

With this change, there is a possibility that @ExistInCodeList's default message is not displayed (instead of, message key is displayed).

[Procedure's required cases]

If all of following cases are matched, please apply next modification.

  • If using @ExistInCodeList annotation as bean validation.
  • If using @ExistInCodeList's default message of ValidationMessages.properties in terasoluna-gfw-common's jar file.

[Modification method]

Please add message definition of @ExistInCodeList in one of the following files. (If not exist the file in your project, please add the file into your project)

  • YOUR_MULTIPLE_PROJECT_ROOT/xxx-web/src/main/resources/ValidationMessages.properties
  • $YOUR_SINGLE_PROJECT/src/main/resources/ValidationMessages.properties
  • $YOUR_ECLIPSE_WTP_PROJECT/src/main/resources/ValidationMessages.properties
org.terasoluna.gfw.common.codelist.ExistInCodeList = Does not exist in {codeListId}

[Step 6] Apply the fixes of ViewResolver setting into spring-mvc.xml

From version 1.0.2, the order of setting of the BeanNameViewResolver has been changed to avoid same with TilesViewResolver and BeanNameViewResolver. Please see the GitHub multi/issues#50 about bug information.

[Procedure's required cases]

If all of the following cases are matched, please apply next modification.

  • If using the Apache Tiles as layout engine
  • If using the BeanNameViewResolver
  • If setting same order with TilesViewResolver and BeanNameViewResolver (if using the blank project setting as it is)

[Modification method]

Please change the BeanNameViewResolver's order to less than TilesViewResolver's order in the following file.

  • YOUR_MULTIPLE_PROJECT_ROOT/xxx-web/src/main/resources/META-INF/spring/spring-mvc.xml
<bean class="org.springframework.web.servlet.view.BeanNameViewResolver">
    <property name="order" value="0" /> <!-- ### Need to edit value attribute ### -->
</bean>

[Step 7] Apply the adding of ResultMessagesLoggingInterceptor definition into xxx-domain.xml

From version 1.0.2, the ResultMessagesLoggingInterceptor has been added into xxx-domain.xml. Please see the GitHub single/issues#39 about bug information. With this change, exceptions that hold a ResultMessages are logged.

[Procedure's required cases]

If the following case is matched, please apply next modification.

  • If using the project generated from single blank project for JPA or MyBatis2

[Modification method]

Please add the ResultMessagesLoggingInterceptor definition in one of the following files.

  • $YOUR_SINGLE_PROJECT/src/main/resources/META-INF/spring/xxx-domain.xml
  • $YOUR_ECLIPSE_WTP_PROJECT/src/main/resources/META-INF/spring/xxx-domain.xml
<bean id="resultMessagesLoggingInterceptor"
    class="org.terasoluna.gfw.common.exception.ResultMessagesLoggingInterceptor">
    <property name="exceptionLogger" ref="exceptionLogger" />
</bean>
<aop:config>
    <aop:advisor advice-ref="resultMessagesLoggingInterceptor"
        pointcut="@within(org.springframework.stereotype.Service)" />
</aop:config>

[Step 8] Apply the fixes of UserIdMDCPutFilter setting into spring-security.xml

From version 1.0.2, changed the UserIdMDCPutFilter setting of spring-security.xml. Please see the GitHub single/issues#45 about bug information. With this change, it becomes possible to include the login user name into the log of after finishing Spring Security processing.

[Procedure's required cases]

If the following case is matched, please apply next modification.

  • If using Spring Security as authentication and authorization processing

[Modification method]

Please remove the removeValue property of UserIdMDCPutFilter from one of the following files.

  • $YOUR_SINGLE_PROJECT/src/main/resources/META-INF/spring/spring-security.xml
  • $YOUR_ECLIPSE_WTP_PROJECT/src/main/resources/META-INF/spring/spring-security.xml
<bean id="userIdMDCPutFilter" class="org.terasoluna.gfw.security.web.logging.UserIdMDCPutFilter">
    <!-- ### Need to remove the 'removeValue' property ### -->
</bean>

[Step 9] Apply the fixes of <distributionManagement> setting into pom.xml

From version 1.0.2, the <distributionManagement> setting (terasolunaorg repositories) are removed from the pom.xml. Please see the GitHub multi/issues#8 about bug information.

[Procedure's required cases]

This procedure is optional, but recommend to apply next modification.

[Modification method]

Please remove the <distributionManagement> settings or remove the terasolunaorg repositories(terasoluna-gfw-releases, terasoluna-gfw-snapshots) from <distributionManagement> setting of the following file.

  • $YOUR_MULTIPLE_PROJECT_ROOT/pom.xml
<distributionManagement>
    <!-- ### Need to remove terasolunaorg repositories ### -->
    <!--
    <repository>
        <id>terasoluna-gfw-releases</id>
        <url>http://repo.terasoluna.org/nexus/content/repositories/terasoluna-gfw-releases/</url>
    </repository>
    <snapshotRepository>
        <id>terasoluna-gfw-snapshots</id>
        <url>http://repo.terasoluna.org/nexus/content/repositories/terasoluna-gfw-snapshots/</url>
    </snapshotRepository>
    -->
</distributionManagement>

[Step 10] Apply the fixes of <relativePath> setting into pom.xml

From version 1.0.2, the <relativePath /> setting has been added into pom.xml. Please see the GitHub multi/issues#36 and GitHub single/issues#46 about bug information. With this change, the trouble with STS's initial import could be avoided.

[Procedure's required cases]

This procedure is optional, but recommend to apply next modification.

[Modification method]

Please add the <relativePath /> element as a child element of <parent> into one of the following files.

  • $YOUR_MULTIPLE_PROJECT_ROOT/pom.xml
  • $YOUR_SINGLE_PROJECT/pom.xml
<parent>
    <groupId>org.terasoluna.gfw</groupId>
    <artifactId>terasoluna-gfw-parent</artifactId>
    <version>1.0.2.RELEASE</version>
    <relativePath /> <!-- ### Need to add ### -->
</parent>

[Step 11] Apply the fixes of findbugs-maven-plugin's setting into pom.xml

From version 1.0.2, fixed the wrong setting of findbugs-maven-plugin in pom.xml. Please see the GitHub multi/issues#59 about bug information.

[Procedure's required cases]

This procedure is optional. If the following case is matched, recommend to apply next modification.

  • If using findbugs-maven-plugin

[Modification method]

Please modify findbugs-maven-plugin's setting (element name) in the following file. (from <inputEncoding> to <sourceEncoding>)

  • $YOUR_MULTIPLE_PROJECT_ROOT/pom.xml
<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>findbugs-maven-plugin</artifactId>
    <version>${org.codehaus.mojo.version}</version>
    <configuration>
        <sourceEncoding>${encoding}</sourceEncoding> <!-- ### Need to edit ### -->
        <outputEncoding>${encoding}</outputEncoding>
        <includeFilterFile>${findbugs.includefilter.xml}</includeFilterFile>
        <xmlOutput>true</xmlOutput>
    </configuration>
</plugin>

[Step 12] Apply the fixes of JdbcCodeList setting into xxx-codelist.xml

From version 1.0.2, added the bean definition of jdbcTemplate for JdbcCodeList in xxx-codelist.xml. Please see the GitHub multi/issues#39 about bug information. With this change, it becomes possible to specify the fetch size to the select statement.

[Procedure's required cases]

If the following case is matched, recommend to apply next modification.

  • If using a large number of records as JdbcCodeList

[Modification method]

Please added the bean definition of jdbcTemplate & abstract bean of JdbcCodeList in the following file.

  • $YOUR_MULTIPLE_PROJECT_ROOT/src/main/resources/META-INF/spring/xxx-domain.xml
  • $YOUR_SINGLE_PROJECT/src/main/resources/META-INF/spring/xxx-domain.xml
  • $YOUR_ECLIPSE_WTP_PROJECT/src/main/resources/META-INF/spring/xxx-domain.xml
<bean id="jdbcTemplateForCodeList" class="org.springframework.jdbc.core.JdbcTemplate">
    <property name="dataSource" ref="dataSource" />
    <property name="fetchSize" value="${codelist.jdbc.fetchSize:1000}" />
</bean>

<bean id="AbstractJdbcCodeList"
      class="org.terasoluna.gfw.common.codelist.JdbcCodeList" abstract="true">
    <property name="jdbcTemplate" ref="jdbcTemplateForCodeList" />
</bean>

And please perform procedures to apply the abstract bean to the JdbcCodeList bean definitions.

  • Specify abstract bean id to the parent attribute instead of class attribute
  • Remove the dataSource property.
<bean id="CL_SAMPLE" parent="AbstractJdbcCodeList"> <!-- ### Need to edit ### -->
    <property name="querySql" value="SELECT code, code_name FROM t_sample_codes ORDER BY code" />
    <property name="valueColumn" value="code" />
    <property name="labelColumn" value="code_name" />
    <!-- ### Need to remove the 'dataSource' property ### -->
</bean>

[Step 13] Apply the fixes of code list import settings into xxx-domain.xml

From version 1.0.2, wildcard import has been used to import multiple code list definitions files in xxx-domain.xml. Please see the GitHub multi/issues#66 and GitHub single/issues#71 about bug information. With this change, it becomes possible to import multiple files from nested directories.

[Procedure's required cases]

This procedure is optional. Please perform next modification, if feel the need.

[Modification method]

Please modify to use wildcard import in one of the following files.

  • $YOUR_MULTIPLE_PROJECT_ROOT/src/main/resources/META-INF/spring/xxx-domain.xml
  • $YOUR_SINGLE_PROJECT/src/main/resources/META-INF/spring/xxx-domain.xml
  • $YOUR_ECLIPSE_WTP_PROJECT/src/main/resources/META-INF/spring/xxx-domain.xml
<import resource="classpath*:META-INF/spring/**/*-codelist.xml" /> <!-- ### Need to edit ### -->

[Step 14] Apply the fixes of CodeListInterceptor setting into spring-mvc.xml

From version 1.0.2, CodeListInterceptor has been added into spring-mvc.xml. Please see the GitHub multi/issues#77 and GitHub single/issues#62 about bug information. With this change, CodeList can be accessed from View component(e.g. JSP).

[Procedure's required cases]

This procedure is optional. Please perform next modification, if feel the need.

[Modification method]

Please add the CodeListInterceptor definition in one of the following files.

  • $YOUR_MULTIPLE_PROJECT_ROOT/src/main/resources/META-INF/spring/spring-mvc.xml
  • $YOUR_SINGLE_PROJECT/src/main/resources/META-INF/spring/spring-mvc.xml
  • $YOUR_ECLIPSE_WTP_PROJECT/src/main/resources/META-INF/spring/spring-mvc.xml
<mvc:interceptors>

    <!-- omit -->

    <mvc:interceptor>
        <mvc:mapping path="/**" />
        <mvc:exclude-mapping path="/resources/**" />
        <mvc:exclude-mapping path="/**/*.html" />
        <bean class="org.terasoluna.gfw.web.codelist.CodeListInterceptor">
            <property name="codeListIdPattern" value="CL_.+" />
        </bean>
    </mvc:interceptor>

    <!-- omit -->

</mvc:interceptors>

[Step 15] Apply the fixes of properties setting into pom.xml

From version 1.0.2, the unnecessary property(<jasperreports.version>) has been removed in pom.xml. Please see the GitHub multi/issues#47 about bug information.

[Procedure's required cases]

This procedure is optional. Please perform next modification, if feel the need.

[Modification method]

Please remove the <jasperreports.version> element in following file.

  • $YOUR_MULTIPLE_PROJECT_ROOT/pom.xml
<properties>

    <!-- omit -->

    <!-- ### Need to remove jasperreports.version ###
    <jasperreports.version>3.5.1</jasperreports.version>
    -->

    <!-- omit -->

</properties>

[Step 16] Apply the fixes of dependency settings of JDBC driver into pom.xml

From version 1.0.2, the JDBC driver settings has been improved in pom.xml. Please see the GitHub multi/issues#92 about bug information.

Improvements is follows.

  • Improve to can be use only H2 Database at local profile (In other words, improve to exclude the H2 Database's jar into war file for the production or testing)
  • Improve to remove the JDBC driver from the web project

[Procedure's required cases]

This procedure is optional. Please perform next modification, if feel the need.

[Modification method]

Please apply improvements in all of following files.

  • $YOUR_MULTIPLE_PROJECT_ROOT/xxx-domain/pom.xml
  • $YOUR_MULTIPLE_PROJECT_ROOT/xxx-env/pom.xml
  • $YOUR_MULTIPLE_PROJECT_ROOT/xxx-web/pom.xml

At first, please remove the H2 Database dependency definition from xxx-domain/pom.xml.

<!-- ### Need to remove the H2 Database ###
<dependency>
    <groupId>com.h2database</groupId>
    <artifactId>h2</artifactId>
    <scope>runtime</scope>
</dependency>
-->

Please add the H2 Database dependency definition into local profile of xxx-env/pom.xml.

<profile>
    <id>local</id>
    <activation>
        <activeByDefault>true</activeByDefault>
    </activation>
    <properties>
        <resource.directory>src/main/resources</resource.directory>
        <buildFinalName>${project.artifactId}-${project.version}</buildFinalName>
    </properties>
    <!-- ### Need to add H2 Database dependency ### -->
    <dependencies>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <scope>runtime</scope>
        </dependency>
    </dependencies>
</profile>

Please change the default profile settings in xxx-web/pom.xml.

  • Change the profile id form default to local
  • Add the warpack-with-env profile to generate war file including xxx-env.jar (Note: exclude H2 database)
<profiles>
    <profile>
        <id>local</id> <!-- ### Need to edit ### -->
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <dependencies>
            <dependency>
                <groupId>com.example</groupId>
                <artifactId>xxx-env</artifactId>
            </dependency>
        </dependencies>
    </profile>
    <profile>
        <id>warpack</id>
        <dependencies>
        </dependencies>
    </profile>
    <!-- ### Need to add warpack-with-env ### -->
    <profile>
        <id>warpack-with-env</id>
        <dependencies>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>xxx-env</artifactId>
                <exclusions>
                    <exclusion>
                        <groupId>com.h2database</groupId>
                        <artifactId>h2</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
        </dependencies>
    </profile>
</profiles>

Note

About setting value of <groupId> or <artifactId>

Please setting values of <groupId> and <artifactId> replace by your project setting.

At last, please remove the JDBC driver dependency from xxx-web/pom.xml.

[Step 17] Apply the fixes of dependency settings for test into pom.xml

From version 1.0.2, dependencies for unit testing has been added in pom.xml. Please see the GitHub single/issues#6 about bug information.

[Procedure's required cases]

This procedure is optional. Please perform next modification, if feel the need.

[Modification method]

Please add dependencies for unit testing in following file.

  • $YOUR_SINGLE_PROJECT/pom.xml
</dependencies>

    <!-- omit -->

    <!-- ### Need to add dependencies for unit testing ### -->
    <!-- Unit Test -->
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-all</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-test</artifactId>
        <scope>test</scope>
    </dependency>

</dependencies>
  • $YOUR_ECLIPSE_WTP_PROJECT/.classpath
<!-- ### Need to add dependencies for unit testing ### -->
<classpathentry kind="lib"
    path="testlib/junit-4.7.jar"
    sourcepath="libsrc/junit-4.7-sources.jar" />
<classpathentry kind="lib"
    path="testlib/mockito-all-1.9.0.jar"
    sourcepath="libsrc/mockito-all-1.9.0-sources.jar" />
<classpathentry kind="lib"
    path="testlib/spring-test-3.2.13.RELEASE.jar"
    sourcepath="libsrc/spring-test-3.2.13.RELEASE-sources.jar" />

Note

Jar files has been included into the downloaded zip file form the Eclipse WTP Project of 1.0.2.RELEASE.

  • $YOUR_ECLIPSE_WTP_PROJECT/build.xml
<path id="build.test.classpath">
    <path refid="build.classpath" />
    <!-- ### Need to add dependencies for unit testing ### -->
    <pathelement location="${testlib.dir}/junit-4.7.jar"/>
    <pathelement location="${testlib.dir}/mockito-all-1.9.0.jar"/>
    <pathelement location="${testlib.dir}/spring-test-3.2.13.RELEASE.jar"/>
</path>

[Step 18] Apply the fixes of dependency scope settings into pom.xml

From version 1.0.2, dependency scope of JDBC Driver has been changed in pom.xml. Please see the GitHub single/issues#60 about bug information.

[Procedure's required cases]

This procedure is optional. Please perform next modification, if feel the need.

[Modification method]

Please change dependency scope of JDBC Driver from compile to runtime in following file.

  • $YOUR_SINGLE_PROJECT/pom.xml
</dependencies>

    <!-- omit -->

    <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
        <version>1.3.172</version>
        <scope>runtime</scope> <!-- ### Need to edit ### -->
    </dependency>

    <!-- omit -->

</dependencies>

Appendix for 1.0.2

Update libraries for using Eclipse WTP Project

This update procedure is for Eclipse WTP project which is downloaded from the release site.

Note

Legend

[Table Header]
Non : Blank project for none O/R Mapper
JPA : Blank project for JPA
MB2 : Blank project for MyBatis 2
[Marks]
* : target for operations

[Step 1]

Download the Eclipse WTP Project of 1.0.2.RELEASE.

[Step 2]

If Eclipse is running, please stop the Eclipse.

[Step 3]

Update(delete and add) jar files in $YOUR_ECLIPSE_WTP_PROJECT/src/main/webapp/WEB-INF/lib.

.. tabularcolumns:: |p{0.25\linewidth}|p{0.30\linewidth}|p{0.30\linewidth}|p{0.05\linewidth}|p{0.05\linewidth}|p{0.05\linewidth}|
Library Name Delete File Add File Non JPA MB2
TERASOLUNA Global Framework Common Library terasoluna-gfw-common-1.0.1.RELEASE.jar terasoluna-gfw-common-1.0.2.RELEASE.jar * * *
  terasoluna-gfw-web-1.0.1.RELEASE.jar terasoluna-gfw-web-1.0.2.RELEASE.jar * * *
  terasoluna-gfw-security-core-1.0.1.RELEASE.jar terasoluna-gfw-security-core-1.0.2.RELEASE.jar * * *
  terasoluna-gfw-security-web-1.0.1.RELEASE.jar terasoluna-gfw-security-web-1.0.2.RELEASE.jar * * *
  terasoluna-gfw-jpa-1.0.1.RELEASE.jar terasoluna-gfw-jpa-1.0.2.RELEASE.jar   *  
  terasoluna-gfw-mybatis2-1.0.1.RELEASE.jar terasoluna-gfw-mybatis2-1.0.2.RELEASE.jar     *
Spring Framework spring-aop-3.2.10.RELEASE.jar spring-aop-3.2.13.RELEASE.jar * * *
  spring-aspects-3.2.10.RELEASE.jar spring-aspects-3.2.13.RELEASE.jar * * *
  spring-beans-3.2.10.RELEASE.jar spring-beans-3.2.13.RELEASE.jar * * *
  spring-context-3.2.10.RELEASE.jar spring-context-3.2.13.RELEASE.jar * * *
  spring-context-support-3.2.10.RELEASE.jar spring-context-support-3.2.13.RELEASE.jar * * *
  spring-core-3.2.10.RELEASE.jar spring-core-3.2.13.RELEASE.jar * * *
  spring-expression-3.2.10.RELEASE.jar spring-expression-3.2.13.RELEASE.jar * * *
  spring-jdbc-3.2.10.RELEASE.jar spring-jdbc-3.2.13.RELEASE.jar * * *
  spring-orm-3.2.10.RELEASE.jar spring-orm-3.2.13.RELEASE.jar * * *
  spring-tx-3.2.10.RELEASE.jar spring-tx-3.2.13.RELEASE.jar * * *
  spring-web-3.2.10.RELEASE.jar spring-web-3.2.13.RELEASE.jar * * *
  spring-webmvc-3.2.10.RELEASE.jar spring-webmvc-3.2.13.RELEASE.jar * * *

[Step 4]

Update(delete and add) source jar files in $YOUR_ECLIPSE_WTP_PROJECT/src/main/webapp/WEB-INF/libsrc.

.. tabularcolumns:: |p{0.25\linewidth}|p{0.30\linewidth}|p{0.30\linewidth}|p{0.05\linewidth}|p{0.05\linewidth}|p{0.05\linewidth}|
Library Name Delete File Add File Non JPA MB2
TERASOLUNA Global Framework Common Library terasoluna-gfw-common-1.0.1.RELEASE-sources.jar terasoluna-gfw-common-1.0.2.RELEASE-sources.jar * * *
  terasoluna-gfw-web-1.0.1.RELEASE-sources.jar terasoluna-gfw-web-1.0.2.RELEASE-sources.jar * * *
  terasoluna-gfw-security-core-1.0.1.RELEASE-sources.jar terasoluna-gfw-security-core-1.0.2.RELEASE-sources.jar * * *
  terasoluna-gfw-security-web-1.0.1.RELEASE-sources.jar terasoluna-gfw-security-web-1.0.2.RELEASE-sources.jar * * *
  terasoluna-gfw-jpa-1.0.1.RELEASE-sources.jar terasoluna-gfw-jpa-1.0.2.RELEASE-sources.jar   *  
  terasoluna-gfw-mybatis2-1.0.1.RELEASE-sources.jar terasoluna-gfw-mybatis2-1.0.2.RELEASE-sources.jar     *
Spring Framework spring-aop-3.2.10.RELEASE-sources.jar spring-aop-3.2.13.RELEASE-sources.jar * * *
  spring-aspects-3.2.10.RELEASE-sources.jar spring-aspects-3.2.13.RELEASE-sources.jar * * *
  spring-beans-3.2.10.RELEASE-sources.jar spring-beans-3.2.13.RELEASE-sources.jar * * *
  spring-context-3.2.10.RELEASE-sources.jar spring-context-3.2.13.RELEASE-sources.jar * * *
  spring-context-support-3.2.10.RELEASE-sources.jar spring-context-support-3.2.13.RELEASE-sources.jar * * *
  spring-core-3.2.10.RELEASE-sources.jar spring-core-3.2.13.RELEASE-sources.jar * * *
  spring-expression-3.2.10.RELEASE-sources.jar spring-expression-3.2.13.RELEASE-sources.jar * * *
  spring-jdbc-3.2.10.RELEASE-sources.jar spring-jdbc-3.2.13.RELEASE-sources.jar * * *
  spring-orm-3.2.10.RELEASE-sources.jar spring-orm-3.2.13.RELEASE-sources.jar * * *
  spring-tx-3.2.10.RELEASE-sources.jar spring-tx-3.2.13.RELEASE-sources.jar * * *
  spring-web-3.2.10.RELEASE-sources.jar spring-web-3.2.13.RELEASE-sources.jar * * *
  spring-webmvc-3.2.10.RELEASE-sources.jar spring-webmvc-3.2.13.RELEASE-sources.jar * * *

[Step 5]

Update the referenced libraries in all of the following files, using replace string.

  • $YOUR_ECLIPSE_WTP_PROJECT/.classpath
  • $YOUR_ECLIPSE_WTP_PROJECT/build.xml
.. tabularcolumns:: |p{0.25\linewidth}|p{0.30\linewidth}|p{0.30\linewidth}|p{0.05\linewidth}|p{0.05\linewidth}|p{0.05\linewidth}|
Library Name Before After Non JPA MB2
TERASOLUNA Global Framework Common Library terasoluna-gfw-common-1.0.1.RELEASE terasoluna-gfw-common-1.0.2.RELEASE * * *
  terasoluna-gfw-web-1.0.1.RELEASE terasoluna-gfw-web-1.0.2.RELEASE * * *
  terasoluna-gfw-security-core-1.0.1.RELEASE terasoluna-gfw-security-core-1.0.2.RELEASE * * *
  terasoluna-gfw-security-web-1.0.1.RELEASE terasoluna-gfw-security-web-1.0.2.RELEASE * * *
  terasoluna-gfw-jpa-1.0.1.RELEASE terasoluna-gfw-jpa-1.0.2.RELEASE   *  
  terasoluna-gfw-mybatis2-1.0.1.RELEASE terasoluna-gfw-mybatis2-1.0.2.RELEASE     *
Spring Framework spring-aop-3.2.10.RELEASE spring-aop-3.2.13.RELEASE * * *
  spring-aspects-3.2.10.RELEASE spring-aspects-3.2.13.RELEASE * * *
  spring-beans-3.2.10.RELEASE spring-beans-3.2.13.RELEASE * * *
  spring-context-3.2.10.RELEASE spring-context-3.2.13.RELEASE * * *
  spring-context-support-3.2.10.RELEASE spring-context-support-3.2.13.RELEASE * * *
  spring-core-3.2.10.RELEASE spring-core-3.2.13.RELEASE * * *
  spring-expression-3.2.10.RELEASE spring-expression-3.2.13.RELEASE * * *
  spring-jdbc-3.2.10.RELEASE spring-jdbc-3.2.13.RELEASE * * *
  spring-orm-3.2.10.RELEASE spring-orm-3.2.13.RELEASE * * *
  spring-tx-3.2.10.RELEASE spring-tx-3.2.13.RELEASE * * *
  spring-web-3.2.10.RELEASE spring-web-3.2.13.RELEASE * * *
  spring-webmvc-3.2.10.RELEASE spring-webmvc-3.2.13.RELEASE * * *
Clone this wiki locally