title: NoSuchAuthorityCodeExcpetion in geotools program (gradle build) converting between coordinate systems
body: <p>I have a java geotools program to convert a coordinate between two coordinate systems.  It attempts to convert between coordinate system ESPG:4326 and ESPG:5179.</p>
  
  <p><strong>I receive the following exception when trying to execute this line in my code:</strong></p>
  
  <pre><code>CoordinateReferenceSystem targetCRS = CRS.decode("EPSG:4326");
  
  Exception in thread "main" org.opengis.referencing.NoSuchAuthorityCodeException: No code "EPSG:4326" from authority "EPSG" found for object of type "EngineeringCRS".
      at org.geotools.referencing.factory.epsg.CartesianAuthorityFactory.noSuchAuthorityException(CartesianAuthorityFactory.java:137)
      at org.geotools.referencing.factory.epsg.CartesianAuthorityFactory.createEngineeringCRS(CartesianAuthorityFactory.java:129)
      at org.geotools.referencing.factory.epsg.CartesianAuthorityFactory.createCoordinateReferenceSystem(CartesianAuthorityFactory.java:120)
      at org.geotools.referencing.factory.AuthorityFactoryAdapter.createCoordinateReferenceSystem(AuthorityFactoryAdapter.java:780)
      at org.geotools.referencing.factory.ThreadedAuthorityFactory.createCoordinateReferenceSystem(ThreadedAuthorityFactory.java:636)
      at org.geotools.referencing.DefaultAuthorityFactory.createCoordinateReferenceSystem(DefaultAuthorityFactory.java:177)
      at org.geotools.referencing.CRS.decode(CRS.java:517)
      at org.geotools.referencing.CRS.decode(CRS.java:440)
      at main.main(main.java:13)
  </code></pre>
  
  <p><strong>My test program:</strong></p>
  
  <pre><code>import org.geotools.geometry.jts.JTS;
  import org.geotools.referencing.CRS;
  import org.locationtech.jts.geom.Coordinate;
  import org.opengis.referencing.FactoryException;
  import org.opengis.referencing.crs.CoordinateReferenceSystem;
  import org.opengis.referencing.operation.MathTransform;
  
  import javax.xml.crypto.dsig.TransformException;
  
  public class main {
  
      public static void main(String[] args)  throws Exception {
          CoordinateReferenceSystem targetCRS = CRS.decode("EPSG:4326");
          CoordinateReferenceSystem sourceCRS = CRS.decode("EPSG:5179");
          double coordinateX = 1307285;
          double coordinateY = 2229260;
          Coordinate in = new Coordinate(coordinateX, coordinateY);
          Coordinate out = in;
  
          MathTransform transform = CRS.findMathTransform(sourceCRS, targetCRS);
          Coordinate result = JTS.transform(in, out, transform);
          result.toString();
      }
  }
  </code></pre>
  
  <p><strong>My build.gradle:</strong></p>
  
  <pre><code>plugins {
  id 'java'
  }
  repositories {
      flatDir {
          dirs 'libs'
      }
      maven {
          url "http://download.osgeo.org/webdav/geotools/"
      }
      mavenCentral()
  }
  dependencies {
      implementation group: 'org.geotools', name: 'gt-main', version: '20.2'
      implementation('org.geotools:gt-referencing:20.2') {
          exclude group: 'javax.units', module: 'jsr108' 
      }
      files('libs/js4108-0.01.jar')
  }
  </code></pre>
  
  <p>I thought it was sufficient to depend on <code>gt-main</code> and <code>gt-referencing</code>.</p>