Skip to content

Commit

Permalink
SCADA-LTS#23 Using jOpenDocument library - using: jOpenDocument, jdbc…
Browse files Browse the repository at this point in the history
…template, log4j2; added daily report; corrected yearly, monthly report; added test: BeforeDateTest; removal of LibreOffice components requirement; corrected before mode; refactoring
  • Loading branch information
Limraj committed Mar 8, 2023
1 parent f62a8d9 commit 9bfd63a
Show file tree
Hide file tree
Showing 47 changed files with 1,031 additions and 684 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
Expand Down
49 changes: 27 additions & 22 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,45 +11,50 @@ repositories {
mavenCentral()
}

dependencies {
configurations {
implementation {
canBeResolved = true
}
}

dependencies {

compile files ('/usr/share/java/juh.jar',
'/usr/share/java/jurt.jar',
'/usr/share/java/ridl.jar',
'/usr/share/java/unoil.jar',
'/usr/share/java/unoloader.jar')
implementation fileTree(include: ['*.jar'], dir: 'lib')
runtimeOnly fileTree(include: ['*.jar'], dir: 'lib')

runtime files ('/usr/share/java/juh.jar',
'/usr/share/java/jurt.jar',
'/usr/share/java/ridl.jar',
'/usr/share/java/unoil.jar',
'/usr/share/java/unoloader.jar')
implementation group: 'org.postgresql', name: 'postgresql', version: '42.2.23'
runtimeOnly group: 'org.postgresql', name: 'postgresql', version: '42.2.23'

compile group: 'org.postgresql', name: 'postgresql', version: '42.2.5'
runtime group: 'org.postgresql', name: 'postgresql', version: '42.2.5'
testImplementation group: 'junit', name: 'junit', version: '4.12'


testCompile group: 'junit', name: 'junit', version: '4.12'
compile group: 'junit', name: 'junit', version: '4.12'
}

jar {
manifest {
attributes(
"Class-Path": configurations.compile.collect { it.getName() }.join(' '),
attributes 'Implementation-Title': 'Gradle Jar File Example',
'Implementation-Version': version,
"Class-Path": configurations.implementation.collect { 'lib' + File.separatorChar + it.getName() }.join(' '),
'Main-Class': 'org.scada_lts.report_to_libreoffice.App'
)
}
}

task fatJar(type: Jar) {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest {
attributes 'Implementation-Title': 'Gradle Jar File Example',
'Implementation-Version': version,
'Main-Class': 'org.scada_lts.report_to_libreoffice.App'
}
baseName = project.name + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
baseName = project.name + '-standalone'
from {
configurations.implementation.collect { it.isDirectory() ? it : zipTree(it) }
}
exclude "**/Log4j2Plugins.dat"
with jar
}

test {
filter {
includeTestsMatching "org.scada_lts.utils.BeforeDateTest"
}
}
30 changes: 18 additions & 12 deletions config/example.conf.properties
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
# :)
dbHost=localhost
dbPort=5432
db=test
dbuser=postgres
dbpasswd=""
report.db.user=postgresql
report.db.password=""
report.db.url=jdbc:postgresql://localhost:5432/test
report.db.driver=org.postgresql.Driver
# '', 'current', '18', '17
year=current
report.year=2023
# 'current', 'before', '01', '02'
month=current
localizations=l1,l2,l3,l4,l5
template_source=/opt/PRJ/report-to-libreoffice/template/Usagers_2018_Frequentation.ods
template_out=/opt/PRJ/report-to-libreoffice/template_out/
formatDateForParseInMonthlyReport=yy.MM
formatDateForParseInDayReport=yy.MM.dd
report.month=01
report.day=01
report.before=true
report.localizations=l1,l2,l3,l4,l5
report.template_source_monthly=/opt/PRJ/report-to-libreoffice/template/Usagers_2023_Frequentation_monthly.ods
report.template_source_yearly=/opt/PRJ/report-to-libreoffice/template/Usagers_2023_Frequentation_yearly.ods
report.template_source_daily=/opt/PRJ/report-to-libreoffice/template/Usagers_2023_Frequentation_daily.ods
report.out=/opt/PRJ/report-to-libreoffice/report_out/
report.formatDateForParseInMonthlyReport=yy.MM
report.formatDateForParseInDayReport=dd.MM.yy
report.formatDateForParseInHourReport=yy.MM.dd
# yearly, monthly, daily
report.type=monthly
Binary file added lib/commons-logging-1.2.jar
Binary file not shown.
Binary file added lib/commons-logging.jar
Binary file not shown.
Binary file added lib/jOpenDocument-1.5.jar
Binary file not shown.
Binary file added lib/log4j-1.2-api-2.20.0.jar
Binary file not shown.
Binary file added lib/log4j-api-2.20.0.jar
Binary file not shown.
Binary file added lib/log4j-core-2.20.0.jar
Binary file not shown.
Binary file added lib/postgresql-42.2.23.jar
Binary file not shown.
Binary file added lib/spring-beans-4.3.16.RELEASE.jar
Binary file not shown.
Binary file added lib/spring-core-4.3.16.RELEASE.jar
Binary file not shown.
Binary file added lib/spring-jdbc-4.3.16.RELEASE.jar
Binary file not shown.
Binary file added lib/spring-tx-4.3.16.RELEASE.jar
Binary file not shown.
4 changes: 0 additions & 4 deletions src/main/java/META-INF/MANIFEST.MF

This file was deleted.

32 changes: 0 additions & 32 deletions src/main/java/org/scada_lts/config/CheckTypeReport.java

This file was deleted.

Loading

0 comments on commit 9bfd63a

Please sign in to comment.