okleine / nCoAP

Java implementation of the CoAP protocol using netty
BSD 3-Clause "New" or "Revised" License
179 stars 57 forks source link

Dependency - onejar-maven-plugin #33

Closed rohling closed 7 years ago

rohling commented 7 years ago

Fail during the maven build :

Plugin org.dstovall:onejar-maven-plugin:1.4.4 or one of its dependencies could not be resolved: Failure to find org.dstovall:onejar-maven-plugin:jar:1.4.4 in https://repo.maven.apache.org/maven2 was cached ...

Dependency nCoAP-master:

onejar-maven-plugin.googlecode.com
        <url>http://onejar-maven-plugin.googlecode.com/svn/mavenrepo</url>

thanks,

okleine commented 7 years ago

It seems that the Googlecode-Repository is no longer online. Try to replace

<groupId>org.dstovall</groupId>

with

<groupId>com.jolira</groupId>. Please let me know if that worked for you.

(see https://github.com/jolira/onejar-maven-plugin)

rohling commented 7 years ago

Thank for immediate return....

 But not ok...now:

[ERROR] Failed to execute goal com.jolira:onejar-maven-plugin:1.4.4:one-jar (default) on project ncoap-simple-client: Execution default of goal com.jolira:onejar-maven-plugin:1.4.4:one-jar failed: Unable to load the mojo 'one-jar' in the plugin 'com.jolira:onejar-maven-plugin:1.4.4'. A required class is missing: org.dstovall.OneJarMojo

thanks,

okleine commented 7 years ago

I just tried to reproduce your issue but I couldn't. When I change the group ID to com.jolira as I wrote above, the appropriate JAR is succesfully loaded into my local Maven repository at

.m2/com/jolira/onejar-maven-plugin/1.4.4/onejar-maven-plugin-1.4.4.jar

and this JAR file contains a class file org.dstovall.OneJarMojo.class. Furthermore, the Maven package-goal runs successfully...

As an alternative, you could remove the plugin from the respective pom.xml files and use the Maven Assembly Plugin instead (see here). Maybe you don't even need any of this if you don't want to create a JAR that includes all dependencies...

martinmine commented 7 years ago

I was able to succesfully build the project by applying the changes proposed by @okleine and also remove from ./pom.xml:

    <pluginRepositories>
        <pluginRepository>
            <id>onejar-maven-plugin.googlecode.com</id>
            <url>http://onejar-maven-plugin.googlecode.com/svn/mavenrepo</url>
        </pluginRepository>
    </pluginRepositories>

Since the new plugin is in the official Maven repo and Google Code is no more. I'll submit a PR for this with my changes.

jamesgarriss commented 7 years ago

This issue still isn't fixed. The POM has to be edited/corrected.

martinmine commented 7 years ago

@jamesgarriss then maybe submit that under a different pull request with your proposed changes? :)

ghost commented 6 years ago

@jamesgarriss Is this issue fixed?