logo
down
shadow

Downsides of using Shade plugin relocation feature


Downsides of using Shade plugin relocation feature

By : user2173114
Date : October 21 2020, 08:10 PM
hope this fix your issue The main issue is that it can fail in cases where the package name is directly defined (not just imported). For example, if you are using reflection and instantiating the a class by its name (including the package name) it will generate the wrong one. Similar problems can occur when the the package is defined in a manifest (there is a transformer for that). See the plugin info for more information.
Another place where this could be an issue is with a third party dependency which uses the same dependency. Consider for example package A which is provided. If package A depends on the relocated package it will in the run time use the provided instance instead of the relocated one. This can lead to unforeseen effects.
code :


Share : facebook icon twitter icon
maven-shade-plugin error: Cannot find setter, adder nor field in org.apache.maven.plugins.shade.resource.ManifestResourc

maven-shade-plugin error: Cannot find setter, adder nor field in org.apache.maven.plugins.shade.resource.ManifestResourc


By : Miles Yu
Date : March 29 2020, 07:55 AM
I hope this helps you . The first thing you could try is to not use the shade plugin (it's an inferior solution in general to the spring-boot plugin). The spring-boot plugin should be the one you find in all samples and guides in spring.io. With the starter-parent in use it's pretty trivial:
code :
<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>
Should sbt-assembly perform a "maven-shade-plugin"-like relocation of classes?

Should sbt-assembly perform a "maven-shade-plugin"-like relocation of classes?


By : user3271050
Date : March 29 2020, 07:55 AM
will help you Updated in September 2015:
sbt-assembly 0.14.0 adds shading support.
code :
assemblyShadeRules in assembly := Seq(
  ShadeRule.rename("org.apache.commons.io.**" -> "shadeio.@1").inAll
)
jar conflict in two applications - maven-shade-plugin relocation

jar conflict in two applications - maven-shade-plugin relocation


By : Kartik Shashni
Date : March 29 2020, 07:55 AM
like below fixes the issue This looks correct to me at first sight.
The shaded .jar replaces the original .jar - so don't expect to find both in your repository.
code :
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>shaded</shadedClassifierName>
<!-- This is the original non-shaded artifact -->
<dependency>
    <groupId>com.my</groupId>
    <artifactId>application-b-client</artifactId>
    <version>1.0.2-SNAPSHOT</version>
</dependency>
<!-- This is the shaded artifact -->
<dependency>
    <groupId>com.my</groupId>
    <artifactId>application-b-client</artifactId>
    <version>1.0.2-SNAPSHOT</version>
    <classifier>shaded</classifier>
</dependency>
Unable to parse configuration of mojo org.apache.maven.plugins:maven-shade-plugin:3.0.0:shade for parameter transformer

Unable to parse configuration of mojo org.apache.maven.plugins:maven-shade-plugin:3.0.0:shade for parameter transformer


By : user2673870
Date : March 29 2020, 07:55 AM
Any of those help I finally figured it out! There seems to be some compatibility issues with the plugin version 3.0.0 when using the transformer. I downgraded the plugin to version 2.3 and now it works fine.
The shade plugin is now able to create the uber jar with all the log components pulled into it.
code :
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-shade-plugin</artifactId>
    <version>2.3</version>
    <configuration>
        <createDependencyReducedPom>false</createDependencyReducedPom>
        <transformers>
            <transformer
                    implementation="com.github.edwgiz.mavenShadePlugin.log4j2CacheTransformer.PluginsCacheFileTransformer">
            </transformer>
        </transformers>
    </configuration>
    <executions>
        <execution>
            <phase>package</phase>
            <goals>
                <goal>shade</goal>
            </goals>
        </execution>
    </executions>
    <dependencies>
        <dependency>
            <groupId>com.github.edwgiz</groupId>
            <artifactId>maven-shade-plugin.log4j2-cachefile-transformer</artifactId>
            <version>2.8.1</version>
        </dependency>
    </dependencies>
</plugin>
Why does relocation with the maven shade plugin not work?

Why does relocation with the maven shade plugin not work?


By : cye
Date : March 29 2020, 07:55 AM
it fixes the issue I am having some trouble running a Hadoop job that includes a newer version of Guava than the one that is included in the Hadoop distribution (CDH 5.2). This is a known problem. I try to solve it by shading the libraries using the Maven shade plugin. Therefore, I added the following lines to my pom.xml: , This worked for me:
Related Posts Related Posts :
  • Replaying merged streams individually
  • DevExpress GridColumn strange proportional sizing
  • Drools Decision table error : Error while creating KieBase
  • Kafka-Flink-Stream processing: Is there a way to reload input files into the variables being used in a streaming process
  • How to export and import nifi flow from one HDP to another HDP
  • map pointWidth to a single Datapoint in Column Chart
  • Pygame animating image by transforming it
  • Why is my Gdk/cairo class causing a segfault?
  • How to organize queues in Masstransit/RabbitMQ?
  • How to remove a collection element without EntityManager#remove(...) in Doctrine 2?
  • how to change the format of the return value of 'mnist.load_data()' to 'mnist_train.csv' in Keras?
  • CodeFights Interview Practice- Dynamic Programing : Basic : fillingBlocks
  • Accessing the built request details in Karate
  • How to draw a polyline with initial point in Leaflet
  • docusign transform pdf field with text tab as required
  • How to avoid "unused variable in a for loop" error
  • Clipping a polygon to only draw within a circle in Love2D
  • Can't import library in Python
  • Silverstripe - Turn modules on or off in config
  • How does shared memory work behind the scene in Linux?
  • Vue - how to bind table column to a data object?
  • OrientDB deep traversal until specific class
  • Static code analysis of Dockerfiles?
  • Is Batmobile Defy Mini a fake device?
  • Reverse a list to a range
  • Add multiple y-axis to SAPUI5 VizFrame Column Charts
  • Nightmare with rabbitmq.client versions
  • How to change timeout for a request in okhttp
  • How to support relative date parameters in Web Intelligence Report
  • cfEngine3 - class if package is installed
  • Count number of sentences in a string in SAS
  • Visit Last Loaded URL
  • What are the use cases to substitute cookbook array attribute in chef?
  • Forgerock - emb.creatingfamsuffix.failure Error when creating the Default Configuration
  • Entity Framework Core 2 : Easily update an object and it's relations
  • Digitize a filled contour plot
  • Service Fabric "Waiting for upgrade..." using VSTS
  • How to convert an IndexedTable to a DataFrame in Julia?
  • Mvc5 pass model to Layout Page
  • How to set queues manager configuration to 'optional'?
  • What guarantees does zlib's inflate/deflate make about avail_in and avail_out?
  • MariaDB - embed function to automatically sum columns and store result?
  • Laravel share Auth::User() info
  • Enable keys in Azure AD application
  • Stripe Payment API with Customer and Card ID
  • iText 7 relative column width no longer working starting iText 7.0.2
  • Customer Master - Contact Person details
  • How to express inheritance in Coq?
  • Sending direct message to a bot in slack and get the response
  • Yii2 dropDownList Default value
  • MSMQ. Who can create a local queue (permissions required)?
  • how to pass angular 2 $scope variables into the Node.js server
  • root undoing previous changes after sudo su user
  • Create X509 Certificate from.p12 or .pem certificate
  • Keras layer.set_weights doesn't modify the layer. Why?
  • Available build tasks in TFS 2017
  • Change oracle apex database user
  • How to parse typesafe config with objects
  • Is "Comment" a protected word in the Open API 3.0 spec or Swagger Editor?
  • Display Percentage in a Row in Tableau
  • shadow
    Privacy Policy - Terms - Contact Us © voile276.org