Work on using branch per project
This commit is contained in:
parent
b1d5f53a79
commit
b37a988a03
42 changed files with 121 additions and 70 deletions
|
|
@ -189,8 +189,11 @@ public class KieRepositoryService {
|
||||||
return reponseMoteur;
|
return reponseMoteur;
|
||||||
}
|
}
|
||||||
|
|
||||||
public JobStatus buildProject(String url, String username, String password, String space, String project, String command, AddLog workOnGoingView, UI ui) {
|
public JobStatus buildProject(String url, String username, String password, String space, String project, String branchName,String command, AddLog workOnGoingView, UI ui) {
|
||||||
String completeurl = url + "/spaces/" + space + "/projects/" + project + "/maven/" + command;
|
String completeurl= url + "/spaces/" + space + "/projects/" + project + "/maven/" + command;
|
||||||
|
if (branchName!= null && branchName.length()>0){
|
||||||
|
completeurl= url + "/spaces/" + space + "/projects/" + project +"/branches/"+branchName+ "/maven/" + command;
|
||||||
|
}
|
||||||
logger.info("url Maven install : " + completeurl);
|
logger.info("url Maven install : " + completeurl);
|
||||||
ResponseEntity<JobStatus> response = restTemplateKiewb
|
ResponseEntity<JobStatus> response = restTemplateKiewb
|
||||||
.execute(completeurl, HttpMethod.POST, requestCallback(null, username, password), clientHttpResponse -> {
|
.execute(completeurl, HttpMethod.POST, requestCallback(null, username, password), clientHttpResponse -> {
|
||||||
|
|
|
||||||
|
|
@ -69,12 +69,12 @@ public class ProjectPersistService {
|
||||||
|
|
||||||
for (PlatformProjectResponse platformProjectResponse : platformProjectResponses) {
|
for (PlatformProjectResponse platformProjectResponse : platformProjectResponses) {
|
||||||
|
|
||||||
ProjectPersist projectPersist = projectRepository.findByProjectName(new KieProject(platformProjectResponse.getSpaceName(), platformProjectResponse.getName()));
|
ProjectPersist projectPersist = projectRepository.findByProjectNameAndBranch(new KieProject(platformProjectResponse.getSpaceName(), platformProjectResponse.getName()),platformProjectResponse.getBranch());
|
||||||
|
|
||||||
if (projectPersist == null) {
|
if (projectPersist == null) {
|
||||||
projectPersist = platformProjectResponseToProjectPersist(platformProjectResponse);
|
projectPersist = platformProjectResponseToProjectPersist(platformProjectResponse);
|
||||||
|
|
||||||
projectRepository.save(projectPersist);
|
projectPersist=projectRepository.save(projectPersist);
|
||||||
addProjectToSession(projectPersist, true);
|
addProjectToSession(projectPersist, true);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -101,12 +101,12 @@ public class ProjectPersistService {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isModifiable) {
|
if (isModifiable) {
|
||||||
projectPersists.put(projectPersist.getProjectName().toString(), projectPersist);
|
projectPersists.put(projectPersist.getProjectName().toString()+"-"+projectPersist.getBranch(), projectPersist);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
ProjectPersist tmp = projectPersists.get(projectPersist.getProjectName().toString());
|
ProjectPersist tmp = projectPersists.get(projectPersist.getProjectName().toString()+"-"+projectPersist.getBranch());
|
||||||
if (tmp == null) {
|
if (tmp == null) {
|
||||||
projectPersists.put(projectPersist.getProjectName().toString(), projectPersist);
|
projectPersists.put(projectPersist.getProjectName().toString()+"-"+projectPersist.getBranch(), projectPersist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -162,6 +162,7 @@ public class ProjectPersistService {
|
||||||
projectPersist.setGroupID(platformProjectResponse.getGroupId());
|
projectPersist.setGroupID(platformProjectResponse.getGroupId());
|
||||||
projectPersist.setProjectName(new KieProject(platformProjectResponse.getSpaceName(), platformProjectResponse.getName()));
|
projectPersist.setProjectName(new KieProject(platformProjectResponse.getSpaceName(), platformProjectResponse.getName()));
|
||||||
projectPersist.setProjectVersion(platformProjectResponse.getVersion());
|
projectPersist.setProjectVersion(platformProjectResponse.getVersion());
|
||||||
|
projectPersist.setBranch(platformProjectResponse.getBranch());
|
||||||
projectPersist.setStatus(ProjectPersist.ADEFINIR);
|
projectPersist.setStatus(ProjectPersist.ADEFINIR);
|
||||||
projectPersist.setClassNameList(platformProjectResponse.getJavaClasses());
|
projectPersist.setClassNameList(platformProjectResponse.getJavaClasses());
|
||||||
return projectPersist;
|
return projectPersist;
|
||||||
|
|
@ -175,12 +176,12 @@ public class ProjectPersistService {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
JobStatus result = kieRepositoryService.buildProject(config.getKiewbUrl(), userConnected.getUserName(),
|
JobStatus result = kieRepositoryService.buildProject(config.getKiewbUrl(), userConnected.getUserName(),
|
||||||
userConnected.getUserPassword(), projectPersist.getProjectName().getSpaceName(), projectPersist.getProjectName().getName(), "compile", workOnGoingView, ui);
|
userConnected.getUserPassword(), projectPersist.getProjectName().getSpaceName(), projectPersist.getProjectName().getName(),projectPersist.getBranch(), "compile", workOnGoingView, ui);
|
||||||
|
|
||||||
executeWrite(url, username, password, workOnGoingView, result.getJobId(), ui);
|
executeWrite(url, username, password, workOnGoingView, result.getJobId(), ui);
|
||||||
|
|
||||||
result = kieRepositoryService.buildProject(config.getKiewbUrl(), userConnected.getUserName(),
|
result = kieRepositoryService.buildProject(config.getKiewbUrl(), userConnected.getUserName(),
|
||||||
userConnected.getUserPassword(), projectPersist.getProjectName().getSpaceName(), projectPersist.getProjectName().getName(), "install", workOnGoingView, ui);
|
userConnected.getUserPassword(), projectPersist.getProjectName().getSpaceName(), projectPersist.getProjectName().getName(),projectPersist.getBranch(), "install", workOnGoingView, ui);
|
||||||
|
|
||||||
executeWrite(url, username, password, workOnGoingView, result.getJobId(), ui);
|
executeWrite(url, username, password, workOnGoingView, result.getJobId(), ui);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ public class JobStatus {
|
||||||
private String result;
|
private String result;
|
||||||
private Date lastModified;
|
private Date lastModified;
|
||||||
private String detailedResult[];
|
private String detailedResult[];
|
||||||
|
private String branchName;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|
@ -81,4 +82,12 @@ public class JobStatus {
|
||||||
public void setDetailedResult(String[] detailedResult) {
|
public void setDetailedResult(String[] detailedResult) {
|
||||||
this.detailedResult = detailedResult;
|
this.detailedResult = detailedResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getBranchName() {
|
||||||
|
return branchName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBranchName(String branchName) {
|
||||||
|
this.branchName = branchName;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,8 @@ public class GridRuntime extends Grid<RuntimePersist> {
|
||||||
|
|
||||||
private TextField hostName;
|
private TextField hostName;
|
||||||
|
|
||||||
|
private TextField branch ;
|
||||||
|
|
||||||
private TextField version;
|
private TextField version;
|
||||||
|
|
||||||
private TextField status;
|
private TextField status;
|
||||||
|
|
@ -33,6 +35,8 @@ public class GridRuntime extends Grid<RuntimePersist> {
|
||||||
|
|
||||||
private String strHostName = "Hostname";
|
private String strHostName = "Hostname";
|
||||||
|
|
||||||
|
private String strBranch = "Branch";
|
||||||
|
|
||||||
private String strVersion = "Version";
|
private String strVersion = "Version";
|
||||||
|
|
||||||
private String strStatus = "State";
|
private String strStatus = "State";
|
||||||
|
|
@ -87,13 +91,21 @@ public class GridRuntime extends Grid<RuntimePersist> {
|
||||||
refreshtGrid(version.getValue(), strVersion);
|
refreshtGrid(version.getValue(), strVersion);
|
||||||
});
|
});
|
||||||
versionCo.setHeader(version);
|
versionCo.setHeader(version);
|
||||||
Grid.Column<RuntimePersist> statusCo = addColumn(runtimePersist -> runtimePersist.getStatus());
|
Grid.Column<RuntimePersist> statusCo = addColumn(runtimePersist -> runtimePersist.getBranch());
|
||||||
|
branch = new TextField(strBranch);
|
||||||
|
branch.setValueChangeMode(ValueChangeMode.EAGER);
|
||||||
|
branch.addValueChangeListener(e -> {
|
||||||
|
refreshtGrid(branch.getValue(), strBranch);
|
||||||
|
});
|
||||||
|
versionCo.setHeader(branch);
|
||||||
|
|
||||||
|
Grid.Column<RuntimePersist> branchCo = addColumn(runtimePersist -> runtimePersist.getStatus());
|
||||||
status = new TextField(strStatus);
|
status = new TextField(strStatus);
|
||||||
status.setValueChangeMode(ValueChangeMode.EAGER);
|
status.setValueChangeMode(ValueChangeMode.EAGER);
|
||||||
status.addValueChangeListener(e -> {
|
status.addValueChangeListener(e -> {
|
||||||
refreshtGrid(status.getValue(), strVersion);
|
refreshtGrid(status.getValue(), strVersion);
|
||||||
});
|
});
|
||||||
statusCo.setHeader(status);
|
branchCo.setHeader(status);
|
||||||
|
|
||||||
addColumn(new ComponentRenderer<>(runtimePersist -> {
|
addColumn(new ComponentRenderer<>(runtimePersist -> {
|
||||||
List<String> serverList = new ArrayList<>();
|
List<String> serverList = new ArrayList<>();
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ public class DeploymentView extends VerticalLayout implements AddLog {
|
||||||
private final String strNameDeploy = "Deploy name";
|
private final String strNameDeploy = "Deploy name";
|
||||||
private final String strNameProject = "Project name";
|
private final String strNameProject = "Project name";
|
||||||
private final String strGroupeId = "Groupe ID";
|
private final String strGroupeId = "Groupe ID";
|
||||||
|
private final String strBranchName = "Branch Name";
|
||||||
private final String strArtefactID = "Artefact ID";
|
private final String strArtefactID = "Artefact ID";
|
||||||
|
|
||||||
//TEXTFIELD search
|
//TEXTFIELD search
|
||||||
|
|
@ -49,6 +50,7 @@ public class DeploymentView extends VerticalLayout implements AddLog {
|
||||||
private TextField nameDeploy;
|
private TextField nameDeploy;
|
||||||
private TextField nameProject;
|
private TextField nameProject;
|
||||||
private TextField groupeId;
|
private TextField groupeId;
|
||||||
|
private TextField branchName;
|
||||||
private TextField artifactId;
|
private TextField artifactId;
|
||||||
private TextField processId;
|
private TextField processId;
|
||||||
private TextField serverName;
|
private TextField serverName;
|
||||||
|
|
@ -92,6 +94,15 @@ public class DeploymentView extends VerticalLayout implements AddLog {
|
||||||
projectPersistGrid.addColumn(projectPersist -> projectPersist.getMainClass()).setHeader("ClassName")
|
projectPersistGrid.addColumn(projectPersist -> projectPersist.getMainClass()).setHeader("ClassName")
|
||||||
.setComparator((projectPersist, t1) -> projectPersist.getMainClass().compareTo(t1.getMainClass()));
|
.setComparator((projectPersist, t1) -> projectPersist.getMainClass().compareTo(t1.getMainClass()));
|
||||||
|
|
||||||
|
Grid.Column<ProjectPersist> branchCo = projectPersistGrid.addColumn(projectPersist -> projectPersist.getBranch());
|
||||||
|
branchName = new TextField(strBranchName);
|
||||||
|
branchName.setValueChangeMode(ValueChangeMode.EAGER);
|
||||||
|
branchName.addValueChangeListener(e -> {
|
||||||
|
refreshtGrid(groupeId.getValue(), strBranchName);
|
||||||
|
});
|
||||||
|
branchCo.setHeader(branchName);
|
||||||
|
|
||||||
|
|
||||||
Grid.Column<ProjectPersist> groupIdCo = projectPersistGrid.addColumn(projectPersist -> projectPersist.getGroupID());
|
Grid.Column<ProjectPersist> groupIdCo = projectPersistGrid.addColumn(projectPersist -> projectPersist.getGroupID());
|
||||||
groupeId = new TextField(strGroupeId);
|
groupeId = new TextField(strGroupeId);
|
||||||
groupeId.setValueChangeMode(ValueChangeMode.EAGER);
|
groupeId.setValueChangeMode(ValueChangeMode.EAGER);
|
||||||
|
|
@ -231,7 +242,7 @@ public class DeploymentView extends VerticalLayout implements AddLog {
|
||||||
if (projectPersist.getStatus().equals(ProjectPersist.DEFINI)) {
|
if (projectPersist.getStatus().equals(ProjectPersist.DEFINI)) {
|
||||||
|
|
||||||
getDeploymentAction().getAssociateKieServer().setEnabled(true);
|
getDeploymentAction().getAssociateKieServer().setEnabled(true);
|
||||||
getDeploymentAction().getDefinirProject().setEnabled(false);
|
getDeploymentAction().getDefinirProject().setEnabled(true);
|
||||||
getDeploymentAction().getDeployer().setEnabled(false);
|
getDeploymentAction().getDeployer().setEnabled(false);
|
||||||
|
|
||||||
} else if (projectPersist.getStatus().equals(ProjectPersist.ADEFINIR)) {
|
} else if (projectPersist.getStatus().equals(ProjectPersist.ADEFINIR)) {
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,8 @@ public class PlatformProjectResponse extends ProjectResponse {
|
||||||
|
|
||||||
private String artifactId;
|
private String artifactId;
|
||||||
|
|
||||||
|
private String branch;
|
||||||
|
|
||||||
private List<String> javaClasses = new ArrayList<>();
|
private List<String> javaClasses = new ArrayList<>();
|
||||||
|
|
||||||
public PlatformProjectResponse() {
|
public PlatformProjectResponse() {
|
||||||
|
|
@ -30,4 +32,12 @@ public class PlatformProjectResponse extends ProjectResponse {
|
||||||
public void setArtifactId(String artifactId) {
|
public void setArtifactId(String artifactId) {
|
||||||
this.artifactId = artifactId;
|
this.artifactId = artifactId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getBranch() {
|
||||||
|
return branch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBranch(String branch) {
|
||||||
|
this.branch = branch;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,8 @@ import org.kie.workbench.common.screens.datamodeller.model.EditorModelContent;
|
||||||
import org.kie.workbench.common.screens.datamodeller.service.DataModelerService;
|
import org.kie.workbench.common.screens.datamodeller.service.DataModelerService;
|
||||||
import org.kie.workbench.common.services.datamodeller.core.DataObject;
|
import org.kie.workbench.common.services.datamodeller.core.DataObject;
|
||||||
import org.kie.workbench.common.services.datamodeller.core.impl.DataModelImpl;
|
import org.kie.workbench.common.services.datamodeller.core.impl.DataModelImpl;
|
||||||
import org.kie.workbench.common.services.shared.project.KieModule;
|
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.uberfire.backend.vfs.PathFactory;
|
||||||
import org.uberfire.io.IOService;
|
import org.uberfire.io.IOService;
|
||||||
import org.uberfire.java.nio.base.options.CommentedOption;
|
import org.uberfire.java.nio.base.options.CommentedOption;
|
||||||
import org.uberfire.java.nio.file.DirectoryStream;
|
import org.uberfire.java.nio.file.DirectoryStream;
|
||||||
|
|
@ -70,6 +70,7 @@ public class PackageResource {
|
||||||
@Inject
|
@Inject
|
||||||
private WorkspaceProjectService workspaceProjectService;
|
private WorkspaceProjectService workspaceProjectService;
|
||||||
|
|
||||||
|
|
||||||
public PackageResource() {
|
public PackageResource() {
|
||||||
System.out.println("coucou");
|
System.out.println("coucou");
|
||||||
}
|
}
|
||||||
|
|
@ -118,7 +119,11 @@ public class PackageResource {
|
||||||
|
|
||||||
final List<PlatformProjectResponse> repoNames = new ArrayList<>();
|
final List<PlatformProjectResponse> repoNames = new ArrayList<>();
|
||||||
for (WorkspaceProject workspaceProject : workspaceProjectService.getAllWorkspaceProjects(ou)) {
|
for (WorkspaceProject workspaceProject : workspaceProjectService.getAllWorkspaceProjects(ou)) {
|
||||||
repoNames.add(getProjectResponse(workspaceProject));
|
for (Branch branch : workspaceProject.getRepository().getBranches()){
|
||||||
|
repoNames.add(getProjectResponse(workspaceProject,branch));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return repoNames;
|
return repoNames;
|
||||||
|
|
@ -129,14 +134,16 @@ public class PackageResource {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private PlatformProjectResponse getProjectResponse(WorkspaceProject workspaceProject) {
|
private PlatformProjectResponse getProjectResponse(WorkspaceProject workspaceProject,Branch branch) {
|
||||||
final PlatformProjectResponse projectResponse = new PlatformProjectResponse();
|
final PlatformProjectResponse projectResponse = new PlatformProjectResponse();
|
||||||
projectResponse.setName(workspaceProject.getName());
|
projectResponse.setName(workspaceProject.getName());
|
||||||
projectResponse.setSpaceName(workspaceProject.getOrganizationalUnit().getName());
|
projectResponse.setSpaceName(workspaceProject.getOrganizationalUnit().getName());
|
||||||
|
|
||||||
if (workspaceProject.getMainModule() != null) {
|
if (workspaceProject.getMainModule() != null) {
|
||||||
Module kmodule = workspaceProject.getMainModule();
|
Module kmodule = workspaceProject.getMainModule();
|
||||||
EditorModelContent econtent = dataModelerService.loadContent(((KieModule) kmodule).getImportsPath());
|
org.uberfire.backend.vfs.Path importVFPath = PathFactory.newPath("project.imports", branch.getPath().toURI()+"project.imports");
|
||||||
|
EditorModelContent econtent = dataModelerService.loadContent(importVFPath);
|
||||||
|
//EditorModelContent econtent = dataModelerService.loadContent(((KieModule) kmodule).getImportsPath());
|
||||||
DataModelImpl econtentDataModel = (DataModelImpl) econtent.getDataModel();
|
DataModelImpl econtentDataModel = (DataModelImpl) econtent.getDataModel();
|
||||||
List<DataObject> dataObjects = econtentDataModel.getExternalClasses();
|
List<DataObject> dataObjects = econtentDataModel.getExternalClasses();
|
||||||
for (DataObject dataObject : dataObjects) {
|
for (DataObject dataObject : dataObjects) {
|
||||||
|
|
@ -149,6 +156,7 @@ public class PackageResource {
|
||||||
projectResponse.setGroupId(workspaceProject.getMainModule().getPom().getGav().getGroupId());
|
projectResponse.setGroupId(workspaceProject.getMainModule().getPom().getGav().getGroupId());
|
||||||
projectResponse.setVersion(workspaceProject.getMainModule().getPom().getGav().getVersion());
|
projectResponse.setVersion(workspaceProject.getMainModule().getPom().getGav().getVersion());
|
||||||
projectResponse.setDescription(workspaceProject.getMainModule().getPom().getDescription());
|
projectResponse.setDescription(workspaceProject.getMainModule().getPom().getDescription());
|
||||||
|
projectResponse.setBranch(branch.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
final ArrayList<org.guvnor.rest.client.PublicURI> publicURIs = new ArrayList<>();
|
final ArrayList<org.guvnor.rest.client.PublicURI> publicURIs = new ArrayList<>();
|
||||||
|
|
@ -412,8 +420,11 @@ public class PackageResource {
|
||||||
WorkspaceProject project = getProject(organizationalUnitName, projectName);
|
WorkspaceProject project = getProject(organizationalUnitName, projectName);
|
||||||
|
|
||||||
if (project != null) {
|
if (project != null) {
|
||||||
|
// Optional<Branch> rr = project.getRepository().getBranch("ee");
|
||||||
|
// org.uberfire.backend.vfs.Path tata = rr.get().getPath();
|
||||||
org.uberfire.backend.vfs.Path rootPath = project.getRootPath();
|
org.uberfire.backend.vfs.Path rootPath = project.getRootPath();
|
||||||
org.uberfire.java.nio.file.Path nioPath = Paths.get(rootPath.toURI());
|
org.uberfire.java.nio.file.Path nioPath = Paths.get(rootPath.toURI());
|
||||||
|
|
||||||
DirectoryStream<org.uberfire.java.nio.file.Path> directoryStream = ioService.newDirectoryStream(nioPath);
|
DirectoryStream<org.uberfire.java.nio.file.Path> directoryStream = ioService.newDirectoryStream(nioPath);
|
||||||
org.uberfire.java.nio.file.Path elementToUpdate = getFileElementPath(directoryStream, assetName);
|
org.uberfire.java.nio.file.Path elementToUpdate = getFileElementPath(directoryStream, assetName);
|
||||||
File fileToUpdate = elementToUpdate.toFile();
|
File fileToUpdate = elementToUpdate.toFile();
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,6 @@
|
||||||
<filter-name>HTTP Basic Auth Filter</filter-name>
|
<filter-name>HTTP Basic Auth Filter</filter-name>
|
||||||
<url-pattern>/git/*</url-pattern>
|
<url-pattern>/git/*</url-pattern>
|
||||||
<url-pattern>/rest/*</url-pattern>
|
<url-pattern>/rest/*</url-pattern>
|
||||||
<url-pattern>/maven2/*</url-pattern>
|
|
||||||
<url-pattern>/ws/*</url-pattern>
|
<url-pattern>/ws/*</url-pattern>
|
||||||
</filter-mapping>
|
</filter-mapping>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,10 @@ public class DeleteFactEventStrategy implements AbstractMemoryEventHandlerStrate
|
||||||
|
|
||||||
} else { // inserted from a rule that is not in a ruleflow/process
|
} else { // inserted from a rule that is not in a ruleflow/process
|
||||||
existingInSessionRuleExecution = sessionContext.getRuleExecution();
|
existingInSessionRuleExecution = sessionContext.getRuleExecution();
|
||||||
|
if (existingInSessionRuleExecution==null){
|
||||||
|
existingInSessionRuleExecution = new RuleExecution();
|
||||||
|
sessionContext.setRuleExecution(existingInSessionRuleExecution);
|
||||||
|
}
|
||||||
existingInSessionRuleExecution.getThenFacts().add(fact);
|
existingInSessionRuleExecution.getThenFacts().add(fact);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
<modules>
|
<modules>
|
||||||
<module>drools-framework-common</module>
|
<module>drools-framework-common</module>
|
||||||
<module>drools-framework-examples</module>
|
<module>drools-framework-examples</module>
|
||||||
<!--module>drools-framework-kie-server-parent</module-->
|
<module>drools-framework-kie-server-parent</module>
|
||||||
<module>drools-framework-runtime-base</module>
|
<module>drools-framework-runtime-base</module>
|
||||||
<module>drools-framework-runtime-entity</module>
|
<module>drools-framework-runtime-entity</module>
|
||||||
<module>drools-framework-kie-wb-parent</module>
|
<module>drools-framework-kie-wb-parent</module>
|
||||||
|
|
|
||||||
|
|
@ -97,8 +97,8 @@
|
||||||
<orderEntry type="library" name="Maven: commons-io:commons-io:2.6" level="project" />
|
<orderEntry type="library" name="Maven: commons-io:commons-io:2.6" level="project" />
|
||||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.7" level="project" />
|
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.7" level="project" />
|
||||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.7" level="project" />
|
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.7" level="project" />
|
||||||
<orderEntry type="library" name="Maven: org.kie:kie-internal:7.31.0.Final" level="project" />
|
<orderEntry type="library" name="Maven: org.kie:kie-internal:7.35.0.Final" level="project" />
|
||||||
<orderEntry type="library" name="Maven: org.kie:kie-api:7.31.0.Final" level="project" />
|
<orderEntry type="library" name="Maven: org.kie:kie-api:7.35.0.Final" level="project" />
|
||||||
<orderEntry type="library" name="Maven: org.kie.soup:kie-soup-maven-support:7.31.0.Final" level="project" />
|
<orderEntry type="library" name="Maven: org.kie.soup:kie-soup-maven-support:7.35.0.Final" level="project" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
|
|
@ -95,8 +95,8 @@
|
||||||
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
|
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
|
||||||
<orderEntry type="library" name="Maven: com.google.guava:guava:13.0.1" level="project" />
|
<orderEntry type="library" name="Maven: com.google.guava:guava:13.0.1" level="project" />
|
||||||
<orderEntry type="library" name="Maven: commons-io:commons-io:2.1" level="project" />
|
<orderEntry type="library" name="Maven: commons-io:commons-io:2.1" level="project" />
|
||||||
<orderEntry type="library" name="Maven: org.kie:kie-internal:7.31.0.Final" level="project" />
|
<orderEntry type="library" name="Maven: org.kie:kie-internal:7.35.0.Final" level="project" />
|
||||||
<orderEntry type="library" name="Maven: org.kie:kie-api:7.31.0.Final" level="project" />
|
<orderEntry type="library" name="Maven: org.kie:kie-api:7.35.0.Final" level="project" />
|
||||||
<orderEntry type="library" name="Maven: org.kie.soup:kie-soup-maven-support:7.31.0.Final" level="project" />
|
<orderEntry type="library" name="Maven: org.kie.soup:kie-soup-maven-support:7.35.0.Final" level="project" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
|
|
@ -25,4 +25,3 @@ spring.data.mongodb.host=localhost:28017
|
||||||
|
|
||||||
eureka.client.service-url.defaultZone=http://127.0.0.1:8761/eureka/
|
eureka.client.service-url.defaultZone=http://127.0.0.1:8761/eureka/
|
||||||
spring.application.name=proxy-app-${org.kie.server.id}
|
spring.application.name=proxy-app-${org.kie.server.id}
|
||||||
kie-wb.m2repo=http://host.docker:8080/kie-wb/maven2/
|
|
||||||
|
|
@ -2,6 +2,8 @@ package org.chtijbug.drools.proxy.persistence.model;
|
||||||
|
|
||||||
import org.chtijbug.drools.proxy.persistence.json.KieProject;
|
import org.chtijbug.drools.proxy.persistence.json.KieProject;
|
||||||
import org.springframework.data.annotation.Id;
|
import org.springframework.data.annotation.Id;
|
||||||
|
import org.springframework.data.mongodb.core.index.CompoundIndex;
|
||||||
|
import org.springframework.data.mongodb.core.index.CompoundIndexes;
|
||||||
import org.springframework.data.mongodb.core.index.Indexed;
|
import org.springframework.data.mongodb.core.index.Indexed;
|
||||||
import org.springframework.data.mongodb.core.mapping.Document;
|
import org.springframework.data.mongodb.core.mapping.Document;
|
||||||
|
|
||||||
|
|
@ -10,6 +12,9 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Document
|
@Document
|
||||||
|
@CompoundIndexes({
|
||||||
|
@CompoundIndex(def = "{'projectName':1, 'branch':1}", name = "projectName_branch_Index")
|
||||||
|
})
|
||||||
public class ProjectPersist implements Serializable {
|
public class ProjectPersist implements Serializable {
|
||||||
|
|
||||||
public static final String ADEFINIR="A définir";
|
public static final String ADEFINIR="A définir";
|
||||||
|
|
@ -23,6 +28,9 @@ public class ProjectPersist implements Serializable {
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@Indexed
|
@Indexed
|
||||||
|
private String uuid;
|
||||||
|
|
||||||
|
|
||||||
private KieProject projectName;
|
private KieProject projectName;
|
||||||
|
|
||||||
private String mainClass;
|
private String mainClass;
|
||||||
|
|
@ -37,6 +45,8 @@ public class ProjectPersist implements Serializable {
|
||||||
|
|
||||||
private String containerID;
|
private String containerID;
|
||||||
|
|
||||||
|
private String branch;
|
||||||
|
|
||||||
private List<String> serverNames= new ArrayList<>();
|
private List<String> serverNames= new ArrayList<>();
|
||||||
|
|
||||||
private String status;
|
private String status;
|
||||||
|
|
@ -146,6 +156,14 @@ public class ProjectPersist implements Serializable {
|
||||||
this.classNameList = classNameList;
|
this.classNameList = classNameList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getBranch() {
|
||||||
|
return branch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBranch(String branch) {
|
||||||
|
this.branch = branch;
|
||||||
|
}
|
||||||
|
|
||||||
public ProjectPersist duplicate(){
|
public ProjectPersist duplicate(){
|
||||||
ArrayList<String> listServerNames = new ArrayList<String>();
|
ArrayList<String> listServerNames = new ArrayList<String>();
|
||||||
listServerNames.addAll(serverNames);
|
listServerNames.addAll(serverNames);
|
||||||
|
|
@ -20,6 +20,9 @@ public class RuntimePersist {
|
||||||
private String serverName;
|
private String serverName;
|
||||||
|
|
||||||
private String version;
|
private String version;
|
||||||
|
|
||||||
|
private String branch;
|
||||||
|
|
||||||
@Indexed
|
@Indexed
|
||||||
private String hostname;
|
private String hostname;
|
||||||
|
|
||||||
|
|
@ -145,4 +148,12 @@ public class RuntimePersist {
|
||||||
public void setTimeStamp(Date timeStamp) {
|
public void setTimeStamp(Date timeStamp) {
|
||||||
this.timeStamp = timeStamp;
|
this.timeStamp = timeStamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getBranch() {
|
||||||
|
return branch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBranch(String branch) {
|
||||||
|
this.branch = branch;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -10,7 +10,8 @@ import java.util.List;
|
||||||
@Repository
|
@Repository
|
||||||
public interface ProjectRepository extends MongoRepository<ProjectPersist, String> {
|
public interface ProjectRepository extends MongoRepository<ProjectPersist, String> {
|
||||||
|
|
||||||
public ProjectPersist findByProjectName(KieProject projectName);
|
public List<ProjectPersist> findByProjectName(KieProject projectName);
|
||||||
|
public ProjectPersist findByProjectNameAndBranch(KieProject projectName,String branch);
|
||||||
public ProjectPersist findByDeploymentName(String deploymentName);
|
public ProjectPersist findByDeploymentName(String deploymentName);
|
||||||
public List<ProjectPersist> findByServerNamesIn(List<String> serverNames);
|
public List<ProjectPersist> findByServerNamesIn(List<String> serverNames);
|
||||||
public List<ProjectPersist> findByServerNamesInAndDeploymentName(List<String> serverNames,String deploymentName);
|
public List<ProjectPersist> findByServerNamesInAndDeploymentName(List<String> serverNames,String deploymentName);
|
||||||
|
|
@ -41,9 +41,9 @@
|
||||||
<orderEntry type="library" name="Maven: com.google.guava:guava:13.0.1" level="project" />
|
<orderEntry type="library" name="Maven: com.google.guava:guava:13.0.1" level="project" />
|
||||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.7" level="project" />
|
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.7" level="project" />
|
||||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.7" level="project" />
|
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.7" level="project" />
|
||||||
<orderEntry type="library" name="Maven: org.kie:kie-internal:7.31.0.Final" level="project" />
|
<orderEntry type="library" name="Maven: org.kie:kie-internal:7.35.0.Final" level="project" />
|
||||||
<orderEntry type="library" name="Maven: org.kie:kie-api:7.31.0.Final" level="project" />
|
<orderEntry type="library" name="Maven: org.kie:kie-api:7.35.0.Final" level="project" />
|
||||||
<orderEntry type="library" name="Maven: org.kie.soup:kie-soup-maven-support:7.31.0.Final" level="project" />
|
<orderEntry type="library" name="Maven: org.kie.soup:kie-soup-maven-support:7.35.0.Final" level="project" />
|
||||||
<orderEntry type="library" name="Maven: com.github.mkopylec:charon-spring-boot-starter:3.1.0" level="project" />
|
<orderEntry type="library" name="Maven: com.github.mkopylec:charon-spring-boot-starter:3.1.0" level="project" />
|
||||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.1.0.RELEASE" level="project" />
|
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.1.0.RELEASE" level="project" />
|
||||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.1.0.RELEASE" level="project" />
|
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.1.0.RELEASE" level="project" />
|
||||||
|
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
<?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="Spring" name="Spring">
|
|
||||||
<configuration />
|
|
||||||
</facet>
|
|
||||||
</component>
|
|
||||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
|
||||||
<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/java" isTestSource="false" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
|
||||||
</content>
|
|
||||||
<orderEntry type="inheritedJdk" />
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-mongodb:2.1.0.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.1.0.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.1.0.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.1.0.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.1.2.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.1.2.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.23" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.mongodb:mongodb-driver:3.8.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.mongodb:bson:3.8.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.mongodb:mongodb-driver-core:3.8.2" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-mongodb:2.1.2.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.1.2.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.1.2.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.1.2.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.1.2.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.1.2.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.1.2.RELEASE" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
|
|
||||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.7" level="project" />
|
|
||||||
</component>
|
|
||||||
</module>
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
</properties>
|
</properties>
|
||||||
<modules>
|
<modules>
|
||||||
<module>drools-framework-business-proxy-app</module>
|
<module>drools-framework-business-proxy-app</module>
|
||||||
<module>drools-framewwork-business-proxy-persistence</module>
|
<module>drools-framework-business-proxy-persistence</module>
|
||||||
<module>drools-framework-business-indexer-app</module>
|
<module>drools-framework-business-indexer-app</module>
|
||||||
<module>drools-framework-business-indexer-persistence</module>
|
<module>drools-framework-business-indexer-persistence</module>
|
||||||
<module>drools-framework-business-reverse-proxy</module>
|
<module>drools-framework-business-reverse-proxy</module>
|
||||||
|
|
|
||||||
2
pom.xml
2
pom.xml
|
|
@ -17,7 +17,7 @@
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<jbpm.version>7.31.0.Final</jbpm.version>
|
<jbpm.version>7.35.0.Final</jbpm.version>
|
||||||
<node.version>v10.16.3</node.version>
|
<node.version>v10.16.3</node.version>
|
||||||
<npm.version>6.11.3</npm.version>
|
<npm.version>6.11.3</npm.version>
|
||||||
<frontend-maven-plugin.version>1.8.0</frontend-maven-plugin.version>
|
<frontend-maven-plugin.version>1.8.0</frontend-maven-plugin.version>
|
||||||
|
|
|
||||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue