Compare commits
11 Commits
patch/7.3.
...
patch/8.0.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea023892f0 | ||
|
|
d6fd1cbe18 | ||
|
|
ce1fd92c74 | ||
|
|
bc4b7a489a | ||
|
|
e51292ea35 | ||
|
|
c2b7b58302 | ||
|
|
893b214fcf | ||
|
|
c0d3e099dd | ||
|
|
3970eb25af | ||
|
|
79361417eb | ||
|
|
1240c228c1 |
@@ -652,15 +652,15 @@
|
||||
|
||||
boolean inOSGi = routines.system.BundleUtils.inOSGi();
|
||||
|
||||
if (inOSGi) {
|
||||
java.util.Dictionary<String, Object> jobProperties = routines.system.BundleUtils.getJobProperties(jobName);
|
||||
|
||||
if (jobProperties != null && jobProperties.get("context") != null) {
|
||||
contextStr = (String)jobProperties.get("context");
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
java.util.Dictionary<String, Object> jobProperties = null;
|
||||
if (inOSGi) {
|
||||
jobProperties = routines.system.BundleUtils.getJobProperties(jobName);
|
||||
|
||||
if (jobProperties != null && jobProperties.get("context") != null) {
|
||||
contextStr = (String)jobProperties.get("context");
|
||||
}
|
||||
}
|
||||
//call job/subjob with an existing context, like: --context=production. if without this parameter, there will use the default context instead.
|
||||
java.io.InputStream inContext = <%=className%>.class.getClassLoader().getResourceAsStream("<%=jobClassPackageFolder%>/contexts/" + contextStr + ".properties");
|
||||
if (inContext == null) {
|
||||
@@ -670,8 +670,17 @@
|
||||
try {
|
||||
//defaultProps is in order to keep the original context value
|
||||
if(context != null && context.isEmpty()) {
|
||||
defaultProps.load(inContext);
|
||||
context = new ContextProperties(defaultProps);
|
||||
defaultProps.load(inContext);
|
||||
if (inOSGi && jobProperties != null) {
|
||||
java.util.Enumeration<String> keys = jobProperties.keys();
|
||||
while (keys.hasMoreElements()) {
|
||||
String propKey = keys.nextElement();
|
||||
if (defaultProps.containsKey(propKey)) {
|
||||
defaultProps.put(propKey, (String) jobProperties.get(propKey));
|
||||
}
|
||||
}
|
||||
}
|
||||
context = new ContextProperties(defaultProps);
|
||||
}
|
||||
} finally {
|
||||
inContext.close();
|
||||
|
||||
@@ -69,13 +69,13 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-api</artifactId>
|
||||
<version>2.16.0</version>
|
||||
<version>2.17.1</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>2.16.0</version>
|
||||
<version>2.17.1</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -388,9 +388,12 @@ class GenerateToolByDom4j{
|
||||
for(XMLNode attri:node.attributes){
|
||||
addAttribute(currEleName,attri);
|
||||
}
|
||||
if(node.name.indexOf(":")>0){
|
||||
int idx = node.name.indexOf(":");
|
||||
if(idx > 0){
|
||||
String prefix = node.name.substring(0, idx);
|
||||
String localName = node.name.substring(idx + 1);
|
||||
%>
|
||||
<%touchXMLNode.getXMLNode(currEleName);%>.setName("<%=node.name%>");
|
||||
<%touchXMLNode.getXMLElement(currEleName);%>.setQName(org.dom4j.DocumentHelper.createQName("<%=localName%>",<%touchXMLNode.getXMLElement(currEleName);%>.getNamespaceForPrefix("<%=prefix%>")));
|
||||
<%
|
||||
}
|
||||
int index = 0;
|
||||
|
||||
@@ -174,7 +174,7 @@ globalMap.put("<%=cid%>_ERROR_MESSAGE",e.getMessage());
|
||||
if (nestRoot != null) {
|
||||
boolean isDefaultNameSpaceAtRoot = "".equals(nestRoot.getQName().getNamespace().getPrefix());
|
||||
for (org.dom4j.Element tmp: (java.util.List<org.dom4j.Element>) nestRoot.elements()) {
|
||||
if (("").equals(tmp.getQName().getNamespace().getURI()) && ("").equals(tmp.getQName().getNamespace().getPrefix()) && isDefaultNameSpaceAtRoot) {
|
||||
if (isDefaultNameSpaceAtRoot && ("").equals(tmp.getQName().getNamespace().getURI()) && ("").equals(tmp.getQName().getNamespace().getPrefix())) {
|
||||
tmp.setQName(org.dom4j.DocumentHelper.createQName(tmp.getName(), nestRoot.getQName().getNamespace()));
|
||||
}
|
||||
replaceDefaultNameSpace(tmp);
|
||||
|
||||
@@ -913,7 +913,7 @@
|
||||
<IMPORT NAME="Driver-VERTICA_7.1.2" MODULE="vertica-jdbc-7.1.2-0.jar" MVN="mvn:org.talend.libraries/vertica-jdbc-7.1.2-0/6.0.0" REQUIRED_IF="(DBTYPE=='VERTICA') and (USE_EXISTING_CONNECTION == 'false') and (DB_VERTICA_VERSION=='VERTICA_7_1_X')" />
|
||||
<IMPORT NAME="Driver-EXASolution" MODULE="exajdbc-6.0.9302.jar" MVN="mvn:org.talend.libraries/exajdbc-6.0.9302/6.3.0" REQUIRED_IF="(DBTYPE=='EXASOL') and (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="Driver-Redshift" MODULE="redshift-jdbc42-no-awssdk-1.2.37.1061.jar" MVN="mvn:com.amazon.redshift/redshift-jdbc42-no-awssdk/1.2.37.1061" REQUIRED_IF="(DBTYPE=='REDSHIFT') and (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="Driver-Snowflake" MODULE="snowflake-jdbc-3.12.11.jar" MVN="mvn:net.snowflake/snowflake-jdbc/3.12.11" REQUIRED_IF="(DBTYPE=='SNOWFLAKE') and (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="Driver-Snowflake" MODULE="snowflake-jdbc-3.13.1.jar" MVN="mvn:net.snowflake/snowflake-jdbc/3.13.1" REQUIRED_IF="(DBTYPE=='SNOWFLAKE') and (USE_EXISTING_CONNECTION == 'false')" />
|
||||
<IMPORT NAME="Driver-VERTICA_9.0" MODULE="vertica-jdbc-9.3.1-0.jar" MVN="mvn:com.vertica/vertica-jdbc/9.3.1-0" REQUIRED_IF="(DBTYPE=='VERTICA') and (USE_EXISTING_CONNECTION == 'false') and (DB_VERTICA_VERSION=='VERTICA_9_0')"/>
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
@@ -304,8 +304,123 @@
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT MODULE_GROUP="GOOGLE-DATAPROC-MANAGE-LIB-DATAPROC14"
|
||||
REQUIRED="true" />
|
||||
<!--
|
||||
Former BD dataproc-1.4 module group deps
|
||||
-->
|
||||
<IMPORT NAME="talend-bigdata-launcher-core"
|
||||
MODULE="talend-bigdata-launcher-core-2.0.14.jar" MVN="mvn:org.talend.bigdata.libs/talend-bigdata-launcher-core/2.0.14" REQUIRED="true"/>
|
||||
<IMPORT NAME="talend-bigdata-launcher-dataproc"
|
||||
MODULE="talend-bigdata-launcher-dataproc-2.0.14.jar" MVN="mvn:org.talend.bigdata.libs/talend-bigdata-launcher-dataproc/2.0.14" REQUIRED="true"/>
|
||||
<IMPORT NAME="talend-bigdata-launcher-jobserver"
|
||||
MODULE="talend-bigdata-launcher-jobserver-2.0.14.jar" MVN="mvn:org.talend.bigdata.libs/talend-bigdata-launcher-jobserver/2.0.14" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-auth-library-credentials"
|
||||
MODULE="google-auth-library-credentials-0.16.2.jar" MVN="mvn:com.google.auth/google-auth-library-credentials/0.16.2" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-api-services-storage"
|
||||
MODULE="google-api-services-storage-v1-rev20181109-1.27.0.jar" MVN="mvn:com.google.apis/google-api-services-storage/v1-rev20181109-1.27.0" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-api-services-dataproc"
|
||||
MODULE="google-api-services-dataproc-v1-rev132-1.25.0.jar" MVN="mvn:com.google.apis/google-api-services-dataproc/v1-rev132-1.25.0" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-cloud-core"
|
||||
MODULE="google-cloud-core-1.73.0.jar" MVN="mvn:com.google.cloud/google-cloud-core/1.73.0" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-cloud-storage"
|
||||
MODULE="google-cloud-storage-1.73.0.jar" MVN="mvn:com.google.cloud/google-cloud-storage/1.73.0" REQUIRED="true"/>
|
||||
<IMPORT NAME="gax"
|
||||
MODULE="gax-1.47.1.jar" MVN="mvn:com.google.api/gax/1.47.1" REQUIRED="true"/>
|
||||
<IMPORT NAME="gax-httpjson"
|
||||
MODULE="gax-httpjson-0.64.1.jar" MVN="mvn:com.google.api/gax-httpjson/0.64.1" REQUIRED="true"/>
|
||||
<IMPORT NAME="threetenbps"
|
||||
MODULE="threetenbp-1.3.3.jar" MVN="mvn:org.threeten/threetenbp/1.3.3" REQUIRED="true"/>
|
||||
<IMPORT NAME="api-common"
|
||||
MODULE="api-common-1.8.1.jar" MVN="mvn:com.google.api/api-common/1.8.1" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-cloud-core-http"
|
||||
MODULE="google-cloud-core-http-1.73.0.jar" MVN="mvn:com.google.cloud/google-cloud-core-http/1.73.0" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-auth-library-oauth2-http"
|
||||
MODULE="google-auth-library-oauth2-http-0.16.2.jar" MVN="mvn:com.google.auth/google-auth-library-oauth2-http/0.16.2" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-auth-library-oauth2-http"
|
||||
MODULE="google-auth-library-oauth2-http-0.16.2.jar" MVN="mvn:com.google.auth/google-auth-library-oauth2-http/0.16.2" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-api-client"
|
||||
MODULE="google-api-client-1.30.1.jar" MVN="mvn:com.google.api-client/google-api-client/1.30.1" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-api-client-appengine"
|
||||
MODULE="google-api-client-appengine-1.30.2.jar" MVN="mvn:com.google.api-client/google-api-client-appengine/1.30.2" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-api-client-servlet"
|
||||
MODULE="google-api-client-servlet-1.30.2.jar" MVN="mvn:com.google.api-client/google-api-client-servlet/1.30.2" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-api-client-gson"
|
||||
MODULE="google-api-client-gson-1.30.2.jar" MVN="mvn:com.google.api-client/google-api-client-gson/1.30.2" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-api-client-jackson2"
|
||||
MODULE="google-api-client-jackson2-1.30.2.jar" MVN="mvn:com.google.api-client/google-api-client-jackson2/1.30.2" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-api-client-java6"
|
||||
MODULE="google-api-client-java6-1.30.2.jar" MVN="mvn:com.google.api-client/google-api-client-java6/1.30.2" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-api-client-protobuf"
|
||||
MODULE="google-api-client-protobuf-1.30.2.jar" MVN="mvn:com.google.api-client/google-api-client-protobuf/1.30.2" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-api-client-xml"
|
||||
MODULE="google-api-client-xml-1.30.2.jar" MVN="mvn:com.google.api-client/google-api-client-xml/1.30.2" REQUIRED="true"/>
|
||||
<IMPORT NAME="animal-sniffer-annotations"
|
||||
MODULE="animal-sniffer-annotations-1.14.jar" MVN="mvn:org.codehaus.mojo/animal-sniffer-annotations/1.14" REQUIRED="true"/>
|
||||
<IMPORT NAME="checker-compat-qual"
|
||||
MODULE="checker-compat-qual-2.5.2.jar" MVN="mvn:org.checkerframework/checker-compat-qual/2.5.2" REQUIRED="true"/>
|
||||
<IMPORT NAME="error_prone_annotations"
|
||||
MODULE="error_prone_annotations-2.1.3.jar" MVN="mvn:com.google.errorprone/error_prone_annotations/2.1.3" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-http-client-apache"
|
||||
MODULE="google-http-client-apache-2.1.0.jar" MVN="mvn:com.google.http-client/google-http-client-apache/2.1.0" REQUIRED="true"/>
|
||||
<IMPORT NAME="j2objc-annotations"
|
||||
MODULE="j2objc-annotations-1.3.jar" MVN="mvn:com.google.j2objc/j2objc-annotations/1.3" REQUIRED="true"/>
|
||||
<IMPORT NAME="jdo2-api"
|
||||
MODULE="jdo2-api-2.3-eb.jar" MVN="mvn:javax.jdo/jdo2-api/2.3-eb" REQUIRED="true"/>
|
||||
<IMPORT NAME="jetty"
|
||||
MODULE="jetty-6.1.26.jar" MVN="mvn:org.mortbay.jetty/jetty/6.1.26" REQUIRED="true"/>
|
||||
<IMPORT NAME="jetty-util"
|
||||
MODULE="jetty-util-6.1.26.jar" MVN="mvn:org.mortbay.jetty/jetty-util/6.1.26" REQUIRED="true"/>
|
||||
<IMPORT NAME="jsr305"
|
||||
MODULE="jsr305-3.0.2.jar" MVN="mvn:com.google.code.findbugs/jsr305/3.0.2" REQUIRED="true"/>
|
||||
<IMPORT NAME="opencensus-api"
|
||||
MODULE="opencensus-api-0.21.0.jar" MVN="mvn:io.opencensus/opencensus-api/0.21.0" REQUIRED="true"/>
|
||||
<IMPORT NAME="opencensus-contrib-http-util"
|
||||
MODULE="opencensus-contrib-http-util-0.21.0.jar" MVN="mvn:io.opencensus/opencensus-contrib-http-util/0.21.0" REQUIRED="true"/>
|
||||
<IMPORT NAME="protobuf-java"
|
||||
MODULE="protobuf-java-3.6.1.jar" MVN="mvn:com.google.protobuf/protobuf-java/3.6.1" REQUIRED="true"/>
|
||||
<IMPORT NAME="transaction-api"
|
||||
MODULE="transaction-api-1.1.jar" MVN="mvn:javax.transaction/transaction-api/1.1" REQUIRED="true"/>
|
||||
<IMPORT NAME="xpp3"
|
||||
MODULE="xpp3-1.1.4c.jar" MVN="mvn:xpp3/xpp3/1.1.4c" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-http-client"
|
||||
MODULE="google-http-client-1.30.1.jar" MVN="mvn:com.google.http-client/google-http-client/1.30.1" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-http-client-appengine"
|
||||
MODULE="google-http-client-appengine-1.30.2.jar" MVN="mvn:com.google.http-client/google-http-client-appengine/1.30.2" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-http-client-gson"
|
||||
MODULE="google-http-client-gson-1.30.2.jar" MVN="mvn:com.google.http-client/google-http-client-gson/1.30.2" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-http-client-jackson2"
|
||||
MODULE="google-http-client-jackson2-1.30.1.jar" MVN="mvn:com.google.http-client/google-http-client-jackson2/1.30.1" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-http-client-protobuf"
|
||||
MODULE="google-http-client-protobuf-1.30.2.jar" MVN="mvn:com.google.http-client/google-http-client-protobuf/1.30.2" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-oauth-client"
|
||||
MODULE="google-oauth-client-1.30.1.jar" MVN="mvn:com.google.oauth-client/google-oauth-client/1.30.1" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-oauth-client-appengine"
|
||||
MODULE="google-oauth-client-appengine-1.30.1.jar" MVN="mvn:com.google.oauth-client/google-oauth-client-appengine/1.30.1" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-oauth-client-java6"
|
||||
MODULE="google-oauth-client-java6-1.30.1.jar" MVN="mvn:com.google.oauth-client/google-oauth-client-java6/1.30.1" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-oauth-client-jetty"
|
||||
MODULE="google-oauth-client-jetty-1.30.1.jar" MVN="mvn:com.google.oauth-client/google-oauth-client-jetty/1.30.1" REQUIRED="true"/>
|
||||
<IMPORT NAME="google-oauth-client-servlet"
|
||||
MODULE="google-oauth-client-servlet-1.30.1.jar" MVN="mvn:com.google.oauth-client/google-oauth-client-servlet/1.30.1" REQUIRED="true"/>
|
||||
<IMPORT NAME="grpc-context"
|
||||
MODULE="grpc-context-1.19.0.jar" MVN="mvn:io.grpc/grpc-context/1.19.0" REQUIRED="true"/>
|
||||
<IMPORT NAME="gson"
|
||||
MODULE="gson-2.8.5.jar" MVN="mvn:com.google.code.gson/gson/2.8.5" REQUIRED="true"/>
|
||||
<IMPORT NAME="json"
|
||||
MODULE="json-20170516.jar" MVN="mvn:org.json/json/20170516" REQUIRED="true"/>
|
||||
<IMPORT NAME="guava"
|
||||
MODULE="guava-27.0.1-jre.jar" MVN="mvn:com.google.guava/guava/27.0.1-jre" REQUIRED="true"/>
|
||||
<IMPORT NAME="jackson-core"
|
||||
MODULE="jackson-core-2.9.9.jar" MVN="mvn:com.fasterxml.jackson.core/jackson-core/2.9.9" REQUIRED="true"/>
|
||||
<IMPORT NAME="jackson-core-asl"
|
||||
MODULE="jackson-core-asl-1.9.16-TALEND.jar" MVN="mvn:org.codehaus.jackson/jackson-core-asl/1.9.16-TALEND" REQUIRED="true"/>
|
||||
<IMPORT NAME="jackson-mapper-asl"
|
||||
MODULE="jackson-mapper-asl-1.9.16-TALEND.jar" MVN="mvn:org.codehaus.jackson/jackson-mapper-asl/1.9.16-TALEND" REQUIRED="true"/>
|
||||
<IMPORT NAME="commons-lang"
|
||||
MODULE="commons-lang-2.6.jar" MVN="mvn:commons-lang/commons-lang/2.6" REQUIRED="true"/>
|
||||
|
||||
<!--
|
||||
component's dependency
|
||||
-->
|
||||
<IMPORT NAME="commons-codec"
|
||||
MODULE="commons-codec-1.14.jar" MVN="mvn:commons-codec/commons-codec/1.14" REQUIRED="true"/>
|
||||
<IMPORT NAME="log4j"
|
||||
|
||||
@@ -297,7 +297,9 @@ if(columnList != null && columnList.size()>0) {
|
||||
<%
|
||||
}%>
|
||||
String insert_<%=cid%> = sb_<%=cid%>.toString();
|
||||
log.debug("<%=cid%> - Executing the query: " + insert_<%=cid%>);
|
||||
|
||||
<%dbLog.data().sqlExecuteTry("insert_"+cid);%>
|
||||
|
||||
<%
|
||||
boolean usingStatsLogs = cid.equals("talendLogs_DB") || cid.equals("talendStats_DB") || cid.equals("talendMeter_DB");
|
||||
if(!usingStatsLogs) {
|
||||
|
||||
@@ -209,7 +209,9 @@ skeleton="../templates/db_output_bulk.skeleton"
|
||||
<%
|
||||
}%>
|
||||
String insert_<%=cid%> = sb_<%=cid%>.toString();
|
||||
log.debug("<%=cid%> - Executing the query: " + insert_<%=cid%>);
|
||||
|
||||
<%dbLog.data().sqlExecuteTry("insert_"+cid);%>
|
||||
|
||||
<%
|
||||
}
|
||||
|
||||
|
||||
@@ -363,15 +363,15 @@
|
||||
REQUIRED_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="jackson-core-asl-1.9.15-TALEND"
|
||||
MODULE="jackson-core-asl-1.9.15-TALEND.jar"
|
||||
MVN="mvn:org.codehaus.jackson/jackson-core-asl/1.9.15-TALEND"
|
||||
NAME="jackson-core-asl-1.9.16-TALEND"
|
||||
MODULE="jackson-core-asl-1.9.16-TALEND.jar"
|
||||
MVN="mvn:org.codehaus.jackson/jackson-core-asl/1.9.16-TALEND"
|
||||
REQUIRED_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
/>
|
||||
<IMPORT
|
||||
NAME="jackson-mapper-asl-1.9.15-TALEND"
|
||||
MODULE="jackson-mapper-asl-1.9.15-TALEND.jar"
|
||||
MVN="mvn:org.codehaus.jackson/jackson-mapper-asl/1.9.15-TALEND"
|
||||
NAME="jackson-mapper-asl-1.9.16-TALEND"
|
||||
MODULE="jackson-mapper-asl-1.9.16-TALEND.jar"
|
||||
MVN="mvn:org.codehaus.jackson/jackson-mapper-asl/1.9.16-TALEND"
|
||||
REQUIRED_IF="USE_EXISTING_CONNECTION == 'false'"
|
||||
/>
|
||||
<IMPORT
|
||||
|
||||
@@ -130,9 +130,22 @@
|
||||
|
||||
</PARAMETERS>
|
||||
|
||||
<ADVANCED_PARAMETERS>
|
||||
<PARAMETER
|
||||
NAME="CACHE_SOURCE"
|
||||
FIELD="CHECK"
|
||||
NUM_ROW="10"
|
||||
>
|
||||
<DEFAULT>false</DEFAULT>
|
||||
</PARAMETER>
|
||||
</ADVANCED_PARAMETERS>
|
||||
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="SAXON-HE" MODULE="Saxon-HE-10.6.jar" MVN="mvn:net.sf.saxon/Saxon-HE/10.6" REQUIRED="true" />
|
||||
<IMPORT NAME="apache-commons-io"
|
||||
MODULE="commons-io-2.8.0.jar" MVN="mvn:commons-io/commons-io/2.8.0"
|
||||
REQUIRED_IF="CACHE_SOURCE == 'true'" />
|
||||
</IMPORTS>
|
||||
</CODEGENERATION>
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ String cid = node.getUniqueName();
|
||||
String xmlFile = ElementParameterParser.getValue(node, "__XML_FILE__");
|
||||
String xslFile = ElementParameterParser.getValue(node, "__XSLT_FILE__");
|
||||
String outputFile = ElementParameterParser.getValue(node, "__OUTPUT_FILE__");
|
||||
boolean cacheSource = "true".equals(ElementParameterParser.getValue(node, "__CACHE_SOURCE__"));
|
||||
|
||||
boolean overrideXml = "true".equals(ElementParameterParser.getValue(node, "__OVERRIDE_INPUT_XML_FILE__"));
|
||||
boolean overrideXsl = "true".equals(ElementParameterParser.getValue(node, "__OVERRIDE_INPUT_XSL_FILE__"));
|
||||
@@ -117,7 +118,12 @@ if(outConns!=null ){
|
||||
if(xmlFile_<%=cid%> instanceof java.io.InputStream){
|
||||
xmlSource<%=cid%> = new javax.xml.transform.stream.StreamSource( (java.io.InputStream)xmlFile_<%=cid%>);
|
||||
} else {
|
||||
xmlSource<%=cid%> = new javax.xml.transform.stream.StreamSource(new java.io.File((String) xmlFile_<%=cid%>));
|
||||
<%if(cacheSource){%>
|
||||
final byte[] xmlBytes_<%=cid%> = org.apache.commons.io.FileUtils.readFileToByteArray(new java.io.File((String) xmlFile_<%=cid%>));
|
||||
xmlSource<%=cid%> = new javax.xml.transform.stream.StreamSource( new java.io.ByteArrayInputStream ( xmlBytes_<%=cid%>) );
|
||||
<%}else{%>
|
||||
xmlSource<%=cid%> = new javax.xml.transform.stream.StreamSource(new java.io.File((String) xmlFile_<%=cid%>));
|
||||
<%}%>
|
||||
}
|
||||
<%} else {%>
|
||||
xmlSource<%=cid%> = new javax.xml.transform.stream.StreamSource( new java.io.StringBufferInputStream ( <%=inConnName%>.<%=xmlCol%>) );
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#Created by JInto - www.guh-software.de
|
||||
#Wed May 09 09:49:20 CST 2007
|
||||
DIRECTORY.NAME=
|
||||
FILENAME.NAME=
|
||||
DIRECTORY.NAME=DirectoryName
|
||||
FILENAME.NAME=Filename
|
||||
HELP=org.talend.help.tXSLT
|
||||
INVALID_MESSAGE.NAME=If XML is invalid, display
|
||||
LONG_NAME=Transforms XML with XSL
|
||||
@@ -25,4 +23,5 @@ INPUT_XML_FILE_COL.NAME=Input column for XML
|
||||
INPUT_XSL_FILE_COL.NAME=Input column for XSL
|
||||
OUTPUT_COL.NAME=Output column for result
|
||||
|
||||
SCHEMA.NAME=Schema
|
||||
SCHEMA.NAME=Schema
|
||||
CACHE_SOURCE.NAME=Legacy mode In-memory buffering (not recommended)
|
||||
@@ -5,7 +5,7 @@
|
||||
String nonProxyHostsString_<%=cid %> = System.getProperty("http.nonProxyHosts");
|
||||
String[] nonProxyHosts_<%=cid %> = (nonProxyHostsString_<%=cid %> == null) ? new String[0] : nonProxyHostsString_<%=cid %>.split("\\|");
|
||||
for (String nonProxyHost : nonProxyHosts_<%=cid %>) {
|
||||
if (<%=host %>.matches(nonProxyHost.trim())) {
|
||||
if ((<%=host %>).matches(nonProxyHost.trim())) {
|
||||
isHostIgnored_<%=cid %> = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -110,6 +110,21 @@ public class BigDataJobUtil {
|
||||
return isSparkWithSynapse;
|
||||
}
|
||||
|
||||
public boolean isSparkWithGoogleDataProc() {
|
||||
boolean isSparkWithGoogleDataProc = false;
|
||||
if (isBDJobWithFramework(ERepositoryObjectType.PROCESS_MR, HadoopConstants.FRAMEWORK_SPARK)
|
||||
|| isBDJobWithFramework(ERepositoryObjectType.PROCESS_STORM, HadoopConstants.FRAMEWORK_SPARKSTREAMING)) {
|
||||
List<? extends IElementParameter> parameters = process.getElementParametersWithChildrens();
|
||||
for (IElementParameter pt : parameters) {
|
||||
if (pt.getName().equals("DISTRIBUTION") //$NON-NLS-1$
|
||||
&& EHadoopDistributions.GOOGLE_CLOUD_DATAPROC.getName().equals(pt.getValue())) {
|
||||
isSparkWithGoogleDataProc = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return isSparkWithGoogleDataProc;
|
||||
}
|
||||
|
||||
public boolean isMRWithHDInsight() {
|
||||
Boolean isMRWithHDInsight = false;
|
||||
if (process != null) {
|
||||
|
||||
@@ -29,6 +29,7 @@ import org.eclipse.core.runtime.Platform;
|
||||
import org.talend.commons.exception.CommonExceptionHandler;
|
||||
import org.talend.commons.utils.generation.JavaUtils;
|
||||
import org.talend.commons.utils.resource.FileExtensions;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.model.general.ModuleNeeded;
|
||||
import org.talend.core.model.process.Element;
|
||||
import org.talend.core.model.process.IElementParameter;
|
||||
@@ -55,6 +56,7 @@ import org.talend.designer.runprocess.ProcessorUtilities;
|
||||
import org.talend.designer.runprocess.java.JavaProcessorUtilities;
|
||||
import org.talend.designer.runprocess.java.TalendJavaProjectManager;
|
||||
import org.talend.designer.runprocess.maven.MavenJavaProcessor;
|
||||
import org.talend.repository.model.IRepositoryService;
|
||||
import org.talend.repository.ui.utils.UpdateLog4jJarUtils;
|
||||
import org.talend.repository.ui.wizards.exportjob.scriptsmanager.JobScriptsManager;
|
||||
import org.talend.repository.ui.wizards.exportjob.scriptsmanager.JobScriptsManager.ExportChoice;
|
||||
@@ -76,7 +78,7 @@ public abstract class BigDataJavaProcessor extends MavenJavaProcessor implements
|
||||
super(process, property, filenameFromLabel);
|
||||
this.process = process;
|
||||
BigDataJobUtil bdUtil = new BigDataJobUtil(process);
|
||||
if (bdUtil.isSparkWithHDInsight() || bdUtil.isSparkWithSynapse()) {
|
||||
if (isLog4j2() && (bdUtil.isSparkWithHDInsight() || bdUtil.isSparkWithSynapse() || bdUtil.isSparkWithGoogleDataProc())) {
|
||||
Element e = (Element) process;
|
||||
IElementParameter paramActivate = e.getElementParameter(EParameterName.LOG4J_ACTIVATE.getName());
|
||||
if (paramActivate != null) {
|
||||
@@ -89,6 +91,14 @@ public abstract class BigDataJavaProcessor extends MavenJavaProcessor implements
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean isLog4j2() {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRepositoryService.class)) {
|
||||
IRepositoryService service = GlobalServiceRegister.getDefault().getService(IRepositoryService.class);
|
||||
return service.isProjectLevelLog4j2();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected abstract JobScriptsManager createJobScriptsManager(ProcessItem processItem,
|
||||
Map<ExportChoice, Object> exportChoiceMap);
|
||||
|
||||
|
||||
@@ -3700,6 +3700,15 @@
|
||||
id="org.talend.repository.model.migration.AddHourFormatToBigqueryBulkOutput"
|
||||
name="AddHourFormatToBigqueryBulkOutput"
|
||||
version="7.3.1">
|
||||
</projecttask>
|
||||
<projecttask
|
||||
beforeLogon="false"
|
||||
breaks="7.3.0"
|
||||
class="org.talend.repository.model.migration.XSLTCheckCacheFileInMemoryTask"
|
||||
description="tXSLT component check catch file in memory when the source and target are the same file"
|
||||
id="org.talend.repository.model.migration.XSLTCheckCacheFileInMemoryTask"
|
||||
name="XSLTCheckCacheFileInMemoryTask"
|
||||
version="7.3.1">
|
||||
</projecttask>
|
||||
</extension>
|
||||
|
||||
@@ -3729,10 +3738,10 @@
|
||||
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.apache"
|
||||
id="log4j-to-slf4j-2.16.0.jar"
|
||||
name="log4j-to-slf4j-2.16.0.jar"
|
||||
mvn_uri="mvn:org.apache.logging.log4j/log4j-to-slf4j/2.16.0"
|
||||
uripath="platform:/plugin/org.talend.libraries.apache/lib/log4j-to-slf4j-2.16.0.jar">
|
||||
id="log4j-to-slf4j-2.17.1.jar"
|
||||
name="log4j-to-slf4j-2.17.1.jar"
|
||||
mvn_uri="mvn:org.apache.logging.log4j/log4j-to-slf4j/2.17.1"
|
||||
uripath="platform:/plugin/org.talend.libraries.apache/lib/log4j-to-slf4j-2.17.1.jar">
|
||||
</libraryNeeded>
|
||||
|
||||
<libraryNeeded
|
||||
@@ -3753,50 +3762,50 @@
|
||||
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.apache"
|
||||
id="log4j-core-2.16.0.jar"
|
||||
name="log4j-core-2.16.0.jar"
|
||||
mvn_uri="mvn:org.apache.logging.log4j/log4j-core/2.16.0"
|
||||
uripath="platform:/plugin/org.talend.libraries.apache/lib/log4j-core-2.16.0.jar">
|
||||
id="log4j-core-2.17.1.jar"
|
||||
name="log4j-core-2.17.1.jar"
|
||||
mvn_uri="mvn:org.apache.logging.log4j/log4j-core/2.17.1"
|
||||
uripath="platform:/plugin/org.talend.libraries.apache/lib/log4j-core-2.17.1.jar">
|
||||
</libraryNeeded>
|
||||
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.apache"
|
||||
id="log4j-api-2.16.0.jar"
|
||||
name="log4j-api-2.16.0.jar"
|
||||
mvn_uri="mvn:org.apache.logging.log4j/log4j-api/2.16.0"
|
||||
uripath="platform:/plugin/org.talend.libraries.apache/lib/log4j-api-2.16.0.jar">
|
||||
id="log4j-api-2.17.1.jar"
|
||||
name="log4j-api-2.17.1.jar"
|
||||
mvn_uri="mvn:org.apache.logging.log4j/log4j-api/2.17.1"
|
||||
uripath="platform:/plugin/org.talend.libraries.apache/lib/log4j-api-2.17.1.jar">
|
||||
</libraryNeeded>
|
||||
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.apache"
|
||||
id="log4j-slf4j-impl-2.16.0.jar"
|
||||
name="log4j-slf4j-impl-2.16.0.jar"
|
||||
mvn_uri="mvn:org.apache.logging.log4j/log4j-slf4j-impl/2.16.0"
|
||||
uripath="platform:/plugin/org.talend.libraries.apache/lib/log4j-slf4j-impl-2.16.0.jar">
|
||||
id="log4j-slf4j-impl-2.17.1.jar"
|
||||
name="log4j-slf4j-impl-2.17.1.jar"
|
||||
mvn_uri="mvn:org.apache.logging.log4j/log4j-slf4j-impl/2.17.1"
|
||||
uripath="platform:/plugin/org.talend.libraries.apache/lib/log4j-slf4j-impl-2.17.1.jar">
|
||||
</libraryNeeded>
|
||||
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.apache"
|
||||
id="log4j-jul-2.16.0.jar"
|
||||
name="log4j-jul-2.16.0.jar"
|
||||
mvn_uri="mvn:org.apache.logging.log4j/log4j-jul/2.16.0"
|
||||
uripath="platform:/plugin/org.talend.libraries.apache/lib/log4j-jul-2.16.0.jar">
|
||||
id="log4j-jul-2.17.1.jar"
|
||||
name="log4j-jul-2.17.1.jar"
|
||||
mvn_uri="mvn:org.apache.logging.log4j/log4j-jul/2.17.1"
|
||||
uripath="platform:/plugin/org.talend.libraries.apache/lib/log4j-jul-2.17.1.jar">
|
||||
</libraryNeeded>
|
||||
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.apache"
|
||||
id="log4j-jcl-2.16.0.jar"
|
||||
name="log4j-jcl-2.16.0.jar"
|
||||
mvn_uri="mvn:org.apache.logging.log4j/log4j-jcl/2.16.0"
|
||||
uripath="platform:/plugin/org.talend.libraries.apache/lib/log4j-jcl-2.16.0.jar">
|
||||
id="log4j-jcl-2.17.1.jar"
|
||||
name="log4j-jcl-2.17.1.jar"
|
||||
mvn_uri="mvn:org.apache.logging.log4j/log4j-jcl/2.17.1"
|
||||
uripath="platform:/plugin/org.talend.libraries.apache/lib/log4j-jcl-2.17.1.jar">
|
||||
</libraryNeeded>
|
||||
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.libraries.apache"
|
||||
id="log4j-1.2-api-2.16.0.jar"
|
||||
name="log4j-1.2-api-2.16.0.jar"
|
||||
mvn_uri="mvn:org.apache.logging.log4j/log4j-1.2-api/2.16.0"
|
||||
uripath="platform:/plugin/org.talend.libraries.apache/lib/log4j-1.2-api-2.16.0.jar">
|
||||
id="log4j-1.2-api-2.17.1.jar"
|
||||
name="log4j-1.2-api-2.17.1.jar"
|
||||
mvn_uri="mvn:org.apache.logging.log4j/log4j-1.2-api/2.17.1"
|
||||
uripath="platform:/plugin/org.talend.libraries.apache/lib/log4j-1.2-api-2.17.1.jar">
|
||||
</libraryNeeded>
|
||||
|
||||
<libraryNeeded
|
||||
|
||||
@@ -24,7 +24,6 @@ woodstox-core-asl
|
||||
|
||||
# MSSQL
|
||||
jtds
|
||||
mssql-jdbc
|
||||
|
||||
# tdm-lib-di
|
||||
tdm-lib-di
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
package org.talend.repository.model.migration;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.core.language.ECodeLanguage;
|
||||
import org.talend.core.model.components.ComponentUtilities;
|
||||
import org.talend.core.model.components.ModifyComponentsAction;
|
||||
import org.talend.core.model.components.conversions.IComponentConversion;
|
||||
import org.talend.core.model.components.filters.IComponentFilter;
|
||||
import org.talend.core.model.components.filters.NameComponentFilter;
|
||||
import org.talend.core.model.migration.AbstractJobMigrationTask;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ProcessType;
|
||||
|
||||
public class XSLTCheckCacheFileInMemoryTask extends AbstractJobMigrationTask {
|
||||
|
||||
@Override
|
||||
public ExecutionResult execute(final Item item) {
|
||||
final ProcessType processType = getProcessType(item);
|
||||
if (getProject().getLanguage() != ECodeLanguage.JAVA || processType == null) {
|
||||
return ExecutionResult.NOTHING_TO_DO;
|
||||
}
|
||||
String[] compNames = {"tXSLT"}; //$NON-NLS-1$
|
||||
|
||||
IComponentConversion action = node -> {
|
||||
if (node == null) {
|
||||
return;
|
||||
}
|
||||
if (ComponentUtilities.getNodeProperty(node, "XML_FILE") != null && ComponentUtilities.getNodeProperty(
|
||||
node, "XML_FILE").getValue().equals(ComponentUtilities.getNodeProperty(node, "OUTPUT_FILE").getValue())) {
|
||||
|
||||
if (ComponentUtilities.getNodeProperty(node, "CACHE_SOURCE") == null) {//$NON-NLS-1$
|
||||
ComponentUtilities.addNodeProperty(node, "CACHE_SOURCE", "CHECK");//$NON-NLS-1$ //$NON-NLS-2$
|
||||
ComponentUtilities.getNodeProperty(node, "CACHE_SOURCE")
|
||||
.setValue("true");//$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
for (String name : compNames) {
|
||||
IComponentFilter filter = new NameComponentFilter(name);
|
||||
|
||||
try {
|
||||
ModifyComponentsAction.searchAndModify(item, processType, filter, Arrays
|
||||
.asList(action));
|
||||
return ExecutionResult.SUCCESS_NO_ALERT;
|
||||
} catch (PersistenceException e) {
|
||||
ExceptionHandler.process(e);
|
||||
return ExecutionResult.FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
return ExecutionResult.NOTHING_TO_DO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getOrder() {
|
||||
GregorianCalendar gc = new GregorianCalendar(2021, Calendar.DECEMBER, 14, 0, 0, 0);
|
||||
return gc.getTime();
|
||||
}
|
||||
}
|
||||
@@ -24,8 +24,8 @@ import org.talend.designer.runprocess.IRunProcessService;
|
||||
import org.talend.librariesmanager.model.ModulesNeededProvider;
|
||||
|
||||
public class UpdateLog4jJarUtils {
|
||||
|
||||
private static final String LOG4J_VERSION = "2.16.0";
|
||||
|
||||
private static final String LOG4J_VERSION = "2.17.1";
|
||||
|
||||
public static final String[] MODULES_NEED_UPDATE_ORDER = { "spark-assembly-1.6.0-hadoop2.6.0.jar" };
|
||||
|
||||
|
||||
@@ -71,9 +71,9 @@ public class CheckLogManagerTest {
|
||||
assertTrue(modules4log4j.contains("jcl-over-slf4j-1.7.25.jar"));
|
||||
} else {
|
||||
// case2: if original job need commons-logging:commons-logging:ja for log4j2
|
||||
assertTrue(modules4log4j.contains("log4j-jcl-2.16.0.jar"));
|
||||
assertTrue(modules4log4j.contains("log4j-jcl-2.17.1.jar"));
|
||||
// case3:if original job need log4j1 jar, add back log4j-1.2-api for log4j2
|
||||
assertTrue(modules4log4j.contains("log4j-1.2-api-2.16.0.jar"));
|
||||
assertTrue(modules4log4j.contains("log4j-1.2-api-2.17.1.jar"));
|
||||
}
|
||||
} finally {
|
||||
CommonsPlugin.setHeadless(headless);
|
||||
@@ -90,7 +90,7 @@ public class CheckLogManagerTest {
|
||||
for (ModuleNeeded moule : modulesNeeded) {
|
||||
modules4log4j.add(moule.getModuleName());
|
||||
}
|
||||
assertTrue(modules4log4j.contains("log4j-1.2-api-2.16.0.jar"));
|
||||
assertTrue(modules4log4j.contains("log4j-1.2-api-2.17.1.jar"));
|
||||
|
||||
process.setComponentsType(ComponentCategory.CATEGORY_4_MAPREDUCE.getName());
|
||||
UpdateLog4jJarUtils.addLog4jToModuleList(modulesNeeded, true, process);
|
||||
@@ -98,7 +98,7 @@ public class CheckLogManagerTest {
|
||||
for (ModuleNeeded moule : modulesNeeded) {
|
||||
modules4log4j.add(moule.getModuleName());
|
||||
}
|
||||
assertTrue(modules4log4j.contains("log4j-1.2-api-2.16.0.jar"));
|
||||
assertTrue(modules4log4j.contains("log4j-1.2-api-2.17.1.jar"));
|
||||
|
||||
process.setComponentsType(ComponentCategory.CATEGORY_4_STORM.getName());
|
||||
UpdateLog4jJarUtils.addLog4jToModuleList(modulesNeeded, true, process);
|
||||
@@ -106,7 +106,7 @@ public class CheckLogManagerTest {
|
||||
for (ModuleNeeded moule : modulesNeeded) {
|
||||
modules4log4j.add(moule.getModuleName());
|
||||
}
|
||||
assertTrue(modules4log4j.contains("log4j-1.2-api-2.16.0.jar"));
|
||||
assertTrue(modules4log4j.contains("log4j-1.2-api-2.17.1.jar"));
|
||||
|
||||
process.setComponentsType(ComponentCategory.CATEGORY_4_STORM.getName());
|
||||
UpdateLog4jJarUtils.addLog4jToModuleList(modulesNeeded, true, process);
|
||||
@@ -114,7 +114,7 @@ public class CheckLogManagerTest {
|
||||
for (ModuleNeeded moule : modulesNeeded) {
|
||||
modules4log4j.add(moule.getModuleName());
|
||||
}
|
||||
assertTrue(modules4log4j.contains("log4j-1.2-api-2.16.0.jar"));
|
||||
assertTrue(modules4log4j.contains("log4j-1.2-api-2.17.1.jar"));
|
||||
|
||||
process.setComponentsType(ComponentCategory.CATEGORY_4_DI.getName());
|
||||
UpdateLog4jJarUtils.addLog4jToModuleList(modulesNeeded, true, process);
|
||||
@@ -122,7 +122,7 @@ public class CheckLogManagerTest {
|
||||
for (ModuleNeeded moule : modulesNeeded) {
|
||||
modules4log4j.add(moule.getModuleName());
|
||||
}
|
||||
assertFalse(modules4log4j.contains("log4j-1.2-api-2.16.0.jar"));
|
||||
assertFalse(modules4log4j.contains("log4j-1.2-api-2.17.1.jar"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -130,16 +130,16 @@ public class CheckLogManagerTest {
|
||||
List<ModuleNeeded> neededModules = new ArrayList<>();
|
||||
|
||||
Set<ModuleNeeded> highPriorityModuleNeededs = new HashSet<>();
|
||||
ModuleNeeded highPriorityModuleNeeded1 = new ModuleNeeded("", "high-priority-module1-2.16.0.jar", null, true);
|
||||
ModuleNeeded highPriorityModuleNeeded1 = new ModuleNeeded("", "high-priority-module1-2.17.1.jar", null, true);
|
||||
highPriorityModuleNeededs.add(highPriorityModuleNeeded1);
|
||||
neededModules.addAll(highPriorityModuleNeededs);
|
||||
|
||||
ModuleNeeded log4jCore = new ModuleNeeded("org.apache.logging.log4j", "log4j-core-2.16.0.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4jCore.setMavenUri("mvn:org.apache.logging.log4j/log4j-core/2.16.0");//$NON-NLS-1$
|
||||
ModuleNeeded log4jCore = new ModuleNeeded("org.apache.logging.log4j", "log4j-core-2.17.1.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4jCore.setMavenUri("mvn:org.apache.logging.log4j/log4j-core/2.17.1");//$NON-NLS-1$
|
||||
neededModules.add(log4jCore);
|
||||
|
||||
ModuleNeeded log4jApi = new ModuleNeeded("org.apache.logging.log4j", "log4j-api-2.16.0.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4jApi.setMavenUri("mvn:org.apache.logging.log4j/log4j-api/2.16.0");//$NON-NLS-1$
|
||||
ModuleNeeded log4jApi = new ModuleNeeded("org.apache.logging.log4j", "log4j-api-2.17.1.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4jApi.setMavenUri("mvn:org.apache.logging.log4j/log4j-api/2.17.1");//$NON-NLS-1$
|
||||
neededModules.add(log4jApi);
|
||||
String[] modulesNeedUpdateOrder = UpdateLog4jJarUtils.MODULES_NEED_UPDATE_ORDER;
|
||||
ModuleNeeded sparkAssembly = new ModuleNeeded("", modulesNeedUpdateOrder[0], null, true); //$NON-NLS-1$
|
||||
|
||||
@@ -19,14 +19,14 @@ public class UpdateLog4jJarUtilsTest {
|
||||
for (String moule : allLog4jModulesName) {
|
||||
modules4log4j2.add(moule);
|
||||
}
|
||||
assertTrue(modules4log4j2.contains("log4j-core-2.16.0.jar"));
|
||||
assertTrue(modules4log4j2.contains("log4j-api-2.16.0.jar"));
|
||||
assertTrue(modules4log4j2.contains("log4j-jcl-2.16.0.jar"));
|
||||
assertTrue(modules4log4j2.contains("log4j-jul-2.16.0.jar"));
|
||||
assertTrue(modules4log4j2.contains("log4j-slf4j-impl-2.16.0.jar"));
|
||||
assertTrue(modules4log4j2.contains("log4j-core-2.17.1.jar"));
|
||||
assertTrue(modules4log4j2.contains("log4j-api-2.17.1.jar"));
|
||||
assertTrue(modules4log4j2.contains("log4j-jcl-2.17.1.jar"));
|
||||
assertTrue(modules4log4j2.contains("log4j-jul-2.17.1.jar"));
|
||||
assertTrue(modules4log4j2.contains("log4j-slf4j-impl-2.17.1.jar"));
|
||||
|
||||
assertFalse(modules4log4j2.contains("jcl-over-slf4j-1.7.25.jar"));
|
||||
assertFalse(modules4log4j2.contains("log4j-to-slf4j-2.16.0.jar"));
|
||||
assertFalse(modules4log4j2.contains("log4j-to-slf4j-2.17.1.jar"));
|
||||
assertFalse(modules4log4j2.contains("slf4j-log4j12-1.7.25.jar"));
|
||||
assertFalse(modules4log4j2.contains("log4j-1.2.17.jar"));
|
||||
|
||||
@@ -36,16 +36,16 @@ public class UpdateLog4jJarUtilsTest {
|
||||
for (String moule : allLog4jModulesName) {
|
||||
modules4log4j1.add(moule);
|
||||
}
|
||||
assertFalse(modules4log4j1.contains("log4j-core-2.16.0.jar"));
|
||||
assertFalse(modules4log4j1.contains("log4j-api-2.16.0.jar"));
|
||||
assertFalse(modules4log4j1.contains("log4j-jcl-2.16.0.jar"));
|
||||
assertFalse(modules4log4j1.contains("log4j-jul-2.16.0.jar"));
|
||||
assertFalse(modules4log4j1.contains("log4j-slf4j-impl-2.16.0.jar"));
|
||||
assertFalse(modules4log4j1.contains("log4j-core-2.17.1.jar"));
|
||||
assertFalse(modules4log4j1.contains("log4j-api-2.17.1.jar"));
|
||||
assertFalse(modules4log4j1.contains("log4j-jcl-2.17.1.jar"));
|
||||
assertFalse(modules4log4j1.contains("log4j-jul-2.17.1.jar"));
|
||||
assertFalse(modules4log4j1.contains("log4j-slf4j-impl-2.17.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.16.0.jar"));
|
||||
assertTrue(modules4log4j1.contains("slf4j-log4j12-1.7.25.jar"));
|
||||
assertTrue(modules4log4j1.contains("jul-to-slf4j-1.7.25.jar"));
|
||||
assertTrue(modules4log4j1.contains("log4j-to-slf4j-2.17.1.jar"));
|
||||
assertTrue(modules4log4j1.contains("slf4j-log4j12-1.7.25.jar"));
|
||||
assertTrue(modules4log4j1.contains("log4j-1.2.17.jar"));
|
||||
|
||||
}
|
||||
@@ -58,14 +58,14 @@ public class UpdateLog4jJarUtilsTest {
|
||||
for (ModuleNeeded moule : allLog4jModules) {
|
||||
modules4log4j2.add(moule.getMavenUri());
|
||||
}
|
||||
assertTrue(modules4log4j2.contains("mvn:org.apache.logging.log4j/log4j-core/2.16.0/jar"));
|
||||
assertTrue(modules4log4j2.contains("mvn:org.apache.logging.log4j/log4j-api/2.16.0/jar"));
|
||||
assertTrue(modules4log4j2.contains("mvn:org.apache.logging.log4j/log4j-jcl/2.16.0/jar"));
|
||||
assertTrue(modules4log4j2.contains("mvn:org.apache.logging.log4j/log4j-jul/2.16.0/jar"));
|
||||
assertTrue(modules4log4j2.contains("mvn:org.apache.logging.log4j/log4j-slf4j-impl/2.16.0/jar"));
|
||||
assertTrue(modules4log4j2.contains("mvn:org.apache.logging.log4j/log4j-core/2.17.1/jar"));
|
||||
assertTrue(modules4log4j2.contains("mvn:org.apache.logging.log4j/log4j-api/2.17.1/jar"));
|
||||
assertTrue(modules4log4j2.contains("mvn:org.apache.logging.log4j/log4j-jcl/2.17.1/jar"));
|
||||
assertTrue(modules4log4j2.contains("mvn:org.apache.logging.log4j/log4j-jul/2.17.1/jar"));
|
||||
assertTrue(modules4log4j2.contains("mvn:org.apache.logging.log4j/log4j-slf4j-impl/2.17.1/jar"));
|
||||
|
||||
assertFalse(modules4log4j2.contains("mvn:org.slf4j/jcl-over-slf4j/1.7.25/jar"));
|
||||
assertFalse(modules4log4j2.contains("mvn:org.apache.logging.log4j/log4j-to-slf4j/2.16.0/jar"));
|
||||
assertFalse(modules4log4j2.contains("mvn:org.apache.logging.log4j/log4j-to-slf4j/2.17.1/jar"));
|
||||
assertFalse(modules4log4j2.contains("mvn:org.slf4j/slf4j-log4j12/1.7.25/jar"));
|
||||
assertFalse(modules4log4j2.contains("mvn:log4j/log4j/1.2.17/jar"));
|
||||
|
||||
@@ -75,16 +75,16 @@ public class UpdateLog4jJarUtilsTest {
|
||||
for (ModuleNeeded moule : allLog4jModules) {
|
||||
modules4log4j1.add(moule.getMavenUri());
|
||||
}
|
||||
assertFalse(modules4log4j1.contains("mvn:org.apache.logging.log4j/log4j-core/2.16.0/jar"));
|
||||
assertFalse(modules4log4j1.contains("mvn:org.apache.logging.log4j/log4j-api/2.16.0/jar"));
|
||||
assertFalse(modules4log4j1.contains("mvn:org.apache.logging.log4j/log4j-jcl/2.16.0/jar"));
|
||||
assertFalse(modules4log4j1.contains("mvn:org.apache.logging.log4j/log4j-jul/2.16.0/jar"));
|
||||
assertFalse(modules4log4j1.contains("mvn:org.apache.logging.log4j/log4j-slf4j-impl/2.16.0/jar"));
|
||||
assertFalse(modules4log4j1.contains("mvn:org.apache.logging.log4j/log4j-core/2.17.1/jar"));
|
||||
assertFalse(modules4log4j1.contains("mvn:org.apache.logging.log4j/log4j-api/2.17.1/jar"));
|
||||
assertFalse(modules4log4j1.contains("mvn:org.apache.logging.log4j/log4j-jcl/2.17.1/jar"));
|
||||
assertFalse(modules4log4j1.contains("mvn:org.apache.logging.log4j/log4j-jul/2.17.1/jar"));
|
||||
assertFalse(modules4log4j1.contains("mvn:org.apache.logging.log4j/log4j-slf4j-impl/2.17.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.16.0/jar"));
|
||||
assertTrue(modules4log4j1.contains("mvn:org.slf4j/slf4j-log4j12/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.17.1/jar"));
|
||||
assertTrue(modules4log4j1.contains("mvn:org.slf4j/slf4j-log4j12/1.7.25/jar"));
|
||||
assertTrue(modules4log4j1.contains("mvn:log4j/log4j/1.2.17/jar"));
|
||||
|
||||
}
|
||||
@@ -92,15 +92,15 @@ public class UpdateLog4jJarUtilsTest {
|
||||
private List<String> getAllLog4jModulesName() {
|
||||
List<String> jarList = new ArrayList<>();
|
||||
// log2
|
||||
jarList.add("log4j-core-2.16.0.jar");//$NON-NLS-1$
|
||||
jarList.add("log4j-api-2.16.0.jar");//$NON-NLS-1$
|
||||
jarList.add("log4j-jcl-2.16.0.jar");//$NON-NLS-1$
|
||||
jarList.add("log4j-jul-2.16.0.jar");//$NON-NLS-1$
|
||||
jarList.add("log4j-slf4j-impl-2.16.0.jar");//$NON-NLS-1$
|
||||
jarList.add("log4j-core-2.17.1.jar");//$NON-NLS-1$
|
||||
jarList.add("log4j-api-2.17.1.jar");//$NON-NLS-1$
|
||||
jarList.add("log4j-jcl-2.17.1.jar");//$NON-NLS-1$
|
||||
jarList.add("log4j-jul-2.17.1.jar");//$NON-NLS-1$
|
||||
jarList.add("log4j-slf4j-impl-2.17.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.16.0.jar");//$NON-NLS-1$
|
||||
jarList.add("log4j-to-slf4j-2.17.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;
|
||||
@@ -108,20 +108,20 @@ public class UpdateLog4jJarUtilsTest {
|
||||
private List<ModuleNeeded> getAllLog4jModules() {
|
||||
List<ModuleNeeded> jarList = new ArrayList<>();
|
||||
// log2
|
||||
ModuleNeeded log4jCore = new ModuleNeeded("org.apache.logging.log4j", "log4j-core-2.16.0.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4jCore.setMavenUri("mvn:org.apache.logging.log4j/log4j-core/2.16.0");//$NON-NLS-1$
|
||||
ModuleNeeded log4jCore = new ModuleNeeded("org.apache.logging.log4j", "log4j-core-2.17.1.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4jCore.setMavenUri("mvn:org.apache.logging.log4j/log4j-core/2.17.1");//$NON-NLS-1$
|
||||
jarList.add(log4jCore);
|
||||
ModuleNeeded log4jApi = new ModuleNeeded("org.apache.logging.log4j", "log4j-api-2.16.0.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4jApi.setMavenUri("mvn:org.apache.logging.log4j/log4j-api/2.16.0");//$NON-NLS-1$
|
||||
ModuleNeeded log4jApi = new ModuleNeeded("org.apache.logging.log4j", "log4j-api-2.17.1.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4jApi.setMavenUri("mvn:org.apache.logging.log4j/log4j-api/2.17.1");//$NON-NLS-1$
|
||||
jarList.add(log4jApi);
|
||||
ModuleNeeded log4jJcl = new ModuleNeeded("org.apache.logging.log4j", "log4j-jcl-2.16.0.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4jJcl.setMavenUri("mvn:org.apache.logging.log4j/log4j-jcl/2.16.0");//$NON-NLS-1$
|
||||
ModuleNeeded log4jJcl = new ModuleNeeded("org.apache.logging.log4j", "log4j-jcl-2.17.1.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4jJcl.setMavenUri("mvn:org.apache.logging.log4j/log4j-jcl/2.17.1");//$NON-NLS-1$
|
||||
jarList.add(log4jJcl);
|
||||
ModuleNeeded log4jJul = new ModuleNeeded("org.apache.logging.log4j", "log4j-jul-2.16.0.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4jJul.setMavenUri("mvn:org.apache.logging.log4j/log4j-jul/2.16.0");//$NON-NLS-1$
|
||||
ModuleNeeded log4jJul = new ModuleNeeded("org.apache.logging.log4j", "log4j-jul-2.17.1.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4jJul.setMavenUri("mvn:org.apache.logging.log4j/log4j-jul/2.17.1");//$NON-NLS-1$
|
||||
jarList.add(log4jJul);
|
||||
ModuleNeeded log4jSlf4jImpl = new ModuleNeeded("org.apache.logging.log4j", "log4j-slf4j-impl-2.16.0.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4jSlf4jImpl.setMavenUri("mvn:org.apache.logging.log4j/log4j-slf4j-impl/2.16.0");//$NON-NLS-1$
|
||||
ModuleNeeded log4jSlf4jImpl = new ModuleNeeded("org.apache.logging.log4j", "log4j-slf4j-impl-2.17.1.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4jSlf4jImpl.setMavenUri("mvn:org.apache.logging.log4j/log4j-slf4j-impl/2.17.1");//$NON-NLS-1$
|
||||
jarList.add(log4jSlf4jImpl);
|
||||
|
||||
// log1
|
||||
@@ -131,8 +131,8 @@ public class UpdateLog4jJarUtilsTest {
|
||||
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.16.0.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4jToSlf4j.setMavenUri("mvn:org.apache.logging.log4j/log4j-to-slf4j/2.16.0");//$NON-NLS-1$
|
||||
ModuleNeeded log4jToSlf4j = new ModuleNeeded("org.apache.logging.log4j", "log4j-to-slf4j-2.17.1.jar", null, true); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
log4jToSlf4j.setMavenUri("mvn:org.apache.logging.log4j/log4j-to-slf4j/2.17.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$
|
||||
|
||||
Reference in New Issue
Block a user