Giter Club home page Giter Club logo

Comments (11)

vladmihalcea avatar vladmihalcea commented on August 23, 2024 1

You're right. Unfortunately, Maven does not have a test-runtime scope, so only moving the dependency to the oracle profile does the trick. I pushed a new change to do that. Thanks for the tip.

from high-performance-java-persistence.

vladmihalcea avatar vladmihalcea commented on August 23, 2024

The README tells exactly what you have to do.

from high-performance-java-persistence.

cruftex avatar cruftex commented on August 23, 2024

@vladmihalcea please reconsider this. That is a bad OOTB experience.

Where is it written in the README that I need to register with Oracle to run the tests against PostgreSQL?!

from high-performance-java-persistence.

cruftex avatar cruftex commented on August 23, 2024

BTW, the README says exactly:

The Unit Tests are run against HSQLDB, so no preliminary set-ups are required.

How should I do this?

from high-performance-java-persistence.

vladmihalcea avatar vladmihalcea commented on August 23, 2024

Just comment the Oracle repository if you don't want to set it up. The tests compile even without the Oracle JDBC Driver.

from high-performance-java-persistence.

cruftex avatar cruftex commented on August 23, 2024

Sure, that's what I did. However, a lot of other people will have the same experience and need to do the same.

If you like, I can do a PR with a suggestion how to solve this with a Maven profile.
To run the tests with Oracle one would need to do mvn -Poracle test then.
In IntelliJ you can enable the profiles in the Maven tool window.

I did something similar here:
https://github.com/cruftex/jsr107-test-zoo/blob/master/pom.xml

If you don't like the idea, that's okay too.

The project is really nice!

Ultimately I would recommend working towards something like:

# run the tests with embedded SQL:
mvn test
# run the integration tests with Oracle:
mvn -Poracle verify
# run the integration tests with MySQL:
mvn -Pmysql verify
# run integration tests for performance on PostgreSQL:
mvn -Pperformance,postgresql verify

from high-performance-java-persistence.

vladmihalcea avatar vladmihalcea commented on August 23, 2024

I'll use a profile activated by an environment variable.

from high-performance-java-persistence.

vladmihalcea avatar vladmihalcea commented on August 23, 2024

Fixed. The Oracle repo must now be activated explicitly.

from high-performance-java-persistence.

cruftex avatar cruftex commented on August 23, 2024

@vladmihalcea please mind that you need to move the JDBC driver dependency into the profile as well.

from high-performance-java-persistence.

vladmihalcea avatar vladmihalcea commented on August 23, 2024

The driver scope is provided so it won't be required during compile. So, it should be just fine.

from high-performance-java-persistence.

cruftex avatar cruftex commented on August 23, 2024

Scope provided means that it is not packaged, since present at the target environment.
It's used for compiling.

If you don't want it in the compile scope, then the scope runtime is the correct one.
However, runtime would be present during running the tests.

from high-performance-java-persistence.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.