[Geoserver-devel] [JIRA] (GEOS-10466) Migrate resources from src/main/java to src/main/resources

Jody Garnett created an issue

GeoServer / TaskGEOS-10466

Migrate resources from src/main/java to src/main/resources

Issue Type:

TaskTask

Assignee:

Unassigned

Created:

18/Apr/22 9:12 AM

Priority:

MediumMedium

Reporter:

Jody Garnett

Making a note of this here, as it was a new one for me:

  • IntelliJ marks folders as sources, generated sources, test sources, generated test sources, resources, test resources,
  • We have files such as gs-main src/test/java/org.vfny/geoserver/util/valid.sld that fail to load when running a test in InteliJ … because srs/test/java is a test resources folder and will not be scanned for resources!
  • this causes testValid() to fail, as null is returned (valid.sld cannot be found)
    public void testValid() throws Exception {
        SLDValidator validator = new SLDValidator();
        List errors = validator.validateSLD(getClass().getResourceAsStream("valid.sld"));
        // showErrors(errors);
        assertTrue(errors.isEmpty());
    }

Wild

I think I have usually done a maven build first which copies such files to target/classes

References:

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100198-sha1:943baf4)

Atlassian logo