Skip to content

Commit 1260351

Browse files
committed
Merge branch 'develop' into feature/improve_testing
2 parents 981221a + 23122e4 commit 1260351

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1178
-471
lines changed

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ before_deploy:
6969
deploy:
7070
- provider: releases
7171
api_key: $GITHUB_API_TOKEN
72-
file: utPLSQL-cli.zip
72+
file:
73+
- utPLSQL-cli.zip
74+
- utPLSQL-cli.zip.md5
7375
skip_cleanup: true
7476
on:
7577
repository: utPLSQL/utPLSQL-cli

.travis/create_release.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ rm -f utPLSQL-cli/lib/orai18n*.jar
1515

1616
zip -r -q dist/utPLSQL-cli-${TRAVIS_BRANCH}-${VERSION}.zip utPLSQL-cli
1717
zip -r -q utPLSQL-cli.zip utPLSQL-cli
18+
md5sum utPLSQL-cli.zip --tag > utPLSQL-cli.zip.md5
1819

1920
cat > bintray.json <<EOF
2021
{

README.md

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
[![latest-release](https://img.shields.io/github/release/utPLSQL/utPLSQL-cli.svg)](https://github.com/utPLSQL/utPLSQLc-li/releases)
2+
[![license](https://img.shields.io/github/license/utPLSQL/utPLSQL-cli.svg)](https://www.apache.org/licenses/LICENSE-2.0)
3+
[![build](https://img.shields.io/travis/utPLSQL/utPLSQL-cli/develop.svg?label=develop%20branch)](https://travis-ci.org/utPLSQL/utPLSQL-cli)
4+
5+
----------
16
# utPLSQL-cli
27
Java command-line client for [utPLSQL v3](https://github.com/utPLSQL/utPLSQL/).
38

@@ -25,10 +30,10 @@ You can also download all development versions from [Bintray](https://bintray.co
2530

2631
## Compatibility
2732
The latest CLI is always compatible with all database frameworks of the same major version.
28-
For example CLI-3.1.0 is compatible with database framework 3.0.0-3.1.0 but not with database framework 2.x.
33+
For example CLI-3.1.0 is compatible with database framework 3.0.0-3.1.* but not with database framework 2.x.
2934

3035
## Localization and NLS settings
31-
utPLSQL-cli will use the environment variables (in that order) "NLS_LANG", "LC_ALL" or "LANG" to change the locale and therefore the NLS settings.
36+
utPLSQL-cli will use the environment variables "LC_ALL" or "LANG" to change the locale and therefore the client NLS settings.
3237
If neither environment variable is available, it will use the JVM default locale.
3338

3439
Example: to change the NLS-settings to English American, you can do the following:
@@ -38,6 +43,17 @@ export LC_ALL=en_US.utf-8
3843

3944
The charset-part of LC_ALL is ignored.
4045

46+
In addition, utPLSQL-cli will use an existing "NLS_LANG" environment variable to create corresponding
47+
`ALTER SESSION`-statements during initialization of the connection.
48+
49+
The variable is parsed according to the [Oracle globalization documentation](https://www.oracle.com/technetwork/database/database-technologies/globalization/nls-lang-099431.html#_Toc110410543)
50+
51+
Example: "NLS_LANG" of `AMERICAN_AMERICA.UTF8` will lead to the following statements:
52+
```sql
53+
ALTER SESSION SET NLS_LANGUAGE='AMERICAN';
54+
ALTER SESSION SET NLS_TERRITORY='AMERICA';
55+
```
56+
4157
## Usage
4258
Currently, utPLSQL-cli supports the following commands:
4359
- run
@@ -58,6 +74,11 @@ To connect using TNS, you need to have the ORACLE_HOME environment variable set.
5874
The file tnsnames.ora must exist in path %ORACLE_HOME%/network/admin
5975
The file tnsnames.ora must contain valid TNS entries.
6076

77+
In case you use a username containing `/` or a password containing `@` you should encapsulate it with double quotes `"`:
78+
```
79+
utplsql run "my/Username"/"myP@ssword"@connectstring
80+
```
81+
6182
### run
6283
`utplsql run <ConnectionURL> [<options>]`
6384

@@ -112,6 +133,15 @@ The file tnsnames.ora must contain valid TNS entries.
112133
-exclude=pckg_list - Comma-separated object list to exclude from the coverage report.
113134
Format: [schema.]package[,[schema.]package ...].
114135
See coverage reporting options in framework documentation.
136+
137+
-q - Does not output the informational messages normally printed to console.
138+
Default: false
139+
140+
-d - Outputs a load of debug information to console
141+
Default: false
142+
143+
-t - Sets the timeout in minutes after which the cli will abort.
144+
Default 60
115145
```
116146

117147
Parameters -f, -o, -s are correlated. That is parameters -o and -s are controlling outputs for reporter specified by the preceding -f parameter.
@@ -210,6 +240,16 @@ UT_XUNIT_REPORTER:
210240
Provides outcomes in a format conforming with JUnit 4 and above as defined in: https://gist.github.com/kuzuha/232902acab1344d6b578
211241
```
212242

243+
## Using utPLSQL-cli as sysdba
244+
245+
Since 3.1.6 it is possible to run utPLSQL-cli as sysdba by running
246+
247+
```
248+
utplsql run "sys as sysdba"/pw@connectstring
249+
```
250+
251+
It is, however, __not recommended__ to run utPLSQL with sysdba privileges.
252+
213253
## Enabling Color Outputs on Windows
214254

215255
To enable color outputs on Windows cmd you need to install an open-source utility called [ANSICON](http://adoxa.altervista.org/ansicon/).

pom.xml

Lines changed: 89 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>org.utplsql</groupId>
66
<artifactId>cli</artifactId>
7-
<version>3.1.1-SNAPSHOT</version>
7+
<version>3.1.6</version>
88
<packaging>jar</packaging>
99

1010
<name>cli</name>
@@ -14,59 +14,74 @@
1414
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1515
<maven.compiler.source>1.8</maven.compiler.source>
1616
<maven.compiler.target>1.8</maven.compiler.target>
17-
<junit.platform.version>1.0.3</junit.platform.version>
18-
<junit.jupiter.version>5.0.3</junit.jupiter.version>
17+
<junit.jupiter.version>5.4.0</junit.jupiter.version>
1918
<travisBuildNumber>local</travisBuildNumber>
2019
</properties>
2120

2221
<dependencies>
23-
<dependency>
24-
<groupId>org.utplsql</groupId>
25-
<artifactId>java-api</artifactId>
26-
<version>3.1.1</version>
27-
<scope>compile</scope>
28-
<exclusions>
29-
<exclusion>
30-
<groupId>com.oracle.jdbc</groupId>
31-
<artifactId>ucp</artifactId>
32-
</exclusion>
33-
</exclusions>
34-
</dependency>
35-
<dependency>
36-
<groupId>com.beust</groupId>
37-
<artifactId>jcommander</artifactId>
38-
<version>1.72</version>
39-
<scope>compile</scope>
40-
</dependency>
41-
<dependency>
42-
<groupId>com.zaxxer</groupId>
43-
<artifactId>HikariCP</artifactId>
44-
<version>2.7.2</version>
45-
<scope>compile</scope>
46-
</dependency>
4722
<dependency>
48-
<groupId>org.slf4j</groupId>
49-
<artifactId>slf4j-nop</artifactId>
50-
<version>1.7.25</version>
23+
<groupId>org.utplsql</groupId>
24+
<artifactId>java-api</artifactId>
25+
<version>3.1.6</version>
5126
<scope>compile</scope>
27+
<exclusions>
28+
<exclusion>
29+
<groupId>com.oracle.jdbc</groupId>
30+
<artifactId>ucp</artifactId>
31+
</exclusion>
32+
<exclusion>
33+
<groupId>com.oracle.jdbc</groupId>
34+
<artifactId>ojdbc8</artifactId>
35+
</exclusion>
36+
<exclusion>
37+
<groupId>com.oracle.jdbc</groupId>
38+
<artifactId>orai18n</artifactId>
39+
</exclusion>
40+
</exclusions>
5241
</dependency>
5342
<dependency>
54-
<groupId>org.junit.jupiter</groupId>
55-
<artifactId>junit-jupiter-api</artifactId>
56-
<version>${junit.jupiter.version}</version>
57-
<scope>test</scope>
43+
<groupId>com.beust</groupId>
44+
<artifactId>jcommander</artifactId>
45+
<version>1.72</version>
46+
<scope>compile</scope>
5847
</dependency>
5948
<dependency>
60-
<groupId>org.junit.jupiter</groupId>
61-
<artifactId>junit-jupiter-engine</artifactId>
62-
<version>${junit.jupiter.version}</version>
63-
<scope>test</scope>
49+
<groupId>com.zaxxer</groupId>
50+
<artifactId>HikariCP</artifactId>
51+
<version>3.3.1</version>
52+
<scope>compile</scope>
6453
</dependency>
6554
<dependency>
6655
<groupId>javax.xml.bind</groupId>
6756
<artifactId>jaxb-api</artifactId>
6857
<version>2.3.0</version>
6958
</dependency>
59+
<dependency>
60+
<groupId>ch.qos.logback</groupId>
61+
<artifactId>logback-classic</artifactId>
62+
<version>1.2.3</version>
63+
</dependency>
64+
<dependency>
65+
<groupId>com.oracle.jdbc</groupId>
66+
<artifactId>ojdbc8</artifactId>
67+
<version>12.2.0.1</version>
68+
<scope>compile</scope>
69+
</dependency>
70+
<dependency>
71+
<groupId>com.oracle.jdbc</groupId>
72+
<artifactId>orai18n</artifactId>
73+
<version>12.2.0.1</version>
74+
<scope>compile</scope>
75+
</dependency>
76+
77+
<!-- Test -->
78+
<dependency>
79+
<groupId>org.junit.jupiter</groupId>
80+
<artifactId>junit-jupiter</artifactId>
81+
<version>${junit.jupiter.version}</version>
82+
<scope>test</scope>
83+
</dependency>
84+
7085
</dependencies>
7186

7287
<build>
@@ -89,62 +104,20 @@
89104
</programs>
90105
</configuration>
91106
</plugin>
92-
<plugin>
93-
<groupId>com.google.code.maven-replacer-plugin</groupId>
94-
<artifactId>replacer</artifactId>
95-
<version>1.5.3</version>
96-
<executions>
97-
<execution>
98-
<id>replace-version-number</id>
99-
<phase>generate-sources</phase>
100-
<goals>
101-
<goal>replace</goal>
102-
</goals>
103-
</execution>
104-
</executions>
105-
<configuration>
106-
<basedir>${project.basedir}/src/main/java</basedir>
107-
<includes>
108-
<include>**/CliVersionInfo.java</include>
109-
</includes>
110-
<preserveDir>true</preserveDir>
111-
<replacements>
112-
<replacement>
113-
<token>MAVEN_PROJECT_NAME = ".*"</token>
114-
<value>MAVEN_PROJECT_NAME = "${project.name}"</value>
115-
</replacement>
116-
<replacement>
117-
<token>MAVEN_PROJECT_VERSION = ".*"</token>
118-
<value>MAVEN_PROJECT_VERSION = "${project.version}"</value>
119-
</replacement>
120-
<replacement>
121-
<token>BUILD_NO = ".*"</token>
122-
<value>BUILD_NO = "${travisBuildNumber}"</value>
123-
</replacement>
124-
</replacements>
125-
</configuration>
126-
</plugin>
127107
<plugin>
128108
<groupId>org.apache.maven.plugins</groupId>
129109
<artifactId>maven-surefire-plugin</artifactId>
130-
<version>2.19.1</version>
110+
<version>2.22.0</version>
131111
<configuration>
132112
<excludes>
133113
<exclude>**/*IT.java</exclude>
134114
</excludes>
135115
</configuration>
136-
<dependencies>
137-
<dependency>
138-
<groupId>org.junit.platform</groupId>
139-
<artifactId>junit-platform-surefire-provider</artifactId>
140-
<version>${junit.platform.version}</version>
141-
</dependency>
142-
</dependencies>
143116
</plugin>
144117
<plugin>
145118
<groupId>org.apache.maven.plugins</groupId>
146119
<artifactId>maven-failsafe-plugin</artifactId>
147-
<version>2.19.1</version>
120+
<version>2.22.0</version>
148121
<executions>
149122
<execution>
150123
<goals>
@@ -153,15 +126,24 @@
153126
</goals>
154127
</execution>
155128
</executions>
156-
<dependencies>
157-
<dependency>
158-
<groupId>org.junit.platform</groupId>
159-
<artifactId>junit-platform-surefire-provider</artifactId>
160-
<version>${junit.platform.version}</version>
161-
</dependency>
162-
</dependencies>
163129
</plugin>
164130
</plugins>
131+
<resources>
132+
<resource>
133+
<directory>src/main/resources</directory>
134+
<filtering>true</filtering>
135+
<includes>
136+
<include>**/utplsql-cli.version</include>
137+
</includes>
138+
</resource>
139+
<resource>
140+
<directory>src/main/resources</directory>
141+
<filtering>false</filtering>
142+
<excludes>
143+
<exclude>**/utplsql-cli.version</exclude>
144+
</excludes>
145+
</resource>
146+
</resources>
165147
</build>
166148

167149
<repositories>
@@ -177,8 +159,26 @@
177159
<enabled>true</enabled>
178160
</snapshots>
179161
</repository>
162+
<repository>
163+
<id>maven.oracle.com</id>
164+
<releases>
165+
<enabled>true</enabled>
166+
</releases>
167+
<snapshots>
168+
<enabled>false</enabled>
169+
</snapshots>
170+
<url>https://maven.oracle.com</url>
171+
<layout>default</layout>
172+
</repository>
180173
</repositories>
181174

175+
<pluginRepositories>
176+
<pluginRepository>
177+
<id>maven.oracle.com</id>
178+
<url>https://maven.oracle.com</url>
179+
</pluginRepository>
180+
</pluginRepositories>
181+
182182
<profiles>
183183
<profile>
184184
<id>utPLSQL-local</id>

0 commit comments

Comments
 (0)