Closed jpcik closed 9 years ago
I didn't had time to test it on my computer, but indeed this is a good idea to get rid the tons of libraries in our git repository. How does it work when packaging the app for production? Should we still include all libraries in the jar file?
I haven't changed the installer bits. So it should be the same for the moment, all jars packaged in the lib folder. Anyway this probably needs a bit of testing.
First run is downloading the libraries, but it seems GSN is self referencing??
BUILD FAILED
C:\...\build.xml:480: Unable to resolve artifact: Missing:
----------
1) gsn:gsn-services:jar:0.0.3-SNAPSHOT
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=gsn -DartifactId=gsn-services -Dversion=0.0.3-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=gsn -DartifactId=gsn-services -Dversion=0.0.3-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) gsn:gsn:jar:1.1.5
2) gsn:gsn-services:jar:0.0.3-SNAPSHOT
----------
1 required artifact is missing.
for artifact:
gsn:gsn:jar:1.1.5
from the specified remote repositories:
central (http://repo1.maven.org/maven2),
TypesafeRepository (http://repo.typesafe.com/typesafe/releases/),
LSIR (http://planetdata.epfl.ch:8081/artifactory/gsn-release/)
not self referencing, but a lib was missing in the repo. it should compile now
using eclipse, one has to do some dirty tricks : http://stackoverflow.com/questions/13288735/maven-not-picking-java-home-correctly/23129154 and to build from ant, it seems I need jibx-bind (and not jibx-run). Do I need to keep both or replacing it is enough?
it almost works now :-) Just a small issue with the play service (and a duplicated logger class):
GSN is trying to start.
All GSN logs are available at: logs/gsn.log
INFO [2015-01-13 14:13:33,685] [Thread-0] (GSNController.java:66) - Started GSN Controller on port 22003
INFO [2015-01-13 14:13:34,261] [main] ( Main.java:313) - Loading wrappers.properties at : conf/wrappers.properties
INFO [2015-01-13 14:13:34,261] [main] ( Main.java:314) - Wrappers initialization ...
GSN is starting at port:22001
All GSN logs are available at: logs/gsn.log
Global Sensor Networks (GSN) is Starting on port 22001...
The logs of GSN server are available in logs/gsn.log file.
To Stop GSN execute the gsn-stop script.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/jeberle/.m2/repository/ch/qos/logback/logback-classic/1.1.1/logback-classic-1.1.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/jeberle/.m2/repository/org/slf4j/slf4j-log4j12/1.7.5/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
WARN [2015-01-13 14:13:38,948] [main] (DataSources.java:54) - Created a DataSource to: jdbc:h2:~/GsnMemDb;AUTO_SERVER=TRUE
INFO [2015-01-13 14:13:39,058] [main] (StorageManager.java:72) - StorageManager DB connection initialized successfuly. driver:org.h2.Driver url:jdbc:h2:~/GsnMemDb;AUTO_SERVER=TRUE
INFO [2015-01-13 14:13:39,058] [main] (StorageManager.java:72) - StorageManager DB connection initialized successfuly. driver:org.h2.Driver url:jdbc:h2:~/GsnMemDb;AUTO_SERVER=TRUE
WARN [2015-01-13 14:13:39,058] [main] (DataSources.java:54) - Created a DataSource to: jdbc:h2:mem:validator
INFO [2015-01-13 14:13:39,061] [main] (StorageManager.java:72) - StorageManager DB connection initialized successfuly. driver:org.h2.Driver url:jdbc:h2:mem:validator
INFO [2015-01-13 14:13:39,061] [main] ( Main.java:181) - The Container Configuration file loaded successfully.
SSL is Starting on port 8443...
[error] o.e.j.util.log - Failed startup of context WebAppContext@55e39682@55e39682/,file:/C:/var/PHD/GSN/lsir-git/src/main/webapp/
play.api.Configuration$$anon$1: Configuration error[Cannot initialize the custom Global object (controllers.gsn.Global) (perhaps it's a wrong reference?)]
at play.api.Configuration$.play$api$Configuration$$configError(Configuration.scala:94) ~[play_2.11-2.3.4.jar:2.3.4]
at play.api.Configuration.reportError(Configuration.scala:743) ~[play_2.11-2.3.4.jar:2.3.4]
at play.api.WithDefaultGlobal$class.play$api$WithDefaultGlobal$$scalaGlobal(Application.scala:42) ~[play_2.11-2.3.4.jar:2.3.4]
at play.core.server.servlet.DefaultWarApplication.play$api$WithDefaultGlobal$$scalaGlobal$lzycompute(Play2Server.scala:118) ~[play2-war-core-common_2.11-1.3-beta2.jar:1.3-beta2]
at play.core.server.servlet.DefaultWarApplication.play$api$WithDefaultGlobal$$scalaGlobal(Play2Server.scala:118) ~[play2-war-core-common_2.11-1.3-beta2.jar:1.3-beta2]
Caused by: java.lang.NoSuchMethodError: gsn.data.DataStore.<init>(Lgsn/config/GsnConf;)V
at controllers.gsn.Global$.<init>(Global.scala:17) ~[gsn-services-0.0.3-SNAPSHOT.jar:0.0.3-SNAPSHOT]
at controllers.gsn.Global$.<clinit>(Global.scala) ~[gsn-services-0.0.3-SNAPSHOT.jar:0.0.3-SNAPSHOT]
at sun.misc.Unsafe.ensureClassInitialized(Native Method) ~[na:1.7.0_03]
at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(Unknown Source) ~[na:1.7.0_03]
at sun.reflect.ReflectionFactory.newFieldAccessor(Unknown Source) ~[na:1.7.0_03]
Sorry, it seems the last commit on this pull is not in sync with the gsn-tools.jar will look at it
the play stuff is experimental, so I just disabled that from the web.xml. that should do.
Ok, it works now. I think it is safe to accept it after updating the readme file. (As I'm expecting that the current users will need some help to have their development setup updated and fully working.)
It is ready to merge. :-) I just noticed there is a warning with the logger as it has two implementation, but I'm not sure we can actually remove one of them:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/jeberle/.m2/repository/ch/qos/logback/logback-classic/1.1.1/logback-classic-1.1.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/jeberle/.m2/repository/org/slf4j/slf4j-log4j12/1.7.5/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
merged
Mavenized version of gsn All jars in lib have been deleted, now referenced from the pom.xml Excepting those not available in pulic maven repositories (afaik) Ant also supported (via link to the dependencies in the pom.xml) for backward compatibility Sbt (simple build tool) also supported. Simple java-scala dev integration