Why does Maven use a pom.xml of a provided build plugin?What is the meaning of type “bundle” in a maven dependency?Why does Java have transient fields?When maven says “resolution will not be reattempted until the update interval of MyRepo has elapsed”, where is that interval specified?Maven error “Failure to transfer…”IntelliJ inspection gives “Cannot resolve symbol” but still compiles codeHow to solve “Plugin execution not covered by lifecycle configuration” for Spring Data Maven BuildsBuild order of Maven multimodule project?Dealing with “Xerces hell” in Java/Maven?Why does this code using random strings print “hello world”?Maven Pom.xml issueFail to build zookeeper env by maven on eclipse

Proto-Indo-European (PIE) words with IPA

Way of refund if scammed?

Coloring lines in a graph the same color if they are the same length

Why is Ni[(PPh₃)₂Cl₂] tetrahedral?

Unpreventable damage to Gideon, the Oathsworn

Existence of a model of ZFC in which the natural numbers are really the natural numbers

How many wires should be in a new thermostat cable?

Must every right-inverse of a linear transformation be a linear transformation?

amsmath: How can I use the equation numbering and label manually and anywhere?

Why is this integration method not valid?

One word for 'the thing that attracts me'?

How to become an Editorial board member?

nginx conf: http2 module not working in Chrome in ubuntu 18.04

Real Analysis: Proof of the equivalent definitions of the derivative.

Which values for voltage divider

(For training purposes) Are there any openings with rook pawns that are more effective than others (and if so, what are they)?

Is there an idiom that means that you are in a very strong negotiation position in a negotiation?

Can the Conjure Barrage spell stack with the Disarming Attack or Trip Attack Battle Master maneuvers?

Is a world with one country feeding everyone possible?

Nunc est bibendum: gerund or gerundive?

Keeping the dodos out of the field

What pc resources are used when bruteforcing?

How did the Allies achieve air superiority on Sicily?

Singular Integration



Why does Maven use a pom.xml of a provided build plugin?


What is the meaning of type “bundle” in a maven dependency?Why does Java have transient fields?When maven says “resolution will not be reattempted until the update interval of MyRepo has elapsed”, where is that interval specified?Maven error “Failure to transfer…”IntelliJ inspection gives “Cannot resolve symbol” but still compiles codeHow to solve “Plugin execution not covered by lifecycle configuration” for Spring Data Maven BuildsBuild order of Maven multimodule project?Dealing with “Xerces hell” in Java/Maven?Why does this code using random strings print “hello world”?Maven Pom.xml issueFail to build zookeeper env by maven on eclipse






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















We do have a simple maven pom like



<project xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>

<groupId>org.xy.project.z</groupId>
<artifactId>client</artifactId>
<packaging>pom</packaging>

<build>
<plugins>
<plugin>
<groupId>org.xy.maven</groupId>
<artifactId>own-maven-plugin</artifactId>
<version>1.19.0</version>
<executions>...</executions>
</plugin>
</plugins>
</build>
</project>


As you may guess the own-maven-pluginis our own maven plugin created in another project and with an independent version. So far no problem. But out of nowhere (at least for me) the provided pom didn't run anymore. And it stopped with the message:



Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Failure to find org.xy.projcect:a:bundle:1.0.7-SNAPSHOT in http://repo.local:8081/repository/maven-public/ was cached in the local repository, resolution will not be reattempted until the update interval of internal-repository has elapsed or updates are forced


What happened. We have created a new version of own-maven-plugin this plugin was always a fat-jar containing all necessary dependencies. Now all we did we added just another dependency.



So there are two things I don't understand.



  1. Why does maven try to resolve all dependencies of an already created jar, that is used within the build-plugins.


  2. And why is the problem fixed after I have deleted .m2/org/xy/maven/own-maven-plugin/own-maven-plugin-1.19.0.pom


This is reproducible, adding the deleted pom fails the build. I didn't find any indication for my problem at the maven plugin description site.



So if someone has an explanation. Please let me know.



UPDATE-1:
Updated error message










share|improve this question
























  • Please post the full error message output and not only an excerpt...

    – khmarbaise
    Mar 23 at 22:08






  • 1





    You can cleanup pom.xml from dependencies in fatjar using flatten plugin: mojohaus.org/flatten-maven-plugin/flatten-mojo.html#flattenMode

    – MariuszS
    Mar 26 at 10:00











  • Thank you didn't know this plugin

    – Christian Lutz
    Mar 26 at 10:15

















0















We do have a simple maven pom like



<project xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>

<groupId>org.xy.project.z</groupId>
<artifactId>client</artifactId>
<packaging>pom</packaging>

<build>
<plugins>
<plugin>
<groupId>org.xy.maven</groupId>
<artifactId>own-maven-plugin</artifactId>
<version>1.19.0</version>
<executions>...</executions>
</plugin>
</plugins>
</build>
</project>


As you may guess the own-maven-pluginis our own maven plugin created in another project and with an independent version. So far no problem. But out of nowhere (at least for me) the provided pom didn't run anymore. And it stopped with the message:



Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Failure to find org.xy.projcect:a:bundle:1.0.7-SNAPSHOT in http://repo.local:8081/repository/maven-public/ was cached in the local repository, resolution will not be reattempted until the update interval of internal-repository has elapsed or updates are forced


What happened. We have created a new version of own-maven-plugin this plugin was always a fat-jar containing all necessary dependencies. Now all we did we added just another dependency.



So there are two things I don't understand.



  1. Why does maven try to resolve all dependencies of an already created jar, that is used within the build-plugins.


  2. And why is the problem fixed after I have deleted .m2/org/xy/maven/own-maven-plugin/own-maven-plugin-1.19.0.pom


This is reproducible, adding the deleted pom fails the build. I didn't find any indication for my problem at the maven plugin description site.



So if someone has an explanation. Please let me know.



UPDATE-1:
Updated error message










share|improve this question
























  • Please post the full error message output and not only an excerpt...

    – khmarbaise
    Mar 23 at 22:08






  • 1





    You can cleanup pom.xml from dependencies in fatjar using flatten plugin: mojohaus.org/flatten-maven-plugin/flatten-mojo.html#flattenMode

    – MariuszS
    Mar 26 at 10:00











  • Thank you didn't know this plugin

    – Christian Lutz
    Mar 26 at 10:15













0












0








0








We do have a simple maven pom like



<project xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>

<groupId>org.xy.project.z</groupId>
<artifactId>client</artifactId>
<packaging>pom</packaging>

<build>
<plugins>
<plugin>
<groupId>org.xy.maven</groupId>
<artifactId>own-maven-plugin</artifactId>
<version>1.19.0</version>
<executions>...</executions>
</plugin>
</plugins>
</build>
</project>


As you may guess the own-maven-pluginis our own maven plugin created in another project and with an independent version. So far no problem. But out of nowhere (at least for me) the provided pom didn't run anymore. And it stopped with the message:



Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Failure to find org.xy.projcect:a:bundle:1.0.7-SNAPSHOT in http://repo.local:8081/repository/maven-public/ was cached in the local repository, resolution will not be reattempted until the update interval of internal-repository has elapsed or updates are forced


What happened. We have created a new version of own-maven-plugin this plugin was always a fat-jar containing all necessary dependencies. Now all we did we added just another dependency.



So there are two things I don't understand.



  1. Why does maven try to resolve all dependencies of an already created jar, that is used within the build-plugins.


  2. And why is the problem fixed after I have deleted .m2/org/xy/maven/own-maven-plugin/own-maven-plugin-1.19.0.pom


This is reproducible, adding the deleted pom fails the build. I didn't find any indication for my problem at the maven plugin description site.



So if someone has an explanation. Please let me know.



UPDATE-1:
Updated error message










share|improve this question
















We do have a simple maven pom like



<project xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>

<groupId>org.xy.project.z</groupId>
<artifactId>client</artifactId>
<packaging>pom</packaging>

<build>
<plugins>
<plugin>
<groupId>org.xy.maven</groupId>
<artifactId>own-maven-plugin</artifactId>
<version>1.19.0</version>
<executions>...</executions>
</plugin>
</plugins>
</build>
</project>


As you may guess the own-maven-pluginis our own maven plugin created in another project and with an independent version. So far no problem. But out of nowhere (at least for me) the provided pom didn't run anymore. And it stopped with the message:



Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Failure to find org.xy.projcect:a:bundle:1.0.7-SNAPSHOT in http://repo.local:8081/repository/maven-public/ was cached in the local repository, resolution will not be reattempted until the update interval of internal-repository has elapsed or updates are forced


What happened. We have created a new version of own-maven-plugin this plugin was always a fat-jar containing all necessary dependencies. Now all we did we added just another dependency.



So there are two things I don't understand.



  1. Why does maven try to resolve all dependencies of an already created jar, that is used within the build-plugins.


  2. And why is the problem fixed after I have deleted .m2/org/xy/maven/own-maven-plugin/own-maven-plugin-1.19.0.pom


This is reproducible, adding the deleted pom fails the build. I didn't find any indication for my problem at the maven plugin description site.



So if someone has an explanation. Please let me know.



UPDATE-1:
Updated error message







java maven plugins build pom.xml






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 25 at 15:48







Christian Lutz

















asked Mar 23 at 20:10









Christian LutzChristian Lutz

8911132




8911132












  • Please post the full error message output and not only an excerpt...

    – khmarbaise
    Mar 23 at 22:08






  • 1





    You can cleanup pom.xml from dependencies in fatjar using flatten plugin: mojohaus.org/flatten-maven-plugin/flatten-mojo.html#flattenMode

    – MariuszS
    Mar 26 at 10:00











  • Thank you didn't know this plugin

    – Christian Lutz
    Mar 26 at 10:15

















  • Please post the full error message output and not only an excerpt...

    – khmarbaise
    Mar 23 at 22:08






  • 1





    You can cleanup pom.xml from dependencies in fatjar using flatten plugin: mojohaus.org/flatten-maven-plugin/flatten-mojo.html#flattenMode

    – MariuszS
    Mar 26 at 10:00











  • Thank you didn't know this plugin

    – Christian Lutz
    Mar 26 at 10:15
















Please post the full error message output and not only an excerpt...

– khmarbaise
Mar 23 at 22:08





Please post the full error message output and not only an excerpt...

– khmarbaise
Mar 23 at 22:08




1




1





You can cleanup pom.xml from dependencies in fatjar using flatten plugin: mojohaus.org/flatten-maven-plugin/flatten-mojo.html#flattenMode

– MariuszS
Mar 26 at 10:00





You can cleanup pom.xml from dependencies in fatjar using flatten plugin: mojohaus.org/flatten-maven-plugin/flatten-mojo.html#flattenMode

– MariuszS
Mar 26 at 10:00













Thank you didn't know this plugin

– Christian Lutz
Mar 26 at 10:15





Thank you didn't know this plugin

– Christian Lutz
Mar 26 at 10:15












2 Answers
2






active

oldest

votes


















0














Maven plugins are usually not constructed as fat jars. They resolve their dependencies themselves.



If you have a fat jar that contains dependencies in its pom, then the dependencies are probably resolved as well, so you have the classes twice: Once in the fat jar and once in the dependencies.



I cannot say whether this explains all your errors, but I guess things are easier if you avoid the fat jar in the first place.






share|improve this answer























  • Thank you for the answer. The reason why we created the fat-jar in the first place was the jar will be used as CLI command and as maven plugin. But for testing we will remove it.

    – Christian Lutz
    Mar 25 at 6:26











  • Ok currently I don't think the fat-jar is the source of the problem. But removing it for testing helped me to find the problem. Still I don't understand the problem in all the details.

    – Christian Lutz
    Mar 26 at 8:31


















0














Ok found the reason for the problem.



The new dependency contained itself a dependency with a dependency of type bundle.



<dependency>
<groupId>org.xy.maven</groupId>
<artifactId>own-maven-plugin-dep</artifactId>
<version>1.2.0</version>
<type>bundle</bundle>
</dependency>


After removing this type it worked like charme, again.
I don't know why <type>bundle</type> has been added in the first place. But I don't see any disadvantages by removing it.



Reading this about bundle type doesn't help much to understand why removing fixed my problem here.



This answer doesn't contain all answers for the question. And if someone provides a better one I am more than happy to change the accepted answer.






share|improve this answer























    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%2f55317932%2fwhy-does-maven-use-a-pom-xml-of-a-provided-build-plugin%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Maven plugins are usually not constructed as fat jars. They resolve their dependencies themselves.



    If you have a fat jar that contains dependencies in its pom, then the dependencies are probably resolved as well, so you have the classes twice: Once in the fat jar and once in the dependencies.



    I cannot say whether this explains all your errors, but I guess things are easier if you avoid the fat jar in the first place.






    share|improve this answer























    • Thank you for the answer. The reason why we created the fat-jar in the first place was the jar will be used as CLI command and as maven plugin. But for testing we will remove it.

      – Christian Lutz
      Mar 25 at 6:26











    • Ok currently I don't think the fat-jar is the source of the problem. But removing it for testing helped me to find the problem. Still I don't understand the problem in all the details.

      – Christian Lutz
      Mar 26 at 8:31















    0














    Maven plugins are usually not constructed as fat jars. They resolve their dependencies themselves.



    If you have a fat jar that contains dependencies in its pom, then the dependencies are probably resolved as well, so you have the classes twice: Once in the fat jar and once in the dependencies.



    I cannot say whether this explains all your errors, but I guess things are easier if you avoid the fat jar in the first place.






    share|improve this answer























    • Thank you for the answer. The reason why we created the fat-jar in the first place was the jar will be used as CLI command and as maven plugin. But for testing we will remove it.

      – Christian Lutz
      Mar 25 at 6:26











    • Ok currently I don't think the fat-jar is the source of the problem. But removing it for testing helped me to find the problem. Still I don't understand the problem in all the details.

      – Christian Lutz
      Mar 26 at 8:31













    0












    0








    0







    Maven plugins are usually not constructed as fat jars. They resolve their dependencies themselves.



    If you have a fat jar that contains dependencies in its pom, then the dependencies are probably resolved as well, so you have the classes twice: Once in the fat jar and once in the dependencies.



    I cannot say whether this explains all your errors, but I guess things are easier if you avoid the fat jar in the first place.






    share|improve this answer













    Maven plugins are usually not constructed as fat jars. They resolve their dependencies themselves.



    If you have a fat jar that contains dependencies in its pom, then the dependencies are probably resolved as well, so you have the classes twice: Once in the fat jar and once in the dependencies.



    I cannot say whether this explains all your errors, but I guess things are easier if you avoid the fat jar in the first place.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Mar 24 at 9:55









    JF MeierJF Meier

    10.7k53069




    10.7k53069












    • Thank you for the answer. The reason why we created the fat-jar in the first place was the jar will be used as CLI command and as maven plugin. But for testing we will remove it.

      – Christian Lutz
      Mar 25 at 6:26











    • Ok currently I don't think the fat-jar is the source of the problem. But removing it for testing helped me to find the problem. Still I don't understand the problem in all the details.

      – Christian Lutz
      Mar 26 at 8:31

















    • Thank you for the answer. The reason why we created the fat-jar in the first place was the jar will be used as CLI command and as maven plugin. But for testing we will remove it.

      – Christian Lutz
      Mar 25 at 6:26











    • Ok currently I don't think the fat-jar is the source of the problem. But removing it for testing helped me to find the problem. Still I don't understand the problem in all the details.

      – Christian Lutz
      Mar 26 at 8:31
















    Thank you for the answer. The reason why we created the fat-jar in the first place was the jar will be used as CLI command and as maven plugin. But for testing we will remove it.

    – Christian Lutz
    Mar 25 at 6:26





    Thank you for the answer. The reason why we created the fat-jar in the first place was the jar will be used as CLI command and as maven plugin. But for testing we will remove it.

    – Christian Lutz
    Mar 25 at 6:26













    Ok currently I don't think the fat-jar is the source of the problem. But removing it for testing helped me to find the problem. Still I don't understand the problem in all the details.

    – Christian Lutz
    Mar 26 at 8:31





    Ok currently I don't think the fat-jar is the source of the problem. But removing it for testing helped me to find the problem. Still I don't understand the problem in all the details.

    – Christian Lutz
    Mar 26 at 8:31













    0














    Ok found the reason for the problem.



    The new dependency contained itself a dependency with a dependency of type bundle.



    <dependency>
    <groupId>org.xy.maven</groupId>
    <artifactId>own-maven-plugin-dep</artifactId>
    <version>1.2.0</version>
    <type>bundle</bundle>
    </dependency>


    After removing this type it worked like charme, again.
    I don't know why <type>bundle</type> has been added in the first place. But I don't see any disadvantages by removing it.



    Reading this about bundle type doesn't help much to understand why removing fixed my problem here.



    This answer doesn't contain all answers for the question. And if someone provides a better one I am more than happy to change the accepted answer.






    share|improve this answer



























      0














      Ok found the reason for the problem.



      The new dependency contained itself a dependency with a dependency of type bundle.



      <dependency>
      <groupId>org.xy.maven</groupId>
      <artifactId>own-maven-plugin-dep</artifactId>
      <version>1.2.0</version>
      <type>bundle</bundle>
      </dependency>


      After removing this type it worked like charme, again.
      I don't know why <type>bundle</type> has been added in the first place. But I don't see any disadvantages by removing it.



      Reading this about bundle type doesn't help much to understand why removing fixed my problem here.



      This answer doesn't contain all answers for the question. And if someone provides a better one I am more than happy to change the accepted answer.






      share|improve this answer

























        0












        0








        0







        Ok found the reason for the problem.



        The new dependency contained itself a dependency with a dependency of type bundle.



        <dependency>
        <groupId>org.xy.maven</groupId>
        <artifactId>own-maven-plugin-dep</artifactId>
        <version>1.2.0</version>
        <type>bundle</bundle>
        </dependency>


        After removing this type it worked like charme, again.
        I don't know why <type>bundle</type> has been added in the first place. But I don't see any disadvantages by removing it.



        Reading this about bundle type doesn't help much to understand why removing fixed my problem here.



        This answer doesn't contain all answers for the question. And if someone provides a better one I am more than happy to change the accepted answer.






        share|improve this answer













        Ok found the reason for the problem.



        The new dependency contained itself a dependency with a dependency of type bundle.



        <dependency>
        <groupId>org.xy.maven</groupId>
        <artifactId>own-maven-plugin-dep</artifactId>
        <version>1.2.0</version>
        <type>bundle</bundle>
        </dependency>


        After removing this type it worked like charme, again.
        I don't know why <type>bundle</type> has been added in the first place. But I don't see any disadvantages by removing it.



        Reading this about bundle type doesn't help much to understand why removing fixed my problem here.



        This answer doesn't contain all answers for the question. And if someone provides a better one I am more than happy to change the accepted answer.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 26 at 8:28









        Christian LutzChristian Lutz

        8911132




        8911132



























            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%2f55317932%2fwhy-does-maven-use-a-pom-xml-of-a-provided-build-plugin%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

            Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

            Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript