Bug 870431 - Ticket Monster: generation of administration section doesn't work properly
Ticket Monster: generation of administration section doesn't work properly
Product: JBoss Enterprise WFK Platform 2
Classification: JBoss
Component: TicketMonster (Show other bugs)
Unspecified Unspecified
medium Severity medium
: CR2
: 2.1.0
Assigned To: Marius Bogoevici
Tomas Repel
Depends On:
  Show dependency treegraph
Reported: 2012-10-26 09:12 EDT by Tomas Repel
Modified: 2013-02-01 10:12 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-11-30 10:34:33 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tomas Repel 2012-10-26 09:12:12 EDT
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:


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 02:00:22 EDT
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 

As a matter of fact, the current patches are incorrect and will need to be 
Comment 2 Tomas Repel 2012-10-30 08:01:47 EDT
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 04:34:38 EST
Any progress on this issue?
Comment 4 Tomas Repel 2012-11-09 09:48:30 EST
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:
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-11 20:16:50 EST
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 14:11:14 EST
Currently generation works, but the results is still broken
Comment 9 Marek Novotny 2012-11-14 11:39:58 EST
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 11:19:31 EST
Verified in WFK 2.1.0.CR2.
Comment 11 Karel Piwko 2012-11-30 10:34:33 EST
Distributed as a part of WFK 2.1.0.GA release.

Note You need to log in before you can comment on or make changes to this bug.