CloudburstMC / nukkit-archetype

Maven Archetype for creating Nukkit plugins
1 stars 0 forks source link

Desired archetype does not exist (com.nukkitx:plugin-archetype:1.0) #1

Open Aericio opened 4 years ago

Aericio commented 4 years ago

Hello! I just tried to use nukkit-archetype and ran into an issue (following the steps in the "Creating new Plugin from IntelliJ" section):

[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] 
[INFO] >>> maven-archetype-plugin:3.1.2:generate (default-cli) > generate-sources @ standalone-pom >>>
[INFO] 
[INFO] <<< maven-archetype-plugin:3.1.2:generate (default-cli) < generate-sources @ standalone-pom <<<
[INFO] 
[INFO] 
[INFO] --- maven-archetype-plugin:3.1.2:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Batch mode
[WARNING] Archetype not found in any catalog. Falling back to central repository.
[WARNING] Add a repository with id 'archetype' in your settings.xml if archetype's repository is elsewhere.
[WARNING] The POM for com.nukkitx:plugin-archetype:jar:1.0 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.925 s
[INFO] Finished at: 2020-04-16T23:46:05-10:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.1.2:generate (default-cli) on project standalone-pom: The desired archetype does not exist (com.nukkitx:plugin-archetype:1.0) -> [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
[INFO] 
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] 
[INFO] >>> maven-archetype-plugin:3.1.2:generate (default-cli) > generate-sources @ standalone-pom >>>
[INFO] 
[INFO] <<< maven-archetype-plugin:3.1.2:generate (default-cli) < generate-sources @ standalone-pom <<<
[INFO] 
[INFO] 
[INFO] --- maven-archetype-plugin:3.1.2:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Batch mode
[WARNING] Archetype not found in any catalog. Falling back to central repository.
[WARNING] The POM for com.nukkitx:plugin-archetype:jar:1.0 is missing, no dependency information available

Tried to re-do from start on new project, same thing. image image

Sleepybear commented 4 years ago

The archetype has not been deployed to the main repo yet, I will work with Supreme to have that done today.

Sleepybear commented 4 years ago

It appears that we cannot use IntelliJ build in archtype for custom archetypes unless they are in the maven central repo. I'll update the README.md momentarily with how to set it up using command line (due to newest version of archetype plugin not allowing to specify repo on command line, it will take some extra steps to get setup first time)

Sleepybear commented 4 years ago

Upvote this on the IntelliJ issue tracker: https://youtrack.jetbrains.com/issue/IDEA-223617

Aericio commented 4 years ago

Will do.

Aericio commented 4 years ago

Just built a maven project via command line. Is this intended behavior? pom.xml:

    <dependencies>
        <dependency>
            <groupId>cn.nukkit</groupId>
            <artifactId>nukkit</artifactId>
            <version>${nukkit.version}</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

plugin.yml:

name: ${project.name}
main: net.paroxity.TestProject
version: ${project.version}
api-version: ["1.0.9"]

image

Sleepybear commented 4 years ago

Looks right. The ${} variables will fill in on compile.

Aericio commented 4 years ago

Ah, alright 👍