From 36decd78b113052c0bea9752f9077efd143704a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eivind=20Bergst=C3=B8l?= Date: Thu, 29 Oct 2020 13:12:13 +0100 Subject: [PATCH] Kaster ut rultor. Tar inn Github actions. Jeg bytter parent pom til en mye enklere. #pragmatisk --- .github/workflows/maven.yml | 5 +- .github/workflows/release.yml | 30 +++ .rultor.yml | 13 -- .scrt/pubring.pgp.asc | 41 ---- .scrt/secring.pgp.asc | 71 ------ .scrt/settings.xml.asc | 21 -- mvn/maven.config | 1 - pom.xml | 221 ++++++++++++------ .../bekk/bekkopen/date/NorwegianDateUtil.java | 14 +- .../person/FodselsnummerCalculator.java | 19 +- 10 files changed, 208 insertions(+), 228 deletions(-) create mode 100644 .github/workflows/release.yml delete mode 100644 .rultor.yml delete mode 100644 .scrt/pubring.pgp.asc delete mode 100644 .scrt/secring.pgp.asc delete mode 100644 .scrt/settings.xml.asc delete mode 100644 mvn/maven.config diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index a6e6153..6de075c 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,6 +1,9 @@ name: Java CI -on: [push] +on: + push: + branches: + - '**' jobs: build: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..cbb8302 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Release +on: + push: + tags: + - '*' + +jobs: + release: + runs-on: ubuntu-18.04 + steps: + - name: Check out Git repository + uses: actions/checkout@v2 + + - name: Install Java and Maven + uses: actions/setup-java@v1 + with: + java-version: 1.8 + + - name: Set release version + run: mvn versions:set --no-transfer-progress -DnewVersion=$(echo ${GITHUB_REF:10}) + + - name: Release to Sonatype + uses: samuelmeuli/action-maven-publish@v1.4.0 + with: + gpg_private_key: ${{ secrets.gpg_private_key }} + gpg_passphrase: ${{ secrets.gpg_passphrase }} + nexus_username: ${{ secrets.nexus_username }} + nexus_password: ${{ secrets.nexus_password }} + maven_args: ' --no-transfer-progress ' + maven_profiles: 'deploy,gpg' diff --git a/.rultor.yml b/.rultor.yml deleted file mode 100644 index a7269e8..0000000 --- a/.rultor.yml +++ /dev/null @@ -1,13 +0,0 @@ -architect: -- eivinhb -decrypt: - settings.xml: "repo/.scrt/settings.xml.asc" - pubring.gpg: "repo/.scrt/pubring.pgp.asc" - secring.gpg: "repo/.scrt/secring.pgp.asc" -release: - script: | - mvn versions:set "-DnewVersion=${tag}" - git commit -am "${tag}" - mvn clean deploy -P 'jcabi-gpg,sonatype,!xdoc' -Dmaven.javadoc.skip=true --settings /home/r/settings.xml -B - commanders: - - eivinhb diff --git a/.scrt/pubring.pgp.asc b/.scrt/pubring.pgp.asc deleted file mode 100644 index b001f5d..0000000 --- a/.scrt/pubring.pgp.asc +++ /dev/null @@ -1,41 +0,0 @@ ------BEGIN PGP MESSAGE----- - -hQEMA5qETcGag5w6AQgAvWg/TndgxzslY3KLV/P62jtzEqdovts1vCeAnUBoZlas -D8KKo/M6PA4lw+Lb+3S1NHfEM6+HLv9o9WOatbid7PsWzHVnXKriCz5i6Mj7OVDD -8n4BE2Cug5Gp5C1/oTvtZC//3PTURNZkdZejrx7Jk2wTaMVqd5Vw2HZm8dot2G/D -R+e+f4kpd6lEI3uk2I63wHeK9VZwv7l3HbeVZdeOmV44uYJVq3DDdqXUOfDqP4Yq -uqH04xSDgdUpuYmnrdxOuAiFqjv8Lo3x5xMNLFTOw2p2juTumw/dydPv1qVClMn5 -P8qPHz76qbaPrZfAyQjG5cTA6M3xCEoKo7jfV1Fp79LqATQG8qihyIGS/D82ho75 -5c08N2wl8po/UrjiJ7R7SiLUazbzpeTU/UiLbWdnYlP3Mjiu/vEWSkZajiPlTJj5 -8EoAojRJ4IDTQk6j77PtzEAkuSBD83AZR4epnFoJ5wu0rO/vMn1+I8YCYuaaHLo3 -bLYHP6VI6g3zBlI2Qn9A/EWpvEyE4ybAeAC0Z11yWuJ2gyS/FLZyVSYnljpZWIAY -HAzRaG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6QieL4yOBsfLqrT1is3tBJOo8XmXO -J6AIsRrICRoQ0gGtUXQH65sfObJJ0EeA2XQLbAbgqb8e01HTgjgUU9N9aQdVAZxb -mcEVh8cAw7pvNsGA6LwUGrJcQLOkj5o5CAGTBFN9viBLiAfGtgF6SBoSj6G839Da -OPo4hJWsO+sb0eUqEKYSef9IoD38uY+1b/aDyshTJWIUERaGLXkzxAQeMb/vqC/D -TAYxA5gx2+65YZpyhrp92n/zmAe+BvIN6UL461vnTIsLTMW0TeJOtbuTN8wEoyfU -2yjgCgu6srgSrKmyVFMu23cdpGG88elyTIsfPnytcIoPAD6mtvSM69iNitFgbRZC -7f1IA5uX+RXPG4ESR0+cEv4ih+4B1xsXa1OHxHlqeQ7Dhdcd3KoNEwMaJ8JigMu1 -UymQQQ45pqP/ESqE8lnbHN5bWQKC5ZoP7MHWHV3B73HCLlgMc9Xj/gE6wYP+0tBv -KOFwk9qne3t+7VzGPxgSHYBEUF0TAVWqtHki/gzvPZKjsLFEK0PorzJEIIjqYJbu -JKGFIPhCTGdmSfJHRIePVqV+tlfBBqb+tohZD8tf+NXaAlwuK2BpcclXnPd0ch1X -CR/4FxQ0xnIW7YbXfau7FLAzEzaLc+ZjLNPLKPTuUilqlz4WhiKWM5i6q/6LqJyR -s9jUclVUfA7HuUWW+Gz3ftu6ZlROraocsXUhcMzZFzE913NFWOoyxQ== -=nCZn ------END PGP MESSAGE----- diff --git a/.scrt/secring.pgp.asc b/.scrt/secring.pgp.asc deleted file mode 100644 index f41bee7..0000000 --- a/.scrt/secring.pgp.asc +++ /dev/null @@ -1,71 +0,0 @@ ------BEGIN PGP MESSAGE----- - -hQEMA5qETcGag5w6AQf9F4DP+4Sx1TvqaKf3x54cXkaOf9GQh/W+TvM170ypJXz3 -/pCTmoreOyMsKW1rw4PJcaIorYF8jGqVtTqFanGpL7C9W8o1BofiHSIY49+OvCSf -M3f/wm70JFPrPzS9NMVeXmmQVeoLLRG2pDoNe+aNy/tYXpx8gifgqY7k/H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7ORAIfkFLsOXraIY1j4mgB+xvoI4+vNnLaD5KiovrCynKTNCe8 -0cXrgRlk0H2K5p7VmgT8ianjQ5zncnW497E46cGGWuLzzUbNo5fej5b3/hfc4/82 -juHCa0Wj4IvY+Qor5gTW9JG8FmX13/xEf3v39UEjCwxYH8eULf/OvRuffwrMKMYP -VLGVpR6Qnf+6lOiHsmx32Prd/KWxW5jYn34at7bM3iRax/gnYJw5V8vGa8ZjrIu5 -p0m6pUL1NIgCNVi5kC2UibiuoHGlUlbwxsIn++G3YICn3fY+3GaIYYxfFvKXlsOJ -a2DGYEj2joT/i7HMS755XM2stjJLy3aIY1ydBc3E/+LFWKYageYcEVKleIF1M6WS -ghJyxBiq3w34kDxKM9oVlEYj9TnJQOeEcVF0uZwG1oiCS4IKf/pr0fMA8LAKx36t -AIHAr/wDnqtSG4c5tdqZ9WrdOAm+WWTkBAZblbhwvvpmHoBElPofTvfEwV+dCeek -+Lp1UPVH8ZAOq3sIEjg3p/vcvHNj+H4U1Q9RbIOQWpjOm3AJdrObutwUwhEd8iJS -XV7SB/A8Ki1lrW9H0ETkDJnbWgPdU4WiGRWdNiSaA2aC6g2wdsc6d+ZZtWBnXJfV -geYI5FOMt4MxTi1lEDE0bqhKT705IVNR0knZXvJBtOW0b++qIyCqHaQ1JnLZCQfl -bu5038Xmp1EQYOZx8hFWvrZJWe/M8/EaVrlcTKl6/FIJg5GxLv0nDRjZTN1sRAO4 -/Sg8x364VlKrU2FgrIUBnqxXr008b3ha9YKOG8v/4Ob1yLXIhZa6w8ZXxwcEFbTQ -V3Rn92mO5rmhc3NifBkc3TAb9KvuHg8Ie+3TwFqbZRBglqUdyLCmCSoJT1NOZ1fB -vfCHbZXJLlAKqjOX/STGVJ1aGQhXF39AtOmsFcVj3Rh5TUI= -=5Led ------END PGP MESSAGE----- diff --git a/.scrt/settings.xml.asc b/.scrt/settings.xml.asc deleted file mode 100644 index 6cb8b85..0000000 --- a/.scrt/settings.xml.asc +++ /dev/null @@ -1,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+q -TJcxDn2BILDZ8o94JJ5tAxwPEUKSeKublQxCipjcQACQ -=vUIk ------END PGP MESSAGE----- diff --git a/mvn/maven.config b/mvn/maven.config deleted file mode 100644 index 7516270..0000000 --- a/mvn/maven.config +++ /dev/null @@ -1 +0,0 @@ --P '!xdoc' diff --git a/pom.xml b/pom.xml index c562bd1..f5444e3 100644 --- a/pom.xml +++ b/pom.xml @@ -19,12 +19,6 @@ - - com.jcabi - parent - 0.50.5 - - scm:git:git@github.com:bekkopen/NoCommons.git scm:git:git@github.com:bekkopen/NoCommons.git @@ -110,69 +104,162 @@ - - - - javax.validation - validation-api - + + + + javax.validation + validation-api + 2.0.1.Final + + + + + javax.xml.bind + jaxb-api + ${jaxb-api.version} + + + com.sun.xml.bind + jaxb-impl + ${jaxb-api.version} + + + com.sun.xml.bind + jaxb-core + ${jaxb-api.version} + + + + + junit + junit + ${junit.version} + test + + + org.hibernate + hibernate-validator + 5.3.6.Final + test + + + javax.el + javax.el-api + 2.2.4 + test + + + org.glassfish.web + javax.el + 2.2.4 + test + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.0 + + + + no.bekk.nocommons + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.8 + true + + ossrh + https://oss.sonatype.org/ + false + + + + + + + + + deploy + + + + + org.apache.maven.plugins + maven-source-plugin + 2.4 + + + attach-sources + + jar-no-fork + + + + - - - javax.xml.bind - jaxb-api - ${jaxb-api.version} - - - com.sun.xml.bind - jaxb-impl - ${jaxb-api.version} - - - com.sun.xml.bind - jaxb-core - ${jaxb-api.version} - + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.4 + + + attach-javadocs + + jar + + + + - - - junit - junit - ${junit.version} - test - - + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + + + --pinentry-mode + loopback + + + + + + + + + - - - - com.jcabi - jcabi-maven-plugin - - - javax.xml.bind - jaxb-api - ${jaxb-api.version} - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - no.bekk.nocommons - - - - - - + + + 4.13.1 + 2.3.0 + 1.8 + 1.8 + - - - 4.13.1 - 2.3.0 - + + + + ossrh + https://oss.sonatype.org/content/repositories/snapshots + + diff --git a/src/main/java/no/bekk/bekkopen/date/NorwegianDateUtil.java b/src/main/java/no/bekk/bekkopen/date/NorwegianDateUtil.java index 5724182..ba6276f 100644 --- a/src/main/java/no/bekk/bekkopen/date/NorwegianDateUtil.java +++ b/src/main/java/no/bekk/bekkopen/date/NorwegianDateUtil.java @@ -20,14 +20,14 @@ public class NorwegianDateUtil { * Adds the given number of working days to the given date. A working day is * specified as a regular Norwegian working day, excluding weekends and all * national holidays. - *

- * Example 1:
- * - Add 5 working days to Wednesday 21.03.2007 -> Yields Wednesday - * 28.03.2007. (skipping saturday and sunday)
- *

- * Example 2:
+ * + * Example 1: + * - Add 5 working days to Wednesday 21.03.2007 Yields Wednesday + * 28.03.2007. (skipping saturday and sunday) + * + * Example 2: * - Add 5 working days to Wednesday 04.04.2007 (day before - * easter-long-weekend) -> yields Monday 16.04.2007 (skipping 2 weekends and + * easter-long-weekend) yields Monday 16.04.2007 (skipping 2 weekends and * 3 weekday holidays). * * @param date diff --git a/src/main/java/no/bekk/bekkopen/person/FodselsnummerCalculator.java b/src/main/java/no/bekk/bekkopen/person/FodselsnummerCalculator.java index a44e5a9..4e0a6bf 100644 --- a/src/main/java/no/bekk/bekkopen/person/FodselsnummerCalculator.java +++ b/src/main/java/no/bekk/bekkopen/person/FodselsnummerCalculator.java @@ -13,18 +13,25 @@ private FodselsnummerCalculator() { super(); } - /** - * Returns a List with valid Fodselsnummer instances for a given Date and gender. - */ + /** + * Returns a List with valid Fodselsnummer instances for a given Date and gender. + * + * @param date en dato + * @param kjonn kjønn + * @return liste med fødselsnummer + */ + public static List getFodselsnummerForDateAndGender(Date date, KJONN kjonn) { List result = getManyFodselsnummerForDate(date); splitByGender(kjonn, result); return result; } - /** - * Return one random valid fodselsnummer on a given date - */ + /** + * Return one random valid fodselsnummer on a given date + * @param date en dato + * @return et fødselsnummer + */ public static Fodselsnummer getFodselsnummerForDate(Date date){ List fodselsnummerList = getManyFodselsnummerForDate(date); Collections.shuffle(fodselsnummerList);