Bug 1028904 - Classes generated from Data modeler won't compile outside business-central
Classes generated from Data modeler won't compile outside business-central
Status: CLOSED NOTABUG
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: Configuration (Show other bugs)
6.0.0
Unspecified Unspecified
low Severity medium
: ER5
: 6.0.0
Assigned To: Walter Medvedeo
Marek Baluch
:
Depends On:
Blocks: 1033104
  Show dependency treegraph
 
Reported: 2013-11-11 02:59 EST by Anthony Patricio
Modified: 2014-11-11 10:23 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-11-11 10:23:48 EST
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 Anthony Patricio 2013-11-11 02:59:34 EST
Description of problem:
Generated classes can't be used outside business-central because of incomplete pom.

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


How reproducible:
Always

Steps to Reproduce:
1- create an object using data modeler
2- use git pull to get it in eclipse or whatever IDE
3- compilation will fail because of
@org.kie.workbench.common.services.datamodeller.annotations.Label(value = "XXX")
@org.kie.api.definition.type.Position(value = 0)

Should the project pom declare org.kie dependencies?

Actual results:


Expected results:


Additional info:
Comment 3 Walter Medvedeo 2013-11-11 04:34:30 EST
As described above, data modeller generated .java files references some annotations that belongs to the kie world.

If you want to compile the generated .java files outside the business central you need to add a dependency to the following maven artifact: kie-api-6.1.0-SNAPSHOT.jar:

<groupId>org.kie</groupId>
<artifactId>kie-api</artifactId>
<version>6.1.0-SNAPSHOT</version>

note: the version number is orientative. (users that use the GA release in the future, probably should use  6.0.0.Final)

One last comment, in order to have all model annotations in the same package, the Label, and Description annotations were re factored to the package "org.kie.api.definition.type".

So take into account that previous generated testing models should be re factored.

from:
@org.kie.workbench.common.services.datamodeller.annotations.Label
@org.kie.workbench.common.services.datamodeller.annotations.Description

to:
@org.kie.api.definition.type.Label
@org.kie.api.definition.type.Description
Comment 4 Marek Baluch 2013-12-09 12:17:20 EST
Hi Walter,

I can confirm that adding the dependency helps but it's also required to add the repository from which it can be downloaded.

Would you mind explaining why isn't the dependency already defined in the pom.xml file? At least we will need to document the steps required to do the compilation.

Thanks!

Regards
Marek
Comment 5 Edson Tirelli 2013-12-10 14:07:40 EST
Marek,

We discussed adding the dependency automatically into the POM, but we don't know at this point the impact this will cause in deployments inside containers, as well as the risk of causing dependency clashes.

For 6.0.0, our suggestion is to keep as is and document the need of the kie-api dependency (developers will probably have this in their development environment anyway). For 6.1, we will have the proper time to understand the impact of automatically adding this dependency.

So yes, it requires documentation.
Comment 6 Lukáš Petrovický 2013-12-11 02:59:58 EST
I am leaving this as ASSIGNED, to be resolved in future versions.
Comment 7 Kris Verlaenen 2013-12-11 04:13:00 EST
It is documented how to add the jBPM library in Eclipse to a project you imported from workbench (to add all required dependencies) here:
http://docs.jboss.org/jbpm/v6.0/userguide/jBPMEclipseJBPM.html#d0e12778

A similar approach could be used in other IDEs.
Comment 8 Samuel Tauil 2014-02-18 18:15:48 EST
I had same issue using GA version.

And what if we use <scope>compile</scope> of this specific dependency into pom.xml ?
Comment 9 Walter Medvedeo 2014-11-11 10:23:48 EST
It was defined that when a user is about to work with a project that uses references to workbench classes, those dependencies should be set according to the documentation. See comments above.

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