Closed htj closed 8 years ago
Have you done a 'mvn clean install' on the parent module (one directory higher) first, before running 'mvn jetty:run' on the war module? Because you need that in order to have those (snapshot) dependencies in your local repo.
On 10 November 2015 at 10:57, Henrik Thostrup Jensen < notifications@github.com> wrote:
htj@pyrite:~/src/apis/apis-authorization-server-war$ mvn jetty:run [snip]
[INFO]
[ERROR] BUILD ERROR
[INFO]
[INFO] Failed to resolve artifact. Missing:
1) nl.surfnet.apis:apis-authorization-server:jar:1.3.6-SNAPSHOT
Try downloading the file manually from the project website.
Then, install it using the command: mvn install:install-file -DgroupId=nl.surfnet.apis -DartifactId=apis-authorization-server -Dversion=1.3.6-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=nl.surfnet.apis -DartifactId=apis-authorization-server -Dversion=1.3.6-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency: 1) nl.surfnet.apis:apis-authorization-server-war:war:1.3.6-SNAPSHOT 2) nl.surfnet.apis:apis-authorization-server:jar:1.3.6-SNAPSHOT
2) nl.surfnet.apis:apis-surfconext-authn:jar:1.3.6-SNAPSHOT
Try downloading the file manually from the project website.
Then, install it using the command: mvn install:install-file -DgroupId=nl.surfnet.apis -DartifactId=apis-surfconext-authn -Dversion=1.3.6-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=nl.surfnet.apis -DartifactId=apis-surfconext-authn -Dversion=1.3.6-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency: 1) nl.surfnet.apis:apis-authorization-server-war:war:1.3.6-SNAPSHOT
2) nl.surfnet.apis:apis-surfconext-authn:jar:1.3.6-SNAPSHOT
2 required artifacts are missing.
for artifact: nl.surfnet.apis:apis-authorization-server-war:war:1.3.6-SNAPSHOT
from the specified remote repositories: openconext-snapshots ( https://build.surfconext.nl/repository/public/snapshots), central (https://repo1.maven.org/maven2), openconext-releases ( https://build.surfconext.nl/repository/public/releases)
[INFO]
[INFO] For more information, run Maven with the -e switch
[INFO]
[INFO] Total time: 41 seconds [INFO] Finished at: Tue Nov 10 10:53:29 CET 2015 [INFO] Final Memory: 22M/142M
[INFO]
This might be something that is super-simple to fix for people that actually know something about maven.
— Reply to this email directly or view it on GitHub https://github.com/OAuth-Apis/apis/issues/85.
I get a test error when doing that:
Running org.surfnet.oaaas.auth.AuthorizationServerFilterTest Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.061 sec <<< FAILURE! Running org.surfnet.oaaas.auth.principal.AuthenticatedPrincipalTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.159 sec Running org.surfnet.oaaas.auth.principal.BasicAuthCredentialsTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec Running org.surfnet.oaaas.model.TokenResponseCacheTest Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.537 sec
Results :
Tests in error: org.surfnet.oaaas.auth.AuthorizationServerFilterTest: org/eclipse/jetty/http/HttpBuffers org.surfnet.oaaas.auth.AuthorizationServerFilterTest: Could not initialize class nl.surfnet.coin.mock.AbstractMockHttpServerTest
Tests run: 7, Failures: 0, Errors: 2, Skipped: 0
[INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] There are test failures.
Please refer to /home/htj/src/apis/apis-resource-server-library/target/surefire-reports for the individual test results. [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3 seconds [INFO] Finished at: Tue Nov 10 14:18:04 CET 2015 [INFO] Final Memory: 36M/601M [INFO] ------------------------------------------------------------------------
test output
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.061 sec <<< FAILURE!
org.surfnet.oaaas.auth.AuthorizationServerFilterTest Time elapsed: 0 sec <<< ERROR!
java.lang.NoClassDefFoundError: org/eclipse/jetty/http/HttpBuffers
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at nl.surfnet.coin.mock.MockHtppServer.initServer(MockHtppServer.java:47)
at nl.surfnet.coin.mock.MockHtppServer.
Dependency error?
Yes, something like that. I'll investigate...
I do not see any obvious error... Can you provide some info about your environment? Do you have things in place like maven proxies, heavily modified settings.xml (for maven)? What Java version do you use? (I just did a complete clean clone / mvn clean install on both Java 7 and 8 with no errors)
Ubuntu 15.04 with OpenJDK8: htj@pyrite:~/src/apis$ java -version openjdk version "1.8.0_45-internal" OpenJDK Runtime Environment (build 1.8.0_45-internal-b14) OpenJDK 64-Bit Server VM (build 25.45-b02, mixed mode)
I deleted the .m2 and did a clean clone. New error, this one is understandable though:
[snip] Downloading: http://oss.sonatype.org/content/groups/jetty/org/eclipse/jetty/jetty-parent/19/jetty-parent-19.pom 178b downloaded (jetty-parent-19.pom) [WARNING] *\ CHECKSUM FAILED - Checksum failed on download: local = '81ffbd1712afe8cdf138b570c0fc9934742c33c1'; remote = '
are you still having this issue? Otherwise we can close it...
I couldn't resolve it. I gave up trying the software out though.
If I can't build, it probably cannot configure it either.
Too bad to hear this. I understood it was a general maven issue that you struggled with, not something Apis-specific, but I might be wrong.
On 2 December 2015 at 09:18, Henrik Thostrup Jensen < notifications@github.com> wrote:
I couldn't resolve it. I gave up trying the software out though.
If I can't build, it probably cannot configure it either.
— Reply to this email directly or view it on GitHub https://github.com/OAuth-Apis/apis/issues/85#issuecomment-161216199.
You can't just blame Maven. The build system is part of the software. Double so with everything Java.
htj@pyrite:~/src/apis/apis-authorization-server-war$ mvn jetty:run [snip] [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Failed to resolve artifact.
Missing:
1) nl.surfnet.apis:apis-authorization-server:jar:1.3.6-SNAPSHOT
Try downloading the file manually from the project website.
Then, install it using the command: mvn install:install-file -DgroupId=nl.surfnet.apis -DartifactId=apis-authorization-server -Dversion=1.3.6-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=nl.surfnet.apis -DartifactId=apis-authorization-server -Dversion=1.3.6-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency: 1) nl.surfnet.apis:apis-authorization-server-war:war:1.3.6-SNAPSHOT 2) nl.surfnet.apis:apis-authorization-server:jar:1.3.6-SNAPSHOT
2) nl.surfnet.apis:apis-surfconext-authn:jar:1.3.6-SNAPSHOT
Try downloading the file manually from the project website.
Then, install it using the command: mvn install:install-file -DgroupId=nl.surfnet.apis -DartifactId=apis-surfconext-authn -Dversion=1.3.6-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=nl.surfnet.apis -DartifactId=apis-surfconext-authn -Dversion=1.3.6-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency: 1) nl.surfnet.apis:apis-authorization-server-war:war:1.3.6-SNAPSHOT 2) nl.surfnet.apis:apis-surfconext-authn:jar:1.3.6-SNAPSHOT
2 required artifacts are missing.
for artifact: nl.surfnet.apis:apis-authorization-server-war:war:1.3.6-SNAPSHOT
from the specified remote repositories: openconext-snapshots (https://build.surfconext.nl/repository/public/snapshots), central (https://repo1.maven.org/maven2), openconext-releases (https://build.surfconext.nl/repository/public/releases)
[INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 41 seconds [INFO] Finished at: Tue Nov 10 10:53:29 CET 2015 [INFO] Final Memory: 22M/142M [INFO] ------------------------------------------------------------------------
This might be something that is super-simple to fix for people that actually know something about maven.