You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "picodotdev (JIRA)" <ji...@apache.org> on 2019/02/24 16:08:00 UTC

[jira] [Commented] (TAP5-2608) Fix and update quickstart

    [ https://issues.apache.org/jira/browse/TAP5-2608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16776307#comment-16776307 ] 

picodotdev commented on TAP5-2608:
----------------------------------

I attach a patch with a refactor for resolve the issue for 5.5.0. Please, do the code review, test it and share your comments, I will try to add the necessary changes if any to the patch be accepted. I tested it with openjdk 8 and opendk 11.

Summary of changes:
 * Moved "filtered" directory to "src/main/resources-filtered".
 * Most of the files of "filtered" directory moved to "archetype-resources". Only has left one, build.gradle for set library versions.
 * Added .gitignore to archetype.
 * Added three source sets for tests: test (unit tests with Spock for application logic classes not related with Tapestry), testUnitTapestry (unit tests for tapestry pages and components with Spock, Tapestry Testify and Tapestry Xpath) and testFunctionalTapestry (functional tests with Spock and Geb).
 * Added some sample test for each source set.
 * Commented dependencies for tapestry-spring, hibernate and upload integration.
 * Removed Contact page.
 * Added tasks in quickstart gradle build to use a specific Gradle wrapper instead of take old Tapestry Gradle build wrapper version.
 * Minor style tweaks to templates.

Steps for testing:

1. Build and install in local repository
{noformat}
[tapestry-5] $ ./gradlew quickstart:build
[tapestry-5] $ mvn install:install-file -Dfile=quickstart/build/libs/quickstart-5.5.0.jar \
                       -DgroupId=org.apache.tapestry \
                       -DartifactId=quickstart \
                       -Dversion=5.5.0 \
                       -Dpackaging=jar
{noformat}
 2. Use and generate an Tapestry app using quickstart 
{noformat}
$ mvn archetype:generate -B \
                       -DarchetypeGroupId=org.apache.tapestry \
                       -DarchetypeArtifactId=quickstart \
                       -DarchetypeVersion=5.5.0 \
                       -DgroupId=com.foo \
                       -DartifactId=foo \
                       -Dpackage=com.foo \
                       -Dversion=1.0
$ chmod +x ./gradlew
# change in build.gradle tapestry version from 5.5.0 to 5.5.0-beta-1
{noformat}
3. Execute tests
{noformat}
./gradlew test testUnitTapestry testFunctionalTapestry{noformat}
4. Run app
{noformat}
./gradlew run
./gradlew run -Dtapestry.execution-mode=qa  {noformat}

> Fix and update quickstart
> -------------------------
>
>                 Key: TAP5-2608
>                 URL: https://issues.apache.org/jira/browse/TAP5-2608
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: quickstart
>    Affects Versions: 5.5.0
>            Reporter: picodotdev
>            Priority: Major
>         Attachments: TAP5-2608_fix_and_update_quickstart.patch, quickstart-browser.png, quickstart.png
>
>
> The quickstat project has some errors on run:
>  * Running the quickstart as in comment https://issues.apache.org/jira/browse/TAP5-2579?focusedCommentId=16770261#comment-16770261 ends with BUILD FAILURE.
>  * After fixing BUILD FAILURE error "./gradlew tasks" fails with "Plugin with id 'gretty' not found." message.
>  * Running "mvn jetty:run" fails with "Could not find artifact javax.servlet:servlet-api:jar:3.0.1 in jboss ([http://repository.jboss.org/nexus/content/groups/public/])" message.
> Some other related issues open are:
>  * https://issues.apache.org/jira/browse/TAP5-2579
>  * [https://github.com/apache/tapestry-5/pull/9/files]
>  * [https://github.com/apache/tapestry-5/pull/10] (for 5.4.x)
> Some other improvements that can be implemented are:
>  * Use Spring Boot instead Gretty.
>  * Use log4j 2 instead slf4j and logback.
>  * Provide some simple unit and functional test examples.
>  * Use more new Gradle version (ideally latest) instead of taking Tapestry Gradle build version.
> Fix the errors and related issues, implement improvements.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)