Skip to content

Commit

Permalink
Use maven-publish pluging - upgrade wrapper to 6.8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ar committed Jun 6, 2021
1 parent 6194971 commit 35b0254
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 100 deletions.
131 changes: 80 additions & 51 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ buildscript {
allprojects {
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'org.owasp.dependencycheck'

group = 'org.jpos.ee'
Expand All @@ -22,6 +21,7 @@ allprojects {

subprojects {
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'signing'
sourceCompatibility = 1.8
targetCompatibility = 1.8
Expand All @@ -34,64 +34,93 @@ subprojects {
project.archivesBaseName="jposee-${project.name}"
javadoc.failOnError = false

def pomConfig = {
name 'jPOS-EE Project'
description """
jPOS Extended Edition
"""
url 'http://jpos.org'
inceptionYear '1998'
organization {
name 'jPOS.org'
url 'http://jpos.org'
}
issueManagement {
system 'YouTrack'
url 'https://jpos.org/issues'
}
scm {
url "https://github.com/jpos/jPOS"
connection "scm:git:https://github.com/jpos/jPOS-EE.git"
developerConnection "scm:git:git@github.com:jpos/jPOS-EE.git"
}
licenses {
license {
name 'GNU AFFERO GENERAL PUBLIC LICENSE'
url 'http://www.gnu.org/licenses/agpl-v3.html'
comments 'See http://jpos.org/license for more details.'
distribution 'repo'
publishing {
publications {
mavenJava(MavenPublication) {
pom {
name = 'jPOS Project'
description = "jPOS Extended Edition"
url = "http://jpos.org"
organization {
name = 'jPOS.org'
url = 'http://jpos.org'
}
issueManagement {
system = 'Github Issues'
url = 'https://github.com/jpos/jPOS-EE/issues'
}
scm {
url = "http://github.com/jpos/jPOS-EE"
connection = "scm:git:https://github.com/jpos/jPOS-EE.git"
developerConnection = "scm:git:git@github.com:jpos/jPOS-EE.git"
}
licenses {
license {
name = 'GNU AFFERO GENERAL PUBLIC LICENSE'
url = 'http://www.gnu.org/licenses/agpl-v3.html'
comments = 'See http://jpos.org/license for more details.'
distribution = 'repo'
}
}
developers {
developer {
id = 'jpos-team'
name = 'jPOS Development Team'
email = 'info@jpos.org'
}
}
}
groupId = 'org.jpos.ee'
artifactId = 'jposee'
from components.java
/*
artifact (sourceJar) {
classifier = 'sources'
}
*/
artifactId="jposee-${project.name}"

/*
pom.withXml {
asNode().dependencies.'*'.findAll() {
it.scope.text() == 'compile' && project.configurations.compile.allDependencies.find { dep ->
dep.name == it.artifactId.text()
}
}.each() {
it.scope*.value = 'implementation'
}
asNode().dependencies.'*'.findAll() {
if (it.groupId.text() == 'org.jpos.ee') {
it.artifactId*.value = "jposee-${it.artifactId.text()}"
}
}
}
*/

}
}
developers {
developer {
id 'jpos-team'
name 'jPOS Development Team'
email 'info@jpos.org'
repositories {
maven {
def releasesRepoUrl = mavenCentralRepo
def snapshotsRepoUrl = 'file:///opt/local/maven'
url = isSnapshot ? snapshotsRepoUrl : releasesRepoUrl
if (!isSnapshot) {
credentials {
if (project.hasProperty("mavenCentralUsername"))
username = mavenCentralUsername
if (project.hasProperty("mavenCentralPassword"))
password = mavenCentralPassword
}
}
}
}
}

configure(install.repositories.mavenInstaller) {
pom.project pomConfig
}
signing {
required { !isSnapshot }
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
pom.project pomConfig
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: 'file:///opt/local/maven')
/*
repository(url: mavenCentralRepo) {
authentication(userName: mavenCentralUsername, password: mavenCentralPassword)
}
*/
}
}
sign publishing.publications.mavenJava
}


test {
useJUnitPlatform()
maxParallelForks = Runtime.runtime.availableProcessors()
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion jpos-app.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ task version (type: JavaExec, dependsOn: classes) {
description = "Shows jPOS Version"
main = 'org.jpos.q2.Q2'
args = ['--version']
classpath configurations.runtime
classpath configurations.runtimeClasspath
}

task dist(type: Tar) {
Expand Down
3 changes: 0 additions & 3 deletions modules/build.gradle

This file was deleted.

45 changes: 1 addition & 44 deletions modules/qi-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
vaadin {
version=vaadinVersion
manageDependencies = true
manageRepositories = false
}
vaadinAddon {
title='QI'
Expand All @@ -12,49 +13,6 @@ vaadinAddon {
vaadinCompile.gwtSdkFirstInClasspath=true
vaadinThemeCompile.themesDirectory = "${webAppDir}/../resources/VAADIN/themes"

apply plugin: 'maven-publish'

publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact (sourceJar) {
classifier = 'sources'
}
artifactId="jposee-${project.name}"
pom.withXml {
asNode().dependencies.'*'.findAll() {
it.scope.text() == 'runtime' && project.configurations.compile.allDependencies.find { dep ->
dep.name == it.artifactId.text()
}
}.each() {
it.scope*.value = 'compile'
}
asNode().dependencies.'*'.findAll() {
if (it.groupId.text() == 'org.jpos.ee') {
it.artifactId*.value = "jposee-${it.artifactId.text()}"
}
}
}
}
}
repositories {
maven {
url 'file:///opt/local/maven'
}
}
}

install {
doFirst {
Configuration archivesConfig = project.getConfigurations().getByName('archives')
archivesConfig.artifacts.removeAll {
it.extension.equals('war')
}
}
}
uploadArchives.enabled = false

dependencies {
api "com.vaadin:vaadin-server:${vaadinVersion}"
api "com.vaadin:vaadin-push:${vaadinVersion}"
Expand Down Expand Up @@ -88,6 +46,5 @@ jar {

jar.dependsOn("vaadinThemeCompile")
jar.dependsOn("vaadinCompile")
install.dependsOn("publishToMavenLocal")
uploadArchives.dependsOn("jar", "publishMavenJavaPublicationToMavenRepository")

0 comments on commit 35b0254

Please # to comment.