How to find if I need to exclude dependencies in a maven java project?Is there a decent HTML Junit report plugin for Maven?How do I efficiently iterate over each entry in a Java Map?How do I read / convert an InputStream into a String in Java?How do I generate random integers within a specific range in Java?How can I create an executable JAR with dependencies using Maven?How do I determine whether an array contains a particular value in Java?How to add local jar files to a Maven project?How do I convert a String to an int in Java?IntelliJ inspection gives “Cannot resolve symbol” but still compiles codeImport Maven dependencies in IntelliJ IDEADealing with “Xerces hell” in Java/Maven?

Did the British navy fail to take into account the ballistics correction due to Coriolis force during WW1 Falkland Islands battle?

Understanding Parallelize methods

Why do all fields in a QFT transform like *irreducible* representations of some group?

What is the difference between Major and Minor Bug?

French abbreviation for comparing two items ("vs")

Is there any way to keep a player from killing an NPC?

Architectural feasibility of a tiered circular stone keep

How to gently end involvement with an online community?

Are the players on the same team as the DM?

If the first law of thermodynamics ensures conservation of energy, why does it allow systems to lose energy?

Can a Rogue PC teach an NPC to perform Sneak Attack?

Is using a hyperlink to close a modal a poor design decision?

Non-visual Computers - thoughts?

What is the difference between "Grippe" and "Männergrippe"?

Is immersion of utensils (tevila) valid before koshering (hagala)?

Is for(( ... )) ... ; a valid shell syntax? In which shells?

Was there ever a treaty between 2 entities with significantly different translations to the detriment of one party?

Justifying the use of directed energy weapons

Are there any elected officials in the U.S. who are not legislators, judges, or constitutional officers?

Is "The life is beautiful" incorrect or just very non-idiomatic?

Was it ever possible to target a zone?

How to respectfully refuse to assist co-workers with IT issues?

Is there any practical application for performing a double Fourier transform? ...or an inverse Fourier transform on a time-domain input?

What would be the challenges to taking off and landing a typical passenger jet at FL300?



How to find if I need to exclude dependencies in a maven java project?


Is there a decent HTML Junit report plugin for Maven?How do I efficiently iterate over each entry in a Java Map?How do I read / convert an InputStream into a String in Java?How do I generate random integers within a specific range in Java?How can I create an executable JAR with dependencies using Maven?How do I determine whether an array contains a particular value in Java?How to add local jar files to a Maven project?How do I convert a String to an int in Java?IntelliJ inspection gives “Cannot resolve symbol” but still compiles codeImport Maven dependencies in IntelliJ IDEADealing with “Xerces hell” in Java/Maven?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















I use both Intellij IDEA (2018.3.5) & Eclipse IDEs, but I prefer Intellij. I have a maven based Java project with multiple poms. I added some dependencies to one of the pom files. I need to find out if there are any dependency conflicts which could prevent the build from running when its deployed, and then exclude them. I tried the steps given below to find conflicts which could cause problems. Are they enough or do I need to do more ?



  • Check if there are any compile time dependency conflicts with mvn clean install -DskipTests. Build was successful with no errors.


  • Check if Intellij shows no problems under File > Project Structure > Problems. There are no problems.


I also saw the dependency tree with mvn dependency:tree -Dverbose. It has a lot of "omitted for duplicate" and "omitted for conflict with" items, but the build was successful. I don't see any errors though. Does this mean that everything is okay or do I have to do something more about these conflicts ?










share|improve this question
































    2















    I use both Intellij IDEA (2018.3.5) & Eclipse IDEs, but I prefer Intellij. I have a maven based Java project with multiple poms. I added some dependencies to one of the pom files. I need to find out if there are any dependency conflicts which could prevent the build from running when its deployed, and then exclude them. I tried the steps given below to find conflicts which could cause problems. Are they enough or do I need to do more ?



    • Check if there are any compile time dependency conflicts with mvn clean install -DskipTests. Build was successful with no errors.


    • Check if Intellij shows no problems under File > Project Structure > Problems. There are no problems.


    I also saw the dependency tree with mvn dependency:tree -Dverbose. It has a lot of "omitted for duplicate" and "omitted for conflict with" items, but the build was successful. I don't see any errors though. Does this mean that everything is okay or do I have to do something more about these conflicts ?










    share|improve this question




























      2












      2








      2








      I use both Intellij IDEA (2018.3.5) & Eclipse IDEs, but I prefer Intellij. I have a maven based Java project with multiple poms. I added some dependencies to one of the pom files. I need to find out if there are any dependency conflicts which could prevent the build from running when its deployed, and then exclude them. I tried the steps given below to find conflicts which could cause problems. Are they enough or do I need to do more ?



      • Check if there are any compile time dependency conflicts with mvn clean install -DskipTests. Build was successful with no errors.


      • Check if Intellij shows no problems under File > Project Structure > Problems. There are no problems.


      I also saw the dependency tree with mvn dependency:tree -Dverbose. It has a lot of "omitted for duplicate" and "omitted for conflict with" items, but the build was successful. I don't see any errors though. Does this mean that everything is okay or do I have to do something more about these conflicts ?










      share|improve this question
















      I use both Intellij IDEA (2018.3.5) & Eclipse IDEs, but I prefer Intellij. I have a maven based Java project with multiple poms. I added some dependencies to one of the pom files. I need to find out if there are any dependency conflicts which could prevent the build from running when its deployed, and then exclude them. I tried the steps given below to find conflicts which could cause problems. Are they enough or do I need to do more ?



      • Check if there are any compile time dependency conflicts with mvn clean install -DskipTests. Build was successful with no errors.


      • Check if Intellij shows no problems under File > Project Structure > Problems. There are no problems.


      I also saw the dependency tree with mvn dependency:tree -Dverbose. It has a lot of "omitted for duplicate" and "omitted for conflict with" items, but the build was successful. I don't see any errors though. Does this mean that everything is okay or do I have to do something more about these conflicts ?







      java maven






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 27 at 19:27







      MasterJoe2

















      asked Mar 27 at 17:28









      MasterJoe2MasterJoe2

      5087 silver badges31 bronze badges




      5087 silver badges31 bronze badges

























          1 Answer
          1






          active

          oldest

          votes


















          1















          The best way to tell if everything is fine with your application is to have good tests.



          However normally one doesn't exclude transitive dependencies from project's <dependency> libraries. Doing it can potentially break the dependency in a subtle and hard to notice way. It's usually safer to remove the whole <dependency>.



          There are few scenario when one should use <exclude>:



          1. Dealing with incompatible transitive dependencies between different libraries e.g. A requires library C-1.0 but library B requires library C-2.0 while C-1.0 and C-2.0 can't coexist on the classpath.


          2. Having transitive dependencies already provided by system e.g. deploying to Tomcat with additional JARs in the TOMCAT_HOME/lib directory.


          If you decide to exclude a dependency it's important that you check the final artifact because sometimes plugins do weird things e.g. there were versions of maven-assembly-plugin affected by a bug that resulted in different dependencies being resolved during shaded JAR creation than maven-dependency-plugin used for compilation.






          share|improve this answer



























          • Thanks. I haven't removed any <exclude>. I want to find out if I need to exclude anything just because of adding some new dependencies to one of the poms. I updated my title just now to clarify. mvn clean package - I see some test failures after this. I am looking into them.

            – MasterJoe2
            Mar 27 at 19:26












          • The only good answer is: have good enough tests to tell you that you can release if the project builds. Try to decrease number of dependencies if you don't need them.

            – Karol Dowbecki
            Mar 27 at 19:31











          • It was suggested to me that I run the app. Thats when a dependency conflict came up. I don't know if this is also needed to discover conflicts.

            – MasterJoe2
            May 21 at 20:13










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55383266%2fhow-to-find-if-i-need-to-exclude-dependencies-in-a-maven-java-project%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1















          The best way to tell if everything is fine with your application is to have good tests.



          However normally one doesn't exclude transitive dependencies from project's <dependency> libraries. Doing it can potentially break the dependency in a subtle and hard to notice way. It's usually safer to remove the whole <dependency>.



          There are few scenario when one should use <exclude>:



          1. Dealing with incompatible transitive dependencies between different libraries e.g. A requires library C-1.0 but library B requires library C-2.0 while C-1.0 and C-2.0 can't coexist on the classpath.


          2. Having transitive dependencies already provided by system e.g. deploying to Tomcat with additional JARs in the TOMCAT_HOME/lib directory.


          If you decide to exclude a dependency it's important that you check the final artifact because sometimes plugins do weird things e.g. there were versions of maven-assembly-plugin affected by a bug that resulted in different dependencies being resolved during shaded JAR creation than maven-dependency-plugin used for compilation.






          share|improve this answer



























          • Thanks. I haven't removed any <exclude>. I want to find out if I need to exclude anything just because of adding some new dependencies to one of the poms. I updated my title just now to clarify. mvn clean package - I see some test failures after this. I am looking into them.

            – MasterJoe2
            Mar 27 at 19:26












          • The only good answer is: have good enough tests to tell you that you can release if the project builds. Try to decrease number of dependencies if you don't need them.

            – Karol Dowbecki
            Mar 27 at 19:31











          • It was suggested to me that I run the app. Thats when a dependency conflict came up. I don't know if this is also needed to discover conflicts.

            – MasterJoe2
            May 21 at 20:13















          1















          The best way to tell if everything is fine with your application is to have good tests.



          However normally one doesn't exclude transitive dependencies from project's <dependency> libraries. Doing it can potentially break the dependency in a subtle and hard to notice way. It's usually safer to remove the whole <dependency>.



          There are few scenario when one should use <exclude>:



          1. Dealing with incompatible transitive dependencies between different libraries e.g. A requires library C-1.0 but library B requires library C-2.0 while C-1.0 and C-2.0 can't coexist on the classpath.


          2. Having transitive dependencies already provided by system e.g. deploying to Tomcat with additional JARs in the TOMCAT_HOME/lib directory.


          If you decide to exclude a dependency it's important that you check the final artifact because sometimes plugins do weird things e.g. there were versions of maven-assembly-plugin affected by a bug that resulted in different dependencies being resolved during shaded JAR creation than maven-dependency-plugin used for compilation.






          share|improve this answer



























          • Thanks. I haven't removed any <exclude>. I want to find out if I need to exclude anything just because of adding some new dependencies to one of the poms. I updated my title just now to clarify. mvn clean package - I see some test failures after this. I am looking into them.

            – MasterJoe2
            Mar 27 at 19:26












          • The only good answer is: have good enough tests to tell you that you can release if the project builds. Try to decrease number of dependencies if you don't need them.

            – Karol Dowbecki
            Mar 27 at 19:31











          • It was suggested to me that I run the app. Thats when a dependency conflict came up. I don't know if this is also needed to discover conflicts.

            – MasterJoe2
            May 21 at 20:13













          1














          1










          1









          The best way to tell if everything is fine with your application is to have good tests.



          However normally one doesn't exclude transitive dependencies from project's <dependency> libraries. Doing it can potentially break the dependency in a subtle and hard to notice way. It's usually safer to remove the whole <dependency>.



          There are few scenario when one should use <exclude>:



          1. Dealing with incompatible transitive dependencies between different libraries e.g. A requires library C-1.0 but library B requires library C-2.0 while C-1.0 and C-2.0 can't coexist on the classpath.


          2. Having transitive dependencies already provided by system e.g. deploying to Tomcat with additional JARs in the TOMCAT_HOME/lib directory.


          If you decide to exclude a dependency it's important that you check the final artifact because sometimes plugins do weird things e.g. there were versions of maven-assembly-plugin affected by a bug that resulted in different dependencies being resolved during shaded JAR creation than maven-dependency-plugin used for compilation.






          share|improve this answer















          The best way to tell if everything is fine with your application is to have good tests.



          However normally one doesn't exclude transitive dependencies from project's <dependency> libraries. Doing it can potentially break the dependency in a subtle and hard to notice way. It's usually safer to remove the whole <dependency>.



          There are few scenario when one should use <exclude>:



          1. Dealing with incompatible transitive dependencies between different libraries e.g. A requires library C-1.0 but library B requires library C-2.0 while C-1.0 and C-2.0 can't coexist on the classpath.


          2. Having transitive dependencies already provided by system e.g. deploying to Tomcat with additional JARs in the TOMCAT_HOME/lib directory.


          If you decide to exclude a dependency it's important that you check the final artifact because sometimes plugins do weird things e.g. there were versions of maven-assembly-plugin affected by a bug that resulted in different dependencies being resolved during shaded JAR creation than maven-dependency-plugin used for compilation.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited May 21 at 20:24

























          answered Mar 27 at 17:36









          Karol DowbeckiKarol Dowbecki

          30.1k9 gold badges43 silver badges62 bronze badges




          30.1k9 gold badges43 silver badges62 bronze badges















          • Thanks. I haven't removed any <exclude>. I want to find out if I need to exclude anything just because of adding some new dependencies to one of the poms. I updated my title just now to clarify. mvn clean package - I see some test failures after this. I am looking into them.

            – MasterJoe2
            Mar 27 at 19:26












          • The only good answer is: have good enough tests to tell you that you can release if the project builds. Try to decrease number of dependencies if you don't need them.

            – Karol Dowbecki
            Mar 27 at 19:31











          • It was suggested to me that I run the app. Thats when a dependency conflict came up. I don't know if this is also needed to discover conflicts.

            – MasterJoe2
            May 21 at 20:13

















          • Thanks. I haven't removed any <exclude>. I want to find out if I need to exclude anything just because of adding some new dependencies to one of the poms. I updated my title just now to clarify. mvn clean package - I see some test failures after this. I am looking into them.

            – MasterJoe2
            Mar 27 at 19:26












          • The only good answer is: have good enough tests to tell you that you can release if the project builds. Try to decrease number of dependencies if you don't need them.

            – Karol Dowbecki
            Mar 27 at 19:31











          • It was suggested to me that I run the app. Thats when a dependency conflict came up. I don't know if this is also needed to discover conflicts.

            – MasterJoe2
            May 21 at 20:13
















          Thanks. I haven't removed any <exclude>. I want to find out if I need to exclude anything just because of adding some new dependencies to one of the poms. I updated my title just now to clarify. mvn clean package - I see some test failures after this. I am looking into them.

          – MasterJoe2
          Mar 27 at 19:26






          Thanks. I haven't removed any <exclude>. I want to find out if I need to exclude anything just because of adding some new dependencies to one of the poms. I updated my title just now to clarify. mvn clean package - I see some test failures after this. I am looking into them.

          – MasterJoe2
          Mar 27 at 19:26














          The only good answer is: have good enough tests to tell you that you can release if the project builds. Try to decrease number of dependencies if you don't need them.

          – Karol Dowbecki
          Mar 27 at 19:31





          The only good answer is: have good enough tests to tell you that you can release if the project builds. Try to decrease number of dependencies if you don't need them.

          – Karol Dowbecki
          Mar 27 at 19:31













          It was suggested to me that I run the app. Thats when a dependency conflict came up. I don't know if this is also needed to discover conflicts.

          – MasterJoe2
          May 21 at 20:13





          It was suggested to me that I run the app. Thats when a dependency conflict came up. I don't know if this is also needed to discover conflicts.

          – MasterJoe2
          May 21 at 20:13








          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55383266%2fhow-to-find-if-i-need-to-exclude-dependencies-in-a-maven-java-project%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현