Solved Build problems after converting to Maven.

Discussion in 'Plugin Development' started by Europia79, Apr 4, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Europia79

    I've done the conversion, but I think there's something wrong with my POM.xml because my Bukkit plugin won't compile (build), because it doesn't know about Material.HARD_CLAY, which makes me think that it's using the wrong Bukkit API.

    Here's my POM.xml:
    https://github.com/Europia79/Demolition/blob/master/pom.xml.txt
    POM.xml (open)

    HTML:
    <?xml version="1.0"?>
    <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/maven-v4_0_0.xsd">
      <modelVersion>4.0.0</modelVersion>
      <groupId>mc.euro</groupId>
      <artifactId>demolition</artifactId>
      <packaging>jar</packaging>
      <version>172${maven.build.timestamp}</version>
      <name>Demolition</name>
        <properties>
        <maven.build.timestamp.format>yyMMdd-HHmm</maven.build.timestamp.format>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      </properties>
      <url>http://maven.apache.org</url>
        <!-- Locations for jar repositories -->
        <repositories>
            <repository>
                <id>battleplugins-repo</id>
                <url>http://server.battleplugins.com/maven/repository/</url>
            </repository>
            <repository>
                <id>bukkit-repo</id>
                <url>http://repo.bukkit.org/content/groups/public</url>
            </repository>
            <repository>
                <id>md_5-snapshots</id>
                <url>http://repo.md-5.net/content/repositories/snapshots/</url>
            </repository>
            <repository>
                <id>sk89q-repo</id>
                <url>http://maven.sk89q.com/repo/</url>
            </repository>
            <repository>
                <id>vault-repo</id>
                <url>http://nexus.theyeticave.net/content/repositories/pub_releases</url>
            </repository>
            <repository>
                <id>kitteh-repo</id>
                <url>http://repo.kitteh.org/content/repositories/public/</url>
            </repository>
        </repositories>
        <!-- Dependencies -->
        <dependencies>
            <!-- Dependencies that have maven repos -->
            <dependency>
                <groupId>org.bukkit</groupId>
                <artifactId>bukkit</artifactId>
                <version>1.7.2-R0.3-SNAPSHOT</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>mc.alk</groupId>
                <artifactId>BattleArena</artifactId>
                <version>3.9.5.4</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>mc.alk</groupId>
                <artifactId>BattleTracker</artifactId>
                <version>2.5.8.8</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.sk89q</groupId>
                <artifactId>worldguard</artifactId>
                <version>5.8.1-SNAPSHOT</version>
                <scope>provided</scope>
            </dependency>
            <!-- unknown plugins that I had to add to the repo -->
            <!-- test dependencies -->
        </dependencies>
        <!-- How we will compile the plugin -->
        <build>
            <finalName>${artifactId}${version}</finalName>
            <extensions>
                <extension>
                    <groupId>org.apache.maven.wagon</groupId>
                    <artifactId>wagon-ssh</artifactId>
                    <version>2.4</version>
                </extension>
            </extensions>
            <defaultGoal>install</defaultGoal>
            <!-- Where our source directory is -->
            <sourceDirectory>${basedir}/src</sourceDirectory>
            <!-- Include all the resources we need -->
            <resources>
                <resource>
                    <targetPath>.</targetPath>
                    <filtering>true</filtering>
                    <directory>${basedir}</directory>
                    <includes>
                        <include>*.yml</include>
                    </includes>
                </resource>
            </resources>
            <plugins>
                <!-- Specify how we build the plugin.jar -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>1.6</version>
                    <executions>
                        <execution>
                            <phase>package</phase>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    </project>


    If anyone wants to try to build my plugin (to replicate & diagnosis the problem), it's at
    https://github.com/Europia79/Demolition
    Make sure you
    1. rename POM.xml.txt to POM.xml
    2. delete build.xml
    3. delete /nbproject/ directory

    I'm using Netbeans, and when I do this, and it does recognize the project as Maven... It just doesn't build. I think my pom.xml error might be in the Dependency section for the Bukkit version ? But maybe the error is in the Build section ?

    I've been working on this all night (with no sleep) because I really wanna convert and build. Any help would be greatly appreciated !

    Still trying to figure this out. Anyone have any ideas ?

    I might have to use Ant+Ivy instead... Or maybe try Intellij instead of Netbeans.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  2. Offline

    amhokies

    Not sure if it could be an issue, but your pom.xml is infact named pom.xml.txt

    EDIT: Cloned the repository you linked and built it with Maven, and it has built fine.
     
  3. Offline

    epicfacecreeper

    Why are you providing a bukkit jar instead of using the bukkit repo? repo.bukkit.org
     
  4. Offline

    Alshain01

    I'm not familiar with Netbeans, but are you sure your compiling with maven and not the compiler? It's a common mistake with Eclipse and IntelliJ.

    Did you actually install Maven?
     
    Europia79 likes this.
  5. Offline

    Europia79

    amhokies Yeah, I went back to Ant build script when the IDE was messed up AND stopped recognizing Material.HARD_CLAY. But I didn't want to lose all my work that I did on Maven, so I saved my pom.xml into a text file. Thanks for helping.

    Yeah, it builds. Just not inside the IDE, unfortunately.

    Alshain01 Maven is packaged with Netbeans. You don't have to download it, but I did in order to have it on the command line. Netbeans works differently than Eclipse. In Eclipse, you export to JAR. In Netbeans, you build a JAR with Ant or Maven.

    Here's some code that I did to help someone out on the forums. It shows that Netbeans is building with the pom.xml
    Netbeans building with pom.xml (open)

    Code:
    Scanning for projects...
     
    Some problems were encountered while building the effective model for mc.euro:Destruction:jar:172140405-0613
    'version' contains an expression but should be a constant. @ mc.euro:Destruction:172${maven.build.timestamp}, C:\Users\Nikolai\Documents\NetBeansProjects\Destruction\pom.xml, line 7, column 12
     
    It is highly recommended to fix these problems because they threaten the stability of your build.
     
    For this reason, future Maven versions might no longer support building such malformed projects.
     
                                                                       
    ------------------------------------------------------------------------
    Building Destruction 172140405-0613
    ------------------------------------------------------------------------
     
    [resources:resources]
    [debug] execute contextualize
    Using 'UTF-8' encoding to copy filtered resources.
    Copying 1 resource to .
     
    [compiler:compile]
    Changes detected - recompiling the module!
    Compiling 1 source file to C:\Users\Nikolai\Documents\NetBeansProjects\Destruction\target\classes
     
    [resources:testResources]
    [debug] execute contextualize
    Using 'UTF-8' encoding to copy filtered resources.
    skip non existing resourceDirectory C:\Users\Nikolai\Documents\NetBeansProjects\Destruction\src\test\resources
     
    [compiler:testCompile]
    Nothing to compile - all classes are up to date
     
    [surefire:test]
    Surefire report directory: C:\Users\Nikolai\Documents\NetBeansProjects\Destruction\target\surefire-reports
     
    -------------------------------------------------------
    T E S T S
    -------------------------------------------------------
    Running mc.euro.destruction.AppTest
    Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 sec
     
    Results :
     
    Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
     
     
    [jar:jar]
    Building jar: C:\Users\Nikolai\Documents\NetBeansProjects\Destruction\target\Destruction172140405-0613.jar
     
    [install:install]
    Installing C:\Users\Nikolai\Documents\NetBeansProjects\Destruction\target\Destruction172140405-0613.jar to C:\Users\Nikolai\.m2\repository\mc\euro\Destruction\172140405-0613\Destruction-172140405-0613.jar
    Installing C:\Users\Nikolai\Documents\NetBeansProjects\Destruction\pom.xml to C:\Users\Nikolai\.m2\repository\mc\euro\Destruction\172140405-0613\Destruction-172140405-0613.pom
    ------------------------------------------------------------------------
    BUILD SUCCESS
    ------------------------------------------------------------------------
    Total time: 1.765s
    Finished at: Sat Apr 05 06:13:04 CDT 2014
    Final Memory: 11M/489M
    ------------------------------------------------------------------------
    


    I'll convert back to a Maven project for Demolition and post the results.

    epicfacecreeper Hopefully this is the problem. What would be the XML option to change this ?
    HTML:
    <scope>provided</scope>
     
  6. Offline

    epicfacecreeper

  7. Offline

    Europia79

    This is the build error in the IDE.
    Netbeans Maven build errors (open)

    Code:
    cd C:\Users\Nikolai\Documents\NetBeansProjects\Demolition; "JAVA_HOME=C:\\Program Files\\Java\\jdk1.7.0_17" C:\\Users\\Nikolai\\AppData\\Roaming\\NetBeans\\7.3\\maven\\bin\\mvn.bat clean install
    Scanning for projects...
     
    Some problems were encountered while building the effective model for mc.euro:demolition:jar:172140405-2244
    'version' contains an expression but should be a constant. @ mc.euro:demolition:172${maven.build.timestamp}, C:\Users\Nikolai\Documents\NetBeansProjects\Demolition\pom.xml, line 7, column 12
    The expression ${artifactId} is deprecated. Please use ${project.artifactId} instead.
    The expression ${version} is deprecated. Please use ${project.version} instead.
     
    It is highly recommended to fix these problems because they threaten the stability of your build.
     
    For this reason, future Maven versions might no longer support building such malformed projects.
     
                                                                           
    ------------------------------------------------------------------------
    Building Demolition 172140405-2244
    ------------------------------------------------------------------------
    Downloading: http://server.battleplugins.com/maven/repository/org/bukkit/bukkit/1.7.2-R0.3-SNAPSHOT/maven-metadata.xml
    Downloading: http://maven.sk89q.com/repo/org/bukkit/bukkit/1.7.2-R0.3-SNAPSHOT/maven-metadata.xml
    Downloading: http://repo.md-5.net/content/repositories/snapshots/org/bukkit/bukkit/1.7.2-R0.3-SNAPSHOT/maven-metadata.xml
    Downloading: http://repo.bukkit.org/content/groups/public/org/bukkit/bukkit/1.7.2-R0.3-SNAPSHOT/maven-metadata.xml
           
           
    Downloaded: http://repo.bukkit.org/content/groups/public/org/bukkit/bukkit/1.7.2-R0.3-SNAPSHOT/maven-metadata.xml (1004 B at 2.5 KB/sec)
    Downloading: http://nexus.theyeticave.net/content/repositories/pub_releases/org/bukkit/bukkit/1.7.2-R0.3-SNAPSHOT/maven-metadata.xml
    Downloading: http://repo.kitteh.org/content/repositories/public/org/bukkit/bukkit/1.7.2-R0.3-SNAPSHOT/maven-metadata.xml
           
           
           
           
    Could not transfer metadata org.bukkit:bukkit:1.7.2-R0.3-SNAPSHOT/maven-metadata.xml from/to battleplugins-repo (http://server.battleplugins.com/maven/repository/): Failed to transfer file: http://server.battleplugins.com/maven/repository/org/bukkit/bukkit/1.7.2-R0.3-SNAPSHOT/maven-metadata.xml. Return code is: 500 , ReasonPhrase:Internal Server Error.
    Downloading: http://server.battleplugins.com/maven/repository/com/sk89q/worldguard/5.8.1-SNAPSHOT/maven-metadata.xml
    Downloading: http://repo.bukkit.org/content/groups/public/com/sk89q/worldguard/5.8.1-SNAPSHOT/maven-metadata.xml
    Downloading: http://repo.md-5.net/content/repositories/snapshots/com/sk89q/worldguard/5.8.1-SNAPSHOT/maven-metadata.xml
    Downloading: http://maven.sk89q.com/repo/com/sk89q/worldguard/5.8.1-SNAPSHOT/maven-metadata.xml
           
    Downloading: http://nexus.theyeticave.net/content/repositories/pub_releases/com/sk89q/worldguard/5.8.1-SNAPSHOT/maven-metadata.xml
           
    Downloading: http://repo.kitteh.org/content/repositories/public/com/sk89q/worldguard/5.8.1-SNAPSHOT/maven-metadata.xml
           
           
           
           
    Downloaded: http://maven.sk89q.com/repo/com/sk89q/worldguard/5.8.1-SNAPSHOT/maven-metadata.xml (310 B at 0.7 KB/sec)
    Could not transfer metadata com.sk89q:worldguard:5.8.1-SNAPSHOT/maven-metadata.xml from/to battleplugins-repo (http://server.battleplugins.com/maven/repository/): Failed to transfer file: http://server.battleplugins.com/maven/repository/com/sk89q/worldguard/5.8.1-SNAPSHOT/maven-metadata.xml. Return code is: 500 , ReasonPhrase:Internal Server Error.
    Failure to transfer com.sk89q:worldguard:5.8.1-SNAPSHOT/maven-metadata.xml from http://server.battleplugins.com/maven/repository/ was cached in the local repository, resolution will not be reattempted until the update interval of battleplugins-repo has elapsed or updates are forced. Original error: Could not transfer metadata com.sk89q:worldguard:5.8.1-SNAPSHOT/maven-metadata.xml from/to battleplugins-repo (http://server.battleplugins.com/maven/repository/): Failed to transfer file: http://server.battleplugins.com/maven/repository/com/sk89q/worldguard/5.8.1-SNAPSHOT/maven-metadata.xml. Return code is: 500 , ReasonPhrase:Internal Server Error.
    Downloading: http://repo.bukkit.org/content/groups/public/org/bukkit/bukkit/1.6.2-R0.1-SNAPSHOT/maven-metadata.xml
    Downloading: http://server.battleplugins.com/maven/repository/org/bukkit/bukkit/1.6.2-R0.1-SNAPSHOT/maven-metadata.xml
    Downloading: http://maven.sk89q.com/repo/org/bukkit/bukkit/1.6.2-R0.1-SNAPSHOT/maven-metadata.xml
    Downloading: http://repo.md-5.net/content/repositories/snapshots/org/bukkit/bukkit/1.6.2-R0.1-SNAPSHOT/maven-metadata.xml
           
    Downloading: http://nexus.theyeticave.net/content/repositories/pub_releases/org/bukkit/bukkit/1.6.2-R0.1-SNAPSHOT/maven-metadata.xml
         
    Downloaded: http://repo.bukkit.org/content/groups/public/org/bukkit/bukkit/1.6.2-R0.1-SNAPSHOT/maven-metadata.xml (2 KB at 8.5 KB/sec)
    Downloading: http://repo.kitteh.org/content/repositories/public/org/bukkit/bukkit/1.6.2-R0.1-SNAPSHOT/maven-metadata.xml
         
    Downloading: http://files.zachsthings.com/repo/org/bukkit/bukkit/1.6.2-R0.1-SNAPSHOT/maven-metadata.xml
         
         
         
         
    Could not transfer metadata org.bukkit:bukkit:1.6.2-R0.1-SNAPSHOT/maven-metadata.xml from/to battleplugins-repo (http://server.battleplugins.com/maven/repository/): Failed to transfer file: http://server.battleplugins.com/maven/repository/org/bukkit/bukkit/1.6.2-R0.1-SNAPSHOT/maven-metadata.xml. Return code is: 500 , ReasonPhrase:Internal Server Error.
     
    [clean:clean]
     
    [resources:resources]
    [debug] execute contextualize
    Using 'UTF-8' encoding to copy filtered resources.
    Copying 0 resource to .
     
    [compiler:compile]
    Compiling 18 source files to C:\Users\Nikolai\Documents\NetBeansProjects\Demolition\target\classes
    -------------------------------------------------------------
    COMPILATION ERROR :
    -------------------------------------------------------------
    mc/euro/demolition/util/PlantTimer.java:[166,53] error: cannot find symbol
    mc/euro/demolition/util/PlantTimer.java:[179,29] error: no suitable method found for damage(double)
    mc/euro/demolition/BombArenaListener.java:[96,60] error: cannot find symbol
    mc/euro/demolition/BombArenaListener.java:[100,77] error: cannot find symbol
    mc/euro/demolition/BombArenaListener.java:[194,28] error: cannot find symbol
    mc/euro/demolition/BombArenaListener.java:[197,86] error: cannot find symbol
    mc/euro/demolition/BombArenaListener.java:[267,52] error: cannot find symbol
    mc/euro/demolition/BombArenaListener.java:[324,82] error: cannot find symbol
    mc/euro/demolition/BombArenaListener.java:[385,46] error: cannot find symbol
    mc/euro/demolition/BombArenaListener.java:[402,53] error: cannot find symbol
    mc/euro/demolition/BombArenaListener.java:[457,82] error: cannot find symbol
    mc/euro/demolition/objects/Bomb.java:[31,37] error: cannot find symbol
    mc/euro/demolition/objects/Bomb.java:[38,37] error: cannot find symbol
    13 errors
    -------------------------------------------------------------
    ------------------------------------------------------------------------
    BUILD FAILURE
    ------------------------------------------------------------------------
    Total time: 3.584s
    Finished at: Sat Apr 05 22:44:36 CDT 2014
    Final Memory: 14M/489M
    ------------------------------------------------------------------------
    Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project demolition: Compilation failure: Compilation failure:
    \Users\Nikolai\Documents\NetBeansProjects\Demolition\src\mc\euro\demolition\util\PlantTimer.java:[166,53] error: cannot find symbol
    \Users\Nikolai\Documents\NetBeansProjects\Demolition\src\mc\euro\demolition\util\PlantTimer.java:[179,29] error: no suitable method found for damage(double)
    \Users\Nikolai\Documents\NetBeansProjects\Demolition\src\mc\euro\demolition\BombArenaListener.java:[96,60] error: cannot find symbol
    \Users\Nikolai\Documents\NetBeansProjects\Demolition\src\mc\euro\demolition\BombArenaListener.java:[100,77] error: cannot find symbol
    \Users\Nikolai\Documents\NetBeansProjects\Demolition\src\mc\euro\demolition\BombArenaListener.java:[194,28] error: cannot find symbol
    \Users\Nikolai\Documents\NetBeansProjects\Demolition\src\mc\euro\demolition\BombArenaListener.java:[197,86] error: cannot find symbol
    \Users\Nikolai\Documents\NetBeansProjects\Demolition\src\mc\euro\demolition\BombArenaListener.java:[267,52] error: cannot find symbol
    \Users\Nikolai\Documents\NetBeansProjects\Demolition\src\mc\euro\demolition\BombArenaListener.java:[324,82] error: cannot find symbol
    \Users\Nikolai\Documents\NetBeansProjects\Demolition\src\mc\euro\demolition\BombArenaListener.java:[385,46] error: cannot find symbol
    \Users\Nikolai\Documents\NetBeansProjects\Demolition\src\mc\euro\demolition\BombArenaListener.java:[402,53] error: cannot find symbol
    \Users\Nikolai\Documents\NetBeansProjects\Demolition\src\mc\euro\demolition\BombArenaListener.java:[457,82] error: cannot find symbol
    \Users\Nikolai\Documents\NetBeansProjects\Demolition\src\mc\euro\demolition\objects\Bomb.java:[31,37] error: cannot find symbol
    \Users\Nikolai\Documents\NetBeansProjects\Demolition\src\mc\euro\demolition\objects\Bomb.java:[38,37] error: cannot find symbol
    -> [Help 1]
     
    To see the full stack trace of the errors, re-run Maven with the -e switch.
    Re-run Maven using the -X switch to enable full debug logging.
     
    For more information about the errors and possible solutions, please read the following articles:
    [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
    


    this is the build from the command prompt:
    mvn install (open)

    C:\Users\Nikolai\Documents\NetBeansProjects\Demolition>mvn install
    [INFO] Scanning for projects...
    [WARNING]
    [WARNING] Some problems were encountered while building the effective model for
    mc.euro:demolition:jar:172140405-2247
    [WARNING] 'version' contains an expression but should be a constant. @ mc.euro:d
    emolition:172${maven.build.timestamp}, C:\Users\Nikolai\Documents\NetBeansProjec
    ts\Demolition\pom.xml, line 7, column 12
    [WARNING] The expression ${artifactId} is deprecated. Please use ${project.artif
    actId} instead.
    [WARNING] The expression ${version} is deprecated. Please use ${project.version}
    instead.
    [WARNING]
    [WARNING] It is highly recommended to fix these problems because they threaten t
    he stability of your build.
    [WARNING]
    [WARNING] For this reason, future Maven versions might no longer support buildin
    g such malformed projects.
    [WARNING]
    [INFO]
    [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethrea
    ded.SingleThreadedBuilder with a thread count of 1
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Building Demolition 172140405-2247
    [INFO] ------------------------------------------------------------------------
    Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
    resources-plugin/2.6/maven-resources-plugin-2.6.pom
    Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-r
    esources-plugin/2.6/maven-resources-plugin-2.6.pom (8 KB at 11.4 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
    compiler-plugin/2.5.1/maven-compiler-plugin-2.5.1.pom
    Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-c
    ompiler-plugin/2.5.1/maven-compiler-plugin-2.5.1.pom (8 KB at 148.9 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
    compiler-plugin/2.5.1/maven-compiler-plugin-2.5.1.jar
    Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-c
    ompiler-plugin/2.5.1/maven-compiler-plugin-2.5.1.jar (32 KB at 387.1 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
    surefire-plugin/2.12.4/maven-surefire-plugin-2.12.4.pom
    Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-s
    urefire-plugin/2.12.4/maven-surefire-plugin-2.12.4.pom (11 KB at 17.4 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/suref
    ire/2.12.4/surefire-2.12.4.pom
    Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefi
    re/2.12.4/surefire-2.12.4.pom (14 KB at 244.9 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
    surefire-plugin/2.12.4/maven-surefire-plugin-2.12.4.jar
    Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-s
    urefire-plugin/2.12.4/maven-surefire-plugin-2.12.4.jar (30 KB at 52.4 KB/sec)
    Downloading: http://server.battleplugins.com/maven/repository/org/bukkit/bukkit/
    1.7.2-R0.3-SNAPSHOT/maven-metadata.xml
    [WARNING] Could not transfer metadata org.bukkit:bukkit:1.7.2-R0.3-SNAPSHOT/mave
    n-metadata.xml from/to battleplugins-repo (http://server.battleplugins.com/maven
    /repository/): Failed to transfer file: http://server.battleplugins.com/maven/re
    pository/org/bukkit/bukkit/1.7.2-R0.3-SNAPSHOT/maven-metadata.xml. Return code i
    s: 500 , ReasonPhrase:Internal Server Error.
    [WARNING] Failure to transfer org.bukkit:bukkit:1.7.2-R0.3-SNAPSHOT/maven-metada
    ta.xml from http://server.battleplugins.com/maven/repository/ was cached in the
    local repository, resolution will not be reattempted until the update interval o
    f battleplugins-repo has elapsed or updates are forced. Original error: Could no
    t transfer metadata org.bukkit:bukkit:1.7.2-R0.3-SNAPSHOT/maven-metadata.xml fro
    m/to battleplugins-repo (http://server.battleplugins.com/maven/repository/): Fai
    led to transfer file: http://server.battleplugins.com/maven/repository/org/bukki
    t/bukkit/1.7.2-R0.3-SNAPSHOT/maven-metadata.xml. Return code is: 500 , ReasonPhr
    ase:Internal Server Error.
    Downloading: http://server.battleplugins.com/maven/repository/com/sk89q/worldgua
    rd/5.8.1-SNAPSHOT/maven-metadata.xml
    [WARNING] Could not transfer metadata com.sk89q:worldguard:5.8.1-SNAPSHOT/maven-
    metadata.xml from/to battleplugins-repo (http://server.battleplugins.com/maven/r
    epository/): Failed to transfer file: http://server.battleplugins.com/maven/repo
    sitory/com/sk89q/worldguard/5.8.1-SNAPSHOT/maven-metadata.xml. Return code is: 5
    00 , ReasonPhrase:Internal Server Error.
    [WARNING] Failure to transfer com.sk89q:worldguard:5.8.1-SNAPSHOT/maven-metadata
    .xml from http://server.battleplugins.com/maven/repository/ was cached in the lo
    cal repository, resolution will not be reattempted until the update interval of
    battleplugins-repo has elapsed or updates are forced. Original error: Could not
    transfer metadata com.sk89q:worldguard:5.8.1-SNAPSHOT/maven-metadata.xml from/to
    battleplugins-repo (http://server.battleplugins.com/maven/repository/): Failed
    to transfer file: http://server.battleplugins.com/maven/repository/com/sk89q/wor
    ldguard/5.8.1-SNAPSHOT/maven-metadata.xml. Return code is: 500 , ReasonPhrase:In
    ternal Server Error.
    Downloading: http://server.battleplugins.com/maven/repository/org/bukkit/bukkit/
    1.6.2-R0.1-SNAPSHOT/maven-metadata.xml
    [WARNING] Could not transfer metadata org.bukkit:bukkit:1.6.2-R0.1-SNAPSHOT/mave
    n-metadata.xml from/to battleplugins-repo (http://server.battleplugins.com/maven
    /repository/): Failed to transfer file: http://server.battleplugins.com/maven/re
    pository/org/bukkit/bukkit/1.6.2-R0.1-SNAPSHOT/maven-metadata.xml. Return code i
    s: 500 , ReasonPhrase:Internal Server Error.
    [WARNING] Failure to transfer org.bukkit:bukkit:1.6.2-R0.1-SNAPSHOT/maven-metada
    ta.xml from http://server.battleplugins.com/maven/repository/ was cached in the
    local repository, resolution will not be reattempted until the update interval o
    f battleplugins-repo has elapsed or updates are forced. Original error: Could no
    t transfer metadata org.bukkit:bukkit:1.6.2-R0.1-SNAPSHOT/maven-metadata.xml fro
    m/to battleplugins-repo (http://server.battleplugins.com/maven/repository/): Fai
    led to transfer file: http://server.battleplugins.com/maven/repository/org/bukki
    t/bukkit/1.6.2-R0.1-SNAPSHOT/maven-metadata.xml. Return code is: 500 , ReasonPhr
    ase:Internal Server Error.
    [INFO]
    [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ demolition
    ---
    Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-f
    iltering/1.1/maven-filtering-1.1.pom
    Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-fi
    ltering/1.1/maven-filtering-1.1.pom (6 KB at 104.7 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-f
    iltering/1.1/maven-filtering-1.1.jar
    Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-fi
    ltering/1.1/maven-filtering-1.1.jar (43 KB at 568.9 KB/sec)
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] Copying 0 resource to .
    [INFO]
    [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ demolition --
    -
    Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-comp
    iler-api/1.9.1/plexus-compiler-api-1.9.1.pom
    Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compi
    ler-api/1.9.1/plexus-compiler-api-1.9.1.pom (867 B at 16.9 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-comp
    iler/1.9.1/plexus-compiler-1.9.1.pom
    Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compi
    ler/1.9.1/plexus-compiler-1.9.1.pom (4 KB at 6.7 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-comp
    iler-manager/1.9.1/plexus-compiler-manager-1.9.1.pom
    Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compi
    ler-manager/1.9.1/plexus-compiler-manager-1.9.1.pom (692 B at 12.5 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-comp
    iler-javac/1.9.1/plexus-compiler-javac-1.9.1.pom
    Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compi
    ler-javac/1.9.1/plexus-compiler-javac-1.9.1.pom (688 B at 12.9 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-comp
    ilers/1.9.1/plexus-compilers-1.9.1.pom
    Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compi
    lers/1.9.1/plexus-compilers-1.9.1.pom (2 KB at 2.2 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-comp
    iler-api/1.9.1/plexus-compiler-api-1.9.1.jar
    Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-comp
    iler-javac/1.9.1/plexus-compiler-javac-1.9.1.jar
    Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-comp
    iler-manager/1.9.1/plexus-compiler-manager-1.9.1.jar
    Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compi
    ler-api/1.9.1/plexus-compiler-api-1.9.1.jar (21 KB at 257.9 KB/sec)
    Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compi
    ler-manager/1.9.1/plexus-compiler-manager-1.9.1.jar (5 KB at 43.2 KB/sec)
    Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-compi
    ler-javac/1.9.1/plexus-compiler-javac-1.9.1.jar (14 KB at 116.5 KB/sec)
    [INFO] Compiling 18 source files to C:\Users\Nikolai\Documents\NetBeansProjects\
    Demolition\target\classes
    [INFO]
    [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ de
    molition ---
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] skip non existing resourceDirectory C:\Users\Nikolai\Documents\NetBeansPr
    ojects\Demolition\src\test\resources
    [INFO]
    [INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ demol
    ition ---
    [INFO] No sources to compile
    [INFO]
    [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ demolition ---
    Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/suref
    ire-booter/2.12.4/surefire-booter-2.12.4.pom
    Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefi
    re-booter/2.12.4/surefire-booter-2.12.4.pom (3 KB at 5.3 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/suref
    ire-api/2.12.4/surefire-api-2.12.4.pom
    Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefi
    re-api/2.12.4/surefire-api-2.12.4.pom (3 KB at 46.8 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/maven
    -surefire-common/2.12.4/maven-surefire-common-2.12.4.pom
    Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/maven-
    surefire-common/2.12.4/maven-surefire-common-2.12.4.pom (6 KB at 9.8 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugin-tools/m
    aven-plugin-annotations/3.1/maven-plugin-annotations-3.1.pom
    Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugin-tools/ma
    ven-plugin-annotations/3.1/maven-plugin-annotations-3.1.pom (2 KB at 2.9 KB/sec)

    Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugin-tools/m
    aven-plugin-tools/3.1/maven-plugin-tools-3.1.pom
    Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugin-tools/ma
    ven-plugin-tools/3.1/maven-plugin-tools-3.1.pom (16 KB at 292.7 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/apache/commons/commons-lang
    3/3.1/commons-lang3-3.1.pom
    Downloaded: http://repo.maven.apache.org/maven2/org/apache/commons/commons-lang3
    /3.1/commons-lang3-3.1.pom (17 KB at 302.2 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/suref
    ire-booter/2.12.4/surefire-booter-2.12.4.jar
    Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/maven
    -surefire-common/2.12.4/maven-surefire-common-2.12.4.jar
    Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/suref
    ire-api/2.12.4/surefire-api-2.12.4.jar
    Downloading: http://repo.maven.apache.org/maven2/org/apache/commons/commons-lang
    3/3.1/commons-lang3-3.1.jar
    Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugin-tools/m
    aven-plugin-annotations/3.1/maven-plugin-annotations-3.1.jar
    Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefi
    re-booter/2.12.4/surefire-booter-2.12.4.jar (34 KB at 428.7 KB/sec)
    Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugin-tools/ma
    ven-plugin-annotations/3.1/maven-plugin-annotations-3.1.jar (14 KB at 97.8 KB/se
    c)
    Downloaded: http://repo.maven.apache.org/maven2/org/apache/commons/commons-lang3
    /3.1/commons-lang3-3.1.jar (309 KB at 1007.9 KB/sec)
    Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefi
    re-api/2.12.4/surefire-api-2.12.4.jar (115 KB at 185.5 KB/sec)
    Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/maven-
    surefire-common/2.12.4/maven-surefire-common-2.12.4.jar (257 KB at 355.2 KB/sec)

    [INFO] No tests to run.
    [INFO]
    [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ demolition ---
    [INFO] Building jar: C:\Users\Nikolai\Documents\NetBeansProjects\Demolition\targ
    et\demolition172140405-2247.jar
    [INFO]
    [INFO] --- maven-install-plugin:2.4:install (default-install) @ demolition ---
    Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-util
    s/3.0.5/plexus-utils-3.0.5.pom
    Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils
    /3.0.5/plexus-utils-3.0.5.pom (3 KB at 4.5 KB/sec)
    Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-util
    s/3.0.5/plexus-utils-3.0.5.jar
    Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils
    /3.0.5/plexus-utils-3.0.5.jar (226 KB at 1758.2 KB/sec)
    [INFO] Installing C:\Users\Nikolai\Documents\NetBeansProjects\Demolition\target\
    demolition172140405-2247.jar to C:\Users\Nikolai\.m2\repository\mc\euro\demoliti
    on\172140405-2247\demolition-172140405-2247.jar
    [INFO] Installing C:\Users\Nikolai\Documents\NetBeansProjects\Demolition\pom.xml
    to C:\Users\Nikolai\.m2\repository\mc\euro\demolition\172140405-2247\demolition
    -172140405-2247.pom
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 9.231 s
    [INFO] Finished at: 2014-04-05T22:47:29-06:00
    [INFO] Final Memory: 12M/489M
    [INFO] ------------------------------------------------------------------------
    C:\Users\Nikolai\Documents\NetBeansProjects\Demolition>
     
  8. Offline

    epicfacecreeper

    In the IDE version, you are using the wrong bukkit version. Change the <version> tag in the bukkit dependency.
     
  9. Offline

    Europia79

    epicfacecreeper
    http://dl.bukkit.org/downloads/bukkit/get/02534_1.7.2-R0.3/bukkit-beta.jar
    I used Bukkit.jar #1903 when I started:
    HTML:
    <version>1.7.2-R0.3</version>
    https://forums.bukkit.org/threads/nullpointer-exception.252509/#post-2383056
    I was helping out the above person and started a Maven project to test it when he said "it didn't work."
    So actually, just now, I got the idea to see if Material.HARD_CLAY works in that project... And it does work.
    I was about to post the POM.xml so that we could check out the differences: But I took a quick look, and it had the "maven-compiler-plugin"
    So I inserted this into my Demolition project's pom.xml and the project now builds in the IDE:
    HTML:
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <version>3.1</version>
      <configuration>
          <source>1.6</source>
          <target>1.6</target>
      </configuration>
    </plugin>
    Thanks for helping everyone! Hopefully this will help other Netbeans users... And users new to Maven.
     
Thread Status:
Not open for further replies.

Share This Page