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

Reply via email to