SilverThings / SilverWare-Demos

SilverWare Examples and Demonstrations
Apache License 2.0
15 stars 12 forks source link

Getting started #7

Open christianbauer opened 8 years ago

christianbauer commented 8 years ago

The version is 2.0-SNAPSHOT but no snapshot repo is configured:

SilverWare-Demos/quickstarts/camel-cdi-helloworld$ mvn clean package
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project io.silverware.demos.quickstarts:camel-cdi-helloworld:2.0-SNAPSHOT (/Users/cb/tmp/SilverWare-Demos/quickstarts/camel-cdi-helloworld/pom.xml) has 7 errors
[ERROR]     Non-resolvable import POM: Could not find artifact io.silverware:microservices-bom:pom:2.0-SNAPSHOT @ io.silverware.demos.quickstarts:quickstarts-parent:2.0-SNAPSHOT, /Users/cb/tmp/SilverWare-Demos/quickstarts/pom.xml, line 55, column 22 -> [Help 2]
[ERROR]     'dependencies.dependency.version' for io.silverware:microservices:jar is missing. @ io.silverware.demos.quickstarts:camel-cdi-helloworld:[unknown-version], /Users/cb/tmp/SilverWare-Demos/quickstarts/camel-cdi-helloworld/pom.xml, line 11, column 19
[ERROR]     'dependencies.dependency.version' for io.silverware:cdi-microservice-provider:jar is missing. @ io.silverware.demos.quickstarts:camel-cdi-helloworld:[unknown-version], /Users/cb/tmp/SilverWare-Demos/quickstarts/camel-cdi-helloworld/pom.xml, line 15, column 19
[ERROR]     'dependencies.dependency.version' for io.silverware:camel-microservice-provider:jar is missing. @ io.silverware.demos.quickstarts:camel-cdi-helloworld:[unknown-version], /Users/cb/tmp/SilverWare-Demos/quickstarts/camel-cdi-helloworld/pom.xml, line 19, column 19
[ERROR]     'dependencies.dependency.version' for io.silverware:camel-cdi-integration:jar is missing. @ io.silverware.demos.quickstarts:camel-cdi-helloworld:[unknown-version], /Users/cb/tmp/SilverWare-Demos/quickstarts/camel-cdi-helloworld/pom.xml, line 23, column 19
[ERROR]     'dependencies.dependency.version' for org.testng:testng:jar is missing. @ io.silverware.demos.quickstarts:camel-cdi-helloworld:[unknown-version], /Users/cb/tmp/SilverWare-Demos/quickstarts/camel-cdi-helloworld/pom.xml, line 31, column 19
[ERROR]     'dependencies.dependency.version' for org.apache.logging.log4j:log4j-jul:jar is missing. @ io.silverware.demos.quickstarts:quickstarts-parent:2.0-SNAPSHOT, /Users/cb/tmp/SilverWare-Demos/quickstarts/pom.xml, line 92, column 19

Do you publish snapshots somewhere?

I've replaced it with 2.0 in all pom.xml and was able to import fine in Intellij. Running io.silverware.microservices.Boot works but has some warnings:

org.reflections.ReflectionsException: could not create Vfs.Dir from url, no matching UrlType was found [file:/System/Library/Java/Extensions/libJ3DUtils.jnilib]
either use fromURL(final URL url, final List<UrlType> urlTypes) or use the static setDefaultURLTypes(final List<UrlType> urlTypes) or addDefaultURLTypes(UrlType urlType) with your specialized UrlType.
    at org.reflections.vfs.Vfs.fromURL(Vfs.java:109) ~[reflections-0.9.10.jar:?]
    at org.reflections.vfs.Vfs.fromURL(Vfs.java:91) ~[reflections-0.9.10.jar:?]
    at org.reflections.Reflections.scan(Reflections.java:237) ~[reflections-0.9.10.jar:?]
    at org.reflections.Reflections.scan(Reflections.java:204) [reflections-0.9.10.jar:?]
    at org.reflections.Reflections.<init>(Reflections.java:129) [reflections-0.9.10.jar:?]
    at io.silverware.microservices.util.DeploymentScanner.<init>(DeploymentScanner.java:89) [microservices-2.0.jar:2.0]
    at io.silverware.microservices.util.DeploymentScanner.getDefaultInstance(DeploymentScanner.java:113) [microservices-2.0.jar:2.0]
    at io.silverware.microservices.util.DeploymentScanner.getContextInstance(DeploymentScanner.java:145) [microservices-2.0.jar:2.0]
    at io.silverware.microservices.Executor.run(Executor.java:287) [microservices-2.0.jar:2.0]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_25]

Probably need to exclude native libs from scanning.

Deltaspike is using a different logger, this can probably resolved with a bridge JAR (slf4j-whatever) on the classpath:

Mai 13, 2016 9:22:01 PM org.apache.deltaspike.core.util.ProjectStageProducer initProjectStage
INFO: Computed the following DeltaSpike ProjectStage: Production
marvec commented 8 years ago

Hello, sorry for the late reply. I did not notice the issue here. For SNAPSHOT, you need to compile and install SilverWare locally. When you check it out, you simply run mvn install in the root and that's it. The logger bridges are already on the classpath, however, they need some configuration parameters that I did not manage to set in the app. These need to passed on the command line. You can find it in README - -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager