Add rest for kie-wb and refactoring
This commit is contained in:
parent
8282128547
commit
97affee12c
18 changed files with 602 additions and 14 deletions
|
|
@ -0,0 +1,155 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>drools-framework-kie-wb-parent</artifactId>
|
||||
<groupId>com.pymmasoftware.jbpm</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>kie-drools-framework-rest-backend</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>kie drools Framework - REST Backend</name>
|
||||
<description>kie drools Framework - REST Backend</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.uberfire</groupId>
|
||||
<artifactId>uberfire-rest-client</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jboss.spec.javax.ejb</groupId>
|
||||
<artifactId>jboss-ejb-api_3.2_spec</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.uberfire</groupId>
|
||||
<artifactId>uberfire-nio2-model</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.uberfire</groupId>
|
||||
<artifactId>uberfire-nio2-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.uberfire</groupId>
|
||||
<artifactId>uberfire-io</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.uberfire</groupId>
|
||||
<artifactId>uberfire-project-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.uberfire</groupId>
|
||||
<artifactId>uberfire-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.uberfire</groupId>
|
||||
<artifactId>uberfire-commons</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.kie.soup</groupId>
|
||||
<artifactId>kie-soup-commons</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jboss.errai</groupId>
|
||||
<artifactId>errai-bus</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jboss.errai</groupId>
|
||||
<artifactId>errai-security-server</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jasypt</groupId>
|
||||
<artifactId>jasypt</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.ocpsoft.prettytime</groupId>
|
||||
<artifactId>prettytime</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.uberfire</groupId>
|
||||
<artifactId>uberfire-social-activities-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.uberfire</groupId>
|
||||
<artifactId>uberfire-social-activities-backend</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.uberfire</groupId>
|
||||
<artifactId>uberfire-structure-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.uberfire</groupId>
|
||||
<artifactId>uberfire-security-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.uberfire</groupId>
|
||||
<artifactId>uberfire-backend-server</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.uberfire</groupId>
|
||||
<artifactId>uberfire-commons-editor-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.uberfire</groupId>
|
||||
<artifactId>uberfire-commons-editor-backend</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.uberfire</groupId>
|
||||
<artifactId>uberfire-services-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- The version of commons-io in droolsjbpm-build-bootstrap pom is way too old-->
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.thoughtworks.xstream</groupId>
|
||||
<artifactId>xstream</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jasypt</groupId>
|
||||
<artifactId>jasypt</artifactId>
|
||||
<version>1.9.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jboss.spec.javax.ejb</groupId>
|
||||
<artifactId>jboss-ejb-api_3.2_spec</artifactId>
|
||||
<version>1.0.0.Final</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.ocpsoft.prettytime</groupId>
|
||||
<artifactId>prettytime</artifactId>
|
||||
<version>3.0.2.Final</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<version>1.3.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,284 @@
|
|||
package org.chtijbug.kie.rest.backend;
|
||||
|
||||
import org.guvnor.common.services.project.model.WorkspaceProject;
|
||||
import org.guvnor.common.services.project.service.WorkspaceProjectService;
|
||||
import org.guvnor.rest.client.ProjectResponse;
|
||||
import org.guvnor.rest.client.Space;
|
||||
import org.guvnor.structure.organizationalunit.OrganizationalUnit;
|
||||
import org.guvnor.structure.organizationalunit.OrganizationalUnitService;
|
||||
import org.guvnor.structure.repositories.PublicURI;
|
||||
import org.guvnor.structure.repositories.Repository;
|
||||
import org.guvnor.structure.repositories.RepositoryService;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.uberfire.io.IOService;
|
||||
import org.uberfire.java.nio.file.DirectoryStream;
|
||||
|
||||
import javax.enterprise.context.ApplicationScoped;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
import javax.ws.rs.*;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.UriInfo;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
@Path("/chtijbug")
|
||||
@Named
|
||||
@ApplicationScoped
|
||||
public class PackageResource {
|
||||
|
||||
private static final org.slf4j.Logger logger = LoggerFactory.getLogger(PackageResource.class);
|
||||
|
||||
@Context
|
||||
protected UriInfo uriInfo;
|
||||
|
||||
@Inject
|
||||
@Named("ioStrategy")
|
||||
private IOService ioService;
|
||||
|
||||
@Inject
|
||||
private OrganizationalUnitService organizationalUnitService;
|
||||
|
||||
@Inject
|
||||
private RepositoryService repositoryService;
|
||||
|
||||
|
||||
@Inject
|
||||
private WorkspaceProjectService workspaceProjectService;
|
||||
|
||||
public PackageResource() {
|
||||
System.out.println("coucou");
|
||||
}
|
||||
|
||||
@GET
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
@Path("/detailedSpaces")
|
||||
// @RolesAllowed({REST_ROLE, REST_PROJECT_ROLE})
|
||||
public Collection<Space> getProjects() {
|
||||
logger.debug("-----getSpaces--- ");
|
||||
|
||||
final List<Space> spaces = new ArrayList<Space>();
|
||||
for (OrganizationalUnit ou : organizationalUnitService.getOrganizationalUnits()) {
|
||||
spaces.add(getSpace(ou));
|
||||
}
|
||||
|
||||
return spaces;
|
||||
}
|
||||
|
||||
private Space getSpace(OrganizationalUnit ou) {
|
||||
final Space space = new Space();
|
||||
space.setName(ou.getName());
|
||||
space.setOwner(ou.getOwner());
|
||||
space.setDefaultGroupId(ou.getDefaultGroupId());
|
||||
|
||||
final List<ProjectResponse> repoNames = new ArrayList<>();
|
||||
for (WorkspaceProject workspaceProject : workspaceProjectService.getAllWorkspaceProjects(ou)) {
|
||||
repoNames.add(getProjectResponse(workspaceProject));
|
||||
}
|
||||
|
||||
space.setProjects(repoNames);
|
||||
return space;
|
||||
}
|
||||
|
||||
private ProjectResponse getProjectResponse(WorkspaceProject workspaceProject) {
|
||||
final ProjectResponse projectResponse = new ProjectResponse();
|
||||
projectResponse.setName(workspaceProject.getName());
|
||||
projectResponse.setSpaceName(workspaceProject.getOrganizationalUnit().getName());
|
||||
|
||||
if (workspaceProject.getMainModule() != null) {
|
||||
projectResponse.setGroupId(workspaceProject.getMainModule().getPom().getGav().getGroupId());
|
||||
projectResponse.setVersion(workspaceProject.getMainModule().getPom().getGav().getVersion());
|
||||
projectResponse.setDescription(workspaceProject.getMainModule().getPom().getDescription());
|
||||
}
|
||||
|
||||
final ArrayList<org.guvnor.rest.client.PublicURI> publicURIs = new ArrayList<>();
|
||||
|
||||
for (PublicURI publicURI : workspaceProject.getRepository().getPublicURIs()) {
|
||||
final org.guvnor.rest.client.PublicURI responseURI = new org.guvnor.rest.client.PublicURI();
|
||||
responseURI.setProtocol(publicURI.getProtocol());
|
||||
responseURI.setUri(publicURI.getURI());
|
||||
publicURIs.add(responseURI);
|
||||
}
|
||||
|
||||
projectResponse.setPublicURIs(publicURIs);
|
||||
return projectResponse;
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("{organizationalUnitName}/{repositoryName}")
|
||||
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
|
||||
public Collection<Package> getPackagesAsJAXB(@PathParam("organizationalUnitName") String organizationalUnitName, @PathParam("repositoryName") String repositoryName) {
|
||||
OrganizationalUnit organizationalUnit = organizationalUnitService.getOrganizationalUnit(organizationalUnitName);
|
||||
Collection<Repository> repositories = organizationalUnit.getRepositories();
|
||||
for (Repository repository : repositories) {
|
||||
if (repository.getAlias().equals(repositoryName)) {
|
||||
|
||||
|
||||
Collection<Package> packages = new ArrayList<>();
|
||||
|
||||
return packages;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("{organizationalUnitName}/{repositoryName}/{packageName}/assets")
|
||||
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
|
||||
public Collection<String> getAssetsAsJAXB(
|
||||
@PathParam("organizationalUnitName") String organizationalUnitName, @PathParam("repositoryName") String repositoryName,
|
||||
@PathParam("packageName") String packageName,
|
||||
@QueryParam("format") List<String> formats) {
|
||||
try {
|
||||
List<String> contentList = new LinkedList<>();
|
||||
|
||||
|
||||
return contentList;
|
||||
} catch (RuntimeException e) {
|
||||
throw new WebApplicationException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private String getProject(String organizationalUnitName, String repositoryName, String packageName) {
|
||||
OrganizationalUnit organizationalUnit = organizationalUnitService.getOrganizationalUnit(organizationalUnitName);
|
||||
Collection<Repository> repositories = organizationalUnit.getRepositories();
|
||||
|
||||
return "tto";
|
||||
}
|
||||
|
||||
|
||||
private void getContentSource(DirectoryStream<org.uberfire.java.nio.file.Path> directoryStream, String asset, List<org.uberfire.java.nio.file.Path> pathLinkedList) {
|
||||
for (org.uberfire.java.nio.file.Path elementPath : directoryStream) {
|
||||
if (org.uberfire.java.nio.file.Files.isDirectory(elementPath)) {
|
||||
DirectoryStream<org.uberfire.java.nio.file.Path> adirectoryStream = ioService.newDirectoryStream(elementPath);
|
||||
getContentSource(adirectoryStream, asset, pathLinkedList);
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void getContent(DirectoryStream<org.uberfire.java.nio.file.Path> directoryStream, Collection<String> contentList) {
|
||||
for (org.uberfire.java.nio.file.Path elementPath : directoryStream) {
|
||||
if (org.uberfire.java.nio.file.Files.isDirectory(elementPath)) {
|
||||
DirectoryStream<org.uberfire.java.nio.file.Path> adirectoryStream = ioService.newDirectoryStream(elementPath);
|
||||
getContent(adirectoryStream, contentList);
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private org.uberfire.java.nio.file.Path getFileElementPath(DirectoryStream<org.uberfire.java.nio.file.Path> directoryStream, String assetName) {
|
||||
for (org.uberfire.java.nio.file.Path elementPath : directoryStream) {
|
||||
if (org.uberfire.java.nio.file.Files.isDirectory(elementPath)) {
|
||||
DirectoryStream<org.uberfire.java.nio.file.Path> adirectoryStream = ioService.newDirectoryStream(elementPath);
|
||||
org.uberfire.java.nio.file.Path foundElementPath = getFileElementPath(adirectoryStream, assetName);
|
||||
if (foundElementPath != null) {
|
||||
return foundElementPath;
|
||||
}
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private org.uberfire.java.nio.file.Path getDirectoryElementPath(DirectoryStream<org.uberfire.java.nio.file.Path> directoryStream, String assetName) {
|
||||
for (org.uberfire.java.nio.file.Path elementPath : directoryStream) {
|
||||
if (org.uberfire.java.nio.file.Files.isDirectory(elementPath)) {
|
||||
DirectoryStream<org.uberfire.java.nio.file.Path> adirectoryStream = ioService.newDirectoryStream(elementPath);
|
||||
if (elementPath.getFileName().toString().equals(assetName)) {
|
||||
return elementPath;
|
||||
}
|
||||
org.uberfire.java.nio.file.Path foundElementPath = getDirectoryElementPath(adirectoryStream, assetName);
|
||||
if (foundElementPath != null) {
|
||||
return foundElementPath;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("{organizationalUnitName}/{repositoryName}/{packageName}/assets/{assetName}")
|
||||
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
|
||||
public Collection<String> getAssetAsJaxB(
|
||||
@PathParam("organizationalUnitName") String organizationalUnitName, @PathParam("repositoryName") String repositoryName,
|
||||
@PathParam("packageName") String packageName, @PathParam("assetName") String assetName) {
|
||||
List<String> resultList = new LinkedList<>();
|
||||
try {
|
||||
|
||||
return resultList;
|
||||
} catch (RuntimeException e) {
|
||||
throw new WebApplicationException(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("{organizationalUnitName}/{repositoryName}/{packageName}/assets/{assetName}/source")
|
||||
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
|
||||
public String getAssetSource(
|
||||
@PathParam("organizationalUnitName") String organizationalUnitName, @PathParam("repositoryName") String repositoryName,
|
||||
@PathParam("packageName") String packageName, @PathParam("assetName") String assetName) {
|
||||
List<String> resultList = new LinkedList<>();
|
||||
String result = "";
|
||||
try {
|
||||
|
||||
return result;
|
||||
} catch (RuntimeException e) {
|
||||
throw new WebApplicationException(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@PUT
|
||||
@Path("{organizationalUnitName}/{repositoryName}/{packageName}/asset/{assetName}")
|
||||
@Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
|
||||
public void updateAssetFromJAXB(
|
||||
@PathParam("organizationalUnitName") String organizationalUnitName, @PathParam("repositoryName") String repositoryName,
|
||||
@PathParam("packageName") String packageName,
|
||||
@PathParam("assetName") String assetName, String asset) {
|
||||
try {
|
||||
|
||||
} catch (RuntimeException e) {
|
||||
throw new WebApplicationException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("{organizationalUnitName}/{repositoryName}/{packageName}/newAsset")
|
||||
@Consumes(MediaType.MULTIPART_FORM_DATA)
|
||||
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
|
||||
public String createAssetFromSourceAndJAXB(
|
||||
@PathParam("organizationalUnitName") String organizationalUnitName, @PathParam("repositoryName") String repositoryName,
|
||||
@PathParam("packageName") String packageName, String asset) {
|
||||
try {
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new WebApplicationException(e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@PUT
|
||||
@Path("{organizationalUnitName}/{repositoryName}/{packageName}/asset/{assetName}/source")
|
||||
@Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN})
|
||||
@Produces({MediaType.WILDCARD})
|
||||
public void updateAssetSource(
|
||||
@PathParam("organizationalUnitName") String organizationalUnitName, @PathParam("repositoryName") String repositoryName,
|
||||
@PathParam("packageName") String packageName, @PathParam("assetName") String assetName, String content) {
|
||||
try {
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new WebApplicationException(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package org.chtijbug.kie.rest.backend;
|
||||
|
||||
public interface PermissionConstants {
|
||||
|
||||
public static final String REST_ROLE = "rest-all";
|
||||
public static final String REST_PROJECT_ROLE = "rest-project";
|
||||
public static final String REST_DEPLOYMENT_ROLE = "rest-deployment";
|
||||
public static final String REST_PROCESS_ROLE = "rest-process";
|
||||
public static final String REST_PROCESS_RO_ROLE = "rest-process-read-only";
|
||||
public static final String REST_TASK_ROLE = "rest-task";
|
||||
public static final String REST_TASK_RO_ROLE = "rest-task-read-only";
|
||||
public static final String REST_QUERY_ROLE = "rest-query";
|
||||
public static final String REST_CLIENT_ROLE = "rest-client";
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
#
|
||||
# Copyright 2012 JBoss Inc
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# ErraiApp.properties
|
||||
#
|
||||
# Do not remove, even if empty!
|
||||
#
|
||||
# This is a marker file. When it is detected inside a JAR or at the
|
||||
# top of any classpath, the subdirectories are scanned for deployable
|
||||
# components. As such, all Errai application modules in a project
|
||||
# should contain an ErraiApp.properties at the root of all classpaths
|
||||
# that you wish to be scanned.
|
||||
#
|
||||
# There are also some configuration options that can be set in this
|
||||
# file, although it is rarely necessary. See the documentation at
|
||||
# https://docs.jboss.org/author/display/ERRAI/ErraiApp.properties
|
||||
# for details.
|
||||
26
drools-framework-kie-wb-parent/kie-wb/jbpm-console.iml
Normal file
26
drools-framework-kie-wb-parent/kie-wb/jbpm-console.iml
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="jpa" name="JPA">
|
||||
<configuration>
|
||||
<setting name="validation-enabled" value="true" />
|
||||
<setting name="provider-name" value="" />
|
||||
<datasource-mapping>
|
||||
<factory-entry name="org.jbpm.domain" />
|
||||
</datasource-mapping>
|
||||
<deploymentDescriptor name="persistence.xml" url="file://$MODULE_DIR$/src/main/resources/persistence.xml" />
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Maven: org.kie:jbpm-wb-showcase:war:7.7.0-SNAPSHOT" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
146
drools-framework-kie-wb-parent/kie-wb/pom.xml
Normal file
146
drools-framework-kie-wb-parent/kie-wb/pom.xml
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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">
|
||||
<parent>
|
||||
<artifactId>drools-framework-kie-wb-parent</artifactId>
|
||||
<groupId>com.pymmasoftware.jbpm</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>kie-wb</artifactId>
|
||||
|
||||
<packaging>pom</packaging>
|
||||
<name>Pymma platform jbpm-console</name>
|
||||
<description>Pymma Plarform Kie-wb
|
||||
</description>
|
||||
<dependencies>
|
||||
|
||||
<!--dependency>
|
||||
<groupId>com.pymmasoftware.jbpm</groupId>
|
||||
<artifactId>kie-drools-framework-rest-backend</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency-->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.kie</groupId>
|
||||
<artifactId>kie-wb</artifactId>
|
||||
<classifier>wildfly11</classifier>
|
||||
<version>${jbpm.version}</version>
|
||||
<type>war</type>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>kie-wb</finalName>
|
||||
<plugins>
|
||||
<!-- unpack step -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.10</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>unpack</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.kie</groupId>
|
||||
<artifactId>kie-wb</artifactId>
|
||||
<classifier>wildfly11</classifier>
|
||||
<version>${jbpm.version}</version>
|
||||
<type>war</type>
|
||||
<outputDirectory>${project.build.directory}/unpack-tmp</outputDirectory>
|
||||
<!--includes>**/*.class,**/*.xml</includes-->
|
||||
</artifactItem>
|
||||
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.10</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-dependencies</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}/unpack-tmp/WEB-INF/lib</outputDirectory>
|
||||
<overWriteReleases>false</overWriteReleases>
|
||||
<overWriteSnapshots>false</overWriteSnapshots>
|
||||
<overWriteIfNewer>true</overWriteIfNewer>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>3.0.2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-resources</id>
|
||||
<!-- here the phase you need -->
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${basedir}/target//unpack-tmp/WEB-INF/classes/META-INF</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>false</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
<overwrite>true</overwrite>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<finalName>kie-wb</finalName>
|
||||
<appendAssemblyId>false</appendAssemblyId>
|
||||
<descriptors>
|
||||
<descriptor>src/main/assembly/assembly-kie-wb-wildfly-11.xml</descriptor>
|
||||
</descriptors>
|
||||
<archive>
|
||||
<addMavenDescriptor>false</addMavenDescriptor>
|
||||
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ Copyright 2012 Red Hat, Inc. and/or its affiliates
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
|
||||
<assembly xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
|
||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd
|
||||
http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 ">
|
||||
|
||||
<!-- including a . in the id will modify the *classifier* of the artifact, instead of the name/id of the artifact -->
|
||||
<id>ee7</id>
|
||||
<formats>
|
||||
<format>war</format>
|
||||
</formats>
|
||||
|
||||
<includeBaseDirectory>false</includeBaseDirectory>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>${project.build.directory}/unpack-tmp</directory>
|
||||
<outputDirectory>.</outputDirectory>
|
||||
</fileSet>
|
||||
|
||||
</fileSets>
|
||||
|
||||
|
||||
</assembly>
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ Copyright 2012 Red Hat, Inc. and/or its affiliates.
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
|
||||
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
|
||||
|
||||
<!-- including a . in the id will modify the *classifier* of the artifact, instead of the name/id of the artifact -->
|
||||
<id>wildfly11</id>
|
||||
<formats>
|
||||
<format>war</format>
|
||||
<format>dir</format>
|
||||
</formats>
|
||||
|
||||
<includeBaseDirectory>false</includeBaseDirectory>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>${project.build.directory}/unpack-tmp</directory>
|
||||
<outputDirectory>.</outputDirectory>
|
||||
</fileSet>
|
||||
|
||||
</fileSets>
|
||||
<!--componentDescriptors>
|
||||
<componentDescriptor>src/main/assembly/component-kie-wb-wildfly-11-eap-7-common.xml</componentDescriptor>
|
||||
</componentDescriptors-->
|
||||
|
||||
</assembly>
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ Copyright 2016 Red Hat, Inc. and/or its affiliates.
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
|
||||
<component xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.3 http://maven.apache.org/xsd/component-1.1.3.xsd">
|
||||
<!-- Assembly configuration for WildFly 10 and EAP 7, shared between the community and product assemblies. -->
|
||||
<dependencySets>
|
||||
<dependencySet>
|
||||
<includes>
|
||||
<include>org.kie:${artifactId}:war</include>
|
||||
</includes>
|
||||
<outputDirectory>.</outputDirectory>
|
||||
<unpack>true</unpack>
|
||||
<unpackOptions>
|
||||
<excludes>
|
||||
<exclude>WEB-INF/classes/application-roles.properties</exclude>
|
||||
<exclude>WEB-INF/classes/application-users.properties</exclude>
|
||||
</excludes>
|
||||
</unpackOptions>
|
||||
<useStrictFiltering>true</useStrictFiltering>
|
||||
</dependencySet>
|
||||
</dependencySets>
|
||||
|
||||
</component>
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- ~ Copyright 2012 Red Hat, Inc. and/or its affiliates. ~ ~ Licensed under the Apache License, Version
|
||||
2.0 (the "License"); ~ you may not use this file except in compliance with
|
||||
the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~ ~ Unless required by applicable law or agreed to in writing, software ~
|
||||
distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT
|
||||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the
|
||||
License for the specific language governing permissions and ~ limitations
|
||||
under the License. -->
|
||||
|
||||
<persistence version="2.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://java.sun.com/xml/ns/persistence"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
|
||||
|
||||
<persistence-unit name="org.jbpm.persistence.jpa" transaction-type="JTA">
|
||||
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
|
||||
<jta-data-source>java:jboss/datasources/jbpmds</jta-data-source>
|
||||
|
||||
<mapping-file>META-INF/JBPMorm.xml</mapping-file>
|
||||
<mapping-file>META-INF/Taskorm.xml</mapping-file>
|
||||
<mapping-file>META-INF/TaskAuditorm.xml</mapping-file>
|
||||
|
||||
<class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
|
||||
<class>org.drools.persistence.info.SessionInfo</class>
|
||||
<class>org.drools.persistence.info.WorkItemInfo</class>
|
||||
|
||||
<class>org.jbpm.process.audit.ProcessInstanceLog</class>
|
||||
<class>org.jbpm.process.audit.NodeInstanceLog</class>
|
||||
<class>org.jbpm.process.audit.VariableInstanceLog</class>
|
||||
|
||||
<class>org.jbpm.persistence.correlation.CorrelationKeyInfo</class>
|
||||
<class>org.jbpm.persistence.correlation.CorrelationPropertyInfo</class>
|
||||
|
||||
<!-- manager -->
|
||||
<class>org.jbpm.runtime.manager.impl.jpa.ContextMappingInfo</class>
|
||||
|
||||
<class>org.jbpm.services.task.impl.model.AttachmentImpl</class>
|
||||
<class>org.jbpm.services.task.impl.model.ContentImpl</class>
|
||||
<class>org.jbpm.services.task.impl.model.BooleanExpressionImpl</class>
|
||||
<class>org.jbpm.services.task.impl.model.CommentImpl</class>
|
||||
<class>org.jbpm.services.task.impl.model.DeadlineImpl</class>
|
||||
<class>org.jbpm.services.task.impl.model.DelegationImpl</class>
|
||||
<class>org.jbpm.services.task.impl.model.EscalationImpl</class>
|
||||
<class>org.jbpm.services.task.impl.model.GroupImpl</class>
|
||||
<class>org.jbpm.services.task.impl.model.I18NTextImpl</class>
|
||||
<class>org.jbpm.services.task.impl.model.NotificationImpl</class>
|
||||
<class>org.jbpm.services.task.impl.model.EmailNotificationImpl</class>
|
||||
<class>org.jbpm.services.task.impl.model.EmailNotificationHeaderImpl</class>
|
||||
<class>org.jbpm.services.task.impl.model.PeopleAssignmentsImpl</class>
|
||||
<class>org.jbpm.services.task.impl.model.ReassignmentImpl</class>
|
||||
|
||||
<class>org.jbpm.services.task.impl.model.TaskImpl</class>
|
||||
<class>org.jbpm.services.task.impl.model.TaskDataImpl</class>
|
||||
<class>org.jbpm.services.task.impl.model.UserImpl</class>
|
||||
|
||||
<!--BAM for task service -->
|
||||
<class>org.jbpm.services.task.audit.impl.model.BAMTaskSummaryImpl</class>
|
||||
|
||||
<!-- Event Classes -->
|
||||
<class>org.jbpm.services.task.audit.impl.model.TaskEventImpl</class>
|
||||
|
||||
<!-- Task Audit Classes -->
|
||||
<class>org.jbpm.services.task.audit.impl.model.AuditTaskImpl</class>
|
||||
<class>org.jbpm.services.task.audit.impl.model.TaskVariableImpl</class>
|
||||
|
||||
<properties>
|
||||
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQL82Dialect" />
|
||||
|
||||
<property name="hibernate.max_fetch_depth" value="3" />
|
||||
<property name="hibernate.hbm2ddl.auto" value="update" />
|
||||
<property name="hibernate.show_sql" value="false" />
|
||||
|
||||
<!-- BZ 841786: AS7/EAP 6/Hib 4 uses new (sequence) generators which seem to cause problems -->
|
||||
<property name="hibernate.id.new_generator_mappings" value="false" />
|
||||
<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform" />
|
||||
</properties>
|
||||
</persistence-unit>
|
||||
|
||||
</persistence>
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
|
||||
<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'
|
||||
debug="true">
|
||||
|
||||
<appender name="console" class="org.apache.log4j.ConsoleAppender">
|
||||
<layout class="org.apache.log4j.PatternLayout">
|
||||
<param name="ConversionPattern"
|
||||
value="%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n"/>
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<root>
|
||||
<level value="INFO"/>
|
||||
<appender-ref ref="console"/>
|
||||
</root>
|
||||
|
||||
</log4j:configuration>
|
||||
55
drools-framework-kie-wb-parent/pom.xml
Normal file
55
drools-framework-kie-wb-parent/pom.xml
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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">
|
||||
<parent>
|
||||
<artifactId>pymma-jbpm-platform-parent</artifactId>
|
||||
<groupId>com.pymmasoftware.jbpm</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>pom</packaging>
|
||||
<artifactId>drools-framework-kie-wb-parent</artifactId>
|
||||
<modules>
|
||||
<module>kie-wb</module>
|
||||
<module>kie-drools-framework-rest-backend</module>
|
||||
</modules>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.uberfire</groupId>
|
||||
<artifactId>uberfire-bom</artifactId>
|
||||
<!-- Using ${uberfire.version} instead of ${project.version} enables easier way to create hot fixes
|
||||
(one-off patches). This pom is a parent for all uberfire modules, so when version is changed in
|
||||
one of them, the ${project.version} property changes too and therefore also required version of
|
||||
uberfire-bom. Usage of this property makes it possible to change version of the (sub)module
|
||||
and still use the original version of uberfire-bom. -->
|
||||
<version>2.9.0.Final</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.kie.soup</groupId>
|
||||
<artifactId>kie-soup-bom</artifactId>
|
||||
<version>7.12.0.Final</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Errai -->
|
||||
<dependency>
|
||||
<groupId>org.jboss.errai.bom</groupId>
|
||||
<artifactId>errai-internal-bom</artifactId>
|
||||
<version>4.3.3.Final</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
</project>
|
||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue