TSK-850: reconfigured taskana-cdi
This commit is contained in:
parent
eb425726dd
commit
51f257b6f0
|
@ -1,140 +1,19 @@
|
|||
<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">
|
||||
<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-cdi</artifactId>
|
||||
<version>1.1.3-SNAPSHOT</version>
|
||||
|
||||
<name>${project.groupId}:${project.artifactId}</name>
|
||||
<url>http://taskana.pro</url>
|
||||
<description>The helper module to integrate taskana into CDI projects.</description>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The Apache License, Version 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
</license>
|
||||
</licenses>
|
||||
<parent>
|
||||
<artifactId>taskana-lib-parent</artifactId>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<version>1.1.2-SNAPSHOT</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
<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>
|
||||
<version.wildfly.swarm>2017.4.0</version.wildfly.swarm>
|
||||
<version.resteasy>3.1.2.Final</version.resteasy>
|
||||
</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>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.wildfly.swarm</groupId>
|
||||
<artifactId>bom</artifactId>
|
||||
<version>${version.wildfly.swarm}</version>
|
||||
<scope>import</scope>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jboss.arquillian</groupId>
|
||||
<artifactId>arquillian-bom</artifactId>
|
||||
<version>1.1.10.Final</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>jboss</id>
|
||||
|
@ -162,11 +41,13 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.wildfly.swarm</groupId>
|
||||
<version>${version.wildfly.swarm}</version>
|
||||
<artifactId>jaxrs</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.wildfly.swarm</groupId>
|
||||
<version>${version.wildfly.swarm}</version>
|
||||
<artifactId>cdi</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
@ -186,12 +67,14 @@
|
|||
<dependency>
|
||||
<groupId>org.wildfly.swarm</groupId>
|
||||
<artifactId>arquillian</artifactId>
|
||||
<version>${version.wildfly.swarm}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- Brought in via Arquillian BOM, see dependencyManagement section above -->
|
||||
<dependency>
|
||||
<groupId>org.jboss.arquillian.junit</groupId>
|
||||
<artifactId>arquillian-junit-container</artifactId>
|
||||
<version>1.1.10.Final</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
@ -209,33 +92,6 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</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>
|
||||
</plugins>
|
||||
</build>
|
||||
<description>The helper module to integrate taskana into CDI projects.</description>
|
||||
</project>
|
|
@ -19,10 +19,13 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
import pro.taskana.configuration.TaskanaEngineConfiguration;
|
||||
|
||||
/**
|
||||
* TODO.
|
||||
*/
|
||||
@ApplicationScoped
|
||||
public class TaskanaProducers {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(TaskanaProducers.class);
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(TaskanaProducers.class);
|
||||
|
||||
private static final String TASKANA_PROPERTIES = "taskana.properties";
|
||||
|
||||
|
@ -43,10 +46,10 @@ public class TaskanaProducers {
|
|||
ctx = new InitialContext();
|
||||
properties.load(propertyStream);
|
||||
dataSource = (DataSource) ctx.lookup(properties.getProperty("datasource.jndi"));
|
||||
logger.debug("---------------> " + dataSource.getConnection().getMetaData());
|
||||
LOGGER.debug("---------------> " + dataSource.getConnection().getMetaData());
|
||||
this.taskanaEngineConfiguration = new TaskanaEngineConfiguration(dataSource, true, false, "TASKANA");
|
||||
} catch (NamingException | SQLException | IOException e) {
|
||||
logger.error("Could not start Taskana: ", e);
|
||||
LOGGER.error("Could not start Taskana: ", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,9 @@ package pro.taskana;
|
|||
import javax.ws.rs.ApplicationPath;
|
||||
import javax.ws.rs.core.Application;
|
||||
|
||||
/**
|
||||
* TODO Why does this test exist?
|
||||
*/
|
||||
@ApplicationPath("/rest")
|
||||
public class RestApplication extends Application {
|
||||
}
|
||||
|
|
|
@ -9,6 +9,9 @@ import pro.taskana.exceptions.NotAuthorizedException;
|
|||
import pro.taskana.exceptions.TaskAlreadyExistException;
|
||||
import pro.taskana.exceptions.WorkbasketNotFoundException;
|
||||
|
||||
/**
|
||||
* TODO.
|
||||
*/
|
||||
@Stateless
|
||||
public class TaskanaEjb {
|
||||
|
||||
|
|
|
@ -19,6 +19,9 @@ import org.wildfly.swarm.Swarm;
|
|||
import org.wildfly.swarm.arquillian.CreateSwarm;
|
||||
import org.wildfly.swarm.undertow.WARArchive;
|
||||
|
||||
/**
|
||||
* TODO.
|
||||
*/
|
||||
@RunWith(Arquillian.class)
|
||||
public class TaskanaProducersTest {
|
||||
|
||||
|
|
|
@ -25,10 +25,13 @@ import pro.taskana.exceptions.TaskNotFoundException;
|
|||
import pro.taskana.exceptions.WorkbasketAlreadyExistException;
|
||||
import pro.taskana.exceptions.WorkbasketNotFoundException;
|
||||
|
||||
/**
|
||||
* TODO.
|
||||
*/
|
||||
@Path("/test")
|
||||
public class TaskanaRestTest {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(TaskanaRestTest.class);
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(TaskanaRestTest.class);
|
||||
|
||||
@EJB
|
||||
private TaskanaEjb taskanaEjb;
|
||||
|
@ -59,7 +62,7 @@ public class TaskanaRestTest {
|
|||
|
||||
Task result = taskanaEjb.getTaskService().createTask(task);
|
||||
|
||||
logger.info(result.getId() + ":" + result.getOwner());
|
||||
LOGGER.info(result.getId() + ":" + result.getOwner());
|
||||
return Response.status(200).entity(result.getId()).build();
|
||||
}
|
||||
|
||||
|
@ -75,7 +78,7 @@ public class TaskanaRestTest {
|
|||
@Path("{id}")
|
||||
public void completeTask(@PathParam("id") String id)
|
||||
throws TaskNotFoundException, InvalidOwnerException, InvalidStateException, NotAuthorizedException {
|
||||
logger.info(id);
|
||||
LOGGER.info(id);
|
||||
taskanaEjb.getTaskService().forceCompleteTask(id);
|
||||
}
|
||||
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -15,6 +15,8 @@
|
|||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<powermock.version>1.7.1</powermock.version>
|
||||
<version.wildfly.swarm>2017.4.0</version.wildfly.swarm>
|
||||
<version.resteasy>3.1.2.Final</version.resteasy>
|
||||
</properties>
|
||||
|
||||
<modules>
|
||||
|
|
Loading…
Reference in New Issue