You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Russell Gold <ru...@oracle.com> on 2020/05/04 14:00:58 UTC

Shade plugin cannot find default setter?

I’m attempting to use the shade plugin to relocate some dependent classes with the following configuration:

<configuration>
    <relocations>
        <pattern>javax.ejb</pattern>
        <shadedPattern>jakarta.ejb</shadedPattern>
        <includes>
            <include>javax.ejb.*</include>
        </includes>
    </relocations>
</configuration>


but when I try running, I see:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.1.0:shade (default) on project orb-gmbal-pfl-shading: Unable to parse configuration of mojo org.apache.maven.plugins:maven-shade-plugin:3.1.0:shade for parameter pattern: Cannot find default setter in class org.apache.maven.plugins.shade.mojo.PackageRelocation -> [Help 1]

How do I get past this?

Thanks,
Russ

Re: Shade plugin cannot find default setter?

Posted by Russell Gold <ru...@oracle.com>.
D’oh! Thank you very much!

> On May 4, 2020, at 10:03 AM, Stuart McCulloch <mc...@gmail.com> wrote:
> 
> It looks like you're missing the <relocation> tag inside the <relocations>
> list:
> https://maven.apache.org/plugins/maven-shade-plugin/examples/class-relocation.html
> 
> try:
> 
> <configuration>
>    <relocations>
>        <relocation>
>            <pattern>javax.ejb</pattern>
>            <shadedPattern>jakarta.ejb</shadedPattern>
>            <includes>
>                <include>javax.ejb.*</include>
>            </includes>
>        </relocation>
>    </relocations>
> </configuration>
> 
> On Mon, 4 May 2020 at 15:01, Russell Gold <ru...@oracle.com> wrote:
> 
>> I’m attempting to use the shade plugin to relocate some dependent classes
>> with the following configuration:
>> 
>> <configuration>
>>    <relocations>
>>        <pattern>javax.ejb</pattern>
>>        <shadedPattern>jakarta.ejb</shadedPattern>
>>        <includes>
>>            <include>javax.ejb.*</include>
>>        </includes>
>>    </relocations>
>> </configuration>
>> 
>> 
>> but when I try running, I see:
>> 
>> [ERROR] Failed to execute goal
>> org.apache.maven.plugins:maven-shade-plugin:3.1.0:shade (default) on
>> project orb-gmbal-pfl-shading: Unable to parse configuration of mojo
>> org.apache.maven.plugins:maven-shade-plugin:3.1.0:shade for parameter
>> pattern: Cannot find default setter in class
>> org.apache.maven.plugins.shade.mojo.PackageRelocation -> [Help 1]
>> 
>> How do I get past this?
>> 
>> Thanks,
>> Russ


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


Re: Shade plugin cannot find default setter?

Posted by Stuart McCulloch <mc...@gmail.com>.
It looks like you're missing the <relocation> tag inside the <relocations>
list:
https://maven.apache.org/plugins/maven-shade-plugin/examples/class-relocation.html

try:

<configuration>
    <relocations>
        <relocation>
            <pattern>javax.ejb</pattern>
            <shadedPattern>jakarta.ejb</shadedPattern>
            <includes>
                <include>javax.ejb.*</include>
            </includes>
        </relocation>
    </relocations>
</configuration>

On Mon, 4 May 2020 at 15:01, Russell Gold <ru...@oracle.com> wrote:

> I’m attempting to use the shade plugin to relocate some dependent classes
> with the following configuration:
>
> <configuration>
>     <relocations>
>         <pattern>javax.ejb</pattern>
>         <shadedPattern>jakarta.ejb</shadedPattern>
>         <includes>
>             <include>javax.ejb.*</include>
>         </includes>
>     </relocations>
> </configuration>
>
>
> but when I try running, I see:
>
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-shade-plugin:3.1.0:shade (default) on
> project orb-gmbal-pfl-shading: Unable to parse configuration of mojo
> org.apache.maven.plugins:maven-shade-plugin:3.1.0:shade for parameter
> pattern: Cannot find default setter in class
> org.apache.maven.plugins.shade.mojo.PackageRelocation -> [Help 1]
>
> How do I get past this?
>
> Thanks,
> Russ