Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REL: v0.16.0 #209

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ODF Validator

Latest version is 0.15.0-SNAPSHOT.
Latest version is 0.16.0.

## About

Expand Down
2 changes: 1 addition & 1 deletion docs/developer/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ To include the core validation library in your project, add the following depend
<dependency>
<groupId>org.openpreservation.odf</groupId>
<artifactId>odf-core</artifactId>
<version>0.15.0-SNAPSHOT</version>
<version>0.16.0</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion odf-apps/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.openpreservation.odf</groupId>
<artifactId>odf-validator</artifactId>
<version>0.15.0-SNAPSHOT</version>
<version>0.16.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,14 @@ private static Integer results(final Path path, final ValidationReport report) {
ConsoleFormatter.info(FACTORY.getInfo("APP-3").getMessage());
}
results(report.documentMessages.getMessages());
outputSummary(report.documentMessages);
outputSummary(isEncrypted(report), report.documentMessages);
return status;
}

private static boolean isEncrypted(final ValidationReport report) {
return report.document.isPackage() && report.document.getPackage().isEncrypted();
}

private static Integer results(final Map<String, List<Message>> messageMap) {
Integer status = 0;
for (Map.Entry<String, List<Message>> entry : messageMap.entrySet()) {
Expand All @@ -150,7 +154,7 @@ private static Integer results(final Path path, final ProfileResult report) {
? report.getValidationReport().documentMessages
: Messages.messageLogInstance();
profileMessages.add(report.getMessageLog().getMessages());
outputSummary(profileMessages);
outputSummary(isEncrypted(report.getValidationReport()), profileMessages);
return status;
}

Expand All @@ -165,8 +169,12 @@ private static Integer results(final String path, final List<Message> messages)
return status;
}

private static void outputSummary(final MessageLog messageLog) {
if (messageLog.hasErrors()) {
private static void outputSummary(final boolean isEncrypted, final MessageLog messageLog) {
if (isEncrypted) {
ConsoleFormatter.error(String.format(
"INCOMPLETE encrypted entries are not supported, %d errors, %d warnings and %d info messages.",
messageLog.getErrorCount(), messageLog.getWarningCount(), messageLog.getInfoCount()));
} else if (messageLog.hasErrors()) {
ConsoleFormatter.error(String.format("NOT VALID, %d errors, %d warnings and %d info messages.",
messageLog.getErrorCount(), messageLog.getWarningCount(), messageLog.getInfoCount()));
} else if (messageLog.hasWarnings()) {
Expand Down
2 changes: 1 addition & 1 deletion odf-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.openpreservation.odf</groupId>
<artifactId>odf-validator</artifactId>
<version>0.15.0-SNAPSHOT</version>
<version>0.16.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion odf-reporting/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.openpreservation.odf</groupId>
<artifactId>odf-validator</artifactId>
<version>0.15.0-SNAPSHOT</version>
<version>0.16.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion odf-validator
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,5 @@ fi

exec "$JAVACMD" -Dfile.encoding=UTF8 -XX:+IgnoreUnrecognizedVMOptions \
-Dapp.name="ODF Validator" \
-jar odf-apps/target/odf-apps-0.15.0-SNAPSHOT-jar-with-dependencies.jar \
-jar odf-apps/target/odf-apps-0.16.0-jar-with-dependencies.jar \
"$@"
2 changes: 1 addition & 1 deletion odf-validator.bat
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ if NOT "%CLASSPATH_PREFIX%" == "" set CLASSPATH=%CLASSPATH_PREFIX%;%CLASSPATH%
@REM Reaching here means variables are defined and arguments have been captured
:endInit

"%JAVACMD%" -Dfile.encoding=UTF8 -XX:+IgnoreUnrecognizedVMOptions -Dapp.name="ODF Validator" -jar .\odf-apps\target\odf-apps-0.15.0-SNAPSHOT-jar-with-dependencies.jar %CMD_LINE_ARGS%
"%JAVACMD%" -Dfile.encoding=UTF8 -XX:+IgnoreUnrecognizedVMOptions -Dapp.name="ODF Validator" -jar .\odf-apps\target\odf-apps-0.16.0-jar-with-dependencies.jar %CMD_LINE_ARGS%
if %ERRORLEVEL% NEQ 0 goto error
goto end

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<groupId>org.openpreservation.odf</groupId>
<artifactId>odf-validator</artifactId>
<version>0.15.0-SNAPSHOT</version>
<version>0.16.0</version>
<packaging>pom</packaging>

<modules>
Expand Down
Loading