Maven CycleException










2















I am currently making a library for my upcoming spigot plugins. But you won't require any knowledge of that since this is more dependent on maven issues



So firstly I'd like to give the source



I have multiple modules: Library, v1_13_R1, v1_13_R2, the reason for multiple v1_13_R etc. is because Maven won't allow you to implement multiple versions of the same dependency. And its crucial for the functions of these modules to have the right version as the packages have the version names in them. EDIT 1 I've seen that this may sound confusing so: The reason why its possible to have multiple of the same library in one jar(Not module) is possible because my system won't initiate the class containing imports that aren't provided as I first detect which version is used. This way I can make it multi-version. I hope this clears up some of the confusing regarding this.



So if I clean package from root then It will create 3 jars, but none of them contains all 3 modules, which is what I need. And if I make the version dependent modules a dependency in my Library module, then I'll get a CycleException.



1) any idea on how to fix this?


or optionally:


2) is there any better project structure possible?



Any help would be really appreciated, thanks in advance



EDIT I still need a good answer as its frustrating me at the moment since nothing works. So if you have any knowledge on how to make such a project structure work please tell me.










share|improve this question
























  • It does not make sense having different versions of the same library on a classpath. This is basic Java and nothing to do with Maven. Furthermore I've seen a package with <type>javadoc</type> which does not exist in Maven. But what exists would be a javadoc package which has a classifier <classifier>javadoc</classifier>...and why is the javadoc part defined as <scope>provided</scope> which does not make sense..?

    – khmarbaise
    Nov 11 '18 at 8:06











  • It does, as NMS(The part I am trying do get right) updates its package name with each version for example for v1_13_R1 the package name is: net.minecraft.server.v1_13_R1 and for v1_13_R2 it is: net.minecraft.server.v1_13_R2 and I need to make multiple modules since I can not make one module have multiple versions on the same artifact. Also I have no dependency as type javadoc

    – YourPalJake
    Nov 11 '18 at 11:11











  • So, are you saying that if you identify your modules V1_13_R1 and V1_13_R2 with the same groupId and artifactId, but different version numbers, you cannot get Maven to have Library depend on both of them?

    – moilejter
    Nov 11 '18 at 19:17












  • No the library that those modules use cannot be added as dependency with multiple versions in the same module

    – YourPalJake
    Nov 11 '18 at 20:34















2















I am currently making a library for my upcoming spigot plugins. But you won't require any knowledge of that since this is more dependent on maven issues



So firstly I'd like to give the source



I have multiple modules: Library, v1_13_R1, v1_13_R2, the reason for multiple v1_13_R etc. is because Maven won't allow you to implement multiple versions of the same dependency. And its crucial for the functions of these modules to have the right version as the packages have the version names in them. EDIT 1 I've seen that this may sound confusing so: The reason why its possible to have multiple of the same library in one jar(Not module) is possible because my system won't initiate the class containing imports that aren't provided as I first detect which version is used. This way I can make it multi-version. I hope this clears up some of the confusing regarding this.



So if I clean package from root then It will create 3 jars, but none of them contains all 3 modules, which is what I need. And if I make the version dependent modules a dependency in my Library module, then I'll get a CycleException.



1) any idea on how to fix this?


or optionally:


2) is there any better project structure possible?



Any help would be really appreciated, thanks in advance



EDIT I still need a good answer as its frustrating me at the moment since nothing works. So if you have any knowledge on how to make such a project structure work please tell me.










share|improve this question
























  • It does not make sense having different versions of the same library on a classpath. This is basic Java and nothing to do with Maven. Furthermore I've seen a package with <type>javadoc</type> which does not exist in Maven. But what exists would be a javadoc package which has a classifier <classifier>javadoc</classifier>...and why is the javadoc part defined as <scope>provided</scope> which does not make sense..?

    – khmarbaise
    Nov 11 '18 at 8:06











  • It does, as NMS(The part I am trying do get right) updates its package name with each version for example for v1_13_R1 the package name is: net.minecraft.server.v1_13_R1 and for v1_13_R2 it is: net.minecraft.server.v1_13_R2 and I need to make multiple modules since I can not make one module have multiple versions on the same artifact. Also I have no dependency as type javadoc

    – YourPalJake
    Nov 11 '18 at 11:11











  • So, are you saying that if you identify your modules V1_13_R1 and V1_13_R2 with the same groupId and artifactId, but different version numbers, you cannot get Maven to have Library depend on both of them?

    – moilejter
    Nov 11 '18 at 19:17












  • No the library that those modules use cannot be added as dependency with multiple versions in the same module

    – YourPalJake
    Nov 11 '18 at 20:34













2












2








2


1






I am currently making a library for my upcoming spigot plugins. But you won't require any knowledge of that since this is more dependent on maven issues



So firstly I'd like to give the source



I have multiple modules: Library, v1_13_R1, v1_13_R2, the reason for multiple v1_13_R etc. is because Maven won't allow you to implement multiple versions of the same dependency. And its crucial for the functions of these modules to have the right version as the packages have the version names in them. EDIT 1 I've seen that this may sound confusing so: The reason why its possible to have multiple of the same library in one jar(Not module) is possible because my system won't initiate the class containing imports that aren't provided as I first detect which version is used. This way I can make it multi-version. I hope this clears up some of the confusing regarding this.



So if I clean package from root then It will create 3 jars, but none of them contains all 3 modules, which is what I need. And if I make the version dependent modules a dependency in my Library module, then I'll get a CycleException.



1) any idea on how to fix this?


or optionally:


2) is there any better project structure possible?



Any help would be really appreciated, thanks in advance



EDIT I still need a good answer as its frustrating me at the moment since nothing works. So if you have any knowledge on how to make such a project structure work please tell me.










share|improve this question
















I am currently making a library for my upcoming spigot plugins. But you won't require any knowledge of that since this is more dependent on maven issues



So firstly I'd like to give the source



I have multiple modules: Library, v1_13_R1, v1_13_R2, the reason for multiple v1_13_R etc. is because Maven won't allow you to implement multiple versions of the same dependency. And its crucial for the functions of these modules to have the right version as the packages have the version names in them. EDIT 1 I've seen that this may sound confusing so: The reason why its possible to have multiple of the same library in one jar(Not module) is possible because my system won't initiate the class containing imports that aren't provided as I first detect which version is used. This way I can make it multi-version. I hope this clears up some of the confusing regarding this.



So if I clean package from root then It will create 3 jars, but none of them contains all 3 modules, which is what I need. And if I make the version dependent modules a dependency in my Library module, then I'll get a CycleException.



1) any idea on how to fix this?


or optionally:


2) is there any better project structure possible?



Any help would be really appreciated, thanks in advance



EDIT I still need a good answer as its frustrating me at the moment since nothing works. So if you have any knowledge on how to make such a project structure work please tell me.







java maven bukkit






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 18 '18 at 11:43







YourPalJake

















asked Nov 10 '18 at 23:15









YourPalJakeYourPalJake

116




116












  • It does not make sense having different versions of the same library on a classpath. This is basic Java and nothing to do with Maven. Furthermore I've seen a package with <type>javadoc</type> which does not exist in Maven. But what exists would be a javadoc package which has a classifier <classifier>javadoc</classifier>...and why is the javadoc part defined as <scope>provided</scope> which does not make sense..?

    – khmarbaise
    Nov 11 '18 at 8:06











  • It does, as NMS(The part I am trying do get right) updates its package name with each version for example for v1_13_R1 the package name is: net.minecraft.server.v1_13_R1 and for v1_13_R2 it is: net.minecraft.server.v1_13_R2 and I need to make multiple modules since I can not make one module have multiple versions on the same artifact. Also I have no dependency as type javadoc

    – YourPalJake
    Nov 11 '18 at 11:11











  • So, are you saying that if you identify your modules V1_13_R1 and V1_13_R2 with the same groupId and artifactId, but different version numbers, you cannot get Maven to have Library depend on both of them?

    – moilejter
    Nov 11 '18 at 19:17












  • No the library that those modules use cannot be added as dependency with multiple versions in the same module

    – YourPalJake
    Nov 11 '18 at 20:34

















  • It does not make sense having different versions of the same library on a classpath. This is basic Java and nothing to do with Maven. Furthermore I've seen a package with <type>javadoc</type> which does not exist in Maven. But what exists would be a javadoc package which has a classifier <classifier>javadoc</classifier>...and why is the javadoc part defined as <scope>provided</scope> which does not make sense..?

    – khmarbaise
    Nov 11 '18 at 8:06











  • It does, as NMS(The part I am trying do get right) updates its package name with each version for example for v1_13_R1 the package name is: net.minecraft.server.v1_13_R1 and for v1_13_R2 it is: net.minecraft.server.v1_13_R2 and I need to make multiple modules since I can not make one module have multiple versions on the same artifact. Also I have no dependency as type javadoc

    – YourPalJake
    Nov 11 '18 at 11:11











  • So, are you saying that if you identify your modules V1_13_R1 and V1_13_R2 with the same groupId and artifactId, but different version numbers, you cannot get Maven to have Library depend on both of them?

    – moilejter
    Nov 11 '18 at 19:17












  • No the library that those modules use cannot be added as dependency with multiple versions in the same module

    – YourPalJake
    Nov 11 '18 at 20:34
















It does not make sense having different versions of the same library on a classpath. This is basic Java and nothing to do with Maven. Furthermore I've seen a package with <type>javadoc</type> which does not exist in Maven. But what exists would be a javadoc package which has a classifier <classifier>javadoc</classifier>...and why is the javadoc part defined as <scope>provided</scope> which does not make sense..?

– khmarbaise
Nov 11 '18 at 8:06





It does not make sense having different versions of the same library on a classpath. This is basic Java and nothing to do with Maven. Furthermore I've seen a package with <type>javadoc</type> which does not exist in Maven. But what exists would be a javadoc package which has a classifier <classifier>javadoc</classifier>...and why is the javadoc part defined as <scope>provided</scope> which does not make sense..?

– khmarbaise
Nov 11 '18 at 8:06













It does, as NMS(The part I am trying do get right) updates its package name with each version for example for v1_13_R1 the package name is: net.minecraft.server.v1_13_R1 and for v1_13_R2 it is: net.minecraft.server.v1_13_R2 and I need to make multiple modules since I can not make one module have multiple versions on the same artifact. Also I have no dependency as type javadoc

– YourPalJake
Nov 11 '18 at 11:11





It does, as NMS(The part I am trying do get right) updates its package name with each version for example for v1_13_R1 the package name is: net.minecraft.server.v1_13_R1 and for v1_13_R2 it is: net.minecraft.server.v1_13_R2 and I need to make multiple modules since I can not make one module have multiple versions on the same artifact. Also I have no dependency as type javadoc

– YourPalJake
Nov 11 '18 at 11:11













So, are you saying that if you identify your modules V1_13_R1 and V1_13_R2 with the same groupId and artifactId, but different version numbers, you cannot get Maven to have Library depend on both of them?

– moilejter
Nov 11 '18 at 19:17






So, are you saying that if you identify your modules V1_13_R1 and V1_13_R2 with the same groupId and artifactId, but different version numbers, you cannot get Maven to have Library depend on both of them?

– moilejter
Nov 11 '18 at 19:17














No the library that those modules use cannot be added as dependency with multiple versions in the same module

– YourPalJake
Nov 11 '18 at 20:34





No the library that those modules use cannot be added as dependency with multiple versions in the same module

– YourPalJake
Nov 11 '18 at 20:34












1 Answer
1






active

oldest

votes


















0














So I've tried a different structure that did work. For the people who are reading this in the future and are having the same issue here is my GitHub repo AzortisLib



I hope this works for everyone!






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%2f53244350%2fmaven-cycleexception%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









    0














    So I've tried a different structure that did work. For the people who are reading this in the future and are having the same issue here is my GitHub repo AzortisLib



    I hope this works for everyone!






    share|improve this answer



























      0














      So I've tried a different structure that did work. For the people who are reading this in the future and are having the same issue here is my GitHub repo AzortisLib



      I hope this works for everyone!






      share|improve this answer

























        0












        0








        0







        So I've tried a different structure that did work. For the people who are reading this in the future and are having the same issue here is my GitHub repo AzortisLib



        I hope this works for everyone!






        share|improve this answer













        So I've tried a different structure that did work. For the people who are reading this in the future and are having the same issue here is my GitHub repo AzortisLib



        I hope this works for everyone!







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 19 '18 at 15:13









        YourPalJakeYourPalJake

        116




        116



























            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%2f53244350%2fmaven-cycleexception%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

            𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

            Crossroads (UK TV series)

            ữḛḳṊẴ ẋ,Ẩṙ,ỹḛẪẠứụỿṞṦ,Ṉẍừ,ứ Ị,Ḵ,ṏ ṇỪḎḰṰọửḊ ṾḨḮữẑỶṑỗḮṣṉẃ Ữẩụ,ṓ,ḹẕḪḫỞṿḭ ỒṱṨẁṋṜ ḅẈ ṉ ứṀḱṑỒḵ,ḏ,ḊḖỹẊ Ẻḷổ,ṥ ẔḲẪụḣể Ṱ ḭỏựẶ Ồ Ṩ,ẂḿṡḾồ ỗṗṡịṞẤḵṽẃ ṸḒẄẘ,ủẞẵṦṟầṓế