Compare commits
19 Commits
patch/TPS-
...
bugfix/mas
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
85a199f467 | ||
|
|
7426a93b49 | ||
|
|
c3e5d003be | ||
|
|
cf5ea4e526 | ||
|
|
4914a382fc | ||
|
|
30caab1c84 | ||
|
|
da989e3f8c | ||
|
|
77754871b5 | ||
|
|
b024dd0ec0 | ||
|
|
b4d3e5ebea | ||
|
|
29f74206d5 | ||
|
|
445c9fc74b | ||
|
|
9f0b02c045 | ||
|
|
e3f4be3219 | ||
|
|
dc47689710 | ||
|
|
936cf7958f | ||
|
|
8f842b2155 | ||
|
|
db23bf8ec1 | ||
|
|
99ba1911f3 |
@@ -54,7 +54,9 @@
|
||||
jobFolderName = jobFolderName + JavaResourcesHelper.getJobFolderName(process.getName(), process.getVersion());
|
||||
String jobClassPackageFolder = codeGenArgument.getCurrentProjectName().toLowerCase() + '/' + jobFolderName;
|
||||
|
||||
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(process, "__LOG4J_ACTIVATE__"));
|
||||
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(process, "__LOG4J_ACTIVATE__"));//log4j enable
|
||||
boolean isLog4j2Enabled = ("true").equals(ElementParameterParser.getValue(process, "__LOG4J2_ACTIVATE__"));//log4j2 enable
|
||||
boolean isLog4j1Enabled = !isLog4j2Enabled;//log4j1 enable
|
||||
|
||||
boolean exist_tParallelize = false;
|
||||
List<? extends INode> tParallelizeList = process.getNodesOfType("tParallelize");
|
||||
@@ -449,6 +451,7 @@
|
||||
|
||||
<%if(isLog4jEnabled){%>
|
||||
if(!"".equals(log4jLevel)){
|
||||
<%if(isLog4j1Enabled){%>
|
||||
if("trace".equalsIgnoreCase(log4jLevel)){
|
||||
log.setLevel(org.apache.log4j.Level.TRACE);
|
||||
}else if("debug".equalsIgnoreCase(log4jLevel)){
|
||||
@@ -465,6 +468,26 @@
|
||||
log.setLevel(org.apache.log4j.Level.OFF);
|
||||
}
|
||||
org.apache.log4j.Logger.getRootLogger().setLevel(log.getLevel());
|
||||
<%}%>
|
||||
|
||||
<%if(isLog4j2Enabled){%>
|
||||
if("trace".equalsIgnoreCase(log4jLevel)){
|
||||
org.apache.logging.log4j.core.config.Configurator.setLevel(log.getName(), org.apache.logging.log4j.Level.TRACE);
|
||||
}else if("debug".equalsIgnoreCase(log4jLevel)){
|
||||
org.apache.logging.log4j.core.config.Configurator.setLevel(log.getName(), org.apache.logging.log4j.Level.DEBUG);
|
||||
}else if("info".equalsIgnoreCase(log4jLevel)){
|
||||
org.apache.logging.log4j.core.config.Configurator.setLevel(log.getName(), org.apache.logging.log4j.Level.INFO);
|
||||
}else if("warn".equalsIgnoreCase(log4jLevel)){
|
||||
org.apache.logging.log4j.core.config.Configurator.setLevel(log.getName(), org.apache.logging.log4j.Level.WARN);
|
||||
}else if("error".equalsIgnoreCase(log4jLevel)){
|
||||
org.apache.logging.log4j.core.config.Configurator.setLevel(log.getName(), org.apache.logging.log4j.Level.ERROR);
|
||||
}else if("fatal".equalsIgnoreCase(log4jLevel)){
|
||||
org.apache.logging.log4j.core.config.Configurator.setLevel(log.getName(), org.apache.logging.log4j.Level.FATAL);
|
||||
}else if ("off".equalsIgnoreCase(log4jLevel)){
|
||||
org.apache.logging.log4j.core.config.Configurator.setLevel(log.getName(), org.apache.logging.log4j.Level.OFF);
|
||||
}
|
||||
org.apache.logging.log4j.core.config.Configurator.setLevel(org.apache.logging.log4j.LogManager.getRootLogger().getName(), log.getLevel());
|
||||
<%}%>
|
||||
}
|
||||
log.info("TalendJob: '<%=codeGenArgument.getJobName()%>' - Start.");
|
||||
<%}%>
|
||||
@@ -499,6 +522,17 @@
|
||||
.filter(it -> it.startsWith("monitoring.audit.logger.properties."))
|
||||
.forEach(key -> properties_<%=jobCatcherNode.getUniqueName()%>.setProperty(key.substring("monitoring.audit.logger.properties.".length()), System.getProperty(key)));
|
||||
|
||||
<%if(isLog4jEnabled) {%>
|
||||
<%if(isLog4j1Enabled) {%>
|
||||
org.apache.log4j.Logger.getLogger("audit").setLevel(org.apache.log4j.Level.DEBUG);
|
||||
<%}%>
|
||||
|
||||
<%if(isLog4j2Enabled) {%>
|
||||
org.apache.logging.log4j.core.config.Configurator.setLevel("audit", org.apache.logging.log4j.Level.DEBUG);
|
||||
<%}%>
|
||||
<%} else {%>
|
||||
org.apache.log4j.Logger.getLogger("audit").setLevel(org.apache.log4j.Level.DEBUG);
|
||||
<%}%>
|
||||
auditLogger_<%=jobCatcherNode.getUniqueName()%> = org.talend.job.audit.JobEventAuditLoggerFactory.createJobAuditLogger(properties_<%=jobCatcherNode.getUniqueName()%>);
|
||||
}
|
||||
<%
|
||||
|
||||
@@ -141,7 +141,9 @@ for (INode node : process.getNodesOfType("tRESTClient")) {
|
||||
boolean talendEsbJobFactory = actAsProvider || !process.getNodesOfType("tRouteInput").isEmpty();
|
||||
boolean talendEsbJob = talendEsbJobFactory || actAsConsumer || ProcessorUtilities.isEsbJob(process);
|
||||
|
||||
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(process, "__LOG4J_ACTIVATE__"));
|
||||
boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(process, "__LOG4J_ACTIVATE__"));//log4j enable
|
||||
boolean isLog4j2Enabled = ("true").equals(ElementParameterParser.getValue(process, "__LOG4J2_ACTIVATE__"));//log4j2 enable
|
||||
boolean isLog4j1Enabled = !isLog4j2Enabled;//log4j1 enable
|
||||
|
||||
if (talendMdmJob) {
|
||||
talendJobInterfaces += ", TalendMDMJob"; // Talend MDM job
|
||||
@@ -156,7 +158,14 @@ if (talendEsbJobFactory) {
|
||||
public class <%=className%> implements <%=talendJobInterfaces%> {
|
||||
<%if(isLog4jEnabled){%>
|
||||
static {System.setProperty("TalendJob.log", "<%=className%>.log");}
|
||||
|
||||
<%if(isLog4j1Enabled){%>
|
||||
private static org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(<%=className%>.class);
|
||||
<%}%>
|
||||
|
||||
<%if(isLog4j2Enabled){%>
|
||||
private static org.apache.logging.log4j.Logger log = org.apache.logging.log4j.LogManager.getLogger(<%=className%>.class);
|
||||
<%}%>
|
||||
<%}%>
|
||||
|
||||
protected static void logIgnoredError(String message, Throwable cause) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<groupId>com.microsoft.azure</groupId>
|
||||
<artifactId>adal4j</artifactId>
|
||||
|
||||
<version>1.1.1-patch</version>
|
||||
<version>1.1.1-20191012</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>adal4j</name>
|
||||
<description>
|
||||
@@ -105,7 +105,7 @@
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>1.7.5</version>
|
||||
<version>1.7.25</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
|
||||
@@ -33,10 +33,15 @@
|
||||
<version>3.0.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>1.7.25</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>1.7.5</version>
|
||||
<version>1.7.25</version>
|
||||
</dependency>
|
||||
<!-- Spring 3 dependencies -->
|
||||
<dependency>
|
||||
|
||||
@@ -27,7 +27,8 @@ import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.apache.commons.lang3.text.WordUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
@@ -41,7 +42,7 @@ import org.json.JSONObject;
|
||||
*/
|
||||
public class JSONHelper {
|
||||
|
||||
private static Logger logger = Logger.getLogger(JSONHelper.class);
|
||||
private static Logger logger = LoggerFactory.getLogger(JSONHelper.class);
|
||||
|
||||
JSONHelper() {
|
||||
// PropertyConfigurator.configure("log4j.properties");
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<groupId>org.neo4j.talend</groupId>
|
||||
<artifactId>neo4j-talend-component</artifactId>
|
||||
<version>1.3-20171206</version>
|
||||
<version>1.3-20191012</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Neo4j Talend </name>
|
||||
@@ -100,12 +100,23 @@
|
||||
<artifactId>neo4j-import-tool</artifactId>
|
||||
<version>${neo4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>1.7.25</version>
|
||||
</dependency>
|
||||
<!-- Talend log4j library -->
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>1.7.25</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.16</version>
|
||||
<scope>provided</scope>
|
||||
<version>1.2.17</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- JUnit -->
|
||||
<dependency>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.neo4j.talend;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.neo4j.graphdb.DynamicLabel;
|
||||
import org.neo4j.graphdb.index.IndexHits;
|
||||
import org.neo4j.helpers.collection.MapUtil;
|
||||
@@ -23,7 +24,7 @@ public class Neo4jBatchDatabase {
|
||||
/**
|
||||
* The logger
|
||||
*/
|
||||
private static Logger log = Logger.getLogger(Neo4jBatchDatabase.class);
|
||||
private static Logger log = LoggerFactory.getLogger(Neo4jBatchDatabase.class);
|
||||
|
||||
/**
|
||||
* Name of the field index for the importId
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package org.neo4j.talend;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.neo4j.graphdb.DynamicRelationshipType;
|
||||
|
||||
@@ -11,7 +12,7 @@ import java.util.Map;
|
||||
|
||||
public class Neo4jBatchInserterRelationship extends Neo4jBatchInserterAbstract {
|
||||
|
||||
private static Logger log = Logger.getLogger(Neo4jBatchInserterRelationship.class);
|
||||
private static Logger log = LoggerFactory.getLogger(Neo4jBatchInserterRelationship.class);
|
||||
|
||||
private String relationshipTypeField;
|
||||
private String direction;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package org.neo4j.talend;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.neo4j.tooling.ImportTool;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
@@ -18,7 +19,7 @@ public class Neo4jImportTool {
|
||||
/**
|
||||
* The logger
|
||||
*/
|
||||
private final static Logger log = Logger.getLogger(Neo4jImportTool.class);
|
||||
private final static Logger log = LoggerFactory.getLogger(Neo4jImportTool.class);
|
||||
|
||||
protected final static String HEADERS_KEY = "HEADERS";
|
||||
protected final static String FILE_KEY = "FILE";
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<groupId>org.talend.components.lib</groupId>
|
||||
<artifactId>talend-db-exasol</artifactId>
|
||||
<version>2.1.4</version>
|
||||
<version>2.1.5</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>talend-db-exasol</name>
|
||||
@@ -33,10 +33,22 @@
|
||||
</distributionManagement>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>1.7.25</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>1.7.25</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.17</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
|
||||
@@ -27,15 +27,15 @@ import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Level;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
/**
|
||||
* This class provides an IMPORT command for the EXASol database.
|
||||
* @author Jan Lolling, jan.lolling@cimt-ag.de
|
||||
*/
|
||||
public class EXABulkUtil {
|
||||
|
||||
private static Logger logger = Logger.getLogger(EXABulkUtil.class);
|
||||
private static Logger logger = LoggerFactory.getLogger(EXABulkUtil.class);
|
||||
public static final String CSV = "CSV";
|
||||
public static final String FBV = "FBV";
|
||||
public static final String ORA = "ORA";
|
||||
@@ -83,14 +83,6 @@ public class EXABulkUtil {
|
||||
private int sourceIdentifierCase = 0; // 0 = unchanged, 1 = lower case, 2 = upper case
|
||||
private boolean onlyBuildSQLCode = false;
|
||||
|
||||
public void setDebug(boolean debug) {
|
||||
if (debug) {
|
||||
logger.setLevel(Level.DEBUG);
|
||||
} else {
|
||||
logger.setLevel(Level.INFO);
|
||||
}
|
||||
}
|
||||
|
||||
private String createNumberFormat(Integer length, Integer precision, boolean hasGroups) {
|
||||
if (length != null && length.intValue() > 0) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
@@ -39,7 +39,6 @@ public class TestEXABulkUtil {
|
||||
truncateStat.execute("truncate table " + errorTable);
|
||||
truncateStat.close();
|
||||
EXABulkUtil u = new EXABulkUtil();
|
||||
u.setDebug(true);
|
||||
u.setTransferSecure(true);
|
||||
u.setConnection(connection);
|
||||
u.setTable(table);
|
||||
@@ -83,7 +82,6 @@ public class TestEXABulkUtil {
|
||||
}
|
||||
truncateStat.close();
|
||||
EXABulkUtil u = new EXABulkUtil();
|
||||
u.setDebug(true);
|
||||
u.setConnection(connection);
|
||||
u.setTable(table);
|
||||
u.setRemoteFileUrl("sftp://172.16.214.132/home/tisadmin/Downloads/");
|
||||
@@ -130,7 +128,6 @@ public class TestEXABulkUtil {
|
||||
}
|
||||
truncateStat.close();
|
||||
EXABulkUtil u = new EXABulkUtil();
|
||||
u.setDebug(true);
|
||||
u.setConnection(connection);
|
||||
u.setTable(table);
|
||||
u.setDbmsSourceType("JDBC");
|
||||
@@ -170,7 +167,6 @@ public class TestEXABulkUtil {
|
||||
}
|
||||
truncateStat.close();
|
||||
EXABulkUtil u = new EXABulkUtil();
|
||||
u.setDebug(true);
|
||||
u.setConnection(connection);
|
||||
u.setTable(table);
|
||||
u.setDbmsSourceType("ORA");
|
||||
@@ -211,7 +207,6 @@ public class TestEXABulkUtil {
|
||||
}
|
||||
stat.close();
|
||||
EXABulkUtil u = new EXABulkUtil();
|
||||
u.setDebug(true);
|
||||
u.setConnection(connection);
|
||||
u.setTable(table);
|
||||
u.setDbmsSourceType("JDBC");
|
||||
@@ -250,7 +245,6 @@ public class TestEXABulkUtil {
|
||||
}
|
||||
stat.close();
|
||||
EXABulkUtil u = new EXABulkUtil();
|
||||
u.setDebug(true);
|
||||
u.setConnection(connection);
|
||||
u.setTable(table);
|
||||
u.setDbmsSourceType("JDBC");
|
||||
@@ -290,7 +284,6 @@ public class TestEXABulkUtil {
|
||||
}
|
||||
stat.close();
|
||||
EXABulkUtil u = new EXABulkUtil();
|
||||
u.setDebug(true);
|
||||
u.setConnection(connection);
|
||||
u.setTable(table);
|
||||
u.setDbmsSourceType("EXA");
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>org.talend.libraries</groupId>
|
||||
<artifactId>job-audit</artifactId>
|
||||
<version>1.0</version>
|
||||
<version>1.1</version>
|
||||
|
||||
<properties>
|
||||
<talend.nexus.url>https://artifacts-oss.talend.com</talend.nexus.url>
|
||||
@@ -50,28 +50,43 @@
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.talend.daikon</groupId>
|
||||
<artifactId>daikon-audit</artifactId>
|
||||
<version>0.31.8</version>
|
||||
<artifactId>audit-common</artifactId>
|
||||
<version>1.8.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!--
|
||||
<dependency>
|
||||
<groupId>org.talend.daikon</groupId>
|
||||
<artifactId>audit-logback</artifactId>
|
||||
<version>0.31.8</version>
|
||||
<artifactId>audit-log4j1</artifactId>
|
||||
<version>1.8.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>1.3.0-alpha4</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.17</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
-->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.talend.daikon</groupId>
|
||||
<artifactId>audit-log4j2</artifactId>
|
||||
<version>1.8.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-api</artifactId>
|
||||
<version>2.12.1</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>2.12.1</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -18,13 +18,30 @@ public class JobEventAuditLoggerFactory {
|
||||
final AuditConfigurationMap config = AuditConfiguration.loadFromProperties(properties);
|
||||
|
||||
AbstractBackend logger = null;
|
||||
String loggerClass = "org.talend.logging.audit.logback.LogbackBackend";
|
||||
|
||||
//load log4j2 implement firstly
|
||||
String loggerClass = "org.talend.logging.audit.log4j2.Log4j2Backend";
|
||||
try {
|
||||
final Class<?> clz = Class.forName(loggerClass);
|
||||
logger = (AbstractBackend) clz.getConstructor(AuditConfigurationMap.class).newInstance(config);
|
||||
} catch (ReflectiveOperationException e) {
|
||||
throw new RuntimeException("Unable to load backend " + loggerClass, e);
|
||||
}
|
||||
final Class<?> clz = Class.forName(loggerClass);
|
||||
logger = (AbstractBackend) clz.getConstructor(AuditConfigurationMap.class).newInstance(config);
|
||||
} catch (ReflectiveOperationException e) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
//load log4j1 implement if not found log4j2
|
||||
if (logger == null) {
|
||||
loggerClass = "org.talend.logging.audit.log4j1.Log4j1Backend";
|
||||
try {
|
||||
final Class<?> clz = Class.forName(loggerClass);
|
||||
logger = (AbstractBackend) clz.getConstructor(AuditConfigurationMap.class).newInstance(config);
|
||||
} catch (ReflectiveOperationException e) {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
|
||||
if(logger == null) {
|
||||
throw new RuntimeException("Unable to load backend : " + loggerClass);
|
||||
}
|
||||
|
||||
final DefaultAuditLoggerBase loggerBase = new DefaultAuditLoggerBase(logger, config);
|
||||
|
||||
|
||||
@@ -8,7 +8,8 @@ public class JobAuditLoggerTest {
|
||||
|
||||
public static void main(String[] args) {
|
||||
Properties props = new Properties();
|
||||
props.setProperty("root.logger", "audit");
|
||||
String root_logger_name = "audit";
|
||||
props.setProperty("root.logger", root_logger_name);
|
||||
props.setProperty("encoding", "UTF-8");
|
||||
props.setProperty("application.name", "Talend Studio");
|
||||
props.setProperty("service.name", "Talend Studio Job");
|
||||
@@ -19,6 +20,10 @@ public class JobAuditLoggerTest {
|
||||
props.setProperty("appender.file.maxsize", "52428800");
|
||||
props.setProperty("appender.file.maxbackup", "20");
|
||||
props.setProperty("host", "false");
|
||||
|
||||
org.apache.logging.log4j.core.config.Configurator.setLevel(root_logger_name, org.apache.logging.log4j.Level.DEBUG);
|
||||
//org.apache.log4j.Logger.getLogger("audit").setLevel(org.apache.log4j.Level.DEBUG);
|
||||
|
||||
final JobAuditLogger logger = JobEventAuditLoggerFactory.createJobAuditLogger(props);
|
||||
Context context = JobContextBuilder.create().jobName("fetch_from_s3_every_day").jobId("jobid_123")
|
||||
.jobVersion("0.1").connectorType("tXMLMAP").connectorId("tXMLMap_1")
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.talend.libraries</groupId>
|
||||
<artifactId>talend-mscrm</artifactId>
|
||||
<version>3.4-20190513</version>
|
||||
<version>3.4-20191012</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>talend-mscrm</name>
|
||||
@@ -109,7 +109,7 @@
|
||||
<dependency>
|
||||
<groupId>com.microsoft.azure</groupId>
|
||||
<artifactId>adal4j</artifactId>
|
||||
<version>1.1.1-patch</version>
|
||||
<version>1.1.1-20191012</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
|
||||
@@ -22,7 +22,8 @@ import org.apache.axis2.transport.http.HTTPConstants;
|
||||
import org.apache.axis2.transport.http.HTTPTransportConstants;
|
||||
import org.apache.axis2.transport.http.HttpTransportProperties;
|
||||
import org.apache.axis2.transport.http.HttpTransportProperties.ProxyProperties;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.datacontract.schemas._2004._07.system_collections_generic.KeyValuePairOfEndpointTypestringztYlk6OT;
|
||||
import org.talend.ms.crm.sdk.OnlineAuthenticationPolicy;
|
||||
import org.talend.ms.crm.sdk.OrganizationServiceStubWrapper;
|
||||
@@ -61,7 +62,7 @@ import com.microsoft.schemas.xrm._2011.contracts.discovery.RetrieveOrganizationR
|
||||
*/
|
||||
public class MSCRMClient {
|
||||
|
||||
static Logger logger = Logger.getLogger(MSCRMClient.class.getName());
|
||||
static Logger logger = LoggerFactory.getLogger(MSCRMClient.class.getName());
|
||||
|
||||
/**
|
||||
* Microsoft account (e.g. youremail@live.com) or Microsoft Office 365 (Org ID e.g.
|
||||
|
||||
@@ -38,7 +38,8 @@ import org.apache.http.impl.client.SystemDefaultHttpClient;
|
||||
import org.apache.http.params.BasicHttpParams;
|
||||
import org.apache.http.params.CoreConnectionPNames;
|
||||
import org.apache.http.params.HttpParams;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
@@ -53,7 +54,7 @@ public final class DeviceIdManager {
|
||||
/**
|
||||
* Logger
|
||||
*/
|
||||
static final Logger Log = Logger.getLogger(DeviceIdManager.class.getName());
|
||||
static final Logger Log = LoggerFactory.getLogger(DeviceIdManager.class.getName());
|
||||
|
||||
private static final Random RandomInstance = new Random();
|
||||
|
||||
|
||||
@@ -16,7 +16,8 @@ import javax.wsdl.WSDLException;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import javax.xml.xpath.XPathExpressionException;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
/**
|
||||
@@ -25,7 +26,7 @@ import org.xml.sax.SAXException;
|
||||
*/
|
||||
public final class OnlineAuthenticationPolicy {
|
||||
|
||||
static Logger logger = Logger.getLogger(OnlineAuthenticationPolicy.class.getName());
|
||||
static Logger logger = LoggerFactory.getLogger(OnlineAuthenticationPolicy.class.getName());
|
||||
|
||||
/**
|
||||
* Construct an Instance of the OnlineAuthenticationPolicy class.
|
||||
|
||||
@@ -44,7 +44,8 @@ import org.apache.http.params.BasicHttpParams;
|
||||
import org.apache.http.params.CoreConnectionPNames;
|
||||
import org.apache.http.params.HttpParams;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Node;
|
||||
import org.xml.sax.SAXException;
|
||||
@@ -55,7 +56,7 @@ import org.xml.sax.SAXException;
|
||||
*/
|
||||
public final class WsdlTokenManager {
|
||||
|
||||
static Logger logger = Logger.getLogger(WsdlTokenManager.class.getName());
|
||||
static Logger logger = LoggerFactory.getLogger(WsdlTokenManager.class.getName());
|
||||
|
||||
private final String DeviceTokenTemplate = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + " <s:Envelope "
|
||||
+ " xmlns:s=\"http://www.w3.org/2003/05/soap-envelope\""
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.talend.libraries</groupId>
|
||||
<artifactId>talendMsgMailUtil-1.1-20170419</artifactId>
|
||||
<artifactId>talendMsgMailUtil-1.1-20191012</artifactId>
|
||||
<name>talendMsgMailUtil</name>
|
||||
<version>6.0.0</version>
|
||||
<packaging>jar</packaging>
|
||||
@@ -37,6 +37,11 @@
|
||||
</distributionManagement>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>1.7.25</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi</artifactId>
|
||||
|
||||
@@ -12,8 +12,8 @@ import org.apache.poi.hsmf.datatypes.MAPIProperty;
|
||||
import org.apache.poi.hsmf.datatypes.StringChunk;
|
||||
import org.apache.poi.hsmf.datatypes.Types;
|
||||
import org.apache.poi.hsmf.exceptions.ChunkNotFoundException;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.log4j.Level;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class MsgMailUtil {
|
||||
|
||||
@@ -24,6 +24,15 @@ public class MsgMailUtil {
|
||||
|
||||
public MsgMailUtil() {
|
||||
}
|
||||
|
||||
private enum Level {
|
||||
DEBUG,
|
||||
INFO,
|
||||
TRACE,
|
||||
FATAL,
|
||||
WARN,
|
||||
ERROR
|
||||
}
|
||||
|
||||
public MsgMailUtil(String fileName, String outAttachmentPath)
|
||||
throws IOException {
|
||||
@@ -31,8 +40,8 @@ public class MsgMailUtil {
|
||||
this.outAttachmentPath = outAttachmentPath;
|
||||
}
|
||||
|
||||
public void activeLog(Logger log, String position) {
|
||||
this.log = log;
|
||||
public void activeLog(String logger_name, String position) {
|
||||
this.log = LoggerFactory.getLogger(logger_name);
|
||||
this.position = position;
|
||||
}
|
||||
|
||||
@@ -113,23 +122,20 @@ public class MsgMailUtil {
|
||||
}
|
||||
}
|
||||
|
||||
public void processLog(Level level, String message) {
|
||||
private void processLog(Level level, String message) {
|
||||
message = position + " - " + message;
|
||||
if (this.log != null) {
|
||||
switch (level.toInt()) {
|
||||
case Level.TRACE_INT:
|
||||
switch (level) {
|
||||
case TRACE:
|
||||
log.trace(message);
|
||||
break;
|
||||
case Level.ERROR_INT:
|
||||
case ERROR:
|
||||
log.error(message);
|
||||
break;
|
||||
case Level.FATAL_INT:
|
||||
log.fatal(message);
|
||||
break;
|
||||
case Level.INFO_INT:
|
||||
case INFO:
|
||||
log.info(message);
|
||||
break;
|
||||
case Level.WARN_INT:
|
||||
case WARN:
|
||||
log.warn(message);
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -650,8 +650,8 @@
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Driver-EXASolution" MODULE="exajdbc-6.0.9302.jar" MVN="mvn:org.talend.libraries/exajdbc-6.0.9302/6.3.0" REQUIRED="true" />
|
||||
<IMPORT NAME="Talend-DB-Exasol-Util" MODULE="talend-db-exasol-2.1.4.jar" MVN="mvn:org.talend.components.lib/talend-db-exasol/2.1.4"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.jdbc.exasol/lib/talend-db-exasol-2.1.4.jar" REQUIRED="true" />
|
||||
<IMPORT NAME="Talend-DB-Exasol-Util" MODULE="talend-db-exasol-2.1.5.jar" MVN="mvn:org.talend.components.lib/talend-db-exasol/2.1.5"
|
||||
UrlPath="platform:/plugin/org.talend.libraries.jdbc.exasol/lib/talend-db-exasol-2.1.5.jar" REQUIRED="true" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
|
||||
@@ -193,7 +193,6 @@
|
||||
<IMPORT NAME="json-smart-2.2.1.jar" MODULE="json-smart-2.2.1.jar" MVN="mvn:net.minidev/json-smart/2.2.1" REQUIRED_IF="READ_BY == 'JSONPATH'" />
|
||||
<IMPORT NAME="accessors-smart-1.1.jar" MODULE="accessors-smart-1.1.jar" MVN="mvn:net.minidev/accessors-smart/1.1" REQUIRED_IF="READ_BY == 'JSONPATH'" />
|
||||
<IMPORT NAME="slf4j-api-1.7.5.jar" MODULE="slf4j-api-1.7.5.jar" MVN="mvn:org.talend.libraries/slf4j-api-1.7.5/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.slf4j/lib/slf4j-api-1.7.5.jar" REQUIRED_IF="READ_BY == 'JSONPATH'" />
|
||||
<IMPORT NAME="slf4j-log4j12-1.7.5.jar" MODULE="slf4j-log4j12-1.7.5.jar" MVN="mvn:org.talend.libraries/slf4j-log4j12-1.7.5/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.slf4j/lib/slf4j-log4j12-1.7.5.jar" REQUIRED_IF="READ_BY == 'JSONPATH'" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
|
||||
@@ -192,8 +192,6 @@
|
||||
REQUIRED_IF="(READ_BY == 'JSONPATH')" />
|
||||
<IMPORT NAME="slf4j-api-1.7.5.jar" MODULE="slf4j-api-1.7.5.jar" MVN="mvn:org.talend.libraries/slf4j-api-1.7.5/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.slf4j/lib/slf4j-api-1.7.5.jar"
|
||||
REQUIRED_IF="(READ_BY == 'JSONPATH')" BundleID="" />
|
||||
<IMPORT NAME="slf4j-log4j12-1.7.5.jar" MODULE="slf4j-log4j12-1.7.5.jar" MVN="mvn:org.talend.libraries/slf4j-log4j12-1.7.5/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.slf4j/lib/slf4j-log4j12-1.7.5.jar"
|
||||
REQUIRED_IF="(READ_BY == 'JSONPATH')" BundleID="" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
org.talend.msg.utils.MsgMailUtil msgMailUtil_<%=cid%>=new org.talend.msg.utils.MsgMailUtil(<%=filename%>,<%=directory%>);
|
||||
<%
|
||||
if(isLog4jEnabled){
|
||||
//the logger object maybe come from log4j1 or log4j2, but inside msgMailUtil, we use slf4j, so pass the logger name instead of logger object self
|
||||
%>
|
||||
msgMailUtil_<%=cid%>.activeLog(log,"<%=cid%>");
|
||||
msgMailUtil_<%=cid%>.activeLog(log.getName(),"<%=cid%>");
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
<IMPORT NAME="JAF" MODULE="activation.jar" MVN="mvn:org.talend.libraries/activation/6.0.0" REQUIRED_IF="(MAIL_TYPE == 'MIME')" />
|
||||
<IMPORT NAME="poi" MODULE="poi-4.1.0-20190523141255_modified_talend.jar" MVN="mvn:org.apache.poi/poi/4.1.0-20190523141255_modified_talend" UrlPath="platform:/plugin/org.talend.libraries.excel/lib/poi-4.1.0-20190523141255_modified_talend.jar" REQUIRED_IF="(MAIL_TYPE == 'MSG')" />
|
||||
<IMPORT NAME="poi-scratchpad" MODULE="poi-scratchpad-4.1.0-20190523141255_modified_talend.jar" MVN="mvn:org.apache.poi/poi-scratchpad/4.1.0-20190523141255_modified_talend" UrlPath="platform:/plugin/org.talend.libraries.excel/lib/poi-scratchpad-4.1.0-20190523141255_modified_talend.jar" REQUIRED_IF="(MAIL_TYPE == 'MSG')" />
|
||||
<IMPORT NAME="talendMsgMailUtil" MODULE="talendMsgMailUtil-1.1-20170419.jar" MVN="mvn:org.talend.libraries/talendMsgMailUtil-1.1-20170419/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.excel/lib/talendMsgMailUtil-1.1-20170419.jar" REQUIRED_IF="(MAIL_TYPE == 'MSG')" />
|
||||
<IMPORT NAME="talendMsgMailUtil" MODULE="talendMsgMailUtil-1.1-20191012.jar" MVN="mvn:org.talend.libraries/talendMsgMailUtil-1.1-20191012/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.excel/lib/talendMsgMailUtil-1.1-20191012.jar" REQUIRED_IF="(MAIL_TYPE == 'MSG')" />
|
||||
<IMPORT NAME="log4j-1.2.17.jar" MODULE="log4j-1.2.17.jar" MVN="mvn:log4j/log4j/1.2.17" UrlPath="platform:/plugin/org.talend.libraries.apache/lib/log4j-1.2.17.jar" REQUIRED_IF="(MAIL_TYPE == 'MSG')" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -13,9 +13,11 @@ CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
|
||||
INode node = (INode)codeGenArgument.getArgument();
|
||||
String cid = node.getUniqueName();
|
||||
String dbname = ElementParameterParser.getValue(node, "__DBNAME__");
|
||||
String jarsBucket = ElementParameterParser.getValue(node, "__GOOGLE_JARS_BUCKET__");
|
||||
%>
|
||||
|
||||
java.util.List<String> connectionCommandList_<%=cid%> = new java.util.ArrayList<String>();
|
||||
String jarsBucket_<%=cid%> = <%=jarsBucket%>.endsWith("/") ? <%=jarsBucket%> : <%=jarsBucket%> + "/";
|
||||
<%
|
||||
boolean setMemory = "true".equals(ElementParameterParser.getValue(node, "__SET_MEMORY__"));
|
||||
if(setMemory) {
|
||||
@@ -50,7 +52,7 @@ java.util.List<String> connectionCommandList_<%=cid%> = new java.util.ArrayList<
|
||||
.withClusterName(<%=ElementParameterParser.getValue(node, "__GOOGLE_CLUSTER_ID__")%>)
|
||||
.withRegion(<%=ElementParameterParser.getValue(node, "__GOOGLE_REGION__")%>)
|
||||
.withProjectId(<%=ElementParameterParser.getValue(node, "__GOOGLE_PROJECT_ID__")%>)
|
||||
.withJarsBucket(<%=ElementParameterParser.getValue(node, "__GOOGLE_JARS_BUCKET__")%>)
|
||||
.withJarsBucket(jarsBucket_<%=cid%>)
|
||||
<%
|
||||
if(ElementParameterParser.getBooleanValue(node, "__DEFINE_PATH_TO_GOOGLE_CREDENTIALS__")) {
|
||||
%>
|
||||
@@ -73,4 +75,4 @@ java.util.List<String> connectionCommandList_<%=cid%> = new java.util.ArrayList<
|
||||
|
||||
globalMap.put("conn_<%=cid%>", instance_<%=cid%>);
|
||||
// Will be used to put additionals jars on google storage
|
||||
globalMap.put("stagingBucket_<%=cid%>", <%=ElementParameterParser.getValue(node, "__GOOGLE_JARS_BUCKET__")%>);
|
||||
globalMap.put("stagingBucket_<%=cid%>", jarsBucket_<%=cid%>);
|
||||
|
||||
@@ -17,17 +17,20 @@
|
||||
|
||||
<% if(hotLibs!=null&&hotLibs.size() > 0){%>
|
||||
|
||||
java.net.URLClassLoader sysloader_<%=cid %> = (java.net.URLClassLoader) ClassLoader.getSystemClassLoader();
|
||||
java.lang.reflect.Method method_<%=cid %> = java.net.URLClassLoader.class.getDeclaredMethod("addURL", new Class[] { java.net.URL.class });
|
||||
method_<%=cid %>.setAccessible(true);
|
||||
String[] libPaths_<%=cid %> = new String[] { <% for(Map<String, String> item : hotLibs) {%> <%=item.get("LIBPATH") %>, <%}%> };
|
||||
|
||||
String[] libPaths_<%=cid %> = new String[] { <% for(Map<String, String> item : hotLibs){%> <%=item.get("LIBPATH") %>, <%}%> };
|
||||
for(String lib_<%=cid %>:libPaths_<%=cid %> ){
|
||||
java.util.List<java.net.URL> libURL_<%=cid %> = new java.util.ArrayList<>();
|
||||
|
||||
for(String lib_<%=cid %>:libPaths_<%=cid %>) {
|
||||
String separator_<%=cid %> = System.getProperty("path.separator");
|
||||
String[] jarFiles_<%=cid %> = lib_<%=cid %>.split(separator_<%=cid %>);
|
||||
for(String jarFile_<%=cid %>:jarFiles_<%=cid %>){
|
||||
method_<%=cid %>.invoke(sysloader_<%=cid %>, new Object[] { new java.io.File(jarFile_<%=cid %>).toURL() });
|
||||
for(String jarFile_<%=cid %> : jarFiles_<%=cid %>) {
|
||||
libURL_<%=cid %>.add( new java.io.File(jarFile_<%=cid %>).toURI().toURL() );
|
||||
}
|
||||
}
|
||||
|
||||
java.net.URL[] libURLArray_<%=cid %> = libURL_<%=cid %>.toArray(new java.net.URL[] {});
|
||||
ClassLoader threadClassLoader_<%=cid %> = Thread.currentThread().getContextClassLoader();
|
||||
java.net.URLClassLoader newthreadClassLoader_<%=cid %> = new java.net.URLClassLoader(libURLArray_<%=cid %>, threadClassLoader_<%=cid %>);
|
||||
Thread.currentThread().setContextClassLoader(newthreadClassLoader_<%=cid %>);
|
||||
<%}%>
|
||||
|
||||
|
||||
@@ -751,7 +751,7 @@
|
||||
boolean javaPrimitiveKeyColumn = JavaTypesManager.isJavaPrimitiveType(typeToGenerate);
|
||||
|
||||
aKeysValues[iKeyName] = getExpressionWithAutoConvertFunction(aKeysValues[iKeyName], keysEntries.get(iKeyName), keysColumns.get(iKeyName), expressionParser, locationMap4Entry, locationMap4Column, autoConverterMap, enable_auto_convert_type);
|
||||
|
||||
|
||||
if(isPersistentSortedTable) {
|
||||
|
||||
|
||||
@@ -768,9 +768,14 @@
|
||||
}
|
||||
<%
|
||||
} else {
|
||||
if("java.util.Date".equals(typeToGenerate)) {%>
|
||||
<%= tableName %>HashKey.<%= aKeysNames[iKeyName] %> = rsc_<%=componentNameForKeyProblem%>_<%=currentJoinedTableIndex%>.exprKey_<%= tableName %>__<%= aKeysNames[iKeyName] %> == null ? null : new java.util.Date(rsc_<%=componentNameForKeyProblem%>_<%=currentJoinedTableIndex%>.exprKey_<%= tableName %>__<%= aKeysNames[iKeyName] %>.getTime());
|
||||
<%
|
||||
}else {
|
||||
%>
|
||||
<%= tableName %>HashKey.<%= aKeysNames[iKeyName] %> = rsc_<%=componentNameForKeyProblem%>_<%=currentJoinedTableIndex%>.exprKey_<%= tableName %>__<%= aKeysNames[iKeyName] %>;
|
||||
<%= tableName %>HashKey.<%= aKeysNames[iKeyName] %> = rsc_<%=componentNameForKeyProblem%>_<%=currentJoinedTableIndex%>.exprKey_<%= tableName %>__<%= aKeysNames[iKeyName] %>;
|
||||
<%
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -788,9 +793,14 @@
|
||||
}
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
<%= tableName %>HashKey.<%= aKeysNames[iKeyName] %> = <%= aKeysValues[iKeyName] %>;
|
||||
if("java.util.Date".equals(typeToGenerate)) {%>
|
||||
<%= tableName %>HashKey.<%= aKeysNames[iKeyName] %> = <%= aKeysValues[iKeyName] %> == null ? null : new java.util.Date(<%= aKeysValues[iKeyName] %>.getTime());
|
||||
<%
|
||||
}else {
|
||||
%>
|
||||
<%= tableName %>HashKey.<%= aKeysNames[iKeyName] %> = <%= aKeysValues[iKeyName] %>;
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
if (checkingSyntax) {
|
||||
|
||||
@@ -27523,7 +27523,7 @@
|
||||
<IMPORT NAME="jcifs" MODULE="jcifs-1.3.0.jar" MVN="mvn:org.talend.libraries/jcifs-1.3.0/6.0.0" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')" />
|
||||
<!-- 2011 -->
|
||||
<!-- crm client -->
|
||||
<IMPORT NAME="talend-mscrm-3.4-20190513" MODULE="talend-mscrm-3.4-20190513.jar" MVN="mvn:org.talend.libraries/talend-mscrm-3.4-20190513/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.crm/lib/talend-mscrm-3.4-20190513.jar" REQUIRED_IF="(((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION =='API_2016_ODATA' OR API_VERSION =='API_2018_ODATA')) OR ((AUTH_TYPE=='ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018')))" />
|
||||
<IMPORT NAME="talend-mscrm-3.4-20191012" MODULE="talend-mscrm-3.4-20191012.jar" MVN="mvn:org.talend.libraries/talend-mscrm-3.4-20191012/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.crm/lib/talend-mscrm-3.4-20191012.jar" REQUIRED_IF="(((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION =='API_2016_ODATA' OR API_VERSION =='API_2018_ODATA')) OR ((AUTH_TYPE=='ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018')))" />
|
||||
<!-- axis2 1.7.4 -->
|
||||
<IMPORT NAME="activation-1.1" MODULE="activation-1.1.jar" MVN="mvn:org.talend.libraries/activation-1.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/activation-1.1.jar" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
|
||||
<IMPORT NAME="axiom-api-1.2.20" MODULE="axiom-api-1.2.20.jar" MVN="mvn:org.talend.libraries/axiom-api-1.2.20/6.0.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
|
||||
@@ -27776,9 +27776,9 @@
|
||||
MVN="mvn:org.talend.libraries/aalto-xml-0.9.10/6.4.0"
|
||||
REQUIRED_IF="(((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR ((AUTH_TYPE=='ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018')))" />
|
||||
<IMPORT
|
||||
NAME="adal4j-1.1.1-patch"
|
||||
MODULE="adal4j-1.1.1-patch.jar"
|
||||
MVN="mvn:com.microsoft.azure/adal4j/1.1.1-patch"
|
||||
NAME="adal4j-1.1.1-20191012"
|
||||
MODULE="adal4j-1.1.1-20191012.jar"
|
||||
MVN="mvn:com.microsoft.azure/adal4j/1.1.1-20191012"
|
||||
REQUIRED_IF="(((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR ((AUTH_TYPE=='ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018')))" />
|
||||
<IMPORT
|
||||
NAME="commons-codec-1.9"
|
||||
|
||||
@@ -38286,7 +38286,7 @@
|
||||
<IMPORT NAME="jcifs" MODULE="jcifs-1.3.0.jar" MVN="mvn:org.talend.libraries/jcifs-1.3.0/6.0.0" REQUIRED_IF="((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2011')) OR (API_VERSION=='API_2007')" />
|
||||
<!-- 2011 -->
|
||||
<!-- crm client -->
|
||||
<IMPORT NAME="talend-mscrm-3.4-20190513" MODULE="talend-mscrm-3.4-20190513.jar" MVN="mvn:org.talend.libraries/talend-mscrm-3.4-20190513/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.crm/lib/talend-mscrm-3.4-20190513.jar" REQUIRED_IF="((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION =='API_2016_ODATA' OR API_VERSION =='API_2018_ODATA')) OR ((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018'))" />
|
||||
<IMPORT NAME="talend-mscrm-3.4-20191012" MODULE="talend-mscrm-3.4-20191012.jar" MVN="mvn:org.talend.libraries/talend-mscrm-3.4-20191012/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.crm/lib/talend-mscrm-3.4-20191012.jar" REQUIRED_IF="((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011' OR API_VERSION =='API_2016_ODATA' OR API_VERSION =='API_2018_ODATA')) OR ((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018'))" />
|
||||
<!-- axis2 1.7.4 -->
|
||||
<IMPORT NAME="activation-1.1" MODULE="activation-1.1.jar" MVN="mvn:org.talend.libraries/activation-1.1/6.0.0" UrlPath="platform:/plugin/org.talend.libraries.apache.axis2/lib/activation-1.1.jar" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
|
||||
<IMPORT NAME="axiom-api-1.2.20" MODULE="axiom-api-1.2.20.jar" MVN="mvn:org.talend.libraries/axiom-api-1.2.20/6.0.0" REQUIRED_IF="(AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2011')" />
|
||||
@@ -38546,9 +38546,9 @@
|
||||
MVN="mvn:org.talend.libraries/aalto-xml-0.9.10/6.4.0"
|
||||
REQUIRED_IF="((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR ((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018'))" />
|
||||
<IMPORT
|
||||
NAME="adal4j-1.1.1-patch"
|
||||
MODULE="adal4j-1.1.1-patch.jar"
|
||||
MVN="mvn:com.microsoft.azure/adal4j/1.1.1-patch"
|
||||
NAME="adal4j-1.1.1-20191012"
|
||||
MODULE="adal4j-1.1.1-20191012.jar"
|
||||
MVN="mvn:com.microsoft.azure/adal4j/1.1.1-20191012"
|
||||
REQUIRED_IF="((AUTH_TYPE=='ONLINE') AND (API_VERSION=='API_2016_ODATA' OR API_VERSION=='API_2018_ODATA')) OR ((AUTH_TYPE == 'ON_PREMISE') AND (MS_CRM_VERSION == 'CRM_2016' OR MS_CRM_VERSION == 'CRM_2018'))" />
|
||||
<IMPORT
|
||||
NAME="commons-codec-1.9"
|
||||
|
||||
@@ -187,7 +187,6 @@
|
||||
<IMPORT NAME="geronimo-j2ee-management_1.1_spec-1.0.1.jar" MODULE="geronimo-j2ee-management_1.1_spec-1.0.1.jar" MVN="mvn:org.talend.libraries/geronimo-j2ee-management_1.1_spec-1.0.1/6.3.0" REQUIRED_IF="SERVER == 'ACTIVEMQ'" />
|
||||
<IMPORT NAME="hawtbuf-1.11.jar" MODULE="hawtbuf-1.11.jar" MVN="mvn:org.talend.libraries/hawtbuf-1.11/6.3.0" REQUIRED_IF="SERVER == 'ACTIVEMQ'" />
|
||||
<IMPORT NAME="slf4j-api-1.7.16.jar" MODULE="slf4j-api-1.7.16.jar" MVN="mvn:org.slf4j/slf4j-api/1.7.16" REQUIRED_IF="SERVER == 'ACTIVEMQ'" />
|
||||
<IMPORT NAME="slf4j-log4j12-1.7.16.jar" MODULE="slf4j-log4j12-1.7.16.jar" MVN="mvn:org.slf4j/slf4j-log4j12/1.7.16" REQUIRED_IF="SERVER == 'ACTIVEMQ'" />
|
||||
|
||||
<IMPORT NAME="WEBSPHERE MQ LIB" MODULE="com.ibm.mq-8.0.0.9.jar" MVN="mvn:com.ibm.mq/com.ibm.mq/8.0.0.9" REQUIRED_IF="(SERVER == 'WEBSPHERE')" />
|
||||
<IMPORT NAME="WEBSPHERE MQ LIB" MODULE="com.ibm.mq.allclient-8.0.0.9.jar" MVN="mvn:com.ibm.mq/com.ibm.mq.allclient/8.0.0.9" REQUIRED_IF="(SERVER == 'WEBSPHERE')" />
|
||||
|
||||
@@ -313,7 +313,6 @@
|
||||
<IMPORT NAME="geronimo-j2ee-management_1.1_spec-1.0.1.jar" MODULE="geronimo-j2ee-management_1.1_spec-1.0.1.jar" MVN="mvn:org.talend.libraries/geronimo-j2ee-management_1.1_spec-1.0.1/6.3.0" REQUIRED_IF="(USE_CONNECTION=='false' AND SERVER == 'ACTIVEMQ')" />
|
||||
<IMPORT NAME="hawtbuf-1.11.jar" MODULE="hawtbuf-1.11.jar" MVN="mvn:org.talend.libraries/hawtbuf-1.11/6.3.0" REQUIRED_IF="(USE_CONNECTION=='false' AND SERVER == 'ACTIVEMQ')" />
|
||||
<IMPORT NAME="slf4j-api-1.7.16.jar" MODULE="slf4j-api-1.7.16.jar" MVN="mvn:org.slf4j/slf4j-api/1.7.16" REQUIRED_IF="(USE_CONNECTION=='false' AND SERVER == 'ACTIVEMQ')" />
|
||||
<IMPORT NAME="slf4j-log4j12-1.7.16.jar" MODULE="slf4j-log4j12-1.7.16.jar" MVN="mvn:org.slf4j/slf4j-log4j12/1.7.16" REQUIRED_IF="(USE_CONNECTION=='false' AND SERVER == 'ACTIVEMQ')" />
|
||||
|
||||
<!-- JBOSS -->
|
||||
<IMPORT NAME="JAVA_SSIST" MODULE="javassist.jar" MVN="mvn:org.talend.libraries/javassist/6.0.0" REQUIRED_IF="(USE_CONNECTION=='false' AND SERVER == 'JBOSS')" />
|
||||
|
||||
@@ -438,7 +438,6 @@
|
||||
<IMPORT NAME="geronimo-j2ee-management_1.1_spec-1.0.1.jar" MODULE="geronimo-j2ee-management_1.1_spec-1.0.1.jar" MVN="mvn:org.talend.libraries/geronimo-j2ee-management_1.1_spec-1.0.1/6.3.0" REQUIRED_IF="(USE_CONNECTION=='false' AND SERVER == 'ACTIVEMQ')" />
|
||||
<IMPORT NAME="hawtbuf-1.11.jar" MODULE="hawtbuf-1.11.jar" MVN="mvn:org.talend.libraries/hawtbuf-1.11/6.3.0" REQUIRED_IF="(USE_CONNECTION=='false' AND SERVER == 'ACTIVEMQ')" />
|
||||
<IMPORT NAME="slf4j-api-1.7.16.jar" MODULE="slf4j-api-1.7.16.jar" MVN="mvn:org.slf4j/slf4j-api/1.7.16" REQUIRED_IF="(USE_CONNECTION=='false' AND SERVER == 'ACTIVEMQ')" />
|
||||
<IMPORT NAME="slf4j-log4j12-1.7.16.jar" MODULE="slf4j-log4j12-1.7.16.jar" MVN="mvn:org.slf4j/slf4j-log4j12/1.7.16" REQUIRED_IF="(USE_CONNECTION=='false' AND SERVER == 'ACTIVEMQ')" />
|
||||
|
||||
<!-- JBOSS -->
|
||||
<IMPORT NAME="JAVA_SSIST" MODULE="javassist.jar" MVN="mvn:org.talend.libraries/javassist/6.0.0" REQUIRED_IF="(USE_CONNECTION=='false' AND SERVER == 'JBOSS')" />
|
||||
|
||||
@@ -30,7 +30,9 @@ imports="
|
||||
}
|
||||
String serverType=ElementParameterParser.getValue(connectionNode, "__SERVER__");
|
||||
|
||||
final boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));
|
||||
final boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__"));//log4j enable
|
||||
final boolean isLog4j2Enabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J2_ACTIVATE__"));//log4j2 enable
|
||||
final boolean isLog4j1Enabled = !isLog4j2Enabled;//log4j1 enable
|
||||
|
||||
if (("JBoss").equals(serverType) || ("ActiveMQ").equals(serverType)) {
|
||||
%>
|
||||
@@ -122,7 +124,7 @@ imports="
|
||||
return gmo;
|
||||
}
|
||||
|
||||
public com.ibm.mq.MQQueue genBackOutQueue(com.ibm.mq.MQQueueManager qMgr,com.ibm.mq.MQQueue inQueue<%if(isLog4jEnabled){%>,org.apache.log4j.Logger log<%}%>){
|
||||
public com.ibm.mq.MQQueue genBackOutQueue(com.ibm.mq.MQQueueManager qMgr,com.ibm.mq.MQQueue inQueue<%if(isLog4jEnabled){%>,<%if(isLog4j1Enabled){%>org.apache.log4j.Logger<%}%><%if(isLog4j2Enabled){%>org.apache.logging.log4j.Logger<%}%> log<%}%>){
|
||||
int[] selectors = new int[2];
|
||||
int[] intAttrs = new int[1];
|
||||
String backoutQName = "";
|
||||
@@ -171,7 +173,7 @@ imports="
|
||||
return backoutQueue;
|
||||
}
|
||||
|
||||
public List<com.ibm.mq.MQMessage> getPoisonMsgs(com.ibm.mq.MQQueueManager qMgr,String inQueueName,com.ibm.mq.MQQueue backoutQueue<%if(isLog4jEnabled){%>,org.apache.log4j.Logger log<%}%>) throws com.ibm.mq.MQException{
|
||||
public List<com.ibm.mq.MQMessage> getPoisonMsgs(com.ibm.mq.MQQueueManager qMgr,String inQueueName,com.ibm.mq.MQQueue backoutQueue<%if(isLog4jEnabled){%>,<%if(isLog4j1Enabled){%>org.apache.log4j.Logger<%}%><%if(isLog4j2Enabled){%>org.apache.logging.log4j.Logger<%}%> log<%}%>) throws com.ibm.mq.MQException{
|
||||
com.ibm.mq.MQQueue inQueue = genInQueue(qMgr,inQueueName, true);
|
||||
com.ibm.mq.MQGetMessageOptions gmo = genGetMsgOptions(true);
|
||||
int browseCursor = 0;
|
||||
@@ -215,7 +217,7 @@ imports="
|
||||
return backoutMsgs;
|
||||
}
|
||||
|
||||
public void backoutMsg(com.ibm.mq.MQQueueManager qMgr,String inQueueName<%if(isLog4jEnabled){%>,org.apache.log4j.Logger log<%}%>) throws com.ibm.mq.MQException{
|
||||
public void backoutMsg(com.ibm.mq.MQQueueManager qMgr,String inQueueName<%if(isLog4jEnabled){%>,<%if(isLog4j1Enabled){%>org.apache.log4j.Logger<%}%><%if(isLog4j2Enabled){%>org.apache.logging.log4j.Logger<%}%> log<%}%>) throws com.ibm.mq.MQException{
|
||||
|
||||
com.ibm.mq.MQQueue inQueue = genInQueue(qMgr,inQueueName,false);
|
||||
com.ibm.mq.MQQueue backoutQueue = genBackOutQueue(qMgr,inQueue<%if(isLog4jEnabled){%>,log<%}%>);
|
||||
|
||||
@@ -37,6 +37,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
if(useExistingS3Connection){
|
||||
current_node = NodeUtil.getNodeByUniqueName(node.getProcess(),s3ConnectionCid,true);
|
||||
}
|
||||
boolean inheritRole = "true".equalsIgnoreCase(ElementParameterParser.getValue(current_node, "__INHERIT_CREDENTIALS__"));
|
||||
List<IMetadataColumn> columnList = getColumnList(node);
|
||||
%>
|
||||
String dbschema_<%=cid%> = null;
|
||||
@@ -229,23 +230,44 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
access_key = ElementParameterParser.getValue(node, "__ACCESS_KEY_SSH__");
|
||||
passwordFieldKey = "__SECRET_KEY_SSH__";
|
||||
}
|
||||
|
||||
if(useExistingS3Connection && !assumeRole){
|
||||
access_key = ElementParameterParser.getValue(current_node, "__ACCESS_KEY__");
|
||||
passwordFieldKey = "__SECRET_KEY__";
|
||||
}
|
||||
if(inheritRole){
|
||||
access_key = "\"\"";
|
||||
%>
|
||||
final String decryptedPwd_<%=cid%> = "";
|
||||
<%
|
||||
if(!assumeRole) {
|
||||
if (ElementParameterParser.canEncrypt(current_node, passwordFieldKey)) {
|
||||
}else{
|
||||
access_key = ElementParameterParser.getValue(current_node, "__ACCESS_KEY__");
|
||||
if (ElementParameterParser.canEncrypt(current_node, passwordFieldKey)) {
|
||||
%>
|
||||
final String decryptedPwd_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(current_node, passwordFieldKey)%>);
|
||||
final String decryptedPwd_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(current_node, passwordFieldKey)%>);
|
||||
<%
|
||||
} else {
|
||||
} else {
|
||||
%>
|
||||
final String decryptedPwd_<%=cid%> = <%= ElementParameterParser.getValue(current_node, passwordFieldKey)%>;
|
||||
final String decryptedPwd_<%=cid%> = <%= ElementParameterParser.getValue(current_node, passwordFieldKey)%>;
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if(!useExistingS3Connection && !assumeRole){
|
||||
if(inheritRole){
|
||||
access_key = "\"\"";
|
||||
%>
|
||||
final String decryptedPwd_<%=cid%> = "";
|
||||
<%
|
||||
}else{
|
||||
access_key = ElementParameterParser.getValue(current_node, "__ACCESS_KEY__");
|
||||
if (ElementParameterParser.canEncrypt(current_node, passwordFieldKey)) {
|
||||
%>
|
||||
final String decryptedPwd_<%=cid%> = routines.system.PasswordEncryptUtil.decryptPassword(<%=ElementParameterParser.getEncryptedValue(current_node, passwordFieldKey)%>);
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
final String decryptedPwd_<%=cid%> = <%= ElementParameterParser.getValue(current_node, passwordFieldKey)%>;
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
if(avroMode) {
|
||||
String avro_mapping = ElementParameterParser.getValue(node, "__JSON_MAPPING__");
|
||||
%>
|
||||
@@ -309,7 +331,7 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
<%
|
||||
}
|
||||
}
|
||||
}else{
|
||||
} else if(!assumeRole && !inheritRole) {
|
||||
%>
|
||||
.append("aws_access_key_id=").append(<%=access_key%>).append(";aws_secret_access_key=").append(decryptedPwd_<%=cid%>)
|
||||
<%
|
||||
|
||||
@@ -141,13 +141,24 @@
|
||||
<PARAMETER NAME="CONNECTION_S3" FIELD="COMPONENT_LIST" REQUIRED="true" FILTER="tS3Connection"
|
||||
NUM_ROW="46" SHOW_IF="(USE_EXISTING_CONNECTION_S3 == 'true') AND (DATA_SOURCE_TYPE == 'S3') AND (ASSUME_ROLE == 'false')" GROUP="S3_CONFIG"/>
|
||||
|
||||
<PARAMETER
|
||||
NAME="INHERIT_CREDENTIALS"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="55"
|
||||
REQUIRED="true"
|
||||
GROUP="S3_CONFIG"
|
||||
SHOW="false"
|
||||
>
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="ACCESS_KEY" FIELD="TEXT" NUM_ROW="50"
|
||||
REQUIRED="true" GROUP="S3_CONFIG" SHOW_IF="(USE_EXISTING_CONNECTION_S3 == 'false') AND (DATA_SOURCE_TYPE == 'S3') AND (ASSUME_ROLE == 'false')">
|
||||
REQUIRED="true" GROUP="S3_CONFIG" SHOW_IF="(USE_EXISTING_CONNECTION_S3 == 'false') AND (DATA_SOURCE_TYPE == 'S3') AND (ASSUME_ROLE == 'false') AND (INHERIT_CREDENTIALS == 'false')">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER NAME="SECRET_KEY" FIELD="PASSWORD" NUM_ROW="50"
|
||||
REQUIRED="true" GROUP="S3_CONFIG" SHOW_IF="(USE_EXISTING_CONNECTION_S3 == 'false') AND (DATA_SOURCE_TYPE == 'S3') AND (ASSUME_ROLE == 'false')">
|
||||
REQUIRED="true" GROUP="S3_CONFIG" SHOW_IF="(USE_EXISTING_CONNECTION_S3 == 'false') AND (DATA_SOURCE_TYPE == 'S3') AND (ASSUME_ROLE == 'false') AND (INHERIT_CREDENTIALS == 'false')">
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</PARAMETER>
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ OTHER_CONFIGURATION.ITEM.DATA_VALUE=Value
|
||||
|
||||
S3_CONFIG.NAME=S3 Setting
|
||||
|
||||
USE_EXISTING_CONNECTION_S3.NAME=Use an existing connection
|
||||
USE_EXISTING_CONNECTION_S3.NAME=Use an existing S3 connection
|
||||
CONNECTION_S3.NAME=Component List
|
||||
ACCESS_KEY.NAME=Access Key
|
||||
SECRET_KEY.NAME=Secret Key
|
||||
|
||||
@@ -32,7 +32,7 @@ ENCODING.ITEM.UTF16BE=UTF16BE
|
||||
|
||||
SCHEMA.NAME=Schema
|
||||
|
||||
USE_EXISTING_CONNECTION.NAME=Use an existing connection
|
||||
USE_EXISTING_CONNECTION.NAME=Use an existing S3 connection
|
||||
CONNECTION.NAME=Component List
|
||||
ACCESS_KEY.NAME=Access Key
|
||||
SECRET_KEY.NAME=Secret Key
|
||||
|
||||
@@ -498,6 +498,7 @@
|
||||
|
||||
<TEMPLATE_PARAM SOURCE="self.REGION" TARGET="tROB.REGION" />
|
||||
<TEMPLATE_PARAM SOURCE="self.INHERIT_CREDENTIALS" TARGET="tROB.INHERIT_CREDENTIALS" />
|
||||
<TEMPLATE_PARAM SOURCE="self.INHERIT_CREDENTIALS" TARGET="tRBE.INHERIT_CREDENTIALS" />
|
||||
<TEMPLATE_PARAM SOURCE="self.ASSUME_ROLE_S3" TARGET="tROB.ASSUME_ROLE" />
|
||||
<TEMPLATE_PARAM SOURCE="self.ARN" TARGET="tROB.ARN" />
|
||||
<TEMPLATE_PARAM SOURCE="self.ROLE_SESSION_NAME" TARGET="tROB.ROLE_SESSION_NAME" />
|
||||
|
||||
@@ -91,7 +91,7 @@ OTHER_CONFIGURATION.ITEM.DATA_VALUE=Value
|
||||
|
||||
S3_CONFIG.NAME=S3 Setting
|
||||
|
||||
USE_EXISTING_CONNECTION_S3.NAME=Use an existing connection
|
||||
USE_EXISTING_CONNECTION_S3.NAME=Use an existing S3 connection
|
||||
CONNECTION_S3.NAME=Component List
|
||||
ACCESS_KEY.NAME=Access Key
|
||||
SECRET_KEY.NAME=Secret Key
|
||||
|
||||
@@ -42,7 +42,7 @@ ESCAPE.NAME=Escape
|
||||
|
||||
S3_CONFIG.NAME=S3 Setting
|
||||
|
||||
USE_EXISTING_CONNECTION_S3.NAME=Use an existing connection
|
||||
USE_EXISTING_CONNECTION_S3.NAME=Use an existing S3 connection
|
||||
CONNECTION_S3.NAME=Component List
|
||||
ACCESS_KEY.NAME=Access Key
|
||||
SECRET_KEY.NAME=Secret Key
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<ITEM NAME="DATE" VALUE="Date" />
|
||||
</ITEMS>
|
||||
</ITEM>
|
||||
<ITEM NAME="DATEPATTERN" FIELD="TEXT"/>
|
||||
<ITEM NAME="DATEPATTERN" FIELD="TEXT" NOT_READONLY_IF="CHECKCOLS.SELECTED_TYPE=='Date'"/>
|
||||
<ITEM NAME="NULLABLE" FIELD="CHECK" VALUE="false" />
|
||||
<ITEM NAME="MAX_LENGTH" FIELD="CHECK" VALUE="false" />
|
||||
</ITEMS>
|
||||
|
||||
@@ -208,6 +208,8 @@ boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.ge
|
||||
mc_<%=cid%>.addMailcap("multipart/*;; x-java-content-handler=com.sun.mail.handlers.multipart_mixed");
|
||||
mc_<%=cid%>.addMailcap("message/rfc822;; x-java-content-handler=com.sun.mail.handlers.message_rfc822");
|
||||
javax.activation.CommandMap.setDefaultCommandMap(mc_<%=cid%>);
|
||||
// add com.sun.mail.handlers to job imports / depenencies (TESB-27110)
|
||||
com.sun.mail.handlers.text_plain text_plain_h_<%=cid%> = null;
|
||||
// -- Send the message --
|
||||
javax.mail.Transport.send(msg_<%=cid %>);
|
||||
} catch(java.lang.Exception e){
|
||||
|
||||
@@ -100,6 +100,7 @@ import org.talend.daikon.properties.property.Property;
|
||||
import org.talend.daikon.properties.property.SchemaProperty;
|
||||
import org.talend.daikon.runtime.RuntimeInfo;
|
||||
import org.talend.daikon.serialize.PostDeserializeSetup;
|
||||
import org.talend.designer.core.CheckLogManamger;
|
||||
import org.talend.designer.core.DesignerPlugin;
|
||||
import org.talend.designer.core.generic.constants.IGenericConstants;
|
||||
import org.talend.designer.core.generic.context.ComponentContextPropertyValueEvaluator;
|
||||
@@ -1260,7 +1261,12 @@ public class Component extends AbstractBasicComponent {
|
||||
}
|
||||
}
|
||||
}
|
||||
ModuleNeeded moduleNeeded = new ModuleNeeded(getName(), "", true, "mvn:org.talend.libraries/slf4j-log4j12-1.7.10/6.0.0");
|
||||
|
||||
ModuleNeeded moduleNeeded = null;
|
||||
if(!CheckLogManamger.isSelectLog4j2()) {
|
||||
//TODO consider to let it works for all jobs, not only for tcompv0 components, mean move the code to ReplaceNodeInProcess and UpdateLog4jJarUtils when not log4j2
|
||||
moduleNeeded = new ModuleNeeded(getName(), "", true, "mvn:org.slf4j/slf4j-log4j12/1.7.25");
|
||||
}
|
||||
componentImportNeedsList.add(moduleNeeded);
|
||||
moduleNeeded = new ModuleNeeded(getName(), "", true, "mvn:org.talend.libraries/talend-codegen-utils/0.28.0");
|
||||
componentImportNeedsList.add(moduleNeeded);
|
||||
|
||||
@@ -13,6 +13,6 @@ public class CheckLogManamger {
|
||||
}
|
||||
|
||||
public static void updateLog4jToModuleList(Collection<ModuleNeeded> jarList) {
|
||||
UpdateLog4jJarUtils.addLog4jToModuleList(jarList, isSelectLog4j2());
|
||||
UpdateLog4jJarUtils.addLog4jToModuleList(jarList, isSelectLog4j2(), null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,8 +32,8 @@ import org.talend.core.model.process.IReplaceNodeInProcess;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.JobletProcessItem;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.model.repository.IRepositoryEditorInput;
|
||||
import org.talend.core.model.update.UpdateResult;
|
||||
import org.talend.core.ui.editor.JobEditorInput;
|
||||
import org.talend.designer.core.ui.editor.process.Process;
|
||||
|
||||
/**
|
||||
@@ -146,23 +146,6 @@ public abstract class AbstractProcessProvider implements IReplaceNodeInProcess {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* DOC hwang Comment method "loadComponentsFromProviders".
|
||||
*
|
||||
* @return
|
||||
* @throws PersistenceException
|
||||
*/
|
||||
public static JobEditorInput createEditorInput(JobletProcessItem processItem, boolean load, Boolean lastVersion, Boolean readonly,
|
||||
Boolean openedInJob) throws PersistenceException {
|
||||
for (AbstractProcessProvider processProvider : findAllProcessProviders()) {
|
||||
JobEditorInput editorInput= processProvider.createJobletEditorInput(processItem, load, lastVersion, readonly, openedInJob);
|
||||
if(editorInput != null) {
|
||||
return editorInput;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* DOC qzhang Comment method "canDeleteNode".
|
||||
*
|
||||
@@ -277,7 +260,7 @@ public abstract class AbstractProcessProvider implements IReplaceNodeInProcess {
|
||||
return false;
|
||||
}
|
||||
|
||||
public JobEditorInput createJobletEditorInput(JobletProcessItem processItem, boolean load, Boolean lastVersion, Boolean readonly,
|
||||
public IRepositoryEditorInput createJobletEditorInput(JobletProcessItem processItem, boolean load, Boolean lastVersion, Boolean readonly,
|
||||
Boolean openedInJob) throws PersistenceException{
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -91,6 +91,7 @@ import org.talend.core.ui.component.ComponentsFactoryProvider;
|
||||
import org.talend.daikon.properties.Properties;
|
||||
import org.talend.daikon.properties.PropertiesVisitor;
|
||||
import org.talend.daikon.properties.property.PropertyValueEvaluator;
|
||||
import org.talend.designer.core.CheckLogManamger;
|
||||
import org.talend.designer.core.i18n.Messages;
|
||||
import org.talend.designer.core.model.components.AbstractBasicComponent;
|
||||
import org.talend.designer.core.model.components.EParameterName;
|
||||
@@ -1968,6 +1969,11 @@ public class DataProcess implements IGeneratingProcess {
|
||||
jobStructure.setStart(true);
|
||||
jobStructure.setSubProcessStart(true);
|
||||
jobStructure.setProcess(duplicatedProcess);
|
||||
if(!CheckLogManamger.isSelectLog4j2()) {
|
||||
jobStructure.getElementParameter("LOG4J_VERSION").setValue("LOG4J1");
|
||||
} else {
|
||||
jobStructure.getElementParameter("LOG4J_VERSION").setValue("LOG4J2");
|
||||
}
|
||||
addDataNode(jobStructure);
|
||||
|
||||
//TODO consider to remove it as may not necessary
|
||||
|
||||
@@ -19,15 +19,21 @@ import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.jdt.internal.ui.JavaPlugin;
|
||||
import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor;
|
||||
import org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer;
|
||||
import org.eclipse.jdt.internal.ui.text.JavaCompositeReconcilingStrategy;
|
||||
import org.eclipse.jdt.internal.ui.text.JavaReconciler;
|
||||
import org.eclipse.jdt.ui.actions.IJavaEditorActionDefinitionIds;
|
||||
import org.eclipse.jdt.ui.text.IJavaPartitions;
|
||||
import org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration;
|
||||
import org.eclipse.jdt.ui.text.JavaTextTools;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.jface.text.BadLocationException;
|
||||
import org.eclipse.jface.text.FindReplaceDocumentAdapter;
|
||||
import org.eclipse.jface.text.IDocument;
|
||||
import org.eclipse.jface.text.Region;
|
||||
import org.eclipse.jface.text.source.IOverviewRuler;
|
||||
import org.eclipse.jface.text.source.ISourceViewer;
|
||||
import org.eclipse.jface.text.source.IVerticalRuler;
|
||||
import org.eclipse.jface.text.source.SourceViewerConfiguration;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.ui.part.FileEditorInput;
|
||||
import org.talend.commons.exception.SystemException;
|
||||
@@ -297,5 +303,41 @@ public class TalendJavaEditor extends CompilationUnitEditor implements ISyntaxCh
|
||||
super.initializeDragAndDrop(viewer);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor#createJavaSourceViewer(org.eclipse.swt.widgets.
|
||||
* Composite, org.eclipse.jface.text.source.IVerticalRuler, org.eclipse.jface.text.source.IOverviewRuler, boolean,
|
||||
* int, org.eclipse.jface.preference.IPreferenceStore)
|
||||
*/
|
||||
@Override
|
||||
protected ISourceViewer createJavaSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler,
|
||||
boolean isOverviewRulerVisible, int styles, IPreferenceStore store) {
|
||||
return new TalendAdaptedSourceViewer(parent, verticalRuler, overviewRuler, isOverviewRulerVisible, styles, store);
|
||||
}
|
||||
|
||||
@SuppressWarnings("restriction")
|
||||
protected class TalendAdaptedSourceViewer extends AdaptedSourceViewer {
|
||||
|
||||
public TalendAdaptedSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler,
|
||||
boolean showAnnotationsOverview, int styles, IPreferenceStore store) {
|
||||
super(parent, verticalRuler, overviewRuler, showAnnotationsOverview, styles, store);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void configure(SourceViewerConfiguration configuration) {
|
||||
super.configure(configuration);
|
||||
if (fReconciler == null) {
|
||||
JavaCompositeReconcilingStrategy strategy = new JavaCompositeReconcilingStrategy(this, TalendJavaEditor.this,
|
||||
configuration.getConfiguredDocumentPartitioning(this));
|
||||
JavaReconciler reconciler = new JavaReconciler(TalendJavaEditor.this, strategy, false);
|
||||
reconciler.setIsAllowedToModifyDocument(false);
|
||||
reconciler.setDelay(500);
|
||||
fReconciler = reconciler;
|
||||
fReconciler.install(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -126,6 +126,7 @@ import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.core.repository.utils.ConvertJobsUtil;
|
||||
import org.talend.core.repository.utils.ProjectHelper;
|
||||
import org.talend.core.repository.utils.XmiResourceManager;
|
||||
import org.talend.core.runtime.process.TalendProcessArgumentConstant;
|
||||
import org.talend.core.runtime.repository.item.ItemProductKeys;
|
||||
import org.talend.core.runtime.util.ItemDateParser;
|
||||
import org.talend.core.service.IScdComponentService;
|
||||
@@ -4492,6 +4493,18 @@ public class Process extends Element implements IProcess2, IGEFProcess, ILastVer
|
||||
private void loadAdditionalProperties() {
|
||||
if (additionalProperties == null) {
|
||||
additionalProperties = new HashMap<Object, Object>();
|
||||
try {
|
||||
if (property.getItem() != null && ERepositoryObjectType.getType(property) != null) {
|
||||
boolean isRouteProcess = ERepositoryObjectType.getType(property).equals(ERepositoryObjectType.PROCESS_ROUTE);
|
||||
if (!isRouteProcess && "ROUTE"
|
||||
.equals(this.property.getAdditionalProperties().get(TalendProcessArgumentConstant.ARG_BUILD_TYPE))) {
|
||||
this.property.getAdditionalProperties().remove(TalendProcessArgumentConstant.ARG_BUILD_TYPE);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
|
||||
for (Object key : this.property.getAdditionalProperties().keySet()) {
|
||||
additionalProperties.put(key, this.property.getAdditionalProperties().get(key));
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import org.talend.core.model.components.ComponentCategory;
|
||||
import org.talend.core.model.components.IComponent;
|
||||
import org.talend.core.model.process.IElementParameter;
|
||||
import org.talend.core.model.process.Problem.ProblemStatus;
|
||||
import org.talend.core.model.process.ProcessUtils;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.ProcessItem;
|
||||
import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
@@ -96,40 +97,46 @@ public class TRunjobUtil {
|
||||
}
|
||||
List<NodeType> nodeList = process.getNode();
|
||||
for(NodeType nodeTye : nodeList) {
|
||||
String subid = null;
|
||||
String id = null;
|
||||
boolean isJoblet = false;
|
||||
boolean nodeActivate = true;
|
||||
List<ElementParameterType> typeList = nodeTye.getElementParameter();
|
||||
for(ElementParameterType eType : typeList) {
|
||||
if("PROCESS:PROCESS_TYPE_PROCESS".equals(eType.getName())) {//$NON-NLS-1$
|
||||
String id = eType.getValue();
|
||||
id = id.substring(id.indexOf(":") + 1);//$NON-NLS-1$
|
||||
String subid = loop + "&" +id;//$NON-NLS-1$
|
||||
for(String pid : idList) {
|
||||
int parent = Integer.parseInt(pid.substring(0, pid.indexOf("&")));//$NON-NLS-1$
|
||||
String child = pid.substring(pid.indexOf("&") + 1, pid.length());//$NON-NLS-1$
|
||||
if(parent != loop && child.equals(id)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
idList.add(subid);
|
||||
|
||||
IRepositoryViewObject obj = ProxyRepositoryFactory.getInstance().getLastVersion(id);
|
||||
if(obj == null || obj.getProperty() == null || obj.getProperty().getItem() == null) {
|
||||
return false;
|
||||
}
|
||||
Item item = obj.getProperty().getItem();
|
||||
if(item instanceof ProcessItem) {
|
||||
ProcessType subprocess = ((ProcessItem)item).getProcess();
|
||||
boolean result = isInLoop(subprocess, idList, loop + 1);
|
||||
if(result) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
id = ProcessUtils.getPureItemId(eType.getValue());
|
||||
subid = loop + "&" + id;//$NON-NLS-1$
|
||||
} else if ("ACTIVATE".equals(eType.getName())) {
|
||||
nodeActivate = Boolean.parseBoolean(eType.getValue());
|
||||
}else if("FAMILY".equals(eType.getName()) && "Joblets".equals(eType.getValue())) {
|
||||
isJoblet = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (nodeActivate && StringUtils.isNotBlank(id)) {
|
||||
for (String pid : idList) {
|
||||
int parent = Integer.parseInt(pid.substring(0, pid.indexOf("&")));//$NON-NLS-1$
|
||||
String child = pid.substring(pid.indexOf("&") + 1, pid.length());//$NON-NLS-1$
|
||||
if (parent != loop && child.equals(id)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
idList.add(subid);
|
||||
|
||||
IRepositoryViewObject obj = ProxyRepositoryFactory.getInstance().getLastVersion(id);
|
||||
if (obj == null || obj.getProperty() == null || obj.getProperty().getItem() == null) {
|
||||
return false;
|
||||
}
|
||||
Item item = obj.getProperty().getItem();
|
||||
if (item instanceof ProcessItem) {
|
||||
ProcessType subprocess = ((ProcessItem) item).getProcess();
|
||||
boolean result = isInLoop(subprocess, idList, loop + 1);
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(isJoblet) {
|
||||
String jobletPaletteType = null;
|
||||
String frameWork = process.getFramework();
|
||||
|
||||
@@ -83,7 +83,6 @@ public class InputTable extends AbstractInOutTable {
|
||||
public void initFromExternalData(ExternalDbMapTable externalMapperTable) {
|
||||
|
||||
boolean isAliasTable = externalMapperTable != null && externalMapperTable.getAlias() != null;
|
||||
|
||||
if (isAliasTable) {
|
||||
// dbmap table is alias
|
||||
setMetadataTable(connection.getTable().clone());
|
||||
@@ -101,7 +100,6 @@ public class InputTable extends AbstractInOutTable {
|
||||
}
|
||||
}
|
||||
|
||||
ArrayList<IMetadataColumn> columnsToRemove = new ArrayList<IMetadataColumn>();
|
||||
for (IMetadataColumn column : columns) {
|
||||
InputColumnTableEntry inputEntry = (InputColumnTableEntry) getNewTableEntry(column);
|
||||
ExternalDbMapEntry externalMapperTableEntry = nameToPerTabEntry.get(inputEntry.getMetadataColumn().getLabel());
|
||||
@@ -110,13 +108,8 @@ public class InputTable extends AbstractInOutTable {
|
||||
fillInputEntry(inputEntry, externalMapperTableEntry);
|
||||
nameToPerTabEntry.remove(externalMapperTableEntry.getName());
|
||||
}
|
||||
if (externalMapperTableEntry != null || !isAliasTable) {
|
||||
dataMapTableEntries.add(inputEntry);
|
||||
} else {
|
||||
columnsToRemove.add(column);
|
||||
}
|
||||
dataMapTableEntries.add(inputEntry);
|
||||
}
|
||||
columns.removeAll(columnsToRemove);
|
||||
|
||||
// create unmatching entries
|
||||
for (ExternalDbMapEntry perTableEntry : nameToPerTabEntry.values()) {
|
||||
|
||||
@@ -890,8 +890,8 @@ public class MapperComponent extends AbstractMapComponent implements IHashableIn
|
||||
res = false;
|
||||
}
|
||||
|
||||
//only one output
|
||||
if (this.externalData.getOutputTables().size() > 1) {
|
||||
//only one output, can be equal to 0 when graphically adding component so we avoid NPE
|
||||
if (this.externalData.getOutputTables().size() != 1) {
|
||||
res = false;
|
||||
} //no rejects
|
||||
else if (this.externalData.getOutputTables().get(0).isRejectInnerJoin()
|
||||
|
||||
@@ -325,7 +325,7 @@ public abstract class BigDataJavaProcessor extends MavenJavaProcessor implements
|
||||
Set<String> libsRequiredByJob = new HashSet<>();
|
||||
Set<ModuleNeeded> neededModules = JavaProcessorUtilities.getNeededModulesForProcess(process);
|
||||
if (!ProcessorUtilities.isExportConfig()) {
|
||||
JavaProcessorUtilities.addLog4jToModuleList(neededModules);
|
||||
JavaProcessorUtilities.addLog4jToModuleList(neededModules, process);
|
||||
}
|
||||
JavaProcessorUtilities.checkJavaProjectLib(neededModules);
|
||||
|
||||
|
||||
@@ -1579,7 +1579,7 @@ public class JavaProcessor extends AbstractJavaProcessor implements IJavaBreakpo
|
||||
Set<ModuleNeeded> neededLibraries = JavaProcessorUtilities.getNeededModulesForProcess(process, options);
|
||||
boolean isLog4jEnabled = Boolean.parseBoolean(ElementParameterParser.getValue(process, "__LOG4J_ACTIVATE__")); //$NON-NLS-1$
|
||||
if (isLog4jEnabled) {
|
||||
JavaProcessorUtilities.addLog4jToModuleList(neededLibraries);
|
||||
JavaProcessorUtilities.addLog4jToModuleList(neededLibraries, process);
|
||||
}
|
||||
return neededLibraries;
|
||||
}
|
||||
@@ -1588,7 +1588,7 @@ public class JavaProcessor extends AbstractJavaProcessor implements IJavaBreakpo
|
||||
public void updateModulesAfterSetLog4j(Collection<ModuleNeeded> modulesNeeded) {
|
||||
boolean isLog4jEnabled = Boolean.parseBoolean(ElementParameterParser.getValue(process, "__LOG4J_ACTIVATE__")); //$NON-NLS-1$
|
||||
if (isLog4jEnabled) {
|
||||
JavaProcessorUtilities.addLog4jToModuleList(modulesNeeded);
|
||||
JavaProcessorUtilities.addLog4jToModuleList(modulesNeeded, process);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1988,6 +1988,12 @@ public class JavaProcessor extends AbstractJavaProcessor implements IJavaBreakpo
|
||||
IFolder extResourcePath = externalResourcesFolder.getFolder(jobContextFolderPath);
|
||||
IFolder resourcesPath = resourcesFolder.getFolder(jobContextFolderPath);
|
||||
|
||||
if (!extResourcePath.exists()) {
|
||||
tProcessJvaProject.createSubFolder(null, externalResourcesFolder, jobContextFolderPath.toString());
|
||||
}
|
||||
|
||||
extResourcePath.refreshLocal(IResource.DEPTH_INFINITE, null);
|
||||
|
||||
if(!resourcesPath.exists()) {
|
||||
tProcessJvaProject.createSubFolder(null, resourcesFolder, jobContextFolderPath.toString());
|
||||
}
|
||||
|
||||
@@ -371,7 +371,7 @@ public class JavaProcessorUtilities {
|
||||
listModulesReallyNeeded.add(jar);
|
||||
}
|
||||
|
||||
addLog4jToModuleList(listModulesReallyNeeded);
|
||||
addLog4jToModuleList(listModulesReallyNeeded, process);
|
||||
listModulesReallyNeeded.removeAll(alreadyRetrievedModules);
|
||||
alreadyRetrievedModules.addAll(listModulesReallyNeeded);
|
||||
|
||||
@@ -427,8 +427,8 @@ public class JavaProcessorUtilities {
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean addLog4jToModuleList(Collection<ModuleNeeded> jarList) {
|
||||
return UpdateLog4jJarUtils.addLog4jToModuleList(jarList, Log4jPrefsSettingManager.getInstance().isSelectLog4j2());
|
||||
public static void addLog4jToModuleList(Collection<ModuleNeeded> jarList, IProcess process) {
|
||||
UpdateLog4jJarUtils.addLog4jToModuleList(jarList, Log4jPrefsSettingManager.getInstance().isSelectLog4j2(), process);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<artifactItem>
|
||||
<groupId>org.talend.libraries</groupId>
|
||||
<artifactId>talend-mscrm</artifactId>
|
||||
<version>3.4-20190513</version>
|
||||
<version>3.4-20191012</version>
|
||||
<type>jar</type>
|
||||
<overWrite>true</overWrite>
|
||||
<outputDirectory>${libs.dir}</outputDirectory>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<classpathentry exported="true" kind="lib" path="lib/poi-scratchpad-4.1.0-20190523141255_modified_talend.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/simpleexcel-2.2-20190722.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/talendExcel-1.5-20190731.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/talendMsgMailUtil-1.1-20170419.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/talendMsgMailUtil-1.1-20191012.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="output" path="class"/>
|
||||
|
||||
@@ -7,6 +7,6 @@ bin.includes = META-INF/,\
|
||||
lib/poi-scratchpad-4.1.0-20190523141255_modified_talend.jar,\
|
||||
lib/commons-compress-1.18.jar,\
|
||||
lib/talendExcel-1.3-20180215.jar,\
|
||||
lib/talendMsgMailUtil-1.1-20170419.jar,\
|
||||
lib/talendMsgMailUtil-1.1-20191012.jar,\
|
||||
lib/commons-math3-3.6.1.jar
|
||||
bin.excludes = lib/.gitignore
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>${talend.groupid}</groupId>
|
||||
<artifactId>talendMsgMailUtil-1.1-20170419</artifactId>
|
||||
<artifactId>talendMsgMailUtil-1.1-20191012</artifactId>
|
||||
<version>${talend.version.600}</version>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.libraries.slf4j</artifactId>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
</project>
|
||||
<?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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tdi-studio-se</artifactId>
|
||||
<version>7.3.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.libraries.slf4j</artifactId>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
</project>
|
||||
|
||||
@@ -3279,6 +3279,85 @@
|
||||
message="Library needed to export to JBoss ESB"
|
||||
name="jbossesb-rosetta.jar" mvn_uri="mvn:org.talend.libraries/jbossesb-rosetta/6.0.0"
|
||||
required="true"/>
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.apache"
|
||||
id="log4j-1.2.17.jar"
|
||||
name="log4j-1.2.17.jar"
|
||||
mvn_uri="mvn:log4j/log4j/1.2.17"
|
||||
uripath="platform:/plugin/org.talend.libraries.apache/lib/log4j-1.2.17.jar">
|
||||
</libraryNeeded>
|
||||
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.apache"
|
||||
id="slf4j-log4j12-1.7.25.jar"
|
||||
name="slf4j-log4j12-1.7.25.jar"
|
||||
mvn_uri="mvn:org.slf4j/slf4j-log4j12/1.7.25"
|
||||
uripath="platform:/plugin/org.talend.libraries.apache/lib/slf4j-log4j12-1.7.25.jar">
|
||||
</libraryNeeded>
|
||||
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.apache"
|
||||
id="log4j-to-slf4j-2.12.1.jar"
|
||||
name="log4j-to-slf4j-2.12.1.jar"
|
||||
mvn_uri="mvn:org.apache.logging.log4j/log4j-to-slf4j/2.12.1"
|
||||
uripath="platform:/plugin/org.talend.libraries.apache/lib/log4j-to-slf4j-2.12.1.jar">
|
||||
</libraryNeeded>
|
||||
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.apache"
|
||||
id="jul-to-slf4j-1.7.25.jar"
|
||||
name="jul-to-slf4j-1.7.25.jar"
|
||||
mvn_uri="mvn:org.slf4j/jul-to-slf4j/1.7.25"
|
||||
uripath="platform:/plugin/org.talend.libraries.apache/lib/jul-to-slf4j-1.7.25.jar">
|
||||
</libraryNeeded>
|
||||
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.apache"
|
||||
id="jcl-over-slf4j-1.7.25.jar"
|
||||
name="jcl-over-slf4j-1.7.25.jar"
|
||||
mvn_uri="mvn:org.slf4j/jcl-over-slf4j/1.7.25"
|
||||
uripath="platform:/plugin/org.talend.libraries.apache/lib/jcl-over-slf4j-1.7.25.jar">
|
||||
</libraryNeeded>
|
||||
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.apache"
|
||||
id="log4j-core-2.12.1.jar"
|
||||
name="log4j-core-2.12.1.jar"
|
||||
mvn_uri="mvn:org.apache.logging.log4j/log4j-core/2.12.1"
|
||||
uripath="platform:/plugin/org.talend.libraries.apache/lib/log4j-core-2.12.1.jar">
|
||||
</libraryNeeded>
|
||||
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.apache"
|
||||
id="log4j-api-2.12.1.jar"
|
||||
name="log4j-api-2.12.1.jar"
|
||||
mvn_uri="mvn:org.apache.logging.log4j/log4j-api/2.12.1"
|
||||
uripath="platform:/plugin/org.talend.libraries.apache/lib/log4j-api-2.12.1.jar">
|
||||
</libraryNeeded>
|
||||
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.apache"
|
||||
id="log4j-slf4j-impl-2.12.1.jar"
|
||||
name="log4j-slf4j-impl-2.12.1.jar"
|
||||
mvn_uri="mvn:org.apache.logging.log4j/log4j-slf4j-impl/2.12.1"
|
||||
uripath="platform:/plugin/org.talend.libraries.apache/lib/log4j-slf4j-impl-2.12.1.jar">
|
||||
</libraryNeeded>
|
||||
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.apache"
|
||||
id="log4j-jul-2.12.1.jar"
|
||||
name="log4j-jul-2.12.1.jar"
|
||||
mvn_uri="mvn:org.apache.logging.log4j/log4j-jul/2.12.1"
|
||||
uripath="platform:/plugin/org.talend.libraries.apache/lib/log4j-jul-2.12.1.jar">
|
||||
</libraryNeeded>
|
||||
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.apache"
|
||||
id="log4j-jcl-2.12.1.jar"
|
||||
name="log4j-jcl-2.12.1.jar"
|
||||
mvn_uri="mvn:org.apache.logging.log4j/log4j-jcl/2.12.1"
|
||||
uripath="platform:/plugin/org.talend.libraries.apache/lib/log4j-jcl-2.12.1.jar">
|
||||
</libraryNeeded>
|
||||
</extension>
|
||||
<!--
|
||||
<extension
|
||||
|
||||
@@ -2,13 +2,277 @@ package org.talend.repository.ui.utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.talend.commons.CommonsPlugin;
|
||||
import org.talend.commons.exception.CommonExceptionHandler;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.model.general.ModuleNeeded;
|
||||
import org.talend.core.model.process.IProcess;
|
||||
import org.talend.core.model.process.IProcess2;
|
||||
import org.talend.core.model.properties.Property;
|
||||
import org.talend.core.runtime.maven.MavenUrlHelper;
|
||||
import org.talend.core.runtime.process.LastGenerationInfo;
|
||||
import org.talend.designer.runprocess.IRunProcessService;
|
||||
import org.talend.librariesmanager.model.ModulesNeededProvider;
|
||||
|
||||
public class UpdateLog4jJarUtils {
|
||||
|
||||
public static boolean addLog4jToJarList(Collection<String> jarList, boolean isSelectLog4j2) {
|
||||
public static void addLog4jToJarList(Collection<String> jarList, boolean isSelectLog4j2) {
|
||||
IProcess2 process = null;
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
|
||||
IRunProcessService processService = (IRunProcessService) GlobalServiceRegister.getDefault()
|
||||
.getService(IRunProcessService.class);
|
||||
IProcess activeProcess = processService.getActiveProcess();
|
||||
if (activeProcess instanceof IProcess2) {
|
||||
process = (IProcess2) activeProcess;
|
||||
}
|
||||
}
|
||||
// if (process != null && ComponentCategory.CATEGORY_4_CAMEL.getName().equals(process.getComponentsType())) {
|
||||
// addLog4jToJarListForESB(jarList, isSelectLog4j2);
|
||||
// return;
|
||||
// }
|
||||
List<String> modulesUsedBefore = removeLog4jFromJarListAndGetUsedJarBefore(process, jarList);
|
||||
addBackJars(jarList, isSelectLog4j2, modulesUsedBefore);
|
||||
}
|
||||
|
||||
public static void addLog4jToModuleList(Collection<ModuleNeeded> jarList, boolean isSelectLog4j2, IProcess currentProcess) {
|
||||
IProcess2 process = null;
|
||||
if (currentProcess instanceof IProcess2) {
|
||||
process = (IProcess2) currentProcess;
|
||||
}
|
||||
// if (process != null && ComponentCategory.CATEGORY_4_CAMEL.getName().equals(process.getComponentsType())) {
|
||||
// addLog4jToModuleListForESB(jarList, isSelectLog4j2);
|
||||
// return;
|
||||
// }
|
||||
List<ModuleNeeded> modulesUsedBefore = removeLog4jFromModuleListAndGetModulesUsedBefore(process, jarList);
|
||||
addBackModules(jarList, isSelectLog4j2, modulesUsedBefore);
|
||||
}
|
||||
|
||||
private static void addBackJars(Collection<String> moduleNeededList, boolean isSelectLog4j2, List<String> modulesUsedBefore) {
|
||||
if (isSelectLog4j2) {
|
||||
boolean usedlog4jJclBefore = false;
|
||||
boolean usedlog4jJulBefore = false;
|
||||
for (String module : modulesUsedBefore) {
|
||||
if (module.matches("log4j-jcl-\\d+\\.\\d+\\.\\d+\\.jar")) { //$NON-NLS-1$
|
||||
usedlog4jJclBefore = true;
|
||||
}
|
||||
if (module.matches("log4j-jul-\\d+\\.\\d+\\.\\d+\\.jar")) { //$NON-NLS-1$
|
||||
usedlog4jJulBefore = true;
|
||||
}
|
||||
}
|
||||
if (usedlog4jJclBefore) {
|
||||
moduleNeededList.add("log4j-jcl-2.12.1.jar");//$NON-NLS-1$
|
||||
}
|
||||
if (usedlog4jJulBefore) {
|
||||
moduleNeededList.add("log4j-jul-2.12.1.jar");//$NON-NLS-1$
|
||||
}
|
||||
moduleNeededList.add("log4j-slf4j-impl-2.12.1.jar");//$NON-NLS-1$
|
||||
moduleNeededList.add("log4j-api-2.12.1.jar");//$NON-NLS-1$
|
||||
moduleNeededList.add("log4j-core-2.12.1.jar");//$NON-NLS-1$
|
||||
} else {
|
||||
boolean usedjclOverSlf4jBefore = false;
|
||||
boolean usedjulToSlf4jBefore = false;
|
||||
for (String module : modulesUsedBefore) {
|
||||
if (module.matches("jcl-over-slf4j-\\d+\\.\\d+\\.\\d+\\.jar")) { //$NON-NLS-1$
|
||||
usedjclOverSlf4jBefore = true;
|
||||
}
|
||||
if (module.matches("jul-to-slf4j-\\d+\\.\\d+\\.\\d+\\.jar")) { //$NON-NLS-1$
|
||||
usedjulToSlf4jBefore = true;
|
||||
}
|
||||
}
|
||||
if (usedjclOverSlf4jBefore) {
|
||||
moduleNeededList.add("jcl-over-slf4j-1.7.25.jar");//$NON-NLS-1$
|
||||
}
|
||||
if (usedjulToSlf4jBefore) {
|
||||
moduleNeededList.add("jul-to-slf4j-1.7.25.jar");//$NON-NLS-1$
|
||||
}
|
||||
moduleNeededList.add("log4j-to-slf4j-2.12.1.jar");//$NON-NLS-1$
|
||||
moduleNeededList.add("slf4j-log4j12-1.7.25.jar");//$NON-NLS-1$
|
||||
moduleNeededList.add("log4j-1.2.17.jar");//$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
private static void addBackModules(Collection<ModuleNeeded> moduleNeededList, boolean isSelectLog4j2,
|
||||
List<ModuleNeeded> modulesUsedBefore) {
|
||||
if (isSelectLog4j2) {
|
||||
boolean usedlog4jJclBefore = false;
|
||||
boolean usedlog4jJulBefore = false;
|
||||
for (ModuleNeeded module : modulesUsedBefore) {
|
||||
if (module.getModuleName().matches("log4j-jcl-\\d+\\.\\d+\\.\\d+\\.jar")) { //$NON-NLS-1$
|
||||
usedlog4jJclBefore = true;
|
||||
}
|
||||
if (module.getModuleName().matches("log4j-jul-\\d+\\.\\d+\\.\\d+\\.jar")) { //$NON-NLS-1$
|
||||
usedlog4jJulBefore = true;
|
||||
}
|
||||
}
|
||||
if (usedlog4jJclBefore) {
|
||||
ModuleNeeded log4jJcl = new ModuleNeeded("org.apache.logging.log4j", "log4j-jcl-2.12.1.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4jJcl.setMavenUri("mvn:org.apache.logging.log4j/log4j-jcl/2.12.1");//$NON-NLS-1$
|
||||
moduleNeededList.add(log4jJcl);
|
||||
}
|
||||
if (usedlog4jJulBefore) {
|
||||
ModuleNeeded log4jJul = new ModuleNeeded("org.apache.logging.log4j", "log4j-jul-2.12.1.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4jJul.setMavenUri("mvn:org.apache.logging.log4j/log4j-jul/2.12.1");//$NON-NLS-1$
|
||||
moduleNeededList.add(log4jJul);
|
||||
}
|
||||
ModuleNeeded log4jSlf4jImpl = new ModuleNeeded("org.apache.logging.log4j", "log4j-slf4j-impl-2.12.1.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4jSlf4jImpl.setMavenUri("mvn:org.apache.logging.log4j/log4j-slf4j-impl/2.12.1");//$NON-NLS-1$
|
||||
moduleNeededList.add(log4jSlf4jImpl);
|
||||
ModuleNeeded log4jApi = new ModuleNeeded("org.apache.logging.log4j", "log4j-api-2.12.1.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4jApi.setMavenUri("mvn:org.apache.logging.log4j/log4j-api/2.12.1");//$NON-NLS-1$
|
||||
moduleNeededList.add(log4jApi);
|
||||
ModuleNeeded log4jCore = new ModuleNeeded("org.apache.logging.log4j", "log4j-core-2.12.1.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4jCore.setMavenUri("mvn:org.apache.logging.log4j/log4j-core/2.12.1");//$NON-NLS-1$
|
||||
moduleNeededList.add(log4jCore);
|
||||
} else {
|
||||
boolean usedjclOverSlf4jBefore = false;
|
||||
boolean usedjulToSlf4jBefore = false;
|
||||
for (ModuleNeeded module : modulesUsedBefore) {
|
||||
if (module.getModuleName().matches("jcl-over-slf4j-\\d+\\.\\d+\\.\\d+\\.jar")) { //$NON-NLS-1$
|
||||
usedjclOverSlf4jBefore = true;
|
||||
}
|
||||
if (module.getModuleName().matches("jul-to-slf4j-\\d+\\.\\d+\\.\\d+\\.jar")) { //$NON-NLS-1$
|
||||
usedjulToSlf4jBefore = true;
|
||||
}
|
||||
}
|
||||
if (usedjclOverSlf4jBefore) {
|
||||
ModuleNeeded jclOverSlf4j = new ModuleNeeded("org.slf4j", "jcl-over-slf4j-1.7.25.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
jclOverSlf4j.setMavenUri("mvn:org.slf4j/jcl-over-slf4j/1.7.25");//$NON-NLS-1$
|
||||
moduleNeededList.add(jclOverSlf4j);
|
||||
}
|
||||
if (usedjulToSlf4jBefore) {
|
||||
ModuleNeeded julToSlf4j = new ModuleNeeded("org.slf4j", "jul-to-slf4j-1.7.25.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
julToSlf4j.setMavenUri("mvn:org.slf4j/jul-to-slf4j/1.7.25");//$NON-NLS-1$
|
||||
moduleNeededList.add(julToSlf4j);
|
||||
}
|
||||
ModuleNeeded log4jToSlf4j = new ModuleNeeded("org.apache.logging.log4j", "log4j-to-slf4j-2.12.1.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4jToSlf4j.setMavenUri("mvn:org.apache.logging.log4j/log4j-to-slf4j/2.12.1");//$NON-NLS-1$
|
||||
moduleNeededList.add(log4jToSlf4j);
|
||||
ModuleNeeded slf4jLog4j12 = new ModuleNeeded("org.slf4j", "slf4j-log4j12-1.7.25.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
slf4jLog4j12.setMavenUri("mvn:org.slf4j/slf4j-log4j12/1.7.25");//$NON-NLS-1$
|
||||
moduleNeededList.add(slf4jLog4j12);
|
||||
ModuleNeeded log4j = new ModuleNeeded("log4j", "log4j-1.2.17.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4j.setMavenUri("mvn:log4j/log4j/1.2.17");//$NON-NLS-1$
|
||||
moduleNeededList.add(log4j);
|
||||
}
|
||||
}
|
||||
|
||||
private static List<ModuleNeeded> removeLog4jFromModuleListAndGetModulesUsedBefore(IProcess2 process,
|
||||
Collection<ModuleNeeded> jarList) {
|
||||
Set<ModuleNeeded> highPriorityModuleNeeded = getHighPriorityModuleNeeded(process);
|
||||
List<ModuleNeeded> modulesUsedBefore = new ArrayList<ModuleNeeded>();
|
||||
Iterator<ModuleNeeded> iterator = jarList.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
ModuleNeeded module = iterator.next();
|
||||
getSpecialModulesUsedBefore(modulesUsedBefore, module);
|
||||
if (highPriorityModuleNeeded != null && !highPriorityModuleNeeded.contains(module)
|
||||
&& isNeedRemoveModule(module, module.getModuleName())) {
|
||||
iterator.remove();
|
||||
if (CommonsPlugin.isDebugMode()) {
|
||||
String processName = "";
|
||||
if (process != null) {
|
||||
processName = process.getName();
|
||||
}
|
||||
String warning = module.getModuleName() + " is removed for " + processName;//$NON-NLS-1$
|
||||
CommonExceptionHandler.warn(warning);
|
||||
}
|
||||
}
|
||||
}
|
||||
return modulesUsedBefore;
|
||||
}
|
||||
|
||||
public static final String[] SPECIALMODULESUSEDBEFORES = { "log4j-jcl-\\d+\\.\\d+\\.\\d+\\.jar", //$NON-NLS-1$
|
||||
"log4j-jul-\\d+\\.\\d+\\.\\d+\\.jar", "jcl-over-slf4j-\\d+\\.\\d+\\.\\d+\\.jar", //$NON-NLS-1$//$NON-NLS-2$
|
||||
"jul-to-slf4j-\\d+\\.\\d+\\.\\d+\\.jar" };//$NON-NLS-1$
|
||||
|
||||
private static List<ModuleNeeded> getSpecialModulesUsedBefore(List<ModuleNeeded> modulesUsedBefore, ModuleNeeded module) {
|
||||
for (String moduleUsedBefore : SPECIALMODULESUSEDBEFORES) {
|
||||
if (module.getModuleName().matches(moduleUsedBefore)) { // $NON-NLS-1$
|
||||
modulesUsedBefore.add(module);
|
||||
}
|
||||
}
|
||||
return modulesUsedBefore;
|
||||
}
|
||||
|
||||
private static List<String> getSpecialJarsUsedBefore(List<String> jarsUsedBefore, String jar) {
|
||||
for (String moduleUsedBefore : SPECIALMODULESUSEDBEFORES) {
|
||||
if (jar.matches(moduleUsedBefore)) { // $NON-NLS-1$
|
||||
jarsUsedBefore.add(jar);
|
||||
}
|
||||
}
|
||||
return jarsUsedBefore;
|
||||
|
||||
}
|
||||
|
||||
private static Set<ModuleNeeded> getHighPriorityModuleNeeded(IProcess2 process) {
|
||||
Set<ModuleNeeded> highPriorityModuleNeeded = null;
|
||||
if (process != null) {
|
||||
Property property = process.getProperty();
|
||||
highPriorityModuleNeeded = LastGenerationInfo.getInstance().getHighPriorityModuleNeeded(property.getId(),
|
||||
property.getVersion());
|
||||
}
|
||||
return highPriorityModuleNeeded == null ? new LinkedHashSet<>() : highPriorityModuleNeeded;
|
||||
}
|
||||
|
||||
private static List<String> removeLog4jFromJarListAndGetUsedJarBefore(IProcess2 process, Collection<String> jarList) {
|
||||
Set<ModuleNeeded> highPriorityModuleNeeded = getHighPriorityModuleNeeded(process);
|
||||
List<String> jarsUsedBefore = new ArrayList<String>();
|
||||
Iterator<String> iterator = jarList.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
String jar = iterator.next();
|
||||
getSpecialJarsUsedBefore(jarsUsedBefore, jar);
|
||||
if (!isHighPriorityModuleNeeded(highPriorityModuleNeeded, jar) && isNeedRemoveModule(null, jar)) {
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
return jarsUsedBefore;
|
||||
}
|
||||
|
||||
private static boolean isHighPriorityModuleNeeded(Set<ModuleNeeded> highPriorityModuleNeeded, String jar) {
|
||||
if (highPriorityModuleNeeded != null) {
|
||||
for (ModuleNeeded moduel : highPriorityModuleNeeded) {
|
||||
if (StringUtils.equals(moduel.getModuleName(), jar)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static final String[] NEEDREMOVEMODULES = { "jcl-over-slf4j-\\d+\\.\\d+\\.\\d+\\.jar", //$NON-NLS-1$
|
||||
"jul-to-slf4j-\\d+\\.\\d+\\.\\d+\\.jar", "log4j-to-slf4j-\\d+\\.\\d+\\.\\d+\\.jar", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"log4j-to-slf4j-\\d+\\.\\d+\\.\\d+\\.jar", "slf4j-log4j12-\\d+\\.\\d+\\.\\d+\\.jar", "log4j-\\d+\\.\\d+\\.\\d+\\.jar", //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
|
||||
"log4j-jcl-\\d+\\.\\d+\\.\\d+\\.jar", "log4j-jul-\\d+\\.\\d+\\.\\d+\\.jar", //$NON-NLS-1$//$NON-NLS-2$
|
||||
"log4j-slf4j-impl-\\d+\\.\\d+\\.\\d+\\.jar", "log4j-1.2-api-\\d+\\.\\d+\\.\\d+\\.jar", //$NON-NLS-1$//$NON-NLS-2$
|
||||
"log4j-core-\\d+\\.\\d+\\.\\d+\\.jar", "log4j-api-\\d+\\.\\d+\\.\\d+\\.jar", //$NON-NLS-1$//$NON-NLS-2$
|
||||
"slf4j-standard-\\d+\\.\\d+\\.\\d+\\.jar" };//$NON-NLS-1$
|
||||
|
||||
private static boolean isNeedRemoveModule(ModuleNeeded module, String moduleName) {
|
||||
for (String needRemoveModuleName : NEEDREMOVEMODULES) {
|
||||
if (moduleName.matches(needRemoveModuleName)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (module == null) {
|
||||
module = ModulesNeededProvider.getModuleNeededById(moduleName);
|
||||
}
|
||||
if (module != null && module.getMavenUri() != null) {
|
||||
String[] mvnSplit = module.getMavenUri().split(MavenUrlHelper.SEPERATOR);
|
||||
if (mvnSplit != null && mvnSplit.length > 0) {
|
||||
if (StringUtils.equals(mvnSplit[0], MavenUrlHelper.MVN_PROTOCOL + "ch.qos.logback")) {//$NON-NLS-1$
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static boolean addLog4jToJarListForESB(Collection<String> jarList, boolean isSelectLog4j2) {
|
||||
List<String> moduleNeededList = new ArrayList<String>();
|
||||
List<String> moduleDeleteList = new ArrayList<String>();
|
||||
if (isSelectLog4j2) {
|
||||
@@ -67,7 +331,7 @@ public class UpdateLog4jJarUtils {
|
||||
return moduleNeededList.size() > 0;
|
||||
}
|
||||
|
||||
public static boolean addLog4jToModuleList(Collection<ModuleNeeded> jarList, boolean isSelectLog4j2) {
|
||||
private static boolean addLog4jToModuleListForESB(Collection<ModuleNeeded> jarList, boolean isSelectLog4j2) {
|
||||
|
||||
List<ModuleNeeded> moduleNeededList = new ArrayList<ModuleNeeded>();
|
||||
List<ModuleNeeded> moduleDeleteList = new ArrayList<ModuleNeeded>();
|
||||
@@ -136,4 +400,5 @@ public class UpdateLog4jJarUtils {
|
||||
|
||||
return moduleNeededList.size() > 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1370,8 +1370,8 @@ public class JobJavaScriptsManager extends JobScriptsManager {
|
||||
libResource.addResources(list);
|
||||
}
|
||||
|
||||
protected boolean addLog4jToJarList(Collection<String> jarList) {
|
||||
return UpdateLog4jJarUtils.addLog4jToJarList(jarList, Log4jPrefsSettingManager.getInstance().isSelectLog4j2());
|
||||
protected void addLog4jToJarList(Collection<String> jarList) {
|
||||
UpdateLog4jJarUtils.addLog4jToJarList(jarList, Log4jPrefsSettingManager.getInstance().isSelectLog4j2());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,10 +15,12 @@
|
||||
*/
|
||||
package org.talend.sdk.component.studio.model.parameter;
|
||||
|
||||
import static java.util.Collections.*;
|
||||
import static java.util.Optional.*;
|
||||
import static java.util.function.Function.*;
|
||||
import static java.util.stream.Collectors.*;
|
||||
import static java.util.Collections.emptyMap;
|
||||
import static java.util.Collections.unmodifiableList;
|
||||
import static java.util.Optional.ofNullable;
|
||||
import static java.util.function.Function.identity;
|
||||
import static java.util.stream.Collectors.toList;
|
||||
import static java.util.stream.Collectors.toMap;
|
||||
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
@@ -31,6 +33,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.TreeMap;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -38,9 +41,9 @@ import org.talend.core.model.process.EComponentCategory;
|
||||
import org.talend.core.model.process.EConnectionType;
|
||||
import org.talend.core.model.process.IElement;
|
||||
import org.talend.core.model.process.IElementParameter;
|
||||
import org.talend.designer.core.ui.editor.nodes.Node;
|
||||
import org.talend.designer.core.model.FakeElement;
|
||||
import org.talend.designer.core.model.components.ElementParameter;
|
||||
import org.talend.designer.core.ui.editor.nodes.Node;
|
||||
import org.talend.sdk.component.server.front.model.ActionReference;
|
||||
import org.talend.sdk.component.server.front.model.ComponentDetail;
|
||||
import org.talend.sdk.component.server.front.model.ConfigTypeNode;
|
||||
@@ -529,7 +532,14 @@ public class SettingVisitor implements PropertyVisitor {
|
||||
final TaCoKitElementParameter taCoKitElementParameter = TaCoKitElementParameter.class.cast(parameter);
|
||||
taCoKitElementParameter.updateValueOnly(defaultValue);
|
||||
if (node.getProperty().hasConstraint() || node.getProperty().hasValidation()) {
|
||||
createValidationLabel(node, taCoKitElementParameter);
|
||||
taCoKitElementParameter.setRegistValidatorCallback(new Callable<Void>() {
|
||||
|
||||
@Override
|
||||
public Void call() throws Exception {
|
||||
createValidationLabel(node, taCoKitElementParameter);
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
buildActivationCondition(node, node);
|
||||
} else {
|
||||
|
||||
@@ -19,6 +19,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
import org.talend.core.model.process.IElement;
|
||||
import org.talend.core.runtime.IAdditionalInfo;
|
||||
@@ -48,6 +49,8 @@ public class TaCoKitElementParameter extends ElementParameter implements IAdditi
|
||||
|
||||
private Optional<IProblemManager> problemManager = Optional.ofNullable(null);
|
||||
|
||||
private Optional<Callable<Void>> registValidatorCallback = Optional.ofNullable(null);
|
||||
|
||||
public TaCoKitElementParameter() {
|
||||
this(null);
|
||||
}
|
||||
@@ -82,6 +85,14 @@ public class TaCoKitElementParameter extends ElementParameter implements IAdditi
|
||||
this.problemManager = Optional.ofNullable(problemManager);
|
||||
}
|
||||
|
||||
public Optional<Callable<Void>> getRegistValidatorCallback() {
|
||||
return registValidatorCallback;
|
||||
}
|
||||
|
||||
public void setRegistValidatorCallback(Callable<Void> registValidatorCallback) {
|
||||
this.registValidatorCallback = Optional.ofNullable(registValidatorCallback);
|
||||
}
|
||||
|
||||
public void registerListener(final String propertyName, final PropertyChangeListener listener) {
|
||||
pcs.addPropertyChangeListener(propertyName, listener);
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
*/
|
||||
package org.talend.sdk.component.studio.ui.composite;
|
||||
|
||||
import static java.util.stream.Stream.*;
|
||||
import static org.talend.sdk.component.studio.model.parameter.SchemaElementParameter.*;
|
||||
import static java.util.stream.Stream.of;
|
||||
import static org.talend.sdk.component.studio.model.parameter.SchemaElementParameter.guessButtonName;
|
||||
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.util.List;
|
||||
@@ -34,6 +34,7 @@ import org.eclipse.swt.layout.FormData;
|
||||
import org.eclipse.swt.layout.FormLayout;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.ui.gmf.util.DisplayUtils;
|
||||
import org.talend.core.model.process.EComponentCategory;
|
||||
import org.talend.core.model.process.EParameterFieldType;
|
||||
@@ -92,7 +93,19 @@ public class TaCoKitComposite extends MissingSettingsMultiThreadDynamicComposite
|
||||
this.problemManager.registTckComposite(this);
|
||||
}
|
||||
elem.getElementParameters().stream().filter(Objects::nonNull).filter(TaCoKitElementParameter.class::isInstance)
|
||||
.map(TaCoKitElementParameter.class::cast).forEach(p -> p.setProblemManager(problemManager));
|
||||
.map(TaCoKitElementParameter.class::cast).forEach(p -> {
|
||||
/**
|
||||
* Regist validators, so that problems from validators can be shown using problem manager
|
||||
*/
|
||||
p.getRegistValidatorCallback().ifPresent(r -> {
|
||||
try {
|
||||
r.call();
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
});
|
||||
p.setProblemManager(problemManager);
|
||||
});
|
||||
}
|
||||
|
||||
private void unregistProblemManager() {
|
||||
|
||||
@@ -66,7 +66,9 @@ public final class TaCoKitNode {
|
||||
EList parameters = node.getElementParameter();
|
||||
for (final Object elem : parameters) {
|
||||
ElementParameterTypeImpl parameter = (ElementParameterTypeImpl) elem;
|
||||
if (!MIGRATION_EXCLUSIONS.contains(parameter.getName()) && (isComponentProperty(parameter.getName()) || parameter.getName().endsWith(VersionParameter.VERSION_SUFFIX))) {
|
||||
if (!MIGRATION_EXCLUSIONS.contains(parameter.getName())
|
||||
&& (!EParameterFieldType.TECHNICAL.name().equals(parameter.getField())
|
||||
|| parameter.getName().endsWith(VersionParameter.VERSION_SUFFIX))) {
|
||||
properties.put(parameter.getName(), parameter.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,9 +164,11 @@ public class UpgradePasswordEncryptionAlg4ItemMigrationTaskTest {
|
||||
assertNotNull(connection);
|
||||
if (connection instanceof DatabaseConnection) {
|
||||
DatabaseConnection connectionImp = (DatabaseConnection) connection;
|
||||
String pass = connectionImp.getPassword();
|
||||
assertNotNull(pass);
|
||||
assertEquals("root", connectionImp.getValue(pass, false));
|
||||
if ("mysql".equals(connectionImp.getLabel())) {
|
||||
String pass = connectionImp.getPassword();
|
||||
assertNotNull(pass);
|
||||
assertEquals("talend", connectionImp.getValue(pass, false));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,47 +13,135 @@ public class UpdateLog4jJarUtilsTest {
|
||||
|
||||
@Test
|
||||
public void testAddLog4jToJarList() {
|
||||
List<String> jarList = new ArrayList<>();
|
||||
jarList.add("log4j-1.2.17.jar");//$NON-NLS-1$
|
||||
jarList.add("log4j-core-2.12.1.jar");//$NON-NLS-1$
|
||||
jarList.add("log4j-api-2.12.1.jar");//$NON-NLS-1$
|
||||
List<String> allLog4jModulesName = getAllLog4jModulesName();
|
||||
UpdateLog4jJarUtils.addLog4jToJarList(allLog4jModulesName, true);// is log4j2
|
||||
List<String> modules4log4j2 = new ArrayList<>();
|
||||
for (String moule : allLog4jModulesName) {
|
||||
modules4log4j2.add(moule);
|
||||
}
|
||||
assertTrue(modules4log4j2.contains("log4j-core-2.12.1.jar"));
|
||||
assertTrue(modules4log4j2.contains("log4j-api-2.12.1.jar"));
|
||||
assertTrue(modules4log4j2.contains("log4j-jcl-2.12.1.jar"));
|
||||
assertTrue(modules4log4j2.contains("log4j-jul-2.12.1.jar"));
|
||||
assertTrue(modules4log4j2.contains("log4j-slf4j-impl-2.12.1.jar"));
|
||||
|
||||
boolean addLog4jToJarListLog4j1 = UpdateLog4jJarUtils.addLog4jToJarList(jarList, true);
|
||||
assertFalse(addLog4jToJarListLog4j1);
|
||||
assertTrue(jarList.contains("log4j-core-2.12.1.jar"));//$NON-NLS-1$
|
||||
assertTrue(jarList.contains("log4j-api-2.12.1.jar"));//$NON-NLS-1$
|
||||
assertFalse(jarList.contains("log4j-1.2.17.jar"));//$NON-NLS-1$
|
||||
assertFalse(modules4log4j2.contains("jcl-over-slf4j-1.7.25.jar"));
|
||||
assertFalse(modules4log4j2.contains("jul-to-slf4j-1.7.25.jar"));
|
||||
assertFalse(modules4log4j2.contains("log4j-to-slf4j-2.12.1.jar"));
|
||||
assertFalse(modules4log4j2.contains("slf4j-log4j12-1.7.25.jar"));
|
||||
assertFalse(modules4log4j2.contains("log4j-1.2.17.jar"));
|
||||
|
||||
allLog4jModulesName = getAllLog4jModulesName();
|
||||
UpdateLog4jJarUtils.addLog4jToJarList(allLog4jModulesName, false);// is log4j1
|
||||
List<String> modules4log4j1 = new ArrayList<>();
|
||||
for (String moule : allLog4jModulesName) {
|
||||
modules4log4j1.add(moule);
|
||||
}
|
||||
assertFalse(modules4log4j1.contains("log4j-core-2.12.1.jar"));
|
||||
assertFalse(modules4log4j1.contains("log4j-api-2.12.1.jar"));
|
||||
assertFalse(modules4log4j1.contains("log4j-jcl-2.12.1.jar"));
|
||||
assertFalse(modules4log4j1.contains("log4j-jul-2.12.1.jar"));
|
||||
assertFalse(modules4log4j1.contains("log4j-slf4j-impl-2.12.1.jar"));
|
||||
|
||||
assertTrue(modules4log4j1.contains("jcl-over-slf4j-1.7.25.jar"));
|
||||
assertTrue(modules4log4j1.contains("jul-to-slf4j-1.7.25.jar"));
|
||||
assertTrue(modules4log4j1.contains("log4j-to-slf4j-2.12.1.jar"));
|
||||
assertTrue(modules4log4j1.contains("slf4j-log4j12-1.7.25.jar"));
|
||||
assertTrue(modules4log4j1.contains("log4j-1.2.17.jar"));
|
||||
|
||||
boolean addLog4jToJarListLog4j2 = UpdateLog4jJarUtils.addLog4jToJarList(jarList, false);
|
||||
assertTrue(addLog4jToJarListLog4j2);
|
||||
assertTrue(jarList.contains("log4j-1.2.17.jar"));//$NON-NLS-1$
|
||||
assertFalse(jarList.contains("log4j-core-2.12.1.jar"));//$NON-NLS-1$
|
||||
assertFalse(jarList.contains("log4j-api-2.12.1.jar"));//$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAddLog4jToModuleList() {
|
||||
List<ModuleNeeded> allLog4jModules = getAllLog4jModules();
|
||||
UpdateLog4jJarUtils.addLog4jToModuleList(allLog4jModules, true, null);// is log4j2
|
||||
List<String> modules4log4j2 = new ArrayList<>();
|
||||
for (ModuleNeeded moule : allLog4jModules) {
|
||||
modules4log4j2.add(moule.getMavenUri());
|
||||
}
|
||||
assertTrue(modules4log4j2.contains("mvn:org.apache.logging.log4j/log4j-core/2.12.1/jar"));
|
||||
assertTrue(modules4log4j2.contains("mvn:org.apache.logging.log4j/log4j-api/2.12.1/jar"));
|
||||
assertTrue(modules4log4j2.contains("mvn:org.apache.logging.log4j/log4j-jcl/2.12.1/jar"));
|
||||
assertTrue(modules4log4j2.contains("mvn:org.apache.logging.log4j/log4j-jul/2.12.1/jar"));
|
||||
assertTrue(modules4log4j2.contains("mvn:org.apache.logging.log4j/log4j-slf4j-impl/2.12.1/jar"));
|
||||
|
||||
assertFalse(modules4log4j2.contains("mvn:org.slf4j/jcl-over-slf4j/1.7.25/jar"));
|
||||
assertFalse(modules4log4j2.contains("mvn:org.slf4j/jul-to-slf4j/1.7.25/jar"));
|
||||
assertFalse(modules4log4j2.contains("mvn:org.apache.logging.log4j/log4j-to-slf4j/2.12.1/jar"));
|
||||
assertFalse(modules4log4j2.contains("mvn:org.slf4j/slf4j-log4j12/1.7.25/jar"));
|
||||
assertFalse(modules4log4j2.contains("mvn:log4j/log4j/1.2.17/jar"));
|
||||
|
||||
allLog4jModules = getAllLog4jModules();
|
||||
UpdateLog4jJarUtils.addLog4jToModuleList(allLog4jModules, false, null);// is log4j1
|
||||
List<String> modules4log4j1 = new ArrayList<>();
|
||||
for (ModuleNeeded moule : allLog4jModules) {
|
||||
modules4log4j1.add(moule.getMavenUri());
|
||||
}
|
||||
assertFalse(modules4log4j1.contains("mvn:org.apache.logging.log4j/log4j-core/2.12.1/jar"));
|
||||
assertFalse(modules4log4j1.contains("mvn:org.apache.logging.log4j/log4j-api/2.12.1/jar"));
|
||||
assertFalse(modules4log4j1.contains("mvn:org.apache.logging.log4j/log4j-jcl/2.12.1/jar"));
|
||||
assertFalse(modules4log4j1.contains("mvn:org.apache.logging.log4j/log4j-jul/2.12.1/jar"));
|
||||
assertFalse(modules4log4j1.contains("mvn:org.apache.logging.log4j/log4j-slf4j-impl/2.12.1/jar"));
|
||||
|
||||
assertTrue(modules4log4j1.contains("mvn:org.slf4j/jcl-over-slf4j/1.7.25/jar"));
|
||||
assertTrue(modules4log4j1.contains("mvn:org.slf4j/jul-to-slf4j/1.7.25/jar"));
|
||||
assertTrue(modules4log4j1.contains("mvn:org.apache.logging.log4j/log4j-to-slf4j/2.12.1/jar"));
|
||||
assertTrue(modules4log4j1.contains("mvn:org.slf4j/slf4j-log4j12/1.7.25/jar"));
|
||||
assertTrue(modules4log4j1.contains("mvn:log4j/log4j/1.2.17/jar"));
|
||||
|
||||
}
|
||||
|
||||
private List<String> getAllLog4jModulesName() {
|
||||
List<String> jarList = new ArrayList<>();
|
||||
// log2
|
||||
jarList.add("log4j-core-2.12.1.jar");//$NON-NLS-1$
|
||||
jarList.add("log4j-api-2.12.1.jar");//$NON-NLS-1$
|
||||
jarList.add("log4j-jcl-2.12.1.jar");//$NON-NLS-1$
|
||||
jarList.add("log4j-jul-2.12.1.jar");//$NON-NLS-1$
|
||||
jarList.add("log4j-slf4j-impl-2.12.1.jar");//$NON-NLS-1$
|
||||
// log1
|
||||
jarList.add("jcl-over-slf4j-1.7.25.jar");//$NON-NLS-1$
|
||||
jarList.add("jul-to-slf4j-1.7.25.jar");//$NON-NLS-1$
|
||||
jarList.add("log4j-to-slf4j-2.12.1.jar");//$NON-NLS-1$
|
||||
jarList.add("slf4j-log4j12-1.7.25.jar");//$NON-NLS-1$
|
||||
jarList.add("log4j-1.2.17.jar");//$NON-NLS-1$
|
||||
return jarList;
|
||||
}
|
||||
private List<ModuleNeeded> getAllLog4jModules() {
|
||||
List<ModuleNeeded> jarList = new ArrayList<>();
|
||||
ModuleNeeded log4j = new ModuleNeeded("log4j", "log4j-1.2.17.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4j.setMavenUri("mvn:log4j/log4j/1.2.17");//$NON-NLS-1$
|
||||
// log2
|
||||
ModuleNeeded log4jCore = new ModuleNeeded("org.apache.logging.log4j", "log4j-core-2.12.1.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4jCore.setMavenUri("mvn:org.apache.logging.log4j/log4j-core/2.12.1");//$NON-NLS-1$
|
||||
jarList.add(log4jCore);
|
||||
ModuleNeeded log4jApi = new ModuleNeeded("org.apache.logging.log4j", "log4j-api-2.12.1.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4jApi.setMavenUri("mvn:org.apache.logging.log4j/log4j-api/2.12.1");//$NON-NLS-1$
|
||||
jarList.add(log4j);
|
||||
jarList.add(log4jCore);
|
||||
jarList.add(log4jApi);
|
||||
ModuleNeeded log4jJcl = new ModuleNeeded("org.apache.logging.log4j", "log4j-jcl-2.12.1.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4jJcl.setMavenUri("mvn:org.apache.logging.log4j/log4j-jcl/2.12.1");//$NON-NLS-1$
|
||||
jarList.add(log4jJcl);
|
||||
ModuleNeeded log4jJul = new ModuleNeeded("org.apache.logging.log4j", "log4j-jul-2.12.1.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4jJul.setMavenUri("mvn:org.apache.logging.log4j/log4j-jul/2.12.1");//$NON-NLS-1$
|
||||
jarList.add(log4jJul);
|
||||
ModuleNeeded log4jSlf4jImpl = new ModuleNeeded("org.apache.logging.log4j", "log4j-slf4j-impl-2.12.1.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4jSlf4jImpl.setMavenUri("mvn:org.apache.logging.log4j/log4j-slf4j-impl/2.12.1");//$NON-NLS-1$
|
||||
jarList.add(log4jSlf4jImpl);
|
||||
|
||||
boolean addLog4jToJarListLog4j1 = UpdateLog4jJarUtils.addLog4jToModuleList(jarList, true);
|
||||
assertFalse(addLog4jToJarListLog4j1);
|
||||
assertTrue(jarList.contains(log4jCore));
|
||||
assertTrue(jarList.contains(log4jApi));
|
||||
assertFalse(jarList.contains(log4j));
|
||||
|
||||
boolean addLog4jToJarListLog4j2 = UpdateLog4jJarUtils.addLog4jToModuleList(jarList, false);
|
||||
assertTrue(addLog4jToJarListLog4j2);
|
||||
assertTrue(jarList.contains(log4j));
|
||||
assertFalse(jarList.contains(log4jCore));
|
||||
assertFalse(jarList.contains(log4jApi));
|
||||
// log1
|
||||
ModuleNeeded jclOverSlf4j = new ModuleNeeded("org.slf4j", "jcl-over-slf4j-1.7.25.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
jclOverSlf4j.setMavenUri("mvn:org.slf4j/jcl-over-slf4j/1.7.25");//$NON-NLS-1$
|
||||
jarList.add(jclOverSlf4j);
|
||||
ModuleNeeded julToSlf4j = new ModuleNeeded("org.slf4j", "jul-to-slf4j-1.7.25.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
julToSlf4j.setMavenUri("mvn:org.slf4j/jul-to-slf4j/1.7.25");//$NON-NLS-1$
|
||||
jarList.add(julToSlf4j);
|
||||
ModuleNeeded log4jToSlf4j = new ModuleNeeded("org.apache.logging.log4j", "log4j-to-slf4j-2.12.1.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4jToSlf4j.setMavenUri("mvn:org.apache.logging.log4j/log4j-to-slf4j/2.12.1");//$NON-NLS-1$
|
||||
jarList.add(log4jToSlf4j);
|
||||
ModuleNeeded slf4jLog4j12 = new ModuleNeeded("org.slf4j", "slf4j-log4j12-1.7.25.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
slf4jLog4j12.setMavenUri("mvn:org.slf4j/slf4j-log4j12/1.7.25");//$NON-NLS-1$
|
||||
jarList.add(slf4jLog4j12);
|
||||
ModuleNeeded log4j = new ModuleNeeded("log4j", "log4j-1.2.17.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4j.setMavenUri("mvn:log4j/log4j/1.2.17");//$NON-NLS-1$
|
||||
jarList.add(log4j);
|
||||
return jarList;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user