Skip to content

Commit

Permalink
remove class loading for "driver-class-name" (#15)
Browse files Browse the repository at this point in the history
* remove class loading for driver-class-name, it throws deprecation warning

* Fix GH release workflow

Co-authored-by: Henrik Adamski <[email protected]>
  • Loading branch information
2 people authored and julian-eggers committed Jan 22, 2020
1 parent 34c79b2 commit 4a1d2c7
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,18 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: 11
server-id: ossrh
server-username: OSSRH_USERNAME
server-password: OSSRH_PASSWORD

- name: setup-github-release
run: sed -i -e 's/<\/servers>/<server><id>github<\/id><username>x-access-token<\/username><password>${GITHUB_TOKEN}<\/password><\/server><\/servers>/g' /home/runner/.m2/settings.xml

- name: setup-gpg
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
run: echo ${GPG_PRIVATE_KEY} | base64 --decode | gpg --batch --import

- name: setup-maven-settings
uses: s4u/maven-settings-action@v1
with:
servers: '[{"id": "ossrh", "username": "${OSSRH_USERNAME}", "password": "${OSSRH_PASSWORD}"}, {"id": "github", "username": "x-access-token", "password": "${GITHUB_TOKEN}"}]'
properties: '[{"gpg.executable": "gpg"}, {"gpg.passphrase": "${GPG_PASSPHRASE}"}]'
sonatypeSnapshots: true

- name: checkout
uses: actions/checkout@v1

Expand All @@ -43,7 +42,7 @@ jobs:
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
run: mvn clean verify deploy
run: mvn clean verify deploy -Dgpg.executable=gpg -Dgpg.passphrase=${GPG_PASSPHRASE}

- name: sonar-analyse
run: |
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
/.project
/.settings/
/target/
/.idea
/*.iml
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<dependency>
<groupId>com.avides.springboot.springtainer</groupId>
<artifactId>springtainer-mysql</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
<scope>test</scope>
</dependency>
```
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>com.avides.springboot.springtainer</groupId>
<artifactId>springtainer-mysql</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>

<name>springtainer-mysql</name>
<description>MySQL test-container</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ private String generateSqlConnectionUrl(MysqlProperties properties)
private Connection createSqlConnection(MysqlProperties properties)
throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException
{
Class.forName("com.mysql.jdbc.Driver").newInstance();
String connectionCommand = generateSqlConnectionUrl(properties) + "?verifyServerCertificate=false&useSSL=false&user=root&password=" + properties
.getRootPassword();
return DriverManager.getConnection(connectionCommand);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import com.github.dockerjava.core.DockerClientBuilder;

@RunWith(SpringRunner.class)
@SpringBootTest(properties = { "spring.datasource.driver-class-name=com.mysql.jdbc.Driver", "spring.datasource.url=${embedded.container.mysql.url}", "spring.datasource.username=root", "spring.datasource.password=${embedded.container.mysql.root-password}" })
@SpringBootTest(properties = { "spring.datasource.url=${embedded.container.mysql.url}", "spring.datasource.username=root", "spring.datasource.password=${embedded.container.mysql.root-password}" })
public abstract class AbstractIT
{
protected DockerClient dockerClient = DockerClientBuilder.getInstance().build();
Expand Down

0 comments on commit 4a1d2c7

Please sign in to comment.