Maven CycleException
up vote
2
down vote
favorite
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 |
up vote
2
down vote
favorite
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 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 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 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 at 20:34
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
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 at 11:43
asked Nov 10 at 23:15
YourPalJake
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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 at 20:34
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
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 |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
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 |
up vote
0
down vote
accepted
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 |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
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 at 15:13
YourPalJake
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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 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 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 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 at 20:34