Thanks for the reply. I was able to exclude Storm and log4j related jars.

Here's a related problem:

Since Storm will now use its log4j jars in its path/jar, you cannot control how 
log4j is used.
Specifically, I'm not able to use log4j2 and my own log4j2.xml to configure 
logging.
(I'm able to do that, if I start the topology from a main function.)

So, the question is: 
- How do I have Storm use log4j2 and apply my log4j2.xml?


BTW, "exclude" as was suggested worked for storm-core, but not for log4j 
related jars.
Instead, I just changed the scope of the dependencies to "provided".


Thank you,
Ramin Farajollah
212 617-0014

From: [email protected] 
Subject: Re: Exclude Storm jars from an assembly

Hello Ramin,

You can use maven-shade-plugin for creating uber-JAR as well. For example, we 
use following configuration:

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-shade-plugin</artifactId>
   <executions>
      <execution>
         <phase>package</phase>
         <goals>
            <goal>shade</goal>
         </goals>
         <configuration>
          <createDependencyReducedPom>false</createDependencyReducedPom>
         </configuration>
      </execution>
   </executions>
   <configuration>
      <artifactSet>
         <excludes>
            <exclude>org.apache.storm:storm-core</exclude>
         </excludes>
      </artifactSet>
   </configuration>
</plugin>

​Cheers! 

Stefan

On Fri, Mar 24, 2017 at 3:03 PM, Ramin Farajollah (BLOOMBERG/ 731 LEX) 
<[email protected]> wrote:

Hi,

The following link describes how to create a Maven assembly and that the Storm 
jars should be excluded:
http://storm.apache.org/releases/1.0.3/Running-topologies-on-a-production-cluster.html

I have been able to generate both a jar of my own classes and another with 
dependencies. Neither are acceptable to "storm jar" command.

*** The question: How to exclude Storm jars from jar-with-dependencies?

On the web there are plenty examples of using an assembly xml but I did not 
find one using a plugin as suggested in the above link.
Would you paste the portion of a pom.xml that includes both the plugin for 
maven-assembly-plugin artifact and the exclusions?

Thank you!

Thank you,
Ramin Farajollah
212 617-0014


-- 
Mgr. Stefan Rakonjac
(+420) 774 692 [email protected]


Reply via email to