Compare commits
4 commits
791db7f890
...
f8cceedc35
Author | SHA1 | Date | |
---|---|---|---|
f8cceedc35 | |||
77b9ea0f61 | |||
4fa6ec6306 | |||
592a269ec8 |
8 changed files with 19 additions and 15 deletions
2
.github/workflows/bld.yml
vendored
2
.github/workflows/bld.yml
vendored
|
@ -8,7 +8,7 @@ jobs:
|
|||
|
||||
strategy:
|
||||
matrix:
|
||||
java-version: [17, 21, 22]
|
||||
java-version: [17, 21, 23]
|
||||
|
||||
steps:
|
||||
- name: Checkout source repository
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
<!-- BEST PRACTICES -->
|
||||
<rule ref="category/java/bestpractices.xml">
|
||||
<exclude name="AvoidPrintStackTrace"/>
|
||||
<exclude name="JUnit4TestShouldUseTestAnnotation"/>
|
||||
<exclude name="JUnitTestContainsTooManyAsserts"/>
|
||||
<exclude name="GuardLogStatement"/>
|
||||
<exclude name="UnitTestContainsTooManyAsserts"/>
|
||||
<exclude name="UnitTestShouldUseTestAnnotation"/>
|
||||
</rule>
|
||||
|
||||
<rule ref="category/java/bestpractices.xml/MissingOverride">
|
||||
|
|
|
@ -42,8 +42,8 @@ public class PropertyFileExampleBuild extends Project {
|
|||
repositories = List.of(MAVEN_CENTRAL, RIFE2_RELEASES);
|
||||
|
||||
scope(test)
|
||||
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 0)))
|
||||
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 0)));
|
||||
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 3)))
|
||||
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 3)));
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
bld.downloadExtensionJavadoc=false
|
||||
bld.downloadExtensionSources=true
|
||||
bld.downloadLocation=
|
||||
bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.1.5
|
||||
bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.1.7
|
||||
bld.repositories=MAVEN_CENTRAL,MAVEN_LOCAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
||||
bld.version=2.1.0
|
||||
|
|
|
@ -45,8 +45,8 @@ public class PropertyFileBuild extends Project {
|
|||
.include(dependency("com.uwyn.rife2", "bld", version(2, 1, 0)));
|
||||
scope(test)
|
||||
.include(dependency("org.jsoup", "jsoup", version(1, 18, 1)))
|
||||
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 0)))
|
||||
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 0)))
|
||||
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 3)))
|
||||
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 3)))
|
||||
.include(dependency("org.assertj:assertj-joda-time:2.2.0"));
|
||||
|
||||
javadocOperation()
|
||||
|
@ -58,6 +58,7 @@ public class PropertyFileBuild extends Project {
|
|||
|
||||
publishOperation()
|
||||
.repository(version.isSnapshot() ? repository("rife2-snapshot") : repository("rife2"))
|
||||
.repository(repository("github"))
|
||||
.info()
|
||||
.groupId("com.uwyn.rife2")
|
||||
.artifactId("bld-property-file")
|
||||
|
|
|
@ -35,7 +35,7 @@ import java.util.logging.Logger;
|
|||
* @since 1.0
|
||||
*/
|
||||
public class PropertyFileOperation extends AbstractOperation<PropertyFileOperation> {
|
||||
private final static Logger LOGGER = Logger.getLogger(PropertyFileOperation.class.getName());
|
||||
private static final Logger LOGGER = Logger.getLogger(PropertyFileOperation.class.getName());
|
||||
private final List<EntryBase<?>> entries_ = new ArrayList<>();
|
||||
private String comment_ = "";
|
||||
private boolean failOnWarning_;
|
||||
|
|
|
@ -39,7 +39,7 @@ import java.util.logging.Logger;
|
|||
* @since 1.0
|
||||
*/
|
||||
public final class PropertyFileUtils {
|
||||
private final static Logger LOGGER = Logger.getLogger(PropertyFileUtils.class.getName());
|
||||
private static final Logger LOGGER = Logger.getLogger(PropertyFileUtils.class.getName());
|
||||
|
||||
private PropertyFileUtils() {
|
||||
// no-op
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
package rife.bld.extension.propertyfile;
|
||||
|
||||
import org.assertj.core.api.AutoCloseableSoftAssertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import rife.bld.Project;
|
||||
import rife.bld.operations.exceptions.ExitStatusException;
|
||||
|
@ -51,11 +52,13 @@ class PropertyFileOperationTest {
|
|||
var p = new Properties();
|
||||
p.load(Files.newInputStream(tmpFile.toPath()));
|
||||
|
||||
assertThat(p.getProperty("version.major")).as("major").isEqualTo("1");
|
||||
assertThat(p.getProperty("version.minor")).as("minor").isEqualTo("0");
|
||||
assertThat(p.getProperty("version.patch")).as("patch").isEqualTo("0");
|
||||
assertThat(p.getProperty("build.date")).as("date")
|
||||
try (var softly = new AutoCloseableSoftAssertions()) {
|
||||
softly.assertThat(p.getProperty("version.major")).as("major").isEqualTo("1");
|
||||
softly.assertThat(p.getProperty("version.minor")).as("minor").isEqualTo("0");
|
||||
softly.assertThat(p.getProperty("version.patch")).as("patch").isEqualTo("0");
|
||||
softly.assertThat(p.getProperty("build.date")).as("date")
|
||||
.isEqualTo(LocalDate.now().format(DateTimeFormatter.ISO_LOCAL_DATE));
|
||||
}
|
||||
|
||||
new PropertyFileOperation()
|
||||
.fromProject(new Project())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue