| Summary: | Package compilation should present an error or warning when a file inside a directory does not declare itself to be in the same package as the other resources in that directory | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise BRMS Platform 5 | Reporter: | Alessandro Lazarotti <alazarot> |
| Component: | BRE (Expert, Fusion) | Assignee: | Tihomir Surdilovic <tsurdilo> |
| Status: | CLOSED NEXTRELEASE | QA Contact: | |
| Severity: | unspecified | Docs Contact: | |
| Priority: | high | ||
| Version: | 5.1.0 GA | ||
| Target Milestone: | --- | ||
| Target Release: | 5.1.0.PostGA | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://jira.jboss.org/jira/browse/BRMS-516 | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: |
Fedora 12, JDK 1.6 sun/oracle
|
|
| Last Closed: | 2010-12-21 07:38:26 UTC | Type: | Feature Request |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Alessandro Lazarotti
2010-12-20 16:23:40 UTC
Link: Added: This issue is related to JBRULES-2840 In the case where rule resources in the srcdir are in multiple packages and you specify binformat="package", each package will be serialized independently to the destination file and thus override the previous serialized package.
I added logging to the DroolsCompilerAntTask which you can invoke by adding:
1. verbose="true" attribute to the compiler task, for example:
<compiler srcdir="${basedir}/src/test/resources/rules"
tofile="${basedir}/src/test/resources/rsa.rules.pkg"
classpathref="rsa.classpath"
binformat="package" verbose="true">
2. adding the ant recorder task to the target containing the compiler task, so for example:
<target name="rules">
<record name="build.log"/>
<compiler srcdir="${basedir}/src/test/resources/rules" verbose="true" ..../>
...
</target>
The log file will contain information about each package and its rules. Also it warns users when each individual package is serialized and that it can overwrite previous serialized packages. The sample output of the log file can look like:
[compiler] ** Content of package: com.sample.other
[compiler] Rule name: Your First Rule
[compiler] ** Content of package: com.sample
[compiler] Rule name: Your Second Rule
[compiler] ** Serializing package [com.sample.other] to destination file. **** THIS WILL OVERRIDE ANY PREVIOUSLY SERIALIZAED PACKAGE ****
[compiler] ** Serializing package [com.sample] to destination file. **** THIS WILL OVERRIDE ANY PREVIOUSLY SERIALIZAED PACKAGE ****
|