Compare commits

...

4 Commits

Author SHA1 Message Date
apoltavtsev
2ffcce909a Update AbstractMavenProcessorPom.java 2020-11-18 13:24:51 +01:00
apoltavtsev
aeab2f8da9 Update AbstractMavenProcessorPom.java 2020-11-18 13:22:25 +01:00
apoltavtsev
1e4010ce99 fix(TESB-29553, TESB-31088) Could not generate ctalenjob microservice jar 2020-11-18 12:40:57 +01:00
kjwang
49aab27be9 Kjwang/fix tup 29290 detect and update all jobs r73 (#3845)
* fix(TUP-28952):TOS: NPE when delete items to recycle bin (#3738)

https://jira.talendforge.org/browse/TUP-28952

Signed-off-by: jding-tlnd <jding@talend.com>

* Fix TUP-29290 "Detect and Update all jobs " is not identifying the changes in imported projects. (#3833)

* Fix TUP-29290 "Detect and Update all jobs " is not identifying the
changes in imported projects.
https://jira.talendforge.org/browse/TUP-29290

Co-authored-by: Jane Ding <jding@talend.com>
2020-11-16 17:58:44 +08:00
3 changed files with 31 additions and 19 deletions

View File

@@ -594,7 +594,7 @@ public class ContextUtils {
return false;
}
// need check the raw value, because in sourceParam, it's raw
if (!sourceParam.getValue().equals(targetParamType.getRawValue())) {
if (!StringUtils.equals(sourceParam.getValue(), targetParamType.getRawValue())) {
return false;
}

View File

@@ -320,24 +320,28 @@ public class RepositoryUpdateManagerHelper {
// all the jobs
for (IRepositoryViewObject process : processRep) {
Item item = process.getProperty().getItem();
boolean found = false;
for (IProcess2 open : openedProcessList) {
if (open.getId().equals(item.getProperty().getId())) {
found = true;
try {
Item item = process.getProperty().getItem();
boolean found = false;
for (IProcess2 open : openedProcessList) {
if (open.getId().equals(item.getProperty().getId())) {
found = true;
}
}
}
if (found) {
continue;
}
checkMonitorCanceled(parentMonitor);
parentMonitor.subTask(RepositoryUpdateManager.getUpdateJobInfor(item.getProperty()));
if (found) {
continue;
}
checkMonitorCanceled(parentMonitor);
parentMonitor.subTask(RepositoryUpdateManager.getUpdateJobInfor(item.getProperty()));
// List<UpdateResult> resultFromProcess = getResultFromProcess(process, types, onlySimpleShow);
// List<UpdateResult> resultFromProcess = getResultFromProcess(process, types, onlySimpleShow);
List<UpdateResult> resultFromProcess = getUpdatesNeededFromItems(parentMonitor, item, types);
if (resultFromProcess != null) {
resultList.addAll(resultFromProcess);
List<UpdateResult> resultFromProcess = getUpdatesNeededFromItems(parentMonitor, item, types);
if (resultFromProcess != null) {
resultList.addAll(resultFromProcess);
}
} catch (Exception ex) {
ExceptionHandler.process(ex);
}
parentMonitor.worked(1);
}

View File

@@ -136,7 +136,7 @@ public abstract class AbstractMavenProcessorPom extends CreateMavenBundleTemplat
Map<ETalendMavenVariables, String> variablesValuesMap = new HashMap<ETalendMavenVariables, String>();
// no need check property is null or not, because if null, will get default ids.
JobInfo lastMainJob = LastGenerationInfo.getInstance().getLastMainJob();
JobInfo lastMainJob = LastGenerationInfo.getInstance().getLastMainJob();
if (JobUtils.isJob(property) && ProcessUtils.isChildRouteProcess(process) && lastMainJob != null) {
variablesValuesMap.put(ETalendMavenVariables.JobGroupId, PomIdsHelper.getJobGroupId(lastMainJob.getProcessor().getProperty()));
variablesValuesMap.put(ETalendMavenVariables.JobVersion, PomIdsHelper.getJobVersion(lastMainJob.getProcessor().getProperty()));
@@ -318,10 +318,18 @@ public abstract class AbstractMavenProcessorPom extends CreateMavenBundleTemplat
String type = null;
if (!jobInfo.isJoblet()) {
property = jobInfo.getProcessItem().getProperty();
groupId = PomIdsHelper.getJobGroupId(property);
artifactId = PomIdsHelper.getJobArtifactId(jobInfo);
JobInfo lastMainJob = LastGenerationInfo.getInstance().getLastMainJob();
if (lastMainJob != null && JobUtils.isJob(jobInfo)) {
groupId = PomIdsHelper.getJobGroupId(lastMainJob.getProcessor().getProperty());
version = PomIdsHelper.getJobVersion(lastMainJob.getProcessor().getProperty());
} else {
groupId = PomIdsHelper.getJobGroupId(property);
version = PomIdsHelper.getJobVersion(property);
}
version = PomIdsHelper.getJobVersion(property);
// try to get the pom version of children job and load from the pom file.
String childPomFileName = PomUtil.getPomFileName(jobInfo.getJobName(), jobInfo.getJobVersion());
IProject codeProject = getJobProcessor().getCodeProject();