Shade plugin cannot find default setter?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Shade plugin cannot find default setter?

Russell Gold-3
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
Reply | Threaded
Open this post in threaded view
|

Re: Shade plugin cannot find default setter?

Stuart McCulloch
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 <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: Shade plugin cannot find default setter?

Russell Gold-3
D’oh! Thank you very much!

> On May 4, 2020, at 10:03 AM, Stuart McCulloch <[hidden email]> 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 <[hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]