Bug 998476 - Jcr2vfs migration tool creates groupId + artifactId directories from jcr package name
Jcr2vfs migration tool creates groupId + artifactId directories from jcr pack...
Status: CLOSED CURRENTRELEASE
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
6.0.0
Unspecified Unspecified
medium Severity medium
: ER6
: 6.0.0
Assigned To: Neus Miras
Petr Široký
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-19 08:10 EDT by Petr Široký
Modified: 2014-08-06 16:20 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-08-06 16:20:36 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Petr Široký 2013-08-19 08:10:21 EDT
Description of problem:
Jcr2vfs migration tool crates multiple unnecessary empty directories with package names in src/main/* and src/test/* directories.

For example multiple empty repositories "org/guvnor/example1/org/guvnor/example1" for following migrated prject:

org.guvnor.example1/
├── pom.xml
├── project.imports
└── src
    ├── main
    │   ├── java
    │   │   └── org
    │   │       └── guvnor
    │   │           └── example1
    │   │               └── org
    │   │                   └── guvnor
    │   │                       └── example1
    │   └── resources
    │       ├── META-INF
    │       │   └── kmodule.xml
    │       ├── org
    │       │   └── guvnor
    │       │       └── example1
    │       │           └── org
    │       │               └── guvnor
    │       │                   └── example1
    │       └── rule1.drl
    └── test
        ├── java
        │   └── org
        │       └── guvnor
        │           └── example1
        │               └── org
        │                   └── guvnor
        │                       └── example1
        └── resources
            └── org
                └── guvnor
                    └── example1
                        └── org
                            └── guvnor
                                └── example1


Version-Release number of selected component (if applicable):
6.0.0-DR6 (also community 6.0.0-SNAPSHOT)


How reproducible:
Always


Steps to Reproduce:
1. Migrate arbitrary guvnor repository
2. Look inside inside the resulting VFS repo.


Actual results:
Multiple unnecessary empty directories with package path created. See above.


Expected results:
No such empty directories.
Comment 1 Jervis Liu 2013-08-20 04:52:25 EDT
This is the default project directory structure used in 6.0. I.e., whenever you create a new project (through UI for example), it always has this directory structure.
Comment 2 Petr Široký 2013-08-20 14:34:49 EDT
The nested directory structure is based on groupId + artifactId. They are both set to jcr package name when migrating the jcr repo, so the result may lead "src/main/java/org/guvnor/example1/org/guvnor/example". It seems bit weird but I don't see any apparent solution right now. I will leave the bz open though as it would be nice to have it fixed somehow in future.
Comment 3 Edson Tirelli 2013-09-30 20:32:04 EDT
Jervis, this does not look right to me. Do we need to create the package names based on the groupId+artifactId? Maybe we should simply use package name for the assets that have a declared package name?
Comment 7 Jervis Liu 2013-10-14 04:07:02 EDT
"Jervis, this does not look right to me. Do we need to create the package names based on the groupId+artifactId? Maybe we should simply use package name for the assets that have a declared package name?"

This is the default behavior in ProjectService. Ie., when we create a new package, we set up the default workspace directory structure using GAV info from pom (which is the only info we have at that stage that can be used to guess the package name). You can always create an asset using whatever package name you prefer later on when you add assets(for example DMO).
Comment 8 Neus Miras 2013-11-18 13:09:22 EST
Create the new project with a GAV with groupId and IdArtifact depending of the old estructure

└── src
    ├── main
    │   ├── java
    │   │   └── org
    │   │       └── guvnor
    │   │           └── example1

In the case specified the groupId has to be "org.guvnor" and the artifactId "example1" at migrated project.
This commit fix that:

Master
https://github.com/droolsjbpm/drools-wb/commit/2fa550960a99567e20735411251b0ac85c85c7f3

6.0.x
https://github.com/droolsjbpm/drools-wb/commit/9067de4e4760e4381b68818840062be3ff410566
Comment 9 Petr Široký 2014-01-14 06:00:17 EST
Verified fixed in 6.0.0-ER7.

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