[rules-dev] drools compiler issue
Michael Neale
michael.neale at gmail.com
Sun Jan 10 21:00:26 EST 2010
Hi All.
OK this looks like a problem - the only immidiate work around is to
remove those files from the jar.
In terms of a longer term solution, please take a look at:
org.drools.guvnor.server.contenthandle/ModelContentHandler.java
change line 68 to be:
if ( entry.getName().endsWith( ".class" ) && entry.getName().indexOf(
'$' ) == -1 && entry.getName().indexOf('-') == -1) {
and that should filter out any "package-info." bits ? it someone able
to try this and confirm it works? I have attached a modified
ModelContentHandler.java - if it is ok - I will commit it (not sure
what other things need to be filtered out - seems the "-" is
definately not valid).
On Wed, Mar 25, 2009 at 5:29 AM, Greg Barton <greg_barton at yahoo.com> wrote:
>
> Dev d00ds, is there some way for Guvnor to filter out package-info? I'm not sure if there are other pseudo classes out there besides package-info, but you could just filter out all classes with names that are not java identifiers just to future proof.
>
> --- On Tue, 3/24/09, glasscat <aburasheed at studentmasjid.com> wrote:
>
>> From: glasscat <aburasheed at studentmasjid.com>
>> Subject: Re: [rules-dev] drools compiler issue
>> To: rules-dev at lists.jboss.org
>> Date: Tuesday, March 24, 2009, 12:10 PM
>> Thanks for the response Greg. I was using the Govunor and it
>> added all the
>> jaxws artifacts in the imports.
>>
>> I guess I have to manually add only the necessary imports.
>>
>>
>>
>> Greg Barton wrote:
>> >
>> >
>> > java packages can not have hyphens. A package name
>> must consist of java
>> > identifiers and periods:
>> >
>> >
>> http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#3.8
>> >
>> > The package-info cannot be imported, even in a regular
>> java file. (Really,
>> > just try!) It's used to apply package level
>> annotations, but beyond this
>> > has no use, afaik. When compiled it creates an
>> abstract interface that
>> > cannot be extended or imported. (Because it's
>> named using an identifier
>> > that contains a hyphen...)
>> >
>> > --- On Mon, 3/23/09, Abu Rasheed
>> <aburasheed at studentmasjid.com> wrote:
>> >
>> >> From: Abu Rasheed
>> <aburasheed at studentmasjid.com>
>> >> Subject: [rules-dev] drools compiler issue
>> >> To: rules-dev at lists.jboss.org
>> >> Date: Monday, March 23, 2009, 3:41 PM
>> >> I'm using the Drools 5.0.0 M5, with Guvnor,
>> when I tried
>> >> to save and
>> >> validate my configuration, I got this error:
>> >> [ERR 102] Line 5:63 mismatched input '-'
>> >>
>> >> It's pointing to this line:
>> >> import <my pachage path>.package-info
>> >>
>> >> Does drools support package with "-"
>> characters?
>> >> The package is part of
>> >> jaxws generated artifacts.
>> >>
>> >> Thanks
>> >> _______________________________________________
>> >> rules-dev mailing list
>> >> rules-dev at lists.jboss.org
>> >> https://lists.jboss.org/mailman/listinfo/rules-dev
>> >
>> >
>> >
>> > _______________________________________________
>> > rules-dev mailing list
>> > rules-dev at lists.jboss.org
>> > https://lists.jboss.org/mailman/listinfo/rules-dev
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/drools-compiler-issue-tp22668702p22685147.html
>> Sent from the drools - dev mailing list archive at
>> Nabble.com.
>>
>> _______________________________________________
>> rules-dev mailing list
>> rules-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-dev
>
>
>
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
--
Michael D Neale
home: www.michaelneale.net
blog: michaelneale.blogspot.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ModelContentHandler.java
Type: application/octet-stream
Size: 3320 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-dev/attachments/20100111/f997163e/attachment.obj
More information about the rules-dev
mailing list