TSK-850: added taskana parent pom and reconfigured taskana-core

This commit is contained in:
Mustapha Zorgati 2019-05-05 19:49:48 +02:00 committed by Holger Hagen
parent ce2f98f2cb
commit eb425726dd
7 changed files with 259 additions and 253 deletions

View File

@ -1,22 +1,24 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" 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">
<modelVersion>4.0.0</modelVersion>
<groupId>pro.taskana</groupId>
<artifactId>taskana-parent</artifactId>
<version>1.1.3-SNAPSHOT</version>
<packaging>pom</packaging>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>taskana-lib-parent</artifactId>
<version>1.1.3-SNAPSHOT</version>
<packaging>pom</packaging>
<description>This pom is parent to all taskana core modules and serves the common build.</description>
<description>This pom is parent to all taskana core modules and serves the common build.</description>
<properties>
<java.version>1.8</java.version>
</properties>
<parent>
<artifactId>taskana-parent</artifactId>
<groupId>pro.taskana</groupId>
<version>1.1.2-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<modules>
<module>taskana-core</module>
<module>taskana-cdi</module>
<module>taskana-spring</module>
<module>taskana-cdi-example</module>
<module>taskana-spring-example</module>
</modules>
<modules>
<module>taskana-core</module>
<module>taskana-cdi</module>
<module>taskana-spring</module>
<module>taskana-cdi-example</module>
<module>taskana-spring-example</module>
</modules>
</project>

View File

@ -1,121 +1,17 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>pro.taskana</groupId>
<artifactId>taskana-core</artifactId>
<version>1.1.3-SNAPSHOT</version>
<name>${project.groupId}:${project.artifactId}</name>
<description>The taskana library to include in your project.</description>
<url>http://taskana.pro</url>
<licenses>
<license>
<name>The Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<developers>
<developer>
<name>Holger Hagen</name>
<email>holger.hagen@novatec-gmbh.de</email>
<organization>NovaTec Consulting GmbH</organization>
<organizationUrl>https://www.novatec-gmbh.de</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:git://github.com/taskana/taskana.git</connection>
<developerConnection>scm:git:ssh://github.com:taskana/taskana.git</developerConnection>
<url>http://github.com/taskana/taskana/tree/master</url>
</scm>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<powermock.version>1.7.1</powermock.version>
</properties>
<profiles>
<profile>
<id>snapshot</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
</profile>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</profile>
</profiles>
<parent>
<artifactId>taskana-lib-parent</artifactId>
<groupId>pro.taskana</groupId>
<version>1.1.2-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<dependencies>
<dependency>
@ -194,112 +90,6 @@
<version>2.9.8</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<versionRange>[1.0.0,)</versionRange>
<goals>
<goal>check</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<configuration>
<configLocation>../../qa/checkstyle/checkstyle.xml</configLocation>
<encoding>UTF-8</encoding>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
<failOnViolation>true</failOnViolation>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
</configuration>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<showWarnings>true</showWarnings>
<compilerArgs>
<arg>-Xlint:all</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<!--
this repository is needed to fetch com.ibm.db2.jcc
-->

View File

@ -327,10 +327,12 @@ public interface WorkbasketService {
* the ids of the workbaskets to delete.
* @return the result of the operations with Id and Exception for each failed workbasket deletion.
* @throws InvalidArgumentException
* if the WorkbasketId parameter is NULL
* if the WorkbasketIds parameter list is NULL or empty
* @throws NotAuthorizedException
* if the current user got no permission for this interaction.
*/
BulkOperationResults<String, TaskanaException> deleteWorkbaskets(List<String> workbasketsIds)
throws NotAuthorizedException, WorkbasketNotFoundException, WorkbasketInUseException, InvalidArgumentException;
throws NotAuthorizedException, InvalidArgumentException;
/**
* Returns the distribution sources for a given workbasket.

View File

@ -802,25 +802,23 @@ public class WorkbasketServiceImpl implements WorkbasketService {
}
BulkOperationResults<String, TaskanaException> bulkLog = new BulkOperationResults<>();
if (!workbasketsIds.isEmpty()) {
Iterator<String> iterator = workbasketsIds.iterator();
String workbasketIdForDeleting = null;
while (iterator.hasNext()) {
try {
workbasketIdForDeleting = iterator.next();
if (!deleteWorkbasket(workbasketIdForDeleting)) {
bulkLog.addError(workbasketIdForDeleting, new WorkbasketInUseException(
"Workbasket with id " + workbasketIdForDeleting
+ " contains completed tasks not deleted and will not be deleted."));
}
} catch (WorkbasketInUseException ex) {
Iterator<String> iterator = workbasketsIds.iterator();
String workbasketIdForDeleting = null;
while (iterator.hasNext()) {
try {
workbasketIdForDeleting = iterator.next();
if (!deleteWorkbasket(workbasketIdForDeleting)) {
bulkLog.addError(workbasketIdForDeleting, new WorkbasketInUseException(
"Workbasket with id " + workbasketIdForDeleting + " is in use and will not be deleted."));
} catch (TaskanaException ex) {
bulkLog.addError(workbasketIdForDeleting, new TaskanaException(
"Workbasket with id " + workbasketIdForDeleting
+ " Throw an exception and couldn't be deleted."));
+ " contains completed tasks not deleted and will not be deleted."));
}
} catch (WorkbasketInUseException ex) {
bulkLog.addError(workbasketIdForDeleting, new WorkbasketInUseException(
"Workbasket with id " + workbasketIdForDeleting + " is in use and will not be deleted."));
} catch (TaskanaException ex) {
bulkLog.addError(workbasketIdForDeleting, new TaskanaException(
"Workbasket with id " + workbasketIdForDeleting
+ " Throw an exception and couldn't be deleted."));
}
}
return bulkLog;

View File

@ -127,7 +127,7 @@ public class WorkbasketCleanupJob extends AbstractTaskanaJob {
* Initializes the WorkbasketCleanupJob schedule. <br>
* All scheduled cleanup jobs are cancelled/deleted and a new one is scheduled.
*
* @param taskanaEngine
* @param taskanaEngine the taskana engine
*/
public static void initializeSchedule(TaskanaEngine taskanaEngine) {
WorkbasketCleanupJob job = new WorkbasketCleanupJob(taskanaEngine, null, null);

View File

@ -35,6 +35,12 @@ public class WorkbasketReport extends Report<MonitorQueryItem, TimeIntervalColum
/**
* buildPlannedDateBasedReport is querying grouping by plannedDate instead of due date.
*
* @return the built workbasketReport
*
* @throws NotAuthorizedException when the current user is not authorized to perform this action
*
* @throws InvalidArgumentException when the arguments given to the builder do not match
*/
WorkbasketReport buildPlannedDateBasedReport() throws NotAuthorizedException, InvalidArgumentException;

208
pom.xml Normal file
View File

@ -0,0 +1,208 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>pro.taskana</groupId>
<artifactId>taskana-parent</artifactId>
<version>1.1.2-SNAPSHOT</version>
<packaging>pom</packaging>
<description>This pom is parent to all taskana modules and serves the common build.</description>
<url>http://taskana.pro</url>
<properties>
<java.version>1.8</java.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<powermock.version>1.7.1</powermock.version>
</properties>
<modules>
<module>lib</module>
<module>rest</module>
</modules>
<developers>
<developer>
<name>Holger Hagen</name>
<email>holger.hagen@novatec-gmbh.de</email>
<organization>Novatec Consulting GmbH</organization>
<organizationUrl>https://www.novatec-gmbh.de</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:git://github.com/taskana/taskana.git</connection>
<developerConnection>scm:git:ssh://github.com:taskana/taskana.git</developerConnection>
<url>http://github.com/taskana/taskana/tree/master</url>
</scm>
<licenses>
<license>
<name>The Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<profiles>
<profile>
<id>snapshot</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
</profile>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</profile>
</profiles>
<build>
<plugins>
<!--
This plugin appends version information into the jar, so that it can be extracted from the jar.
See TSK-837 for more information
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<showWarnings>true</showWarnings>
<failOnWarning>false</failOnWarning>
<compilerArgs>
<arg>-Xlint:all</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<configuration>
<configLocation>qa/checkstyle/checkstyle.xml</configLocation>
<encoding>UTF-8</encoding>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
<failOnViolation>true</failOnViolation>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
</configuration>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>