Skip to content

Commit 993e757

Browse files
authored
Merge pull request #2 from scheey/fix/main_class_as_property
fix: Beispiel 2 funktioniert nicht
2 parents 3af204d + 6a991d5 commit 993e757

6 files changed

Lines changed: 14 additions & 9 deletions

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ For tests you can run
2727

2828
For example you can run
2929

30-
```de.ukt.mvh.CLIConsentMapperOlderMinors_1_7_2 --date_of_birth=12.2010 --date_of_consent=04.07.2025 -o outfileOlderMinors.json --consent_pat_data_1=true --consent_insurance_data_2=true --consent_contact_5=false```
31-
30+
```./gradlew run -PmainClass=de.ukt.mvh.CLIConsentMapperOlderMinors_1_7_2 --args="--date_of_birth=12.2010 --date_of_consent=04.07.2025 -o outfileOlderMinors.json --consent_pat_data_1=true --consent_insurance_data_2=true --consent_contact_5=false"```
3231

3332

3433

build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,10 @@ dependencies {
3131

3232
test {
3333
useJUnitPlatform()
34+
}
35+
36+
run {
37+
if (project.hasProperty('mainClass')) {
38+
mainClass = project.property('mainClass')
39+
}
3440
}

src/main/java/de/ukt/mvh/CLIConsentMapperOlderMinors_1_7_2.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ public class CLIConsentMapperOlderMinors_1_7_2 {
1515
public static void main(String[] args) throws IOException, java.text.ParseException {
1616
Options options = new Options();
1717

18-
Option dateConsent = new Option("d", "date_of_consent", true,
18+
Option dateConsent = new Option("c", "date_of_consent", true,
1919
"date consent was signed format must be DD.MM.YYYY");
2020
dateConsent.setRequired(true);
2121
options.addOption(dateConsent);
2222

23-
Option dateBirth = new Option("d", "date_of_birth", true,
23+
Option dateBirth = new Option("b", "date_of_birth", true,
2424
"date minor was born format must be MM.YYYY - day is skipped for anonymization");
2525
dateBirth.setRequired(true);
2626
options.addOption(dateBirth);

src/main/java/de/ukt/mvh/CLIConsentMapperYoungMinors_1_7_2.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ public class CLIConsentMapperYoungMinors_1_7_2 {
1616
public static void main(String[] args) throws IOException, java.text.ParseException {
1717
Options options = new Options();
1818

19-
Option dateConsent = new Option("d", "date_of_consent", true,
19+
Option dateConsent = new Option("c", "date_of_consent", true,
2020
"date consent was signed format must be DD.MM.YYYY");
2121
dateConsent.setRequired(true);
2222
options.addOption(dateConsent);
2323

24-
Option dateBirth = new Option("d", "date_of_birth", true,
24+
Option dateBirth = new Option("b", "date_of_birth", true,
2525
"date minor was born format must be MM.YYYY - day is skipped for anonymization");
2626
dateBirth.setRequired(true);
2727
options.addOption(dateBirth);

src/main/java/de/ukt/mvh/CLIConsentMapper_1_7_2.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ public class CLIConsentMapper_1_7_2 {
1717
public static void main(String[] args) throws IOException, java.text.ParseException {
1818
Options options = new Options();
1919

20-
Option dateConsent = new Option("d", "date_of_consent", true,
20+
Option dateConsent = new Option("c", "date_of_consent", true,
2121
"date consent was signed format must be DD.MM.YYYY");
2222
dateConsent.setRequired(true);
2323
options.addOption(dateConsent);
2424

25-
Option dateBirth = new Option("d", "date_of_birth", true,
25+
Option dateBirth = new Option("b", "date_of_birth", true,
2626
"date minor was born format must be MM.YYYY - day is skipped for anonymization");
2727
dateBirth.setRequired(true);
2828
options.addOption(dateBirth);

src/main/java/de/ukt/mvh/ConsentMapperParents_1_7_2_from_REDCap.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ protected static Consent makeConsent(String redcapFormular, Date birthday) throw
5151
public static void main(String[] args) throws IOException, java.text.ParseException {
5252
Options options = new Options();
5353

54-
Option dateBirth = new Option("d", "date_of_birth", true,
54+
Option dateBirth = new Option("b", "date_of_birth", true,
5555
"date minor was born format must be MM.YYYY - day is skipped for anonymization");
5656
dateBirth.setRequired(true);
5757
options.addOption(dateBirth);

0 commit comments

Comments
 (0)