Hide Forgot
Description of problem: When a JCR package name contains Java keywords like 'package' or 'new' (complete list here: http://docs.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html) it gets migrated into a project that contains the package name as is, thus making it invalid Java package name. Following is a directory structure created by the migration tool. There seems to be a try to "escape" the package keyword, however the assets are saved in the unescaped directory. Also note that for example DRL assets contain the wrong package name (with the unescaped keyword). |-- pom.xml |-- project.imports `-- src |-- main | |-- java | | `-- keyword | | `-- _package | | `-- in | | `-- name | `-- resources | |-- keyword | | |-- package | | | `-- in | | | `-- name | | | |-- Rule\ in\ invalid\ package.drl | | | `-- Simple\ text\ file.txt | | `-- _package | | `-- in | | `-- name | `-- META-INF | `-- kmodule.xml `-- test |-- java | `-- keyword | `-- _package | `-- in | `-- name `-- resources `-- keyword `-- _package `-- in `-- name Version-Release number of selected component (if applicable): 6.0.0-ER5 (also community 6.0.0-SNAPSHOT)
To be consistent with the current package name management, all the package name migrated are converted to lowercase and escaped if it has keywords before creation. Commit: 6.0.x https://github.com/droolsjbpm/drools-wb/commit/6a6abab9dedc23560036885eb79335816d279589
Resolved an associaced bug related with the package naming of the scenarios Commit: https://github.com/droolsjbpm/drools-wb/commit/25b986ca8fb60642b57c153ad7b9da6f799ed0d0
Tested again with 6.0.0-ER7 and I am still seeing the same wrong directory structure as described above. I am attaching the repo that can be used to reproduce the issue.
Created attachment 849915 [details] JCR repo that will reproduce the issue.
Fixed. Now adds 'mod_' to the keyword and renames the project packages too. Commited at 6.0.x: https://github.com/droolsjbpm/drools-wb/commit/c02c2d71a23486c98df1cf3b633b7166ef3a5ead
This no longer has a target release of 6.0.0.
I am not sure if the prefix "mod_" is the best one, but it makes it clear that the package name changed, so that is good. The issue is fixed so I am closing it. Verified in 6.0.1-ER1.