Maven CycleException
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
add a comment |
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
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
add a comment |
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
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
java maven bukkit
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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!
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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!
add a comment |
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!
add a comment |
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!
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!
answered Nov 19 '18 at 15:13
YourPalJakeYourPalJake
116
116
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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