Hi Luis, we normally run those tests from a full blown Java IDE, don't think anyone has tried to do that from the command line in ages, and it requires quite some familiarity with how both Java and Maven work (e.g., stuff like the test classes ending up in target/test/classes is something considered obvious). If I run ScriptTest from IntelliJ it works like a charm, if you're trying to develop some projection support I would warmly suggest to take the time to setup either IntelliJ or Eclipse, there should be guides in the dev guide (yes, also those are maintained best effort, but are definitely a bit more recent than the ScriptTest notes).
Cheers Andrea On Wed, Oct 23, 2019 at 5:22 PM Luís Moreira de Sousa via GeoTools-Devel < geotools-devel@lists.sourceforge.net> wrote: > Hello again, > > I located a .class file for ScriptRunner > in modules/library/referencing/target/test-classes and added it to the > class path. Like this the test can be run, but it is seeking the test > scripts in the wrong folder: > > $ java -cp > target/classes:target/test-classes:modules/library/referencing/target/test-classes:$CLASSPATH > -ea org.geotools.referencing.ScriptRunner > src/test/resources/org/geotools/referencing/test-data/scripts/Sinusoidal.txt > Oct 23, 2019 5:15:42 PM org.geotools.referencing.ScriptRunner main > INFO: > java.io.FileNotFoundException: > src/test/resources/org/geotools/referencing/test-data/scripts/Sinusoidal.txt > (No such file or directory) > at java.io.FileInputStream.open0(Native Method) > at java.io.FileInputStream.open(FileInputStream.java:195) > at java.io.FileInputStream.<init>(FileInputStream.java:138) > at java.io.FileInputStream.<init>(FileInputStream.java:93) > at java.io.FileReader.<init>(FileReader.java:58) > at org.geotools.referencing.ScriptRunner.main(ScriptRunner.java:94) > > As I understand it, the running instructions given in the Sinusoidal.txt > script are not correct. Any hint on how to run this test are welcome. > > Thank you. > > -- > Luís > > Sent with ProtonMail <https://protonmail.com> Secure Email. > > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ > On Wednesday, October 23, 2019 3:59 PM, Luís Moreira de Sousa < > luis.de.so...@protonmail.ch> wrote: > > Hi Mark, > > thank you for your reply. mvn test-compile runs without errors, but it > does not create the test-classes folder inside ./target. > > Thanks. > > -- > Luís > > Sent with ProtonMail <https://protonmail.com> Secure Email. > > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ > On Monday, October 21, 2019 7:23 PM, mark <mc.pr...@gmail.com> wrote: > > On 10/21/19 11:59 AM, Luís Moreira de Sousa via GeoTools-Devel wrote: > > Hi all, > > I am trying to run the projections tests. They all complain of the absence > of ScriptRunner, e.g.: > > $ java -cp target/classes:target/test-classes:$CLASSPATH -ea > org.geotools.referencing.ScriptRunner > src/test/resources/org/geotools/referencing/test-data/scripts/Sinusoidal.txt > Error: Could not find or load main class > org.geotools.referencing.ScriptRunner > > The ScriptRunner indeed does not feature in the class path produced by > maven: > > $ mvn dependency:build-classpath > mvn.out > $ cat mvn.out | grep ScriptRunner > $ > > Do I need to obtain the class path in a different way? > > You need to use the "test" classpath as ScriptRunner is a test class: > https://github.com/geotools/geotools/blob/master/modules/library/referencing/src/test/java/org/geotools/referencing/ScriptRunner.java > > A compiled version should be in ./target/test-classes/ after compiling > test sources ( > > mvn test-compile > > should make that happen) > > -M > > > > _______________________________________________ > GeoTools-Devel mailing list > GeoTools-Devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geotools-devel > -- Regards, Andrea Aime == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- *Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.*
_______________________________________________ GeoTools-Devel mailing list GeoTools-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel