Solved Maven unable to compile plugin, Malformed POM?

Discussion in 'Plugin Development' started by pyropyro78, Apr 7, 2020.

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

    pyropyro78

    I cannot seem to build due to this error. Anyone have any ideas?

    (I am new to Maven but want to ultimately link this to Jenkins which I have working)

    System: PineA64+
    OS: DietPi (Debian Stretch minimalist)
    Maven: 3.6.3

    Full project source GitHub:
    https://github.com/pyropyro78/AdminDrop

    Error:
    [ERROR] Malformed POM /var/lib/jenkins/workspace/AdminDrop/pom.xml: Unrecognised tag: 'repositories' (position: START_TAG seen ...</resources>\n \n <repositories>... @29:19) @ /var/lib/jenkins/workspace/AdminDrop/pom.xml, line 29, column 19 @

    pom:
    <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>AdminDrop</groupId>
    <artifactId>AdminDrop</artifactId>
    <version>4.0.0.0r1-SNAPSHOT</version>
    <build>
    <sourceDirectory>src</sourceDirectory>
    <plugins>
    <plugin>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.8.0</version>
    <configuration>
    <source>1.8</source>
    <target>1.8</target>
    </configuration>
    </plugin>
    </plugins>

    <resources>
    <resource>
    <filtering>true</filtering>
    <directory>${basedir}</directory>
    <includes>
    <include>*.yml</include>
    </includes>
    </resource>
    </resources>

    <repositories>
    <repository>
    <id>spigot-repo</id>
    <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
    </repository>
    </repositories>

    <dependencies>
    <dependency>
    <groupId>org.spigotmc</groupId>
    <artifactId>spigot-api</artifactId>
    <version>spigot-1.15.2</version>
    <scope>provided</scope>
    </dependency>

    <dependency>
    <groupId>org.bukkit</groupId>
    <artifactId>bukkit</artifactId>
    <version>craftbukkit-1.15.2</version>
    <scope>provided</scope>
    </dependency>
    </dependencies>

    </build>
    </project>

    Update: When I remove Repository section it then gives that same issue but for dependencies

    Solved with post: Maven unable to compile plugin, Malformed POM? (Link leads to spigotmc.org as a heads up)

    for reference if anyone else stumbles upon this with a similar issue.

    The post that solved the issue from user Noxyro
    Solution was that the resources was to be in the build tag but everything below that was not.

    Additionally for the archive, I messed up the version name. should have been 1.15.2-R0.1-SNAPSHOT for spigot and bukkit version tags.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited: Apr 8, 2020
Thread Status:
Not open for further replies.

Share This Page