This repository contains the source code for all samples of the Mastering Maven blog series.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
implementation 'com.oracle.database.jdbc:ojdbc8:19.6.0.0' | |
implementation 'com.oracle.database.jdbc:ucp:19.6.0.0' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins { | |
id 'java-library' | |
id 'org.kordamp.gradle.java-project' version '0.35.0' | |
id 'org.kordamp.gradle.bintray' version '0.35.0' | |
} | |
if (!project.hasProperty('bintrayUsername')) ext.bintrayUsername = '**undefined**' | |
if (!project.hasProperty('bintrayApiKey')) ext.bintrayApiKey = '**undefined**' | |
if (!project.hasProperty('sonatypeUsername')) ext.sonatypeUsername = '**undefined**' | |
if (!project.hasProperty('sonatypePassword')) ext.sonatypePassword = '**undefined**' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.acme</groupId> | |
<artifactId>sample05</artifactId> | |
<version>0.0.0-SNAPSHOT</version> | |
<dependencies> | |
<dependency> | |
<groupId>org.slf4j</groupId> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
gpg --quiet --batch --yes --decrypt --passphrase="$DECRYPT_PASSPHRASE" \ | |
--output $HOME/.github-secrets.tar .github-secrets.tar.gpg | |
tar xvf $HOME/.github-secrets.tar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.acme</groupId> | |
<artifactId>sample04</artifactId> | |
<version>0.0.0-SNAPSHOT</version> | |
<dependencies> | |
<dependency> | |
<groupId>org.apache.commons</groupId> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.acme; | |
import static org.apache.commons.lang3.StringUtils.capitalize; | |
public class Sample { | |
public String greeting() { | |
return capitalize("hello world"); | |
} | |
public static void main(String[] args) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins { | |
id 'java-library' | |
id 'application' | |
id 'maven-publish' | |
id 'com.github.johnrengelman.shadow' | |
} | |
group = 'com.acme' | |
version = '0.0.0-SNAPSHOT' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
jcenter() | |
gradlePluginPortal() | |
} | |
dependencies { | |
classpath 'org.kordamp.gradle:oci-gradle-build-cache-plugin:0.3.0' | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* SPDX-License-Identifier: Apache-2.0 | |
* | |
* Copyright 2019 Andres Almiray. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |