Making 2 flavors of a jar

I got 2 folders, src/core/java/... and src/bukkit/java/... I want to setup maven in a way that it will build core first, then use the output as a dependency to build bukkit. The output will be 2 jars
12 Replies
JavaBot
JavaBot8mo ago
This post has been reserved for your question.
Hey @eren.! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Defective
Defective8mo ago
split your project into 2 modules and include core as a dependency of the bukkit module
eren.
eren.OP8mo ago
i have 0 experience outside adding dependencies so this is the best i could do: main pom.xml
<modules>
<module>Chiroptera-Core</module>
<module>Chiroptera-Bukkit</module>
</modules>
<modules>
<module>Chiroptera-Core</module>
<module>Chiroptera-Bukkit</module>
</modules>
src/core/pom.xml
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>me.eren</groupId>
<artifactId>Chiroptera-Core</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>
</project>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>me.eren</groupId>
<artifactId>Chiroptera-Core</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>
</project>
says Module 'Chiroptera-Core' not found
Defective
Defective8mo ago
Do the packages math in bots main pom and the pom of core module?
0x150
0x1508mo ago
making a multi module project with idea will result in the structure you want pom.xml in the root folder is a parent pom, which both has core and bukkit modules. bukkit depends on the maven coordinates for core. done
eren.
eren.OP8mo ago
honestly i didnt understand a single word you said
eren.
eren.OP8mo ago
you mean this?
No description
eren.
eren.OP8mo ago
will try looks fine so far, will post here if something goes wrong
eren.
eren.OP8mo ago
i could already tell from the file size but bukkit doesnt use core correctly
No description
eren.
eren.OP8mo ago
No description
eren.
eren.OP8mo ago
fixed by changing scope to complie
JavaBot
JavaBot8mo ago
Post Closed
This post has been closed by <@587604022349791274>.
Want results from more Discord servers?
Add your server