Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Migrate to Gradle DSL as a build tool#73

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Pazus merged 16 commits intodevelopfromgradle-dsl-migration
Feb 22, 2019
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
16 commits
Select commitHold shift + click to select a range
1f34cd6
gradle kotlin DSL migration
PazusFeb 17, 2019
df4b726
separated integration tests, updated CONTRIBUTING.md
PazusFeb 17, 2019
f0c3ea9
collapse Coverage resources tasks
PazusFeb 17, 2019
59d69cc
Update CONTRIBUTING.md
PazusFeb 19, 2019
a35f8a2
remove clean phase before publishing jar
PazusFeb 19, 2019
3d632dd
showStandardStreams = true
PazusFeb 19, 2019
2bc1c16
check if build speeds up
PazusFeb 19, 2019
1b7849c
check if build speeds up
PazusFeb 19, 2019
9f28122
narrow caches
PazusFeb 19, 2019
431125e
Revert "narrow caches"
PazusFeb 19, 2019
2dcb1b3
debug
PazusFeb 20, 2019
4b6d291
echo opts
PazusFeb 20, 2019
0214d77
Update .travis.yml
PazusFeb 20, 2019
20ad8bf
clean up to initial state
PazusFeb 21, 2019
5bc0d92
remove pom.xml file as project is not migrated to Gradle
PazusFeb 21, 2019
91a051f
publish only on develop and tags
PazusFeb 21, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions.gitignore
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,6 +4,8 @@

# Maven
target/
build
.gradle
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
Expand All@@ -18,3 +20,4 @@ buildNumber.properties

#Exclude CoverageHTMLReporter resources as they are managed by maven
src/main/resources/CoverageHTMLReporter/
/gradle.properties
28 changes: 16 additions & 12 deletions.travis.yml
View file
Open in desktop
Original file line numberDiff line numberDiff 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"

before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $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
- echo JAVA_HOME = ${JAVA_HOME}
- echo PATH = ${PATH}
- ls ${JAVA_HOME}
- java -version
- echo $JAVA_OPTS
- echo $GRADLE_OPTS
- echo JAVA_HOME = ${GRADLE_HOME}

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
- ./gradlew check

deploy:
- provider: script
script:mvn clean deploy -DskipTests=true -B -U -DtravisBuildNumber=$TRAVIS_BUILD_NUMBER
script:./gradlew uploadArchives
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
script:./gradlew uploadArchives
skip_cleanup: true
on:
repository: utPLSQL/utPLSQL-java-api
Expand Down
51 changes: 0 additions & 51 deletions.travis/settings.tmpl.xml
View file
Open in desktop

This file was deleted.

55 changes: 0 additions & 55 deletions.travis/settings.xml
View file
Open in desktop

This file was deleted.

48 changes: 15 additions & 33 deletionsCONTRIBUTING.md
View file
Open in desktop
Original file line numberDiff line numberDiff 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:
Create file `gradle.properties` in the root directory of the repository and place OTN credentials there:
```properties
ORACLE_OTN_USER=user@email.com
ORACLE_OTN_PASSWORD=password
```

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

*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.*
```bash
./gradlew build -x intTest
```

### 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.
By default tests are executed against `app/app` user of `localhost:1521/XE database`.

### 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.
If you want to run tests against another database you may set `DB_URL`, `DB_USER`, `DB_PASS` environment variables.

When you have local database set up you can run the complete build including integration tests by executing
```bash
cd utPLSQL-java-api
mvn clean package install
./gradlew build
```

### Skip the local database part

If you want to skip the local database part, just run ``mvn clean package install -DskipTests``.
You willstillbe able to run ``mvn test`` because integration tests arerun in the``verify``-phase.
If you want to skip the local database part, just run ``./gradlew test``.
You will be able to run ``./gradle test`` because integration tests areexecuted in theseparate ``intTest`` task as part of overall ``check``.
Loading

[8]ページ先頭

©2009-2025 Movatter.jp