You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The library uses OJDBC Driver to connect to the database, it's added as a maven dependency. To be able to download the Oracle dependencies, you need to configure your access to Oracle's Maven Repository:
13
+
Create file `gradle.properties` in the root directory of the repository and place OTN credentials there:
After configuring your access to Oracle's Maven repository, you will be able to successfully build this API by disabling integration tests.
15
20
16
-
*Sections 6.1 and 6.5 are the more important ones, and the only ones you need if you're using the latest Maven version.*
21
+
```bash
22
+
./gradlew build -x intTest
23
+
```
17
24
18
25
### Local database with utPLSQL and utPLSQL-demo-project
19
26
20
27
To usefully contribute you'll have to setup a local database with installed [latest utPLSQL v3](https://github.com/utPLSQL/utPLSQL) and [utPLSQL-demo-project](https://github.com/utPLSQL/utPLSQL-demo-project).
21
28
The demo-project will serve as your test user. See .travis.yml to see an example on how it can be installed.
29
+
By default tests are executed against `app/app` user of `localhost:1521/XE database`.
22
30
23
-
### Maven settings for utPLSQL-local profile
24
-
25
-
utPLSQL-java-api comes with a preconfigured profile "utPLSQL-local". This profile uses properties to set the correct
26
-
environment variables for DB_URL, DB_USER and DB_PASS which is needed to run the integration tests.
27
-
You can set these properties by adding the following to your Maven settings.xml:
28
-
29
-
```xml
30
-
<settings>
31
-
<!-- ... -->
32
-
<profiles>
33
-
<profile>
34
-
<id>utPLSQL-local</id>
35
-
<properties>
36
-
<dbUrl>localhost:1521/XE</dbUrl>
37
-
<dbUser>app</dbUser>
38
-
<dbPass>app</dbPass>
39
-
</properties>
40
-
</profile>
41
-
</profiles>
42
-
43
-
<activeProfiles>
44
-
<activeProfile>utPLSQL-local</activeProfile>
45
-
</activeProfiles>
46
-
</settings>
47
-
```
48
-
49
-
After configuring your access to Oracle's Maven repository, you will be able to successfully build this API.
31
+
If you want to run tests against another database you may set `DB_URL`, `DB_USER`, `DB_PASS` environment variables.
50
32
33
+
When you have local database set up you can run the complete build including integration tests by executing
51
34
```bash
52
-
cd utPLSQL-java-api
53
-
mvn clean package install
35
+
./gradlew build
54
36
```
55
37
56
38
### Skip the local database part
57
39
58
-
If you want to skip the local database part, just run ``mvn clean package install -DskipTests``.
59
-
You will still be able to run ``mvn test`` because integration tests are run in the ``verify``-phase.
40
+
If you want to skip the local database part, just run ``./gradlew test``.
41
+
You will be able to run ``./gradle test`` because integration tests are executed in the separate ``intTest`` task as part of overall ``check``.
0 commit comments