Compare commits
8 Commits
release/7.
...
release/7.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae4cc4cdfd | ||
|
|
909a8e4fb7 | ||
|
|
59d71296ce | ||
|
|
b80b862bcd | ||
|
|
ed2b236467 | ||
|
|
152a06856f | ||
|
|
258be81901 | ||
|
|
8c0bdc29bf |
@@ -88,7 +88,7 @@ public enum EDatabaseVersion4Drivers {
|
||||
"Microsoft", "MSSQL_PROP", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new String[] { "mssql-jdbc.jar", "slf4j-api-1.7.25.jar", "slf4j-log4j12-1.7.25.jar", "adal4j-1.6.7.jar", //$NON-NLS-1$
|
||||
"commons-lang3-3.10.jar", "commons-codec-1.14.jar", "gson-2.8.6.jar", "oauth2-oidc-sdk-9.7.jar",
|
||||
"json-smart-2.4.7.jar", "nimbus-jose-jwt-8.11.jar", "javax.mail-1.6.2.jar", "reload4j-1.2.19.jar",
|
||||
"json-smart-2.4.7.jar", "nimbus-jose-jwt-9.22.jar", "javax.mail-1.6.2.jar", "reload4j-1.2.19.jar",
|
||||
"accessors-smart-2.4.7.jar", "asm-9.1.jar", "content-type-2.1.jar" })),
|
||||
|
||||
VERTICA_9(new DbVersion4Drivers(EDatabaseTypeName.VERTICA, "VERTICA 9.X", "VERTICA_9_0", "vertica-jdbc-9.3.1-0.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
@@ -94,7 +94,11 @@ public interface IDetectCVEService extends IService {
|
||||
if (art == null) {
|
||||
return null;
|
||||
}
|
||||
return String.format("%s:%s:%s", art.getGroupId(), art.getArtifactId(), art.getVersion());
|
||||
String gavc = String.format("%s:%s:%s", art.getGroupId(), art.getArtifactId(), art.getVersion());
|
||||
if (!StringUtils.isEmpty(art.getClassifier())) {
|
||||
gavc += ":" + art.getClassifier();
|
||||
}
|
||||
return gavc;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -112,6 +116,8 @@ public interface IDetectCVEService extends IService {
|
||||
private String a;
|
||||
|
||||
private String v;
|
||||
|
||||
private String c;
|
||||
|
||||
/**
|
||||
* @return the g
|
||||
@@ -155,8 +161,28 @@ public interface IDetectCVEService extends IService {
|
||||
this.v = v;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the c
|
||||
*/
|
||||
public String getC() {
|
||||
return c;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param c the c to set
|
||||
*/
|
||||
public void setC(String c) {
|
||||
this.c = c;
|
||||
}
|
||||
|
||||
public String getGAVString() {
|
||||
return String.format("%s:%s:%s", g, a, v);
|
||||
String gav = String.format("%s:%s:%s", g, a, v);
|
||||
if (!StringUtils.isEmpty(c)) {
|
||||
gav += ":" + c;
|
||||
}
|
||||
return gav;
|
||||
}
|
||||
|
||||
public String getGA() {
|
||||
@@ -168,13 +194,16 @@ public interface IDetectCVEService extends IService {
|
||||
return null;
|
||||
}
|
||||
String[] gavs = gav.split(":");
|
||||
if (gavs.length != 3) {
|
||||
if (gavs.length < 3) {
|
||||
return null;
|
||||
}
|
||||
GAV ret = new GAV();
|
||||
ret.setG(gavs[0]);
|
||||
ret.setA(gavs[1]);
|
||||
ret.setV(gavs[2]);
|
||||
if (gavs.length > 3) {
|
||||
ret.setC(gavs[3]);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -184,19 +213,7 @@ public interface IDetectCVEService extends IService {
|
||||
}
|
||||
|
||||
String gav = mavenUri2GAV(mavenURI);
|
||||
if (StringUtils.isEmpty(gav)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
String[] gavs = gav.split(":");
|
||||
if (gavs.length != 3) {
|
||||
return null;
|
||||
}
|
||||
GAV ret = new GAV();
|
||||
ret.setG(gavs[0]);
|
||||
ret.setA(gavs[1]);
|
||||
ret.setV(gavs[2]);
|
||||
return ret;
|
||||
return parseFromGAV(gav);
|
||||
}
|
||||
|
||||
public GAV clone() throws CloneNotSupportedException {
|
||||
@@ -224,6 +241,12 @@ public interface IDetectCVEService extends IService {
|
||||
sb.append(v);
|
||||
sb.append(",");
|
||||
}
|
||||
|
||||
if (!StringUtils.isEmpty(c)) {
|
||||
sb.append("c:");
|
||||
sb.append(c);
|
||||
sb.append(",");
|
||||
}
|
||||
|
||||
if (sb.lastIndexOf(",") > 0) {
|
||||
sb.deleteCharAt(sb.length() - 1);
|
||||
@@ -245,6 +268,9 @@ public interface IDetectCVEService extends IService {
|
||||
if (!StringUtils.isEmpty(v)) {
|
||||
hash += hash * 31 + v.hashCode();
|
||||
}
|
||||
if (!StringUtils.isEmpty(c)) {
|
||||
hash += hash * 31 + c.hashCode();
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
@@ -267,8 +293,12 @@ public interface IDetectCVEService extends IService {
|
||||
if (!StringUtils.equals(a, gav.getA())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!StringUtils.equals(v, gav.getV())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return StringUtils.equals(v, gav.getV());
|
||||
return StringUtils.equals(c, gav.getC());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -706,6 +706,8 @@ public class ProcessorUtilities {
|
||||
|
||||
processor.setArguments(argumentsMap);
|
||||
|
||||
handelDQComponents(selectedProcessItem, currentProcess);
|
||||
|
||||
// generate the code of the father after the childrens
|
||||
// so the code won't have any error during the check, and it will help to check
|
||||
// if the generation is really needed.
|
||||
@@ -721,7 +723,7 @@ public class ProcessorUtilities {
|
||||
*/
|
||||
generateBuildInfo(jobInfo, progressMonitor, isMainJob, currentProcess, currentJobName, processor, option);
|
||||
|
||||
handelDQComponents(selectedProcessItem, currentProcess);
|
||||
checkNeedExportItemsForDQ(currentProcess);
|
||||
|
||||
copyDependenciedResources(currentProcess, progressMonitor);
|
||||
|
||||
@@ -1251,6 +1253,8 @@ public class ProcessorUtilities {
|
||||
|
||||
processor.setArguments(argumentsMap);
|
||||
|
||||
handelDQComponents(selectedProcessItem, currentProcess);
|
||||
|
||||
generateContextInfo(jobInfo, selectedContextName, statistics, trace, needContext, progressMonitor,
|
||||
currentProcess, currentJobName, processor, isMainJob, codeGenerationNeeded);
|
||||
|
||||
@@ -1266,7 +1270,7 @@ public class ProcessorUtilities {
|
||||
generateBuildInfo(jobInfo, progressMonitor, isMainJob, currentProcess, currentJobName, processor, option);
|
||||
TimeMeasure.step(idTimer, "generateBuildInfo");
|
||||
|
||||
handelDQComponents(selectedProcessItem, currentProcess);
|
||||
checkNeedExportItemsForDQ(currentProcess);
|
||||
|
||||
copyDependenciedResources(currentProcess, progressMonitor);
|
||||
|
||||
@@ -1355,10 +1359,34 @@ public class ProcessorUtilities {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Specail operation for DQ components:
|
||||
* - For tdqReportRun, set 'needExportItemsForDQ'to true so as the item folder can be exported
|
||||
* - For tRuleSurvivorship, copy the current item's drools file from 'workspace/metadata/survivorship' to '.Java/src/resources'
|
||||
* if the job includes tdqReportRun, set 'needExportItemsForDQ'to true so as the item folder can be exported
|
||||
*
|
||||
* @param processItem
|
||||
* @param currentProcess
|
||||
*/
|
||||
private static void checkNeedExportItemsForDQ(IProcess currentProcess) {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITDQItemService.class)) {
|
||||
ITDQItemService tdqItemService =
|
||||
GlobalServiceRegister.getDefault().getService(ITDQItemService.class);
|
||||
// TDQ-19637 if it includes 'tDqReportRun',must export item folder
|
||||
if (tdqItemService != null && !needExportItemsForDQ) {
|
||||
for (INode node : currentProcess.getGeneratingNodes()) {
|
||||
String componentName = node.getComponent().getName();
|
||||
if ("tDqReportRun".equals(componentName)) {
|
||||
needExportItemsForDQ = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Specail operation for DQ components:
|
||||
* - For tRuleSurvivorship, copy the current item's drools file from 'workspace/metadata/survivorship' to
|
||||
* '.Java/src/resources'
|
||||
*
|
||||
* @param processItem
|
||||
*/
|
||||
private static void handelDQComponents(ProcessItem processItem,IProcess currentProcess) {
|
||||
@@ -1373,17 +1401,7 @@ public class ProcessorUtilities {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
// TDQ-19637 if it includes 'tDqReportRun',must export item folder
|
||||
if (!needExportItemsForDQ) {
|
||||
for (INode node : currentProcess.getGeneratingNodes()) {
|
||||
String componentName = node.getComponent().getName();
|
||||
if ("tDqReportRun".equals(componentName)) {
|
||||
needExportItemsForDQ = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* 1.TDQ-12474 copy the "metadata/survivorship/rulePackage" to ".Java/src/main/resources/". so that it will be
|
||||
/* 1.TDQ-12474 copy the "metadata/survivorship/rulePackage" to ".Java/src/main/resources/". so that it will be
|
||||
used by maven command 'include-survivorship-rules' to export.
|
||||
2.TDQ-14308 current drools file in 'src/resourcesmetadata/survivorship/' should be included to job jar.
|
||||
*/
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-compat</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.beanshell</groupId>
|
||||
<artifactId>bsh</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -97,7 +97,18 @@
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
<version>3.3.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
|
||||
@@ -14,6 +14,17 @@
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
<version>3.3.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.tycho</groupId>
|
||||
|
||||
@@ -34,6 +34,17 @@
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
<version>3.3.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
@@ -127,6 +138,11 @@
|
||||
<artifactId>commons-compress</artifactId>
|
||||
<version>1.21</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache-extras.beanshell</groupId>
|
||||
<artifactId>bsh</artifactId>
|
||||
<version>2.0b6</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
@@ -373,6 +373,10 @@ public class LocalLibraryManager implements ILibraryManagerService, IChangedLibr
|
||||
.process(new Exception(getClass().getSimpleName() + " resolve " + module.getModuleName() + " failed !"));
|
||||
}
|
||||
try {
|
||||
// try maven uri first
|
||||
if (jarFile == null) {
|
||||
jarFile = getJarFile(module.getMavenUri());
|
||||
}
|
||||
// try the jar name if can't get jar with uri.
|
||||
if (jarFile == null) {
|
||||
jarFile = getJarFile(jarNeeded);
|
||||
@@ -384,7 +388,10 @@ public class LocalLibraryManager implements ILibraryManagerService, IChangedLibr
|
||||
ILibraryManagerUIService libUiService = GlobalServiceRegister.getDefault()
|
||||
.getService(ILibraryManagerUIService.class);
|
||||
|
||||
libUiService.installModules(new String[] { jarNeeded });
|
||||
// libUiService.installModules(new String[] { jarNeeded });
|
||||
List<ModuleNeeded> moduleList = new ArrayList<ModuleNeeded>();
|
||||
moduleList.add(module);
|
||||
libUiService.installModules(moduleList);
|
||||
}
|
||||
jarFile = retrieveJarFromLocal(module);
|
||||
if (jarFile == null) {
|
||||
@@ -1347,7 +1354,7 @@ public class LocalLibraryManager implements ILibraryManagerService, IChangedLibr
|
||||
if (path.equals(moduleLocation)) {
|
||||
continue;
|
||||
} else {
|
||||
if (CommonsPlugin.isDebugMode()) {
|
||||
if (CommonsPlugin.isDebugMode() && !CommonsPlugin.isHeadless()) {
|
||||
CommonExceptionHandler
|
||||
.warn(name + " is duplicated, locations:" + path + " and:" + moduleLocation);
|
||||
}
|
||||
|
||||
@@ -1075,8 +1075,10 @@ public class ExtractMetaDataUtils {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (driverJarPathArg.startsWith(MavenUrlHelper.MVN_PROTOCOL)) {
|
||||
setDriverPath(librairesManagerService, jarPathList, driverJarPathArg);
|
||||
if (TalendQuoteUtils.removeQuotesIfExist(driverJarPathArg)
|
||||
.startsWith(MavenUrlHelper.MVN_PROTOCOL)) {
|
||||
setDriverPath(librairesManagerService, jarPathList,
|
||||
TalendQuoteUtils.removeQuotesIfExist(driverJarPathArg));
|
||||
} else {
|
||||
String jarName = librairesManagerService.getJarNameFromMavenuri(driverJarPathArg);
|
||||
if (jarName == null) {
|
||||
|
||||
Reference in New Issue
Block a user