Open SuperAlecs opened 7 years ago
Please reply i really need it @fromgate
@SuperAlecs You need to install the dependencies first:
cd /usr/local/src/
git clone https://github.com/Nukkit/Nukkit.git
cd Nukkit
git submodule update --init
mvn clean
mvn package
mvn install
Now nukkit is in your LOCAL maven repo However, I may already have other dependencies installed in my local repo that are required to build nukkit, as I build plugins all the time. I don't believe so, as the Nukkit devs made it STUPID SIMPLE to build from source. DO NOT skip the submodule update command above or it will not work!
cd /usr/local/src/
git clone https://github.com/NukkitRu/Multipass.git
cd Multipass
mvn clean
mvn package
mvn install
Now MultiPass is in your LOCAL maven repository. That should not error. All the dependencies are correctly defined in its pom.xml file
cd /usr/local/src/
git clone https://github.com/NukkitRu/MultiChat.git
cd MultiChat
PROBLEM: You first have to update MultiChat's pom.xml file with the nukkit AND MultiPass dependencies before you can actually build MultiChat. (If any maven wizards know of a better way to include dependencies from the command line easily, please reply here.)
Since you've already built the two dependencies, you can grab the groupId, artifactId and version from each dependency's pom.xml file and stuff them in a dependency wrapper, which is in the dependencies section of the pom.xml.
This is what the pom.xml file should now look like for MultiChat:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ru.nukkit.multichat</groupId>
<artifactId>MultiChat</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>cn.nukkit</groupId>
<artifactId>nukkit</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ru.nukkit.multipass</groupId>
<artifactId>Multipass</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
Build it!
mvn clean
mvn package
It should compile fine and spit out the name of the compiled file:
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ MultiChat ---
[INFO] Building jar: /usr/local/src/MultiChat/target/MultiChat-1.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
That should work for you!
well I just got the error failed to execute goal pl.project13.maven:git-commit-id-plugin:2.2.1:revision (get-the-git-infos) on project nukkit: The plugin pl.project13.maven:git-commit-id-plugin:2.2.1 requires Maven version [3.1.1,)
when compiling Nukkit with mvn package
@ZizzyZizzy
When i try to compile the console says this [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Cfg.java:[3,22] error: package cn.nukkit.utils does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Cfg.java:[4,22] error: package cn.nukkit.utils does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Cfg.java:[7,25] error: cannot find symbol [ERROR] class SimpleConfig [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Cfg.java:[43,11] error: cannot find symbol [ERROR] class Cfg [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Paginator.java:[3,16] error: package cn.nukkit does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Paginator.java:[4,24] error: package cn.nukkit.command does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Paginator.java:[10,33] error: cannot find symbol [ERROR] class Paginator [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Paginator.java:[65,26] error: cannot find symbol [ERROR] class Paginator [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Paginator.java:[69,26] error: cannot find symbol [ERROR] class Paginator [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Paginator.java:[95,25] error: cannot find symbol [ERROR] class Paginator [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/ChatHelp.java:[3,16] error: package cn.nukkit does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/ChatHelp.java:[4,24] error: package cn.nukkit.command does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/ChatHelp.java:[5,22] error: package cn.nukkit.utils does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/ChatHelp.java:[9,34] error: package cn.nukkit.permission does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/ChatHelp.java:[9,0] error: static import only from classes and interfaces [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/Cmd.java:[4,16] error: package cn.nukkit does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/Cmd.java:[5,24] error: package cn.nukkit.command does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/Cmd.java:[6,23] error: package cn.nukkit.plugin does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/Cmd.java:[7,22] error: package cn.nukkit.utils does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/ChatHelp.java:[18,27] error: cannot find symbol [ERROR] class ChatHelp [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/ChatHelp.java:[18,49] error: cannot find symbol [ERROR] class ChatHelp [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Message.java:[3,16] error: package cn.nukkit does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Message.java:[4,16] error: package cn.nukkit does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Message.java:[5,24] error: package cn.nukkit.command does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Message.java:[6,22] error: package cn.nukkit.level does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Message.java:[7,23] error: package cn.nukkit.plugin does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Message.java:[8,22] error: package cn.nukkit.utils does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Message.java:[9,22] error: package cn.nukkit.utils does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/Cmd.java:[42,30] error: cannot find symbol [ERROR] class Cmd [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/Cmd.java:[77,34] error: cannot find symbol [ERROR] class Cmd [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/Cmd.java:[85,36] error: cannot find symbol [ERROR] class Cmd [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/Cmd.java:[85,58] error: cannot find symbol [ERROR] class Cmd [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/Cmd.java:[91,11] error: cannot find symbol [ERROR] class Cmd [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Message.java:[57,19] error: cannot find symbol [ERROR] class Message [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Message.java:[109,36] error: cannot find symbol [ERROR] class Message [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Message.java:[130,23] error: cannot find symbol [ERROR] class Message [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Message.java:[146,25] error: cannot find symbol [ERROR] class Message [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Message.java:[280,28] error: cannot find symbol [ERROR] class Message [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/MultiChat.java:[3,23] error: package cn.nukkit.plugin does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/MultiChat.java:[9,31] error: cannot find symbol [ERROR] class PluginBase [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/ChatGroup.java:[4,16] error: package cn.nukkit does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/ChatGroup.java:[5,24] error: package cn.nukkit.command does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/ChatGroup.java:[6,22] error: package cn.nukkit.utils does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/ChatGroup.java:[10,26] error: package ru.nukkit.multipass does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/ChatGroup.java:[16,27] error: cannot find symbol [ERROR] class ChatGroup [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/ChatGroup.java:[16,49] error: cannot find symbol [ERROR] class ChatGroup [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/ChatSet.java:[3,16] error: package cn.nukkit does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/ChatSet.java:[4,24] error: package cn.nukkit.command does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/ChatSet.java:[5,22] error: package cn.nukkit.utils does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/ChatSet.java:[17,27] error: cannot find symbol [ERROR] class ChatSet [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/ChatSet.java:[17,49] error: cannot find symbol [ERROR] class ChatSet [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Util.java:[3,16] error: package cn.nukkit does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Util.java:[4,22] error: package cn.nukkit.utils does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Util.java:[5,22] error: package cn.nukkit.utils does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Util.java:[7,26] error: package ru.nukkit.multipass does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Util.java:[11,39] error: cannot find symbol [ERROR] class Util [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Util.java:[15,41] error: cannot find symbol [ERROR] class Util [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Util.java:[19,42] error: cannot find symbol [ERROR] class Util [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Util.java:[24,40] error: cannot find symbol [ERROR] class Util [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Util.java:[36,47] error: cannot find symbol [ERROR] class Util [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Util.java:[48,43] error: cannot find symbol [ERROR] class Util [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Util.java:[55,36] error: cannot find symbol [ERROR] class Util [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Util.java:[60,46] error: cannot find symbol [ERROR] class Util [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Util.java:[80,34] error: cannot find symbol [ERROR] class Util [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Util.java:[89,38] error: cannot find symbol [ERROR] class Util [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Util.java:[93,40] error: cannot find symbol [ERROR] class Util [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/CommandExecutor.java:[3,24] error: package cn.nukkit.command does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/CommandExecutor.java:[4,24] error: package cn.nukkit.command does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/CommandExecutor.java:[6,37] error: cannot find symbol [ERROR] class Command [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/CommandExecutor.java:[12,27] error: cannot find symbol [ERROR] class CommandExecutor [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/ChatReload.java:[3,16] error: package cn.nukkit does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/ChatReload.java:[4,24] error: package cn.nukkit.command does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/ChatReload.java:[15,27] error: cannot find symbol [ERROR] class ChatReload [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/ChatReload.java:[15,49] error: cannot find symbol [ERROR] class ChatReload [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/ChatListener.java:[3,16] error: package cn.nukkit does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/ChatListener.java:[4,16] error: package cn.nukkit does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/ChatListener.java:[5,22] error: package cn.nukkit.event does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/ChatListener.java:[6,22] error: package cn.nukkit.event does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/ChatListener.java:[7,22] error: package cn.nukkit.event does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/ChatListener.java:[8,29] error: package cn.nukkit.event.player does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/ChatListener.java:[9,29] error: package cn.nukkit.event.player does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/ChatListener.java:[11,32] error: package ru.nukkit.multipass.event does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/ChatListener.java:[19,37] error: cannot find symbol [ERROR] class Listener [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/ChatListener.java:[22,23] error: cannot find symbol [ERROR] class ChatListener [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/ChatListener.java:[28,23] error: cannot find symbol [ERROR] class ChatListener [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/ChatListener.java:[42,29] error: cannot find symbol [ERROR] class ChatListener [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/Commander.java:[3,16] error: package cn.nukkit does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/Commander.java:[4,24] error: package cn.nukkit.command does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/Commander.java:[5,23] error: package cn.nukkit.plugin does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/Commander.java:[6,22] error: package cn.nukkit.utils does not exist [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/Commander.java:[16,19] error: cannot find symbol [ERROR] class Commander [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/Commander.java:[18,28] error: cannot find symbol [ERROR] class Commander [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/Commander.java:[27,18] error: cannot find symbol [ERROR] class Commander [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/Commander.java:[59,33] error: cannot find symbol [ERROR] class Commander [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/Commander.java:[83,35] error: cannot find symbol [ERROR] class Commander [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/Commander.java:[83,18] error: cannot find symbol [ERROR] class Commander [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/command/Commander.java:[87,34] error: cannot find symbol [ERROR] class Commander [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Cfg.java:[9,5] error: cannot find symbol [ERROR] class Cfg [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Cfg.java:[12,5] error: cannot find symbol [ERROR] class Cfg [ERROR] /root/MultiChat/src/main/java/ru/nukkit/multichat/util/Cfg.java:[15,5] error: cannot find symbol