Exporting maven with external library

Discussion in 'Spigot Plugin Development' started by Multimap, May 26, 2017.

  1. Im making an api and I added the api to my external jars on IntelliJ and tried to compile but get this error:

    Code (Text):
    ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project TestingAPI: Compilation failure: Compilation failure:
    [ERROR] C:\Users\Data Center\workspace\Java\GeneralCoding\TestingAPI\src\main\java\Test.java:[13,4] error: cannot find symbol
    [ERROR]   symbol:   class LanguageAPI
    [ERROR]   location: class Test
    [ERROR] C:\Users\Data Center\workspace\Java\GeneralCoding\TestingAPI\src\main\java\Test.java:[13,34] error: cannot find symbol
    [ERROR] -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
     
    Heres my pom.xml

    Code (Text):
    <?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>TestingAPI</groupId>
        <artifactId>TestingAPI</artifactId>
        <version>1.3</version>

        <build>
            <directory>
                C:\Users\Data Center\Documents\Java Development\plugins\output
            </directory>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <fork>true</fork>
                        <executable>C:\Program Files\Java\jdk1.8.0_131\bin\javac.exe</executable>
                        <source>1.8</source>
                        <target>1.8</target>
                    </configuration>
                </plugin>
            </plugins>
        </build>

        <repositories>
            <repository>
                <id>spigot-repo</id>
                <url>
                    https://hub.spigotmc.org/nexus/content/repositories/snapshots/
                </url>
            </repository>
            <repository>
                <id>puha-repo</id>
                <url>
                    http://repo.puha.io/nexus/content/repositories/releases/
                </url>
            </repository>
        </repositories>
        <dependencies>
            <!-- Spigot-API -->
            <dependency>
                <groupId>org.spigotmc</groupId>
                <artifactId>spigot-api</artifactId>
                <version>1.8.8-R0.1-SNAPSHOT</version>
                <scope>provided</scope>
            </dependency>
            <!-- Bukkit API -->
            <dependency>
                <groupId>org.bukkit</groupId>
                <artifactId>bukkit</artifactId>
                <version>1.8.8-R0.1-SNAPSHOT</version>
            </dependency>
        </dependencies>
    </project>
    any help would be nice since it makes no sense why it aint workin.