Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cfdbef9

Browse files
committed
Merge branch 'develop' into pazus-init-refactor
# Conflicts: # pom.xml
2 parents 67326ce + 1d4dc11 commit cfdbef9

12 files changed

+463
-390
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
# Maven
66
target/
7+
build
8+
.gradle
79
pom.xml.tag
810
pom.xml.releaseBackup
911
pom.xml.versionsBackup
@@ -18,3 +20,4 @@ buildNumber.properties
1820

1921
#Exclude CoverageHTMLReporter resources as they are managed by maven
2022
src/main/resources/CoverageHTMLReporter/
23+
/gradle.properties

.travis.yml

+16-12
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ env:
1212
- DOCKER_CFG=$HOME/.docker
1313
- DOCKER_REPO="utplsqlv3/oracledb"
1414
- CACHE_DIR=$HOME/.cache
15-
- MAVEN_HOME=/usr/local/maven
16-
- MAVEN_CFG=$HOME/.m2
1715
- DB_URL="127.0.0.1:1521:XE"
1816
- DB_USER=app
1917
- DB_PASS=app
@@ -33,30 +31,36 @@ env:
3331
- UTPLSQL_VERSION="develop"
3432
UTPLSQL_FILE="utPLSQL"
3533

34+
before_cache:
35+
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
36+
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
3637
cache:
3738
directories:
39+
- $HOME/.gradle/caches/
40+
- $HOME/.gradle/wrapper/
3841
- $DOCKER_CFG
3942
- $CACHE_DIR
40-
- $MAVEN_CFG
4143

4244
install:
43-
- bash .travis/maven_cfg.sh
4445
- bash .travis/start_db.sh
4546
- bash .travis/install_utplsql.sh
4647
- bash .travis/install_demo_project.sh
47-
48+
4849
before_script:
49-
- cp .travis/settings.xml $MAVEN_CFG/settings.xml
50+
- echo JAVA_HOME = ${JAVA_HOME}
51+
- echo PATH = ${PATH}
52+
- ls ${JAVA_HOME}
53+
- java -version
54+
- echo $JAVA_OPTS
55+
- echo $GRADLE_OPTS
56+
- echo JAVA_HOME = ${GRADLE_HOME}
5057

5158
script:
52-
- mvn verify -B
53-
54-
before_deploy:
55-
- if [ ! -z "$TRAVIS_TAG" ]; then VERSION=$(tr -d "/v/" <<<$TRAVIS_TAG); mvn org.codehaus.mojo:versions-maven-plugin:2.1:set -DnewVersion=${VERSION}; fi
59+
- ./gradlew check
5660

5761
deploy:
5862
- provider: script
59-
script: mvn clean deploy -DskipTests=true -B -U -DtravisBuildNumber=$TRAVIS_BUILD_NUMBER
63+
script: ./gradlew uploadArchives
6064
skip_cleanup: true
6165
on:
6266
repository: utPLSQL/utPLSQL-java-api
@@ -65,7 +69,7 @@ deploy:
6569
condition: "${TRAVIS_JOB_NUMBER} =~ \\.1$"
6670

6771
- provider: script
68-
script: mvn clean deploy -DskipTests=true -B -U -DtravisBuildNumber=$TRAVIS_BUILD_NUMBER
72+
script: ./gradlew uploadArchives
6973
skip_cleanup: true
7074
on:
7175
repository: utPLSQL/utPLSQL-java-api

.travis/settings.tmpl.xml

-51
This file was deleted.

.travis/settings.xml

-55
This file was deleted.

CONTRIBUTING.md

+15-33
Original file line numberDiff line numberDiff line change
@@ -10,50 +10,32 @@ https://maven.apache.org/install.html
1010

1111
### Oracle Maven Repository
1212
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:
14+
```properties
15+
ORACLE_OTN_USER[email protected]
16+
ORACLE_OTN_PASSWORD=password
17+
```
1318

14-
http://docs.oracle.com/middleware/1213/core/MAVEN/config_maven_repo.htm#MAVEN9010
19+
After configuring your access to Oracle's Maven repository, you will be able to successfully build this API by disabling integration tests.
1520

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+
```
1724

1825
### Local database with utPLSQL and utPLSQL-demo-project
1926

2027
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).
2128
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`.
2230

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.
5032

33+
When you have local database set up you can run the complete build including integration tests by executing
5134
```bash
52-
cd utPLSQL-java-api
53-
mvn clean package install
35+
./gradlew build
5436
```
5537

5638
### Skip the local database part
5739

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

Comments
 (0)