Skip to content

Commit

Permalink
Merge pull request #13 from blezek/update-nifi-version
Browse files Browse the repository at this point in the history
Update nifi version
  • Loading branch information
blezek authored Sep 3, 2021
2 parents 1a669c5 + a71282f commit 00f6deb
Show file tree
Hide file tree
Showing 18 changed files with 343 additions and 324 deletions.
177 changes: 86 additions & 91 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,116 +1,111 @@
buildscript {
repositories {
mavenCentral()
maven {url 'http://dl.bintray.com/sponiro/gradle-plugins'}
}
dependencies {
classpath group: 'de.fanero.gradle.plugin.nar', name: 'gradle-nar-plugin', version: '0.1'
}
}

plugins {
id "com.github.breadmoirai.github-release" version "2.0.1"
id "me.ragill.nar-plugin" version "1.0.2"
id "com.github.breadmoirai.github-release" version "2.2.12"
id 'java'
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'de.fanero.gradle.plugin.nar'
apply plugin: 'project-report'

ext {
nifiVersion = '1.7.1'
nifiVersion = '1.14.0'
}

group = 'com.blezek.nifi.dicom'
version = '1.4'
group 'com.blezek.nifi.dicom'
version '1.14'

sourceCompatibility = 1.8
targetCompatibility = 1.8

// Adds the NAR taget for NIFI
nar {
manifest {
attributes (
'Nar-Group': project.group,
'Nar-Id': project.name,
'Nar-Version': project.version
)
}
manifest {
attributes(
'Nar-Group': project.group,
'Nar-Id': project.name,
'Nar-Version': project.version
)
}
}

test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
reports {
html.enabled = true
}
useJUnitPlatform()
}

repositories {
mavenCentral()
// DCM4CHE has their own Maven...
maven { url "https://www.dcm4che.org/maven2/" }
maven { url "http://jcenter.bintray.com/" }
mavenCentral()
// DCM4CHE has their own Maven...
maven { url "https://www.dcm4che.org/maven2/" }
maven { url "https://jcenter.bintray.com/" }
}

dependencies {
testCompile('org.junit.jupiter:junit-jupiter-api:5.2.0')
testCompile('org.junit.vintage:junit-vintage-engine:5.2.0')
testCompile (
"org.apache.nifi:nifi-mock:" + project.nifiVersion,
'org.hamcrest:hamcrest-library:1.3',
)

compile group: 'javax.json', name: 'javax.json-api', version: '1.0'
compile group: 'com.google.guava', name: 'guava', version: '23.0'

// DCM4CHE
compile group: 'org.dcm4che', name: 'dcm4che-core', version: '3.3.8'
compile group: 'org.dcm4che', name: 'dcm4che-image', version: '3.3.8'
compile group: 'org.dcm4che', name: 'dcm4che-net', version: '3.3.8'
compile group: 'org.apache.nifi', name: 'nifi-api', version: project.nifiVersion
compile group: 'org.apache.nifi', name: 'nifi-utils', version: project.nifiVersion

// These are extra PixelMed libraries that hopefully could be removed
// https://mvnrepository.com/artifact/javax.vecmath/vecmath
compile group: 'javax.vecmath', name: 'vecmath', version: '1.5.2'
// https://mvnrepository.com/artifact/org.hsqldb/hsqldb
compile group: 'org.hsqldb', name: 'hsqldb', version: '2.4.0'
// https://mvnrepository.com/artifact/commons-net/commons-net
compile group: 'commons-net', name: 'commons-net', version: '3.6'
// https://mvnrepository.com/artifact/javax.jmdns/jmdns
compile group: 'javax.jmdns', name: 'jmdns', version: '3.4.1'

// Database and misc
compile 'org.apache.derby:derby:10.14.1.0'
compile group: 'org.apache.derby', name: 'derbynet', version: '10.14.1.0'
compile 'org.jdbi:jdbi3-core:3.1.0'
compile "com.h2database:h2:1.3.170"
compile "com.google.guava:guava:23.0"
compile "org.flywaydb:flyway-core:5.0.7"
compile 'com.google.code.gson:gson:2.8.2'

// Encryption
compile 'org.bouncycastle:bcprov-jdk15on:1.52'
compile 'org.bouncycastle:bcpkix-jdk15on:1.52'
// CSV
compile "com.opencsv:opencsv:4.0"

// See https://stackoverflow.com/a/43574427/334619
// Need to add back in activation framework that is deprecated from
// JDK 9 and removed in 11
compile "javax.xml.bind:jaxb-api:2.2.11"
compile "com.sun.xml.bind:jaxb-core:2.2.11"
compile "com.sun.xml.bind:jaxb-impl:2.2.11"
compile "javax.activation:activation:1.1.1"
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
testImplementation(
"org.apache.nifi:nifi-mock:" + project.nifiVersion,
'org.hamcrest:hamcrest-library:1.3',
)

implementation group: 'javax.json', name: 'javax.json-api', version: '1.0'
implementation group: 'com.google.guava', name: 'guava', version: '23.0'

// DCM4CHE
implementation group: 'org.dcm4che', name: 'dcm4che-core', version: '3.3.8'
implementation group: 'org.dcm4che', name: 'dcm4che-image', version: '3.3.8'
implementation group: 'org.dcm4che', name: 'dcm4che-net', version: '3.3.8'
implementation group: 'org.apache.nifi', name: 'nifi-api', version: project.nifiVersion
implementation group: 'org.apache.nifi', name: 'nifi-utils', version: project.nifiVersion

// These are extra PixelMed libraries that hopefully could be removed
// https://mvnrepository.com/artifact/javax.vecmath/vecmath
implementation group: 'javax.vecmath', name: 'vecmath', version: '1.5.2'
// https://mvnrepository.com/artifact/org.hsqldb/hsqldb
implementation group: 'org.hsqldb', name: 'hsqldb', version: '2.4.0'
// https://mvnrepository.com/artifact/commons-net/commons-net
implementation group: 'commons-net', name: 'commons-net', version: '3.6'
// https://mvnrepository.com/artifact/javax.jmdns/jmdns
implementation group: 'javax.jmdns', name: 'jmdns', version: '3.4.1'

// Database and misc
implementation 'org.apache.derby:derby:10.14.1.0'
implementation group: 'org.apache.derby', name: 'derbynet', version: '10.14.1.0'
implementation 'org.jdbi:jdbi3-core:3.1.0'
implementation "com.h2database:h2:1.3.170"
implementation "com.google.guava:guava:23.0"
implementation "org.flywaydb:flyway-core:5.0.7"
implementation 'com.google.code.gson:gson:2.8.2'

// Encryption
implementation 'org.bouncycastle:bcprov-jdk15on:1.52'
implementation 'org.bouncycastle:bcpkix-jdk15on:1.52'

// CSV
implementation "com.opencsv:opencsv:4.0"

// See https://stackoverflow.com/a/43574427/334619
// Need to add back in activation framework that is deprecated from
// JDK 9 and removed in 11
implementation "javax.xml.bind:jaxb-api:2.2.11"
implementation "com.sun.xml.bind:jaxb-core:2.2.11"
implementation "com.sun.xml.bind:jaxb-impl:2.2.11"
implementation "javax.activation:activation:1.1.1"
}
FilenameFilter filter = { dir, filename -> filename.contains(".nar") && filename.contains(project.version)}
FilenameFilter filter = { dir, filename -> filename.contains(".nar") && filename.contains(project.version) }

githubRelease {
token System.getenv( 'GITHUB_TOKEN' )
owner "blezek"
repo "nifi-dicom"
releaseAssets = jar.destinationDir.listFiles filter
token System.getenv('GITHUB_TOKEN') ?: "0"
owner "blezek"
repo "nifi-dicom"
releaseAssets = jar.destinationDir.listFiles filter
dryRun Project.hasProperty("DRYRUN") ?: true

body = {
"""\
# Info
This release updates to NiFi version 1.14 and Gradle 7.3 without introducing any other changes.
## ChangeLog
* ${changelog().call().replace('\n', '\n* ')}
"""
}
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
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-4.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public void onTrigger(ProcessContext context, ProcessSession session) throws Pro
}
}

session.commit();
session.commitAsync();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/blezek/nifi/dicom/DeidentifyDICOM.java
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public void onTrigger(ProcessContext context, ProcessSession session) throws Pro
session.transfer(flowFile, RELATIONSHIP_REJECT);
getLogger().error("Flowfile is not a DICOM file, could not read attributes", e);
}
session.commit();
session.commitAsync();
}

void deidentifyUsingPixelMed(DeidentificationService controller, ProcessContext context, ProcessSession session,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public void onTrigger(ProcessContext context, ProcessSession session) throws Pro
getLogger().error("Flowfile is not a DICOM file, could not read attributes", e);
}
}
session.commit();
session.commitAsync();
}

void deifentifyAndEncrypt(ProcessContext context, ProcessSession session, FlowFile flowfile) throws Exception {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/blezek/nifi/dicom/ExtractDICOMTags.java
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ public void onTrigger(ProcessContext context, ProcessSession session) throws Pro
session.transfer(flowFile, RELATIONSHIP_SUCCESS);
}
}
session.commit();
session.commitAsync();
}

}
2 changes: 1 addition & 1 deletion src/main/java/com/blezek/nifi/dicom/ListenDICOM.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ protected void store(Association as, PresentationContext pc, Attributes rq, PDVI
processSession.getProvenanceReporter().receive(flowFile, transitUri, details,
watch.getDuration(TimeUnit.MILLISECONDS));
processSession.transfer(flowFile, ListenDICOM.RELATIONSHIP_SUCCESS);
processSession.commit();
processSession.commitAsync();
} catch (FlowFileAccessException | IllegalStateException ex) {
getLogger().error("Unable to fully process input due to " + ex.getMessage(), ex);
throw ex;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/blezek/nifi/dicom/ModifyDICOMTags.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public void onTrigger(ProcessContext context, ProcessSession session) throws Pro
session.remove(flowfile);
}
}
session.commit();
session.commitAsync();
}

}
4 changes: 2 additions & 2 deletions src/main/java/com/blezek/nifi/dicom/PutDICOM.java
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ private void send(ProcessContext context, ProcessSession session, List<FlowFile>
getLogger().error("error connecting to " + remote.getDevice(), e);
session.transfer(validDICOMFlowFiles, RELATIONSHIP_FAILURE);
// I don't believe this is needed?
// session.commit();
// session.commitAsync();
return;
}

Expand Down Expand Up @@ -259,7 +259,7 @@ private void send(ProcessContext context, ProcessSession session, List<FlowFile>
scheduledExecutorService.shutdown();
}
// I don't believe this is needed because we are doing only one file at a time.
// session.commit();
// session.commitAsync();
}

}
Loading

0 comments on commit 00f6deb

Please sign in to comment.