Bug 870431

Summary: Ticket Monster: generation of administration section doesn't work properly
Product: [Retired] JBoss Enterprise WFK Platform 2 Reporter: Tomas Repel <trepel>
Component: TicketMonsterAssignee: Marius Bogoevici <mariusb>
Status: CLOSED CURRENTRELEASE QA Contact: Tomas Repel <trepel>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.1.0CC: bsutter, kpiwko, mnovotny, myarboro, pmuir, rruss
Target Milestone: CR2   
Target Release: 2.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ticket-monster
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-30 15:34:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tomas Repel 2012-10-26 13:12:12 UTC
I tried to generate administration section for Ticket Monster example. These are problems I have to cope with:

- that demo/*.patch files have hard-coded paths /demo/src/... but are inside demo directory, so the paths are not valid. I simply replace 'demo/' by './'
- the admin_layer_functional.patch rewrites the webapp/index.html which is wrong, it should only modify the webapp/admin/index.html I think. Furhermore the new index.xhtml redirects to desktop-index.xhtml and mobile-index.xhtml but these files don't exist.
- RichFaces and Errai are not compatible, modify pom.xml to use 12.0 version of com.google.guava:guava dependency. See: https://bugzilla.redhat.com/show_bug.cgi?id=870349

Version-Release number of selected component (if applicable):

Ticket Monster example, version 2.1.0.ER2
Forge 1.0.5.Final

How reproducible:

Always.

Additional info:

The class org.jboss.jdf.example.ticketmonster.model.SectionAllocation has id of type long. This is ok for Forge 1.0.5.Final, but if using Forge 1.1.1.Final, this causes an compile error in generated class SectionAllocationBean. If id is of type Long (as in other classes), everything is OK.

Comment 1 Marius Bogoevici 2012-10-29 06:00:22 UTC
1. The paths are generated by `git diff` and applied with `git apply` so they 
should work. We need to investigate this.

2. THe admin_layer_functional.patch is correct in modifying webapp/index.html 
because the latter is modified by Forge. However, the content of the patch is 
incorrect.

As a matter of fact, the current patches are incorrect and will need to be 
regenerated.

Comment 2 Tomas Repel 2012-10-30 12:01:47 UTC
1. If you clone the git repository, the paths work because there is proper .git directory with git specific information. But if you remove this directory or use the productized example (from *-ticketmonster-demo.zip), the patches do not apply correctly.

Comment 3 Karel Piwko 2012-11-05 09:34:38 UTC
Any progress on this issue?

Comment 4 Tomas Repel 2012-11-09 14:48:30 UTC
To successfully generate the Administration section, one has to do following:

1. Remove the maven-building from admin_layer.fsh script
2. relativize all the paths in demo/patches/*.patch files. All paths have to start with "./src/"
3. Now the admin_layer.fsh is ready to be executed via forge console
4. You have to apply all the patches during first execution. Consecutive runs of admin_layer.fsh script cause that some of the files that need to be patched are modified in a way that patches cannot be applied anymore.
5. Modify the demo/pom.xml so the guava 12.0 version is used. Add following to dependencyManagement:
  <dependency>
    <groupId>com.google.guava</groupId>
    <artifactId>guava</artifactId>
    <version>12.0</version>
  </dependency>
6. Build and deploy the example, Administration section should be in place and working.

These steps work for both 1.1.1.Final and 1.0.6.Final Forge versions.

Comment 5 Marius Bogoevici 2012-11-12 01:16:50 UTC
Fixed in 2.0.5.Final tag (community). Guava issue fixed in enterprise 
repository. We need to add a note for running the generation multiple times 
(which is not necessary)

Comment 8 Marek Novotny 2012-11-13 19:11:14 UTC
Currently generation works, but the results is still broken

Comment 9 Marek Novotny 2012-11-14 16:39:58 UTC
Marius provided fixed forge admin patches, which seems work only on git repository enabled directory. So I added into ticket-monster maven build execution of "git init" and package that directory with ticket-monster-demo.zip.

Speaking about version it is 2.0.6.Final-redhat-1 and now WFK ticket-monster-demo.zip will contain zipped /jboss-wfk-2.1.0/demo/ticket-monster-2.0.6.Final-redhat-1-demo.zip, because assembly plugin filters the .git/ directory unexpectedly even it is setup to not exclude it (turned off default exclusion)

Comment 10 Tomas Repel 2012-11-15 16:19:31 UTC
Verified in WFK 2.1.0.CR2.

Comment 11 Karel Piwko 2012-11-30 15:34:33 UTC
Distributed as a part of WFK 2.1.0.GA release.