Announcement Announcement Module
Collapse
No announcement yet.
DBRE : Changing package of reverse engineering Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • DBRE : Changing package of reverse engineering

    Hi,

    Is it possible to change the target package of the reverse engineering command once it has been called once ?
    It looks like once it has been issued with one package, it ignores all subsequent package options.

    Reproducing steps :

    Code:
    roo> database reverse engineer --schema test-error --package ~.domain
    Created SRC_MAIN_RESOURCES\dbre.xml
    Updated ROOT\pom.xml
    Updated SRC_MAIN_RESOURCES\META-INF\persistence.xml
    Created SRC_MAIN_JAVA\com\company\app\domain
    Created SRC_MAIN_JAVA\com\company\app\domain\TableWithCommentPK.java
    Created SRC_MAIN_JAVA\com\company\app\domain\TableWithComment.java
    Created SRC_MAIN_JAVA\com\company\app\domain\TableWithCommentPK_Roo_Json.aj
    Created SRC_MAIN_JAVA\com\company\app\domain\TableWithCommentPK_Roo_Serializable.aj
    Created SRC_MAIN_JAVA\com\company\app\domain\TableWithCommentPK_Roo_Configurable.aj
    Created SRC_MAIN_JAVA\com\company\app\domain\TableWithCommentPK_Roo_Identifier.aj
    Created SRC_MAIN_JAVA\com\company\app\domain\TableWithComment_Roo_Configurable.aj
    Created SRC_MAIN_JAVA\com\company\app\domain\TableWithComment_Roo_Jpa_ActiveRecord.aj
    Created SRC_MAIN_JAVA\com\company\app\domain\TableWithComment_Roo_ToString.aj
    Created SRC_MAIN_JAVA\com\company\app\domain\TableWithComment_Roo_Jpa_Entity.aj
    I then delete all entity java files by hand. Roo picks it up and delete all corresponding files :

    Code:
    Deleted SRC_MAIN_JAVA\com\company\app\domain\TableWithComment_Roo_ToString.aj - TableWithComment.java not found
    Deleted SRC_MAIN_JAVA\com\company\app\domain\TableWithComment_Roo_Jpa_Entity.aj - TableWithComment.java not found
    Deleted SRC_MAIN_JAVA\com\company\app\domain\TableWithComment_Roo_Jpa_ActiveRecord.aj - TableWithComment.java not found
    Deleted SRC_MAIN_JAVA\com\company\app\domain\TableWithComment_Roo_Configurable.aj - TableWithComment.java not found
    Deleted SRC_MAIN_JAVA\com\company\app\domain\TableWithCommentPK_Roo_Serializable.aj - TableWithCommentPK.java not found
    Deleted SRC_MAIN_JAVA\com\company\app\domain\TableWithCommentPK_Roo_Json.aj - TableWithCommentPK.java not found
    Deleted SRC_MAIN_JAVA\com\company\app\domain\TableWithCommentPK_Roo_Identifier.aj - TableWithCommentPK.java not found
    Deleted SRC_MAIN_JAVA\com\company\app\domain\TableWithCommentPK_Roo_Configurable.aj - TableWithCommentPK.java not found
    Then if I reverse to another package, files are not created in the proper package :

    Code:
    roo> database reverse engineer --schema test-error --package ~.other.domain
    Created SRC_MAIN_RESOURCES\dbre.xml
    Created SRC_MAIN_JAVA\com\company\app\domain
    Created SRC_MAIN_JAVA\com\company\app\domain\TableWithCommentPK.java
    Created SRC_MAIN_JAVA\com\company\app\domain\TableWithComment.java
    Created SRC_MAIN_JAVA\com\company\app\domain\TableWithCommentPK_Roo_Json.aj
    Created SRC_MAIN_JAVA\com\company\app\domain\TableWithCommentPK_Roo_Serializable.aj
    Created SRC_MAIN_JAVA\com\company\app\domain\TableWithCommentPK_Roo_Configurable.aj
    Created SRC_MAIN_JAVA\com\company\app\domain\TableWithCommentPK_Roo_Identifier.aj
    Created SRC_MAIN_JAVA\com\company\app\domain\TableWithComment_Roo_Configurable.aj
    Created SRC_MAIN_JAVA\com\company\app\domain\TableWithComment_Roo_ToString.aj
    Am I missing something here ?

    Thanks !

  • #2
    Existing entities will not change locations, however if new tables are added, these will be put into the subsequent --package you specify.

    Comment


    • #3
      Thanks for answering me !

      The thing is : I just deleted the said entities so to me roo should not consider them as "existing"...

      So if I made a mistake in the package, or just want to refactor the entities package, I have no other solution than recreating a new project with the new packaging policy ? That's what I actually had to do for a project.

      As a more general question, does roo hold/store some information somewhere else than in the actual java/aj file ?

      thanks

      Comment

      Working...
      X