Skip to content

Commit 734d0e9

Browse files
committed
Add maven publish task
Signed-off-by: Paolo Di Tommaso <[email protected]>
1 parent e200055 commit 734d0e9

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,14 @@ The `CSVREAD` function provided by the H2 database engine allows you to query an
160160
Like all dataflow operators in Nextflow, the operators provided by this plugin are executed asynchronously.
161161

162162
In particular, data inserted using the `sqlInsert` operator is *not* guaranteed to be available to any subsequent queries using the `fromQuery` operator, as it is not possible to make a channel factory operation dependent on some upstream operation.
163+
164+
165+
## Developtment
166+
167+
#### Publish artifacts to Maven repo
168+
169+
Use the following command:
170+
171+
```
172+
./gradlew plugins:nf-sqldb:publishMavenPublicationToMavenRepository
173+
```

plugins/build.gradle

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ subprojects {
6060
apply plugin: 'java'
6161
apply plugin: 'groovy'
6262
apply plugin: 'io.nextflow.nf-build-plugin'
63+
apply plugin: 'maven-publish'
6364

6465
repositories {
6566
mavenLocal()
@@ -153,6 +154,33 @@ subprojects {
153154
}
154155

155156
task upload(dependsOn: [uploadPlugin] ) { }
157+
158+
/*
159+
* publish jars maven repo on S3
160+
*/
161+
ext.aws_access_key_id = project.findProperty('aws_access_key_id') ?: System.getenv('AWS_ACCESS_KEY_ID')
162+
ext.aws_secret_access_key = project.findProperty('aws_secret_access_key') ?: System.getenv('AWS_SECRET_ACCESS_KEY')
163+
ext.publishRepoUrl = project.findProperty('publish_repo_url') ?: System.getenv('PUBLISH_REPO_URL') ?: ( version.endsWith('-SNAPSHOT') ? "s3://maven.seqera.io/snapshots" : "s3://maven.seqera.io/releases" )
164+
165+
publishing {
166+
publications {
167+
maven(MavenPublication) {
168+
from components.java
169+
suppressPomMetadataWarningsFor('testFixturesApiElements')
170+
suppressPomMetadataWarningsFor('testFixturesRuntimeElements')
171+
}
172+
}
173+
repositories {
174+
maven {
175+
url = publishRepoUrl
176+
credentials(AwsCredentials) {
177+
// keys are defined in the `gradle.properties` file
178+
accessKey aws_access_key_id
179+
secretKey aws_secret_access_key
180+
}
181+
}
182+
}
183+
}
156184
}
157185

158186
/*

0 commit comments

Comments
 (0)