diff --git a/.mvn/wrapper/MavenWrapperDownloader.java b/.mvn/wrapper/MavenWrapperDownloader.java index b901097f2..73634eeef 100644 --- a/.mvn/wrapper/MavenWrapperDownloader.java +++ b/.mvn/wrapper/MavenWrapperDownloader.java @@ -20,98 +20,99 @@ import java.util.Properties; public class MavenWrapperDownloader { - private static final String WRAPPER_VERSION = "0.5.6"; - /** - * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. - */ - private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" - + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; + private static final String WRAPPER_VERSION = "0.5.6"; + /** Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. */ + private static final String DEFAULT_DOWNLOAD_URL = + "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" + + WRAPPER_VERSION + + "/maven-wrapper-" + + WRAPPER_VERSION + + ".jar"; - /** - * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to - * use instead of the default one. - */ - private static final String MAVEN_WRAPPER_PROPERTIES_PATH = - ".mvn/wrapper/maven-wrapper.properties"; + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to use + * instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; - /** - * Path where the maven-wrapper.jar will be saved to. - */ - private static final String MAVEN_WRAPPER_JAR_PATH = - ".mvn/wrapper/maven-wrapper.jar"; + /** Path where the maven-wrapper.jar will be saved to. */ + private static final String MAVEN_WRAPPER_JAR_PATH = ".mvn/wrapper/maven-wrapper.jar"; - /** - * Name of the property which should be used to override the default download url for the wrapper. - */ - private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; - public static void main(String args[]) { - System.out.println("- Downloader started"); - File baseDirectory = new File(args[0]); - System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); - // If the maven-wrapper.properties exists, read it and check if it contains a custom - // wrapperUrl parameter. - File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); - String url = DEFAULT_DOWNLOAD_URL; - if(mavenWrapperPropertyFile.exists()) { - FileInputStream mavenWrapperPropertyFileInputStream = null; - try { - mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); - Properties mavenWrapperProperties = new Properties(); - mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); - url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); - } catch (IOException e) { - System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); - } finally { - try { - if(mavenWrapperPropertyFileInputStream != null) { - mavenWrapperPropertyFileInputStream.close(); - } - } catch (IOException e) { - // Ignore ... - } - } - } - System.out.println("- Downloading from: " + url); - - File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); - if(!outputFile.getParentFile().exists()) { - if(!outputFile.getParentFile().mkdirs()) { - System.out.println( - "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); - } - } - System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if (mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { try { - downloadFileFromURL(url, outputFile); - System.out.println("Done"); - System.exit(0); - } catch (Throwable e) { - System.out.println("- Error downloading"); - e.printStackTrace(); - System.exit(1); + if (mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... } + } } + System.out.println("- Downloading from: " + url); - private static void downloadFileFromURL(String urlString, File destination) throws Exception { - if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { - String username = System.getenv("MVNW_USERNAME"); - char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); - Authenticator.setDefault(new Authenticator() { - @Override - protected PasswordAuthentication getPasswordAuthentication() { - return new PasswordAuthentication(username, password); - } - }); - } - URL website = new URL(urlString); - ReadableByteChannel rbc; - rbc = Channels.newChannel(website.openStream()); - FileOutputStream fos = new FileOutputStream(destination); - fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); - fos.close(); - rbc.close(); + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if (!outputFile.getParentFile().exists()) { + if (!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output directory '" + + outputFile.getParentFile().getAbsolutePath() + + "'"); + } } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { + String username = System.getenv("MVNW_USERNAME"); + char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); + Authenticator.setDefault( + new Authenticator() { + @Override + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(username, password); + } + }); + } + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } } diff --git a/common/taskana-common-logging/pom.xml b/common/taskana-common-logging/pom.xml index e5a53963d..5a865f39c 100644 --- a/common/taskana-common-logging/pom.xml +++ b/common/taskana-common-logging/pom.xml @@ -1,7 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 taskana-common-logging @@ -9,8 +9,8 @@ The global trace logging implementation - taskana-common-parent pro.taskana + taskana-common-parent 4.8.1-SNAPSHOT diff --git a/lib/taskana-core/src/main/java/pro/taskana/monitor/api/reports/TimeIntervalReportBuilder.java b/lib/taskana-core/src/main/java/pro/taskana/monitor/api/reports/TimeIntervalReportBuilder.java index eca102646..c6ae1fd15 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/monitor/api/reports/TimeIntervalReportBuilder.java +++ b/lib/taskana-core/src/main/java/pro/taskana/monitor/api/reports/TimeIntervalReportBuilder.java @@ -115,8 +115,8 @@ public interface TimeIntervalReportBuilder< * Excludes the values of a certain {@linkplain TaskCustomField} to the builder. * *

The created report contains only tasks with a {@linkplain - * Task#getCustomAttribute(TaskCustomField) custom attribute} value not matching one of the - * items in the list. + * Task#getCustomAttribute(TaskCustomField) custom attribute} value not matching one of the items + * in the list. * * @param customField the specified {@linkplain TaskCustomField} * @param strings the values the specified {@linkplain Task#getCustomAttribute(TaskCustomField) diff --git a/lib/taskana-core/src/main/java/pro/taskana/monitor/internal/MonitorMapper.java b/lib/taskana-core/src/main/java/pro/taskana/monitor/internal/MonitorMapper.java index b13da07d0..02b036023 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/monitor/internal/MonitorMapper.java +++ b/lib/taskana-core/src/main/java/pro/taskana/monitor/internal/MonitorMapper.java @@ -48,7 +48,9 @@ public interface MonitorMapper { @Param("timestamp") TaskTimestamp timestamp, @Param("report") TimeIntervalReportBuilder report); - @SelectProvider(type = MonitorMapperSqlProvider.class, method = "getTaskCountOfDetailedClassifications") + @SelectProvider( + type = MonitorMapperSqlProvider.class, + method = "getTaskCountOfDetailedClassifications") @Result(column = "TASK_CLASSIFICATION_KEY", property = "key") @Result(column = "ATTACHMENT_CLASSIFICATION_KEY", property = "attachmentKey") @Result(column = "AGE_IN_DAYS", property = "ageInDays") @@ -58,7 +60,9 @@ public interface MonitorMapper { @Param("timestamp") TaskTimestamp timestamp, @Param("report") TimeIntervalReportBuilder report); - @SelectProvider(type = MonitorMapperSqlProvider.class, method = "getTaskCountOfTaskCustomFieldValues") + @SelectProvider( + type = MonitorMapperSqlProvider.class, + method = "getTaskCountOfTaskCustomFieldValues") @Result(column = "CUSTOM_FIELD", property = "key") @Result(column = "AGE_IN_DAYS", property = "ageInDays") @Result(column = "NUMBER_OF_TASKS", property = "numberOfTasks") @@ -67,9 +71,7 @@ public interface MonitorMapper { @Param("timestamp") TaskTimestamp timestamp, @Param("report") TimeIntervalReportBuilder report); - @SelectProvider( - type = MonitorMapperSqlProvider.class, - method = "getTaskIdsForSelectedItems") + @SelectProvider(type = MonitorMapperSqlProvider.class, method = "getTaskIdsForSelectedItems") List getTaskIdsForSelectedItems( @Param("now") Instant now, @Param("report") TimeIntervalReportBuilder report, diff --git a/lib/taskana-core/src/main/java/pro/taskana/monitor/internal/reports/TimeIntervalReportBuilderImpl.java b/lib/taskana-core/src/main/java/pro/taskana/monitor/internal/reports/TimeIntervalReportBuilderImpl.java index 92c29eea9..7d852b958 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/monitor/internal/reports/TimeIntervalReportBuilderImpl.java +++ b/lib/taskana-core/src/main/java/pro/taskana/monitor/internal/reports/TimeIntervalReportBuilderImpl.java @@ -47,6 +47,7 @@ abstract class TimeIntervalReportBuilderImpl< protected List domains; protected List classificationIds; protected List excludedClassificationIds; + protected WorkingDaysToDaysConverter converter; private String[] custom1In; private String[] custom1NotIn; private String[] custom1Like; @@ -95,7 +96,6 @@ abstract class TimeIntervalReportBuilderImpl< private String[] custom16In; private String[] custom16NotIn; private String[] custom16Like; - protected WorkingDaysToDaysConverter converter; TimeIntervalReportBuilderImpl(InternalTaskanaEngine taskanaEngine, MonitorMapper monitorMapper) { this.taskanaEngine = taskanaEngine; @@ -386,9 +386,7 @@ abstract class TimeIntervalReportBuilderImpl< try { this.taskanaEngine.openConnection(); return monitorMapper.getCustomAttributeValuesForReport( - this, - getCombinedClassificationFilter(), - taskCustomField); + this, getCombinedClassificationFilter(), taskCustomField); } finally { this.taskanaEngine.returnConnection(); } diff --git a/lib/taskana-core/src/main/java/pro/taskana/workbasket/internal/WorkbasketAccessItemQueryImpl.java b/lib/taskana-core/src/main/java/pro/taskana/workbasket/internal/WorkbasketAccessItemQueryImpl.java index c6db147ae..a677eed8a 100644 --- a/lib/taskana-core/src/main/java/pro/taskana/workbasket/internal/WorkbasketAccessItemQueryImpl.java +++ b/lib/taskana-core/src/main/java/pro/taskana/workbasket/internal/WorkbasketAccessItemQueryImpl.java @@ -23,6 +23,9 @@ public class WorkbasketAccessItemQueryImpl implements WorkbasketAccessItemQuery "pro.taskana.workbasket.internal.WorkbasketQueryMapper.countQueryWorkbasketAccessItems"; private static final String LINK_TO_VALUEMAPPER = "pro.taskana.workbasket.internal.WorkbasketQueryMapper.queryWorkbasketAccessItemColumnValues"; + private final InternalTaskanaEngine taskanaEngine; + private final List orderBy; + private final List orderColumns; private AccessItemQueryColumnName columnName; private String[] accessIdIn; private String[] accessIdLike; @@ -31,10 +34,6 @@ public class WorkbasketAccessItemQueryImpl implements WorkbasketAccessItemQuery private String[] workbasketKeyLike; private String[] idIn; - private final InternalTaskanaEngine taskanaEngine; - private final List orderBy; - private final List orderColumns; - WorkbasketAccessItemQueryImpl(InternalTaskanaEngine taskanaEngine) { this.taskanaEngine = taskanaEngine; orderBy = new ArrayList<>(); diff --git a/lib/taskana-core/src/test/java/acceptance/report/ProvideClassificationCategoryReportAccTest.java b/lib/taskana-core/src/test/java/acceptance/report/ProvideClassificationCategoryReportAccTest.java index 8de5b221d..6aa0a91b3 100644 --- a/lib/taskana-core/src/test/java/acceptance/report/ProvideClassificationCategoryReportAccTest.java +++ b/lib/taskana-core/src/test/java/acceptance/report/ProvideClassificationCategoryReportAccTest.java @@ -324,8 +324,7 @@ class ProvideClassificationCategoryReportAccTest extends AbstractReportAccTest { @WithAccessId(user = "monitor") @Test - void should_ReturnItemsOfCategoryReport_When_FilteringWithCustomAttributeIn() - throws Exception { + void should_ReturnItemsOfCategoryReport_When_FilteringWithCustomAttributeIn() throws Exception { List columnHeaders = getShortListOfColumnHeaders(); ClassificationCategoryReport report = diff --git a/pom.xml b/pom.xml index 8de218da2..0229abc27 100644 --- a/pom.xml +++ b/pom.xml @@ -152,6 +152,13 @@ org.codehaus.mojo aspectj-maven-plugin ${version.aspectj-maven-plugin} + + + org.aspectj + aspectjtools + ${version.aspectj} + + ${java.version} 11 @@ -173,13 +180,6 @@ - - - org.aspectj - aspectjtools - ${version.aspectj} - - diff --git a/rest/taskana-rest-spring/src/test/java/pro/taskana/workbasket/rest/WorkbasketControllerIntTest.java b/rest/taskana-rest-spring/src/test/java/pro/taskana/workbasket/rest/WorkbasketControllerIntTest.java index 79cfc7fc2..b27e88895 100644 --- a/rest/taskana-rest-spring/src/test/java/pro/taskana/workbasket/rest/WorkbasketControllerIntTest.java +++ b/rest/taskana-rest-spring/src/test/java/pro/taskana/workbasket/rest/WorkbasketControllerIntTest.java @@ -231,8 +231,7 @@ class WorkbasketControllerIntTest { RestEndpoints.URL_WORKBASKET_ID, "WBI:100000000000000000000000000000000004"); HttpEntity auth = new HttpEntity<>(RestHelper.generateHeadersForUser("businessadmin")); - ThrowingCallable call = - () -> TEMPLATE.exchange(url, HttpMethod.DELETE, auth, Void.class); + ThrowingCallable call = () -> TEMPLATE.exchange(url, HttpMethod.DELETE, auth, Void.class); assertThatThrownBy(call) .isInstanceOf(HttpStatusCodeException.class)