◐ Shell
reader mode source ↗
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
28 changes: 16 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ env:
- DOCKER_CFG=$HOME/.docker
- DOCKER_REPO="utplsqlv3/oracledb"
- CACHE_DIR=$HOME/.cache
- MAVEN_HOME=/usr/local/maven
- MAVEN_CFG=$HOME/.m2
- DB_URL="127.0.0.1:1521:XE"
- DB_USER=app
- DB_PASS=app
Expand All @@ -33,30 +31,36 @@ env:
- UTPLSQL_VERSION="develop"
UTPLSQL_FILE="utPLSQL"

cache:
directories:
- $DOCKER_CFG
- $CACHE_DIR
- $MAVEN_CFG

install:
- bash .travis/maven_cfg.sh
- bash .travis/start_db.sh
- bash .travis/install_utplsql.sh
- bash .travis/install_demo_project.sh

before_script:
- cp .travis/settings.xml $MAVEN_CFG/settings.xml

script:
- mvn verify -B

before_deploy:
- if [ ! -z "$TRAVIS_TAG" ]; then VERSION=$(tr -d "/v/" <<<$TRAVIS_TAG); mvn org.codehaus.mojo:versions-maven-plugin:2.1:set -DnewVersion=${VERSION}; fi

deploy:
- provider: script
script: mvn clean deploy -DskipTests=true -B -U -DtravisBuildNumber=$TRAVIS_BUILD_NUMBER
skip_cleanup: true
on:
repository: utPLSQL/utPLSQL-java-api
Expand All @@ -65,7 +69,7 @@ deploy:
condition: "${TRAVIS_JOB_NUMBER} =~ \\.1$"

- provider: script
script: mvn clean deploy -DskipTests=true -B -U -DtravisBuildNumber=$TRAVIS_BUILD_NUMBER
skip_cleanup: true
on:
repository: utPLSQL/utPLSQL-java-api
Expand Down
51 changes: 0 additions & 51 deletions .travis/settings.tmpl.xml
55 changes: 0 additions & 55 deletions .travis/settings.xml
48 changes: 15 additions & 33 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,50 +10,32 @@ https://maven.apache.org/install.html

### Oracle Maven Repository
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:

http://docs.oracle.com/middleware/1213/core/MAVEN/config_maven_repo.htm#MAVEN9010

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

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

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).
The demo-project will serve as your test user. See .travis.yml to see an example on how it can be installed.

### Maven settings for utPLSQL-local profile

utPLSQL-java-api comes with a preconfigured profile "utPLSQL-local". This profile uses properties to set the correct
environment variables for DB_URL, DB_USER and DB_PASS which is needed to run the integration tests.
You can set these properties by adding the following to your Maven settings.xml:

```xml
<settings>
<!-- ... -->
<profiles>
<profile>
<id>utPLSQL-local</id>
<properties>
<dbUrl>localhost:1521/XE</dbUrl>
<dbUser>app</dbUser>
<dbPass>app</dbPass>
</properties>
</profile>
</profiles>

<activeProfiles>
<activeProfile>utPLSQL-local</activeProfile>
</activeProfiles>
</settings>
```

After configuring your access to Oracle's Maven repository, you will be able to successfully build this API.

```bash
cd utPLSQL-java-api
mvn clean package install
```

### Skip the local database part

If you want to skip the local database part, just run ``mvn clean package install -DskipTests``.
You will still be able to run ``mvn test`` because integration tests are run in the ``verify``-phase.
Loading
Toggle all file notes Toggle all file annotations