You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Sean Abbott <se...@akamai.com> on 2013/09/05 23:54:01 UTC

More detailed info on how exclusions work

I keep getting errors where I can see my exclusions working, but then it
seems to attempt to compile the class anyway.

For instance:  http://pastebin.com/wFPpQWxU

I could see the "number of files to compile" number going down as I
added exclusions, and yet I still kept getting the same error messages
every time.

Why?

A link to an explanation would be just as good.  My google-foo is
failed, and I've been at this for hours.

Thanks!

-- 
sean

Sean Abbott
Release Engineer, Portal
Akamai Technologies
seabbott@akamai.com
office: 617-444-2818


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: More detailed info on how exclusions work

Posted by Ron Wheeler <rw...@artifact-software.com>.
Exclusions are normally used to avoid duplicate dependent jars from 
being included.

I am not sure what you are expecting to happen when you exclude a module 
in this way.

Ron


On 05/09/2013 5:54 PM, Sean Abbott wrote:
> I keep getting errors where I can see my exclusions working, but then it
> seems to attempt to compile the class anyway.
>
> For instance:  http://pastebin.com/wFPpQWxU
>
> I could see the "number of files to compile" number going down as I
> added exclusions, and yet I still kept getting the same error messages
> every time.
>
> Why?
>
> A link to an explanation would be just as good.  My google-foo is
> failed, and I've been at this for hours.
>
> Thanks!
>


-- 
Ron Wheeler
President
Artifact Software Inc
email: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: More detailed info on how exclusions work

Posted by Wayne Fay <wa...@gmail.com>.
> I keep getting errors where I can see my exclusions working, but then it
> seems to attempt to compile the class anyway.

I'd assume that javac is pulling in your class for compilation for
some good reason despite Maven's attempt to exclude it. Try -X to see
details of what is happening with javac before assuming this is a
failure of Maven itself.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: More detailed info on how exclusions work

Posted by Curtis Rueden <ct...@wisc.edu>.
Hi all,

> > I could see the "number of files to compile" number going down as I
> > added exclusions, and yet I still kept getting the same error messages
> > every time.
>
> Are you still including source files that depend on the excluded
> sources? If so, Javac will try to compile the excluded classes anyway.
> This is a feature of the Java compiler, not Maven-specific.

I just discovered the "-implicit:none" flag of javac, which prevents this
behavior. That might help in cases like this, though of course there are
still a host of reasons to avoid this scheme.

-Curtis


On Fri, Sep 6, 2013 at 12:34 PM, Curtis Rueden <ct...@wisc.edu> wrote:

> Hi Sean,
>
> > I could see the "number of files to compile" number going down as I
> > added exclusions, and yet I still kept getting the same error messages
> > every time.
>
> Are you still including source files that depend on the excluded sources?
> If so, Javac will try to compile the excluded classes anyway. This is a
> feature of the Java compiler, not Maven-specific.
>
> As an aside, I think you are in for a world of pain trying to exclude
> classes from compilation in this way just because they have compile errors.
> Can't you just fix the compile errors? Or if you have some other
> requirements, there is almost certainly a better way of achieving them than
> what you are trying to do.
>
> Regards,
> Curtis
>
>
> On Thu, Sep 5, 2013 at 4:54 PM, Sean Abbott <se...@akamai.com> wrote:
>
>> I keep getting errors where I can see my exclusions working, but then it
>> seems to attempt to compile the class anyway.
>>
>> For instance:  http://pastebin.com/wFPpQWxU
>>
>> I could see the "number of files to compile" number going down as I
>> added exclusions, and yet I still kept getting the same error messages
>> every time.
>>
>> Why?
>>
>> A link to an explanation would be just as good.  My google-foo is
>> failed, and I've been at this for hours.
>>
>> Thanks!
>>
>> --
>> sean
>>
>> Sean Abbott
>> Release Engineer, Portal
>> Akamai Technologies
>> seabbott@akamai.com
>> office: 617-444-2818
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>

Re: More detailed info on how exclusions work

Posted by Curtis Rueden <ct...@wisc.edu>.
Hi Sean,

> I could see the "number of files to compile" number going down as I
> added exclusions, and yet I still kept getting the same error messages
> every time.

Are you still including source files that depend on the excluded sources?
If so, Javac will try to compile the excluded classes anyway. This is a
feature of the Java compiler, not Maven-specific.

As an aside, I think you are in for a world of pain trying to exclude
classes from compilation in this way just because they have compile errors.
Can't you just fix the compile errors? Or if you have some other
requirements, there is almost certainly a better way of achieving them than
what you are trying to do.

Regards,
Curtis


On Thu, Sep 5, 2013 at 4:54 PM, Sean Abbott <se...@akamai.com> wrote:

> I keep getting errors where I can see my exclusions working, but then it
> seems to attempt to compile the class anyway.
>
> For instance:  http://pastebin.com/wFPpQWxU
>
> I could see the "number of files to compile" number going down as I
> added exclusions, and yet I still kept getting the same error messages
> every time.
>
> Why?
>
> A link to an explanation would be just as good.  My google-foo is
> failed, and I've been at this for hours.
>
> Thanks!
>
> --
> sean
>
> Sean Abbott
> Release Engineer, Portal
> Akamai Technologies
> seabbott@akamai.com
> office: 617-444-2818
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>