jts icon indicating copy to clipboard operation
jts copied to clipboard

Publish ESRi, Oracle modules on Maven

Open andyjefferson opened this issue 5 years ago • 6 comments

These have non-open source dependencies but, unless they are published, they will not be useable (without inflicting on developers to "go off and build it yourself").

In the case of Oracle the only additional work required (by the Maven releaser) is to install an Oracle JDBC driver jar in their local Maven repo, and then build/release the JTS module (in a suitable place in Maven).

FWIW Vividsolutions managed to publish such modules without apparent problem.

andyjefferson avatar Jun 10 '19 15:06 andyjefferson

In the case of Oracle the only additional work required (by the Maven releaser) is to install an Oracle JDBC driver jar in their local Maven repo, and then build/release the JTS module (in a suitable place in Maven).

Actually to run (at least some of) the testcases a developer also needs to have an oracle instance running

mprins avatar Jun 11 '19 08:06 mprins

This is a serious pain. Now that Oracle drivers are in Maven Central is there any reason this can't be done?

yeroc avatar Nov 29 '19 22:11 yeroc

@yeroc @andyjefferson Creating a PR that updates https://github.com/locationtech/jts/blob/master/modules/io/ora/pom.xml and .travis.yml to build the oracle module could be a start

mprins avatar Nov 29 '19 23:11 mprins

Actually to run (at least some of) the testcases a developer also needs to have an oracle instance running

Yes, that is a serious impediment to maintaining and publishing these modules, IMO. I am no longer in a position to run the tests for these modules . I suppose the Oracle module could be released in a "compile-only" way, if that is worth anything. The unit tests would have to be disabled in some way for CI, I think?

Other ideas welcome.

dr-jts avatar Nov 30 '19 02:11 dr-jts

FWIW Vividsolutions managed to publish such modules without apparent problem.

At Vivid we had an environment in which to develop and run the tests.

dr-jts avatar Nov 30 '19 02:11 dr-jts

FWIW Oracle JDBC driver(s) are in Maven central.

Change https://github.com/locationtech/jts/blob/master/pom.xml#L116 to be "com.oracle.database.jdbc", "ojdbc8" and version 12.2.0.1

Change https://github.com/locationtech/jts/blob/master/modules/io/ora/pom.xml#L40 to be "com.oracle.database.jdbc", "ojdbc8".

Change https://github.com/locationtech/jts/blob/master/modules/io/ora/README.md to remove the lines about needing an Oracle JDBC driver, since one is in the Maven repo.

That presumably would allow anyone to build it. You'd have to disable tests without a working Oracle instance, clearly.

I tried "mvn clean install -DskipTests" followed by "mvn install -Poracle -DskipTests" but got some Maven whinges on the second command about "Failure to find org.locationtech.jts:jts-io:pom:1.18.0-SNAPSHOT". The parent seems to be set to 1.18.0-SNAPSHOT rather than the current 1.18.2-SNAPSHOT, so perhaps change that.

Oh, and https://github.com/locationtech/jts/blob/master/modules/io/ora/pom.xml will also need the dependency

        <dependency>
            <groupId>org.locationtech.jts</groupId>
            <artifactId>jts-core</artifactId>
            <version>${project.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>

adding.

Do all of that and you can finally do "mvn install -Poracle -DskipTests"

andyjefferson avatar May 02 '21 14:05 andyjefferson