Compare commits
1 Commits
vdrokov_fi
...
cmeng/chor
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2ae1b236b4 |
@@ -10,8 +10,7 @@ Require-Bundle: org.eclipse.core.runtime,
|
||||
org.apache.log4j,
|
||||
org.talend.libraries.apache,
|
||||
org.talend.commons.runtime,
|
||||
org.talend.libraries.ui,
|
||||
org.apache.ant
|
||||
org.talend.libraries.ui
|
||||
Export-Package:
|
||||
org.talend.commons.ui.runtime,
|
||||
org.talend.commons.ui.runtime.exception,
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
<version>5.1.1</version>
|
||||
<version>2.3.5</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<instructions>
|
||||
|
||||
@@ -108,9 +108,5 @@ public interface FileConstants {
|
||||
String BLUEPRINT_FOLDER_NAME = "OSGI-INF/blueprint"; //$NON-NLS-1$
|
||||
|
||||
String SPRING_FOLDER_NAME = "META-INF/spring"; //$NON-NLS-1$
|
||||
|
||||
String TALEND_FOLDER_NAME = "TALEND-INF"; //$NON-NLS-1$
|
||||
|
||||
String MAVEN_FOLDER_NAME = "MAVEN-INF";
|
||||
|
||||
}
|
||||
|
||||
@@ -135,7 +135,6 @@ import org.talend.core.runtime.repository.item.ItemProductKeys;
|
||||
import org.talend.core.runtime.services.IGenericWizardService;
|
||||
import org.talend.core.runtime.services.IMavenUIService;
|
||||
import org.talend.core.runtime.util.ItemDateParser;
|
||||
import org.talend.core.runtime.util.SharedStudioUtils;
|
||||
import org.talend.core.service.ICoreUIService;
|
||||
import org.talend.cwm.helper.SubItemHelper;
|
||||
import org.talend.cwm.helper.TableHelper;
|
||||
@@ -1799,12 +1798,9 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
* @throws PersistenceException
|
||||
*/
|
||||
private void emptyTempFolder(Project project) throws PersistenceException {
|
||||
try {
|
||||
String str = SharedStudioUtils.getTempFolderPath().toPortableString();
|
||||
FilesUtils.deleteFolder(new File(str), false);
|
||||
}catch (Exception ex) {
|
||||
ExceptionHandler.process(ex);
|
||||
}
|
||||
String str = (System.getProperty("eclipse.home.location") + "temp").substring(5);
|
||||
FilesUtils.deleteFolder(new File(str), false);
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
IProject fsProject = ResourceUtils.getProject(project);
|
||||
IFolder folder = ResourceUtils.getFolder(fsProject, RepositoryConstants.TEMP_DIRECTORY, false);
|
||||
@@ -2199,14 +2195,6 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
TimeMeasurePerformance.step("logOnProject", "Sync components libraries"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
try {
|
||||
// for new added mapping file, sync to project mapping folder
|
||||
MetadataTalendType.syncNewMappingFileToProject();
|
||||
} catch (SystemException e) {
|
||||
// ignore
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
|
||||
currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
|
||||
currentMonitor.beginTask("Execute before logon migrations tasks", 1); //$NON-NLS-1$
|
||||
ProjectManager.getInstance().getMigrationRecords().clear();
|
||||
@@ -2308,6 +2296,8 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
// set the project mappings url
|
||||
System.setProperty("talend.mappings.url", url.toString()); // $NON-NLS-1$
|
||||
}
|
||||
// for new added mapping file, sync to project mapping folder
|
||||
MetadataTalendType.syncNewMappingFileToProject();
|
||||
} catch (SystemException e) {
|
||||
// ignore
|
||||
ExceptionHandler.process(e);
|
||||
|
||||
@@ -149,6 +149,7 @@ public class ConvertJobsUtil {
|
||||
}
|
||||
|
||||
public static enum JobStreamingFramework {
|
||||
STORMFRAMEWORK("Storm", "Storm (Deprecated)", "_STORM_STORM_FRAMEWORK_"), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
SPARKSTREAMINGFRAMEWORK("Spark Streaming", "Spark Streaming", "_STORM_SPARKSTREAMING_FRAMEWORK_"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
private String name;
|
||||
@@ -359,7 +360,8 @@ public class ConvertJobsUtil {
|
||||
if (JobBatchFramework.MAPREDUCEFRAMEWORK.getDisplayName().equals(frameworkObj)
|
||||
|| JobBatchFramework.SPARKFRAMEWORK.getDisplayName().equals(frameworkObj)) {
|
||||
return JobType.BIGDATABATCH.getDisplayName();
|
||||
} else if (JobStreamingFramework.SPARKSTREAMINGFRAMEWORK.getName().equals(frameworkObj)) {
|
||||
} else if (JobStreamingFramework.STORMFRAMEWORK.getName().equals(frameworkObj)
|
||||
|| JobStreamingFramework.SPARKSTREAMINGFRAMEWORK.getName().equals(frameworkObj)) {
|
||||
return JobType.BIGDATASTREAMING.getDisplayName();
|
||||
} else {
|
||||
return JobType.STANDARD.getDisplayName();
|
||||
|
||||
@@ -123,8 +123,7 @@ Require-Bundle: org.eclipse.jdt.core,
|
||||
org.apache.servicemix.bundles.avro,
|
||||
jackson-core-asl,
|
||||
org.talend.libraries.jackson,
|
||||
org.eclipse.m2e.core,
|
||||
org.talend.libraries.apache.common
|
||||
org.eclipse.m2e.core
|
||||
Bundle-Activator: org.talend.core.runtime.CoreRuntimePlugin
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-ClassPath: .,
|
||||
|
||||
@@ -1,288 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<mapping>
|
||||
<dbms product="SINGLESTORE" id="singlestore_id" label="Mapping SingleStore"
|
||||
default="true">
|
||||
<dbTypes>
|
||||
<dbType type="BOOL" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BOOLEAN" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BIGINT" ignorePre="true"/>
|
||||
<dbType type="BIGINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BINARY" ignorePre="true"/>
|
||||
<dbType type="BIT" ignorePre="true" />
|
||||
<dbType type="BLOB" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="CHAR" defaultLength="200" ignorePre="true"/>
|
||||
<dbType type="DATE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="DATETIME" ignoreLen="true" ignorePre="false" />
|
||||
<dbType type="DECIMAL" defaultLength="20" defaultPrecision="10" preBeforelen="false"/>
|
||||
<dbType type="DOUBLE" defaultLength="20" defaultPrecision="10"/>
|
||||
<dbType type="DOUBLE UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="ENUM" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="FLOAT" defaultPrecision="2"/>
|
||||
<dbType type="FLOAT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="GEOGRAPHY" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="GEOGRAPHYPOINT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INT" ignorePre="true" />
|
||||
<dbType type="INT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INTEGER" ignorePre="true" />
|
||||
<dbType type="INTEGER UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LONGTEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LONGBLOB" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="MEDIUMBLOB" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MEDIUMINT" ignorePre="true" />
|
||||
<dbType type="MEDIUMINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MEDIUMTEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="SMALLINT" ignorePre="true" />
|
||||
<dbType type="SMALLINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="SET" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIMESTAMP" ignoreLen="true" ignorePre="false" />
|
||||
<dbType type="TINYBLOB" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TINYINT" ignorePre="true" />
|
||||
<dbType type="TINYINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TINYTEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="VARBINARY" ignorePre="true" />
|
||||
<dbType type="VARCHAR" default="true" defaultLength="100" ignorePre="true"/>
|
||||
<dbType type="YEAR" ignorePre="true"/>
|
||||
<dbType type="JSON" ignoreLen="true" ignorePre="true"/>
|
||||
</dbTypes>
|
||||
|
||||
<language name="java">
|
||||
<talendToDbTypes><!-- Adviced mappings -->
|
||||
<talendType type="id_List"/>
|
||||
<talendType type="id_Boolean">
|
||||
<dbType type="BOOL" default="true" />
|
||||
</talendType>
|
||||
<talendType type="id_Byte">
|
||||
<dbType type="TINYINT" default="true" />
|
||||
<dbType type="BIGINT" />
|
||||
<dbType type="INT" />
|
||||
<dbType type="MEDIUMINT" />
|
||||
<dbType type="SMALLINT" />
|
||||
</talendType>
|
||||
<talendType type="id_byte[]">
|
||||
<dbType type="VARBINARY" default="true" />
|
||||
<dbType type="BINARY" />
|
||||
<dbType type="BIT" />
|
||||
<dbType type="BLOB" />
|
||||
<dbType type="LONGBLOB" />
|
||||
<dbType type="MEDIUMBLOB" />
|
||||
<dbType type="TINYBLOB" />
|
||||
</talendType>
|
||||
<talendType type="id_Character">
|
||||
<dbType type="CHAR" default="true" />
|
||||
<dbType type="VARCHAR"/>
|
||||
</talendType>
|
||||
<talendType type="id_Date">
|
||||
<dbType type="DATE" />
|
||||
<dbType type="DATETIME" default="true" />
|
||||
<dbType type="TIME" />
|
||||
<dbType type="YEAR" />
|
||||
<dbType type="TIMESTAMP" />
|
||||
</talendType>
|
||||
<talendType type="id_BigDecimal">
|
||||
<dbType type="DECIMAL" default="true" />
|
||||
<dbType type="FLOAT"/>
|
||||
<dbType type="DOUBLE" />
|
||||
</talendType>
|
||||
<talendType type="id_Double">
|
||||
<dbType type="DOUBLE" default="true" />
|
||||
<dbType type="FLOAT"/>
|
||||
<dbType type="DECIMAL" />
|
||||
</talendType>
|
||||
<talendType type="id_Float">
|
||||
<dbType type="FLOAT" default="true" />
|
||||
<dbType type="DOUBLE"/>
|
||||
<dbType type="DECIMAL" />
|
||||
</talendType>
|
||||
<talendType type="id_Integer">
|
||||
<dbType type="INT" default="true" />
|
||||
<dbType type="BIGINT" />
|
||||
</talendType>
|
||||
<talendType type="id_Long">
|
||||
<dbType type="BIGINT" default="true" />
|
||||
</talendType>
|
||||
<talendType type="id_Object">
|
||||
<dbType type="BLOB" default="true"/>
|
||||
<dbType type="ENUM" />
|
||||
<dbType type="GEOGRAPHY" />
|
||||
<dbType type="GEOGRAPHYPOINT" />
|
||||
<dbType type="MEDIUMINT" />
|
||||
<dbType type="LONGBLOB" />
|
||||
<dbType type="MEDIUMBLOB" />
|
||||
<dbType type="SET" />
|
||||
<dbType type="TINYBLOB" />
|
||||
</talendType>
|
||||
<talendType type="id_Short">
|
||||
<dbType type="SMALLINT" default="true" />
|
||||
<dbType type="INT" />
|
||||
<dbType type="BIGINT"/>
|
||||
<dbType type="MEDIUMINT" />
|
||||
</talendType>
|
||||
<talendType type="id_String">
|
||||
<dbType type="VARCHAR" default="true" />
|
||||
<dbType type="LONGTEXT"/>
|
||||
<dbType type="MEDIUMTEXT" />
|
||||
<dbType type="TEXT" />
|
||||
<dbType type="TINYTEXT" />
|
||||
<dbType type="CHAR" />
|
||||
<dbType type="JSON" />
|
||||
</talendType>
|
||||
</talendToDbTypes>
|
||||
<dbToTalendTypes>
|
||||
<dbType type="BOOL">
|
||||
<talendType type="id_Boolean" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BOOLEAN">
|
||||
<talendType type="id_Boolean" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BIGINT">
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BINARY">
|
||||
<talendType type="id_byte[]" />
|
||||
<talendType type="id_Boolean" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BIT">
|
||||
<talendType type="id_byte[]" />
|
||||
<talendType type="id_Boolean" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BLOB">
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
<talendType type="id_Object" />
|
||||
</dbType>
|
||||
<dbType type="CHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="DATE">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="DATETIME">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="DECIMAL">
|
||||
<talendType type="id_Float"/>
|
||||
<talendType type="id_Double"/>
|
||||
<talendType type="id_BigDecimal" default="true"/>
|
||||
</dbType>
|
||||
<dbType type="DOUBLE">
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="ENUM">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="FLOAT">
|
||||
<talendType type="id_Float" default="true" />
|
||||
<talendType type="id_Double"/>
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="GEOGRAPHY">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="GEOGRAPHYPOINT">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="JSON">
|
||||
<talendType type="id_String" default="true" />
|
||||
<talendType type="id_Object" />
|
||||
</dbType>
|
||||
<dbType type="INT">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="INTEGER">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="LONGTEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="LONGBLOB">
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
<talendType type="id_Object" />
|
||||
</dbType>
|
||||
<dbType type="MEDIUMBLOB">
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
<talendType type="id_Object" />
|
||||
</dbType>
|
||||
<dbType type="MEDIUMINT">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="MEDIUMTEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="SMALLINT">
|
||||
<talendType type="id_Short" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
<talendType type="id_Integer"/>
|
||||
</dbType>
|
||||
<dbType type="SET">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIME">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIMESTAMP">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TINYBLOB">
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
<talendType type="id_Object" />
|
||||
</dbType>
|
||||
<dbType type="TINYINT">
|
||||
<talendType type="id_Byte" default="true" />
|
||||
<talendType type="id_Integer"/>
|
||||
<talendType type="id_Long"/>
|
||||
<talendType type="id_Short"/>
|
||||
</dbType>
|
||||
<dbType type="TINYTEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="VARBINARY">
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
</dbType>
|
||||
<dbType type="VARCHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="YEAR">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BIGINT UNSIGNED" >
|
||||
</dbType>
|
||||
<dbType type="DOUBLE UNSIGNED" >
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="FLOAT UNSIGNED" >
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="INT UNSIGNED" >
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INTEGER UNSIGNED" >
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MEDIUMINT UNSIGNED" >
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long" />
|
||||
</dbType>
|
||||
<dbType type="SMALLINT UNSIGNED" >
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long" />
|
||||
</dbType>
|
||||
<dbType type="TINYINT UNSIGNED" >
|
||||
<talendType type="id_Short" default="true" />
|
||||
<talendType type="id_Integer" />
|
||||
<talendType type="id_Long" />
|
||||
</dbType>
|
||||
</dbToTalendTypes>
|
||||
</language>
|
||||
</dbms>
|
||||
|
||||
</mapping>
|
||||
@@ -94,6 +94,4 @@ public interface IESBService extends IService {
|
||||
* @return
|
||||
*/
|
||||
public IProcessor createOSGIJavaProcessor(IProcess process, Property property, boolean filenameFromLabel);
|
||||
|
||||
public boolean isSOAPServiceProvider(Item item);
|
||||
}
|
||||
|
||||
@@ -126,8 +126,6 @@ public class PluginChecker {
|
||||
|
||||
public static final String BDEE_PLUGIN_ID = "org.talend.designer.bigdata"; //$NON-NLS-1$
|
||||
|
||||
public static final String BD_ROUTINE_PLUGIN_ID = "org.talend.designer.routines.bigdata"; //$NON-NLS-1$
|
||||
|
||||
public static final String DOCKER_PLUGIN_ID = "org.talend.designer.docker"; //$NON-NLS-1$
|
||||
|
||||
public static final String HELP_DI_EE_PLUGIN_ID = "org.talend.help.dataprep"; //$NON-NLS-1$
|
||||
@@ -368,10 +366,6 @@ public class PluginChecker {
|
||||
return isPluginLoaded(ESBSE_PLUGIN_ID);
|
||||
}
|
||||
|
||||
public static boolean isBigdataRoutineLoaded() {
|
||||
return isPluginLoaded(BD_ROUTINE_PLUGIN_ID);
|
||||
}
|
||||
|
||||
public static String getBundlePath(String bundleName) {
|
||||
String bundlePath = ""; //$NON-NLS-1$
|
||||
Bundle refBundle = Platform.getBundle(bundleName);
|
||||
|
||||
@@ -58,7 +58,7 @@ public enum EDatabaseVersion4Drivers {
|
||||
HSQLDB_SERVER(new DbVersion4Drivers(EDatabaseTypeName.HSQLDB_SERVER, "hsqldb.jar")), //$NON-NLS-1$
|
||||
HSQLDB_WEBSERVER(new DbVersion4Drivers(EDatabaseTypeName.HSQLDB_WEBSERVER, "hsqldb.jar")), //$NON-NLS-1$
|
||||
|
||||
H2(new DbVersion4Drivers(EDatabaseTypeName.H2, "h2-1.4.198.jar")), //$NON-NLS-1$
|
||||
H2(new DbVersion4Drivers(EDatabaseTypeName.H2, "h2-1.3.160.jar")), //$NON-NLS-1$
|
||||
|
||||
//
|
||||
JAVADB_EMBEDED(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_EMBEDED, "derby.jar")), //$NON-NLS-1$
|
||||
|
||||
@@ -40,6 +40,8 @@ public enum EHadoopConfs {
|
||||
|
||||
SQOOP("SQOOP", new String[] { "sqoop-site.xml" }), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
STORM("STORM", new String[] { "storm-site.xml" }), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
TEZ("TEZ", new String[] { "tez-site.xml" }), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
ZOOKEEPER("ZOOKEEPER", new String[0]), //$NON-NLS-1$
|
||||
|
||||
@@ -81,11 +81,6 @@ public final class ComponentUtilities {
|
||||
|
||||
public static void setNodeValue(NodeType node, String name, String value) {
|
||||
ElementParameterType property = getNodeProperty(node, name);
|
||||
|
||||
if (property == null) {
|
||||
throw new IllegalArgumentException( "The component node "+node.getComponentName()+" doesn't have the property "+name );
|
||||
}
|
||||
|
||||
property.setValue(value);
|
||||
}
|
||||
|
||||
|
||||
@@ -320,8 +320,7 @@ public class JobContextManager implements IContextManager {
|
||||
contextParam = new JobContextParameter();
|
||||
contextParam.setContext(context);
|
||||
contextParam.setName(contextParamType.getName());
|
||||
contextParam.setPrompt(
|
||||
contextParamType.getPrompt() == null ? (contextParamType.getName() + "?") : contextParamType.getPrompt());
|
||||
contextParam.setPrompt(contextParamType.getPrompt());
|
||||
contextParam.setInternalId(contextParamType.getInternalId());
|
||||
originalParamerters.add(contextParam.getName());
|
||||
boolean exists = true;
|
||||
|
||||
@@ -60,7 +60,6 @@ import org.talend.designer.core.model.utils.emf.talendfile.RoutinesParameterType
|
||||
import org.talend.designer.runprocess.ItemCacheManager;
|
||||
import org.talend.repository.ProjectManager;
|
||||
import org.talend.repository.model.IProxyRepositoryFactory;
|
||||
import org.apache.commons.text.StringEscapeUtils;
|
||||
|
||||
/**
|
||||
* DOC bqian class global comment. Detailled comment
|
||||
@@ -1005,6 +1004,8 @@ public final class ProcessUtils {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static boolean isChildRouteProcess(IProcess process) {
|
||||
List n = process.getNodesOfType("tRouteInput");
|
||||
if (n!=null && n.size()!=0) {
|
||||
@@ -1012,8 +1013,4 @@ public final class ProcessUtils {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static String escapeJava(String input) {
|
||||
return StringEscapeUtils.escapeJava(input);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +32,10 @@ public enum ECodePart {
|
||||
MRCODE("mrcode"), //$NON-NLS-1$
|
||||
MRCONFIG("mrconfig"), //$NON-NLS-1$
|
||||
MRJOBFOOTER("mrjobfooter"), //$NON-NLS-1$
|
||||
STORMCODE("stormcode"), //$NON-NLS-1$
|
||||
STORMCONFIG("stormconfig"), //$NON-NLS-1$
|
||||
STORMMONITOR("stormmonitor"), //$NON-NLS-1$
|
||||
STORMJOBFOOTER("stormjobfooter"), //$NON-NLS-1$
|
||||
SPARKCODE("sparkcode"), //$NON-NLS-1$
|
||||
SPARKCONFIG("sparkconfig"), //$NON-NLS-1$
|
||||
SPARKJOBFOOTER("sparkjobfooter"), //$NON-NLS-1$
|
||||
|
||||
@@ -13,10 +13,7 @@
|
||||
package org.talend.core.runtime.util;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
@@ -87,29 +84,6 @@ public class SharedStudioUtils {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isNeedCleanOnSharedMode() {
|
||||
if (SharedStudioUtils.isSharedStudioMode()) {
|
||||
boolean isNeedClean = installedPatch();
|
||||
String studioArtifactsFileSha256Hex = getStudioArtifactsFileSha256Hex();
|
||||
if (updateArtifactsFileSha256Hex(studioArtifactsFileSha256Hex)) {
|
||||
isNeedClean = true;
|
||||
}
|
||||
return isNeedClean;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean updateArtifactsFileSha256Hex(String studioArtifactsFileSha256Hex) {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IUpdateService.class)) {
|
||||
IUpdateService updateService = GlobalServiceRegister.getDefault().getService(IUpdateService.class);
|
||||
try {
|
||||
return updateService.updateArtifactsFileSha256Hex(new NullProgressMonitor(), studioArtifactsFileSha256Hex);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public static boolean installedPatch() {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IUpdateService.class)) {
|
||||
IUpdateService updateService = GlobalServiceRegister.getDefault().getService(IUpdateService.class);
|
||||
@@ -134,41 +108,4 @@ public class SharedStudioUtils {
|
||||
File extchangeFolder = new File (componentFolder, path.toOSString());
|
||||
return extchangeFolder;
|
||||
}
|
||||
|
||||
public static IPath getTempFolderPath() {
|
||||
if (SharedStudioUtils.isSharedStudioMode()) {
|
||||
Path wsPath = new Path(Platform.getInstanceLocation().getURL().getPath());
|
||||
return wsPath.append("temp");
|
||||
} else {
|
||||
return new Path(System.getProperty("user.dir")).append("temp");
|
||||
}
|
||||
}
|
||||
|
||||
public static String getStudioArtifactsFileSha256Hex() {
|
||||
File studioArtifactsFile = new File(Platform.getInstallLocation().getURL().getPath(), "artifacts.xml");//$NON-NLS-1$
|
||||
if (studioArtifactsFile.exists()) {
|
||||
InputStream inputStream = null;
|
||||
try {
|
||||
inputStream = new FileInputStream(studioArtifactsFile);
|
||||
return sha256Hex(inputStream);
|
||||
} catch (FileNotFoundException e) {
|
||||
ExceptionHandler.process(e);
|
||||
} catch (IOException e) {
|
||||
ExceptionHandler.process(e);
|
||||
} finally {
|
||||
if (inputStream != null) {
|
||||
try {
|
||||
inputStream.close();
|
||||
} catch (IOException ex) {
|
||||
ExceptionHandler.process(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
private static String sha256Hex(final InputStream inputStream) throws IOException {
|
||||
return org.apache.commons.codec.digest.DigestUtils.sha256Hex(inputStream);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,12 +38,4 @@ public interface IDQComponentService extends IService {
|
||||
* @param node The node which need to be modified
|
||||
*/
|
||||
void correctlyCustomMatcherParameter(NodeType node);
|
||||
|
||||
/**
|
||||
* Change the attribute of MatchingData and use Integer value instead of double value.
|
||||
*
|
||||
* @param node The node which need to be modified
|
||||
*/
|
||||
void covertConfindWeight2Int(NodeType node);
|
||||
|
||||
}
|
||||
|
||||
@@ -18,11 +18,13 @@ import org.eclipse.ui.IEditorPart;
|
||||
import org.talend.commons.ui.runtime.image.IImage;
|
||||
import org.talend.core.IService;
|
||||
import org.talend.core.model.components.IComponentsHandler;
|
||||
import org.talend.core.model.general.Project;
|
||||
import org.talend.core.model.process.INode;
|
||||
import org.talend.core.model.process.IProcess2;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.ProcessItem;
|
||||
import org.talend.core.model.repository.IRepositoryEditorInput;
|
||||
import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
import org.talend.repository.model.IRepositoryNode;
|
||||
import org.talend.repository.model.nodes.IProjectRepositoryNode;
|
||||
|
||||
@@ -31,6 +33,8 @@ import org.talend.repository.model.nodes.IProjectRepositoryNode;
|
||||
*/
|
||||
public interface IStormProcessService extends IService {
|
||||
|
||||
boolean needStormProcess();
|
||||
|
||||
IRepositoryNode getRootNode(IProjectRepositoryNode projectNode);
|
||||
|
||||
public boolean collectStandardProcessNode(List<String> filteredContents, Object node);
|
||||
@@ -39,6 +43,8 @@ public interface IStormProcessService extends IService {
|
||||
|
||||
public boolean isStormEditor(IEditorPart editorPart);
|
||||
|
||||
public List<IRepositoryViewObject> getStormProcesses(Project project);
|
||||
|
||||
/**
|
||||
* This method is responsible for creating additional information which are going to be registered in the Process
|
||||
* (and then in the Item). DOC rdubois Comment method "generateSparkStreamingInfosParameter".
|
||||
|
||||
@@ -22,6 +22,4 @@ public interface IUpdateService extends IService {
|
||||
public boolean syncSharedStudioLibraryInPatch(IProgressMonitor monitor) throws Exception;
|
||||
|
||||
public String getSharedStudioMissingPatchVersion();
|
||||
|
||||
public boolean updateArtifactsFileSha256Hex(IProgressMonitor monitor, String studioArtifactsFileShaCodeHex);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
@@ -95,8 +94,6 @@ public final class ProjectManager {
|
||||
|
||||
private Set<Project> tempProjects;
|
||||
|
||||
private WeakHashMap<IRepositoryViewObject, Boolean> cachedObjects = new WeakHashMap<IRepositoryViewObject, Boolean>();
|
||||
|
||||
private ProjectManager() {
|
||||
beforeLogonRecords = new HashSet<String>();
|
||||
logonRecords = new HashSet<String>();
|
||||
@@ -454,15 +451,9 @@ public final class ProjectManager {
|
||||
if (object == null) {
|
||||
return true;
|
||||
}
|
||||
if (cachedObjects.containsKey(object)) {
|
||||
return cachedObjects.get(object);
|
||||
}
|
||||
|
||||
org.talend.core.model.properties.Project emfProject = getProject(object.getProperty().getItem());
|
||||
org.talend.core.model.properties.Project curProject = curP.getEmfProject();
|
||||
boolean ret = emfProject.equals(curProject);
|
||||
cachedObjects.put(object, ret);
|
||||
return ret;
|
||||
return emfProject.equals(curProject);
|
||||
|
||||
} else {
|
||||
IProjectRepositoryNode root = node.getRoot();
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
// ============================================================================
|
||||
package org.talend.repository;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.talend.commons.exception.LoginException;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.core.model.general.Project;
|
||||
@@ -47,8 +45,6 @@ public abstract class RepositoryWorkUnit<T> {
|
||||
|
||||
private boolean refreshRepository = true; // added for TDI-27085
|
||||
|
||||
private Set<String> specifiedCommitFiles;
|
||||
|
||||
/**
|
||||
* Usefull for some save only actions, where we're sure everything is up to date.
|
||||
*/
|
||||
@@ -198,13 +194,6 @@ public abstract class RepositoryWorkUnit<T> {
|
||||
this.refreshRepository = refreshRepository;
|
||||
}
|
||||
|
||||
public Set<String> getSpecifiedCommitFiles() {
|
||||
return specifiedCommitFiles;
|
||||
}
|
||||
|
||||
public void setSpecifiedCommitFiles(Set<String> specifiedCommitFiles) {
|
||||
this.specifiedCommitFiles = specifiedCommitFiles;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for avoidUpdateLocks.
|
||||
|
||||
@@ -24,7 +24,6 @@ import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.ui.IEditorPart;
|
||||
import org.talend.core.IService;
|
||||
import org.talend.core.model.components.IComponentsFactory;
|
||||
import org.talend.core.model.general.ModuleNeeded;
|
||||
import org.talend.core.model.general.Project;
|
||||
import org.talend.core.model.metadata.builder.connection.DatabaseConnection;
|
||||
import org.talend.core.model.process.IContextManager;
|
||||
@@ -145,8 +144,4 @@ public interface IRepositoryService extends IService {
|
||||
|
||||
public void setShouldCheckRepoViewCommonNavigatorDirty(IRepositoryView repView, boolean shouldFlag);
|
||||
|
||||
boolean isProjectLevelLog4j2();
|
||||
|
||||
List<ModuleNeeded> getLog4j2Modules();
|
||||
|
||||
}
|
||||
|
||||
@@ -34,8 +34,7 @@ Require-Bundle: org.apache.commons.lang,
|
||||
org.apache.commons.io,
|
||||
org.apache.httpcomponents.httpcore,
|
||||
org.apache.httpcomponents.httpclient,
|
||||
org.slf4j.api,
|
||||
org.apache.ant
|
||||
org.slf4j.api
|
||||
Import-Package: org.eclipse.jdt.internal.ui.workingsets
|
||||
Export-Package: org.talend.core.ui,
|
||||
org.talend.core.ui.actions,
|
||||
|
||||
@@ -562,10 +562,10 @@ ContextBuiltinToRepositoryCommand.addRelation=A context variable by the same nam
|
||||
ContextModifyCommand.label=Modify Context
|
||||
MetadataExportXmlCommand.title=Warning
|
||||
MetadataExportXmlCommand.message=Warning: this file already exist, do you want to override it?
|
||||
RoutinesFunctionProposal.Description.v1=Description: {0}\n
|
||||
RoutinesFunctionProposal.CreatedBy.v1=Created By: {1}\n\n
|
||||
RoutinesFunctionProposal.ReturnType.v1=Return Type: {2}\n
|
||||
RoutinesFunctionProposal.VariableName.v1=Example: {3}\n\n
|
||||
RoutinesFunctionProposal.Description=Description: {0}\n
|
||||
RoutinesFunctionProposal.CreatedBy=Created By: {1}\n\n
|
||||
RoutinesFunctionProposal.ReturnType=Return Type: {2}\n
|
||||
RoutinesFunctionProposal.VariableName=Example: {3}\n\n
|
||||
RoutinesFunctionProposal.User=User
|
||||
RoutinesFunctionProposal.System=System
|
||||
NodeReturnProposal.Description=Description: {0} : {1}\n\n
|
||||
@@ -574,10 +574,10 @@ NodeReturnProposal.Type=Type: {3}\n
|
||||
NodeReturnProposal.Availability=Availability: {4}\n
|
||||
NodeReturnProposal.VariableName=Variable Name: {5}\n
|
||||
ContextParameterProposal.NoCommentAvaiable=No Comment Available
|
||||
ContextParameterProposal.Description.v1=Description: {0}
|
||||
ContextParameterProposal.ContextVariable.v1=Default context environment: {1}
|
||||
ContextParameterProposal.Type.v1=Type: {2}
|
||||
ContextParameterProposal.VariableName.v1=Value: {3}
|
||||
ContextParameterProposal.Description=Description: {0}
|
||||
ContextParameterProposal.ContextVariable=Context Variable: {1}
|
||||
ContextParameterProposal.Type=Type: {2}
|
||||
ContextParameterProposal.VariableName=Variable Name: {3}
|
||||
ArchiveFileExportOperationFullPath.cannotCreateDir=unable to create directory '{0}'
|
||||
WorkingSetConfigurationDialog_new_label=&New...
|
||||
WorkingSetConfigurationDialog_edit_label=&Edit...
|
||||
|
||||
@@ -68,11 +68,15 @@ public class CoreImageProvider {
|
||||
return ECoreImage.PROCESS_BATCH_MR_ICON;
|
||||
} else if (HadoopConstants.FRAMEWORK_SPARKSTREAMING.equals(framework)) {
|
||||
return ECoreImage.PROCESS_STREAMING_SPARK_ICON;
|
||||
} else if (HadoopConstants.FRAMEWORK_STORM.equals(framework)) {
|
||||
return ECoreImage.PROCESS_STREAMING_STORM_ICON;
|
||||
}
|
||||
// the following statements are for the items exported from old studio versions since they have no framework
|
||||
// properties
|
||||
else if (itemType == ERepositoryObjectType.PROCESS_MR) {
|
||||
return ECoreImage.PROCESS_BATCH_MR_ICON;
|
||||
} else if (itemType == ERepositoryObjectType.PROCESS_STORM) {
|
||||
return ECoreImage.PROCESS_STREAMING_STORM_ICON;
|
||||
}
|
||||
}
|
||||
return getIcon(itemType);
|
||||
|
||||
@@ -102,9 +102,7 @@ public class HorizontalTabFactory {
|
||||
* @param descriptors
|
||||
*/
|
||||
public void setInput(List<TalendPropertyTabDescriptor> descriptors) {
|
||||
if (tabbedPropertyViewer != null && tabbedPropertyViewer.getControl() != null && !tabbedPropertyViewer.getControl().isDisposed()) {
|
||||
tabbedPropertyViewer.setInput(descriptors);
|
||||
}
|
||||
tabbedPropertyViewer.setInput(descriptors);
|
||||
}
|
||||
|
||||
public List<TalendPropertyTabDescriptor> getInput() {
|
||||
|
||||
@@ -80,7 +80,7 @@ public class ContextParameterProposal implements IContentProposal {
|
||||
MessageFormat format = new MessageFormat(getDescriptionMessagePattern());
|
||||
if (contextParameter.getContext() != null) {
|
||||
Object[] replaceArgs = new Object[] { desc, contextParameter.getContext().getName(), contextParameter.getType(),
|
||||
contextParameter.getValue() };
|
||||
contextParameter.getName() };
|
||||
return format.format(replaceArgs);
|
||||
}
|
||||
return desc;
|
||||
@@ -88,10 +88,10 @@ public class ContextParameterProposal implements IContentProposal {
|
||||
}
|
||||
|
||||
private String getDescriptionMessagePattern() {
|
||||
String message = Messages.getString("ContextParameterProposal.Description.v1") + "\n\n"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
message += Messages.getString("ContextParameterProposal.ContextVariable.v1") + "\n\n"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
message += Messages.getString("ContextParameterProposal.Type.v1") + "\n"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
message += Messages.getString("ContextParameterProposal.VariableName.v1") + "\n"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
String message = Messages.getString("ContextParameterProposal.Description") + "\n\n"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
message += Messages.getString("ContextParameterProposal.ContextVariable") + "\n\n"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
message += Messages.getString("ContextParameterProposal.Type") + "\n"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
message += Messages.getString("ContextParameterProposal.VariableName") + "\n"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
return message;
|
||||
}
|
||||
|
||||
|
||||
@@ -74,10 +74,10 @@ public class RoutinesFunctionProposal implements IContentProposal {
|
||||
*/
|
||||
@Override
|
||||
public String getDescription() {
|
||||
String message = Messages.getString("RoutinesFunctionProposal.Description.v1");
|
||||
message += Messages.getString("RoutinesFunctionProposal.CreatedBy.v1");
|
||||
message += Messages.getString("RoutinesFunctionProposal.ReturnType.v1");
|
||||
message += Messages.getString("RoutinesFunctionProposal.VariableName.v1");
|
||||
String message = Messages.getString("RoutinesFunctionProposal.Description");
|
||||
message += Messages.getString("RoutinesFunctionProposal.CreatedBy");
|
||||
message += Messages.getString("RoutinesFunctionProposal.ReturnType");
|
||||
message += Messages.getString("RoutinesFunctionProposal.VariableName");
|
||||
|
||||
MessageFormat format = new MessageFormat(message);
|
||||
Object[] args = new Object[] { function.getDescription(),
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
// ============================================================================
|
||||
package org.talend.core;
|
||||
|
||||
import org.apache.logging.log4j.message.ThreadDumpMessage;
|
||||
import org.eclipse.core.runtime.Plugin;
|
||||
import org.eclipse.core.runtime.preferences.InstanceScope;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
@@ -209,8 +208,4 @@ public class CorePlugin extends Plugin {
|
||||
return (ICreateXtextProcessService) GlobalServiceRegister.getDefault().getService(ICreateXtextProcessService.class);
|
||||
}
|
||||
|
||||
public static String threadDump(String message) {
|
||||
return new ThreadDumpMessage(message).toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
package org.talend.core.model.metadata.query.generator;
|
||||
|
||||
import org.talend.core.database.EDatabaseTypeName;
|
||||
import org.talend.core.model.metadata.QueryUtil;
|
||||
import org.talend.core.model.metadata.query.AbstractQueryGenerator;
|
||||
import org.talend.core.model.process.IElement;
|
||||
|
||||
@@ -39,23 +38,4 @@ public class PostgreQueryGenerator extends AbstractQueryGenerator {
|
||||
}
|
||||
return super.getSchema(elem);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getTableNameWithDBAndSchema(final String dbName, final String schema, String tableName) {
|
||||
if (tableName == null || EMPTY.equals(tableName.trim())) {
|
||||
tableName = QueryUtil.DEFAULT_TABLE_NAME;
|
||||
}
|
||||
|
||||
final StringBuffer tableNameWithDBAndSchema = new StringBuffer();
|
||||
|
||||
// postgres do not support db.schema.table_name, so only need schema.table_name
|
||||
if (schema != null && !EMPTY.equals(schema)) {
|
||||
tableNameWithDBAndSchema.append(checkContextAndAddQuote(schema));
|
||||
tableNameWithDBAndSchema.append(getSQLFieldConnector());
|
||||
}
|
||||
//
|
||||
tableNameWithDBAndSchema.append(checkContextAndAddQuote(tableName));
|
||||
|
||||
return tableNameWithDBAndSchema.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,13 +16,13 @@ import java.io.File;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
|
||||
import org.eclipse.core.runtime.preferences.DefaultScope;
|
||||
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
|
||||
import org.talend.core.CorePlugin;
|
||||
import org.talend.core.prefs.GeneralParametersProvider.GeneralParameters;
|
||||
import org.talend.core.runtime.util.SharedStudioUtils;
|
||||
|
||||
/**
|
||||
* Intializer of core preferences. <br/>
|
||||
@@ -54,7 +54,7 @@ public class CorePreferenceInitializer extends AbstractPreferenceInitializer {
|
||||
IEclipsePreferences node = new DefaultScope().getNode(CorePlugin.getDefault().getBundle().getSymbolicName());
|
||||
|
||||
// Building temporary files directory path
|
||||
IPath tempPath = SharedStudioUtils.getTempFolderPath();
|
||||
IPath tempPath = new Path(System.getProperty("user.dir")).append("temp"); // NON-NLS-1$// NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-2$
|
||||
File tempFile = tempPath.toFile();
|
||||
if (!tempFile.exists()) {
|
||||
tempFile.mkdirs();
|
||||
|
||||
@@ -54,17 +54,6 @@
|
||||
<groupId>org.apache.maven.wagon</groupId>
|
||||
<artifactId>wagon-http</artifactId>
|
||||
<version>${wagon.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
<version>1.13.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.wagon</groupId>
|
||||
|
||||
@@ -40,12 +40,6 @@
|
||||
<version>${project.version}</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>studio-log4j-dependencies-tos</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>studio-maven-repository-build</artifactId>
|
||||
@@ -84,13 +78,13 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>karaf-maven-plugin-4-2-10-tos</artifactId>
|
||||
<artifactId>karaf-maven-plugin-4-2-4-tos</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>karaf-maven-plugin-4-2-10-tos</artifactId>
|
||||
<artifactId>karaf-maven-plugin-4-2-4-tos</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
@@ -106,10 +100,37 @@
|
||||
<version>${project.version}</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>1.15</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>official</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.tycho</groupId>
|
||||
<artifactId>tycho-packaging-plugin</artifactId>
|
||||
<version>${tycho.version}</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.tycho.extras</groupId>
|
||||
<artifactId>tycho-buildtimestamp-jgit</artifactId>
|
||||
<version>${tycho.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<configuration>
|
||||
<strictBinIncludes>false</strictBinIncludes>
|
||||
<format>'${product.timestamp}'</format>
|
||||
<archive>
|
||||
<addMavenDescriptor>false</addMavenDescriptor>
|
||||
<!-- By default, name of the current user is inserted into generated MANIFEST.MF files -->
|
||||
<manifestEntries>
|
||||
<Built-By />
|
||||
</manifestEntries>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
||||
@@ -1,65 +1,65 @@
|
||||
<?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>studio-maven-repository-tos</artifactId>
|
||||
<version>7.4.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>karaf-maven-plugin-4-2-10-tos</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.karaf.tooling</groupId>
|
||||
<artifactId>karaf-maven-plugin</artifactId>
|
||||
<version>4.2.10</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>jcl-over-slf4j</artifactId>
|
||||
<version>1.7.12</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-dependency-tree</artifactId>
|
||||
<version>3.0.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-framework-bom</artifactId>
|
||||
<version>5.0.2.RELEASE</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.tukaani</groupId>
|
||||
<artifactId>xz</artifactId>
|
||||
<version>1.6</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.8</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-dependencies</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<addParentPoms>true</addParentPoms>
|
||||
<copyPom>true</copyPom>
|
||||
<includeScope>compile</includeScope>
|
||||
<outputDirectory>${basedir}/../../../tmp/repository</outputDirectory>
|
||||
<useRepositoryLayout>true</useRepositoryLayout>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</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>studio-maven-repository-tos</artifactId>
|
||||
<version>7.4.1-SNAPSHOT</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>karaf-maven-plugin-4-2-4-tos</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.karaf.tooling</groupId>
|
||||
<artifactId>karaf-maven-plugin</artifactId>
|
||||
<version>4.2.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>jcl-over-slf4j</artifactId>
|
||||
<version>1.7.12</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-dependency-tree</artifactId>
|
||||
<version>3.0.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-framework-bom</artifactId>
|
||||
<version>5.0.2.RELEASE</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.tukaani</groupId>
|
||||
<artifactId>xz</artifactId>
|
||||
<version>1.6</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.8</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-dependencies</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<addParentPoms>true</addParentPoms>
|
||||
<copyPom>true</copyPom>
|
||||
<includeScope>compile</includeScope>
|
||||
<outputDirectory>${basedir}/../../../tmp/repository</outputDirectory>
|
||||
<useRepositoryLayout>true</useRepositoryLayout>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -14,7 +14,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
<version>5.1.1</version>
|
||||
<version>2.3.7</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
<version>5.1.1</version>
|
||||
<version>2.5.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -14,18 +14,8 @@
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
<version>2.5.1</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>1.15</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
@@ -14,17 +14,6 @@
|
||||
<groupId>org.talend.ci</groupId>
|
||||
<artifactId>osgihelper-maven-plugin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>1.15</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<modules>
|
||||
<module>plugins/maven-bundle-plugin-2-3-7</module>
|
||||
<module>plugins/maven-bundle-plugin-2-5-3</module>
|
||||
<module>plugins/karaf-maven-plugin-4-2-10</module>
|
||||
<module>plugins/karaf-maven-plugin-4-2-4</module>
|
||||
<module>plugins/maven-install-plugin-2-5-1</module>
|
||||
<module>plugins/talend-compiler-plugin</module>
|
||||
<module>plugins/talend-ci-osgihelper-maven-plugin</module>
|
||||
@@ -43,18 +43,7 @@
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>1.15</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
<?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>studio-maven-repository-tos</artifactId>
|
||||
<version>7.4.1-SNAPSHOT</version>
|
||||
<relativePath>../</relativePath>
|
||||
</parent>
|
||||
<artifactId>studio-log4j-dependencies-tos</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<dependencies>
|
||||
<!--add log4j dependency https://jira.talendforge.org/browse/TUP-29704 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-slf4j-impl</artifactId>
|
||||
<version>2.12.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>2.12.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-api</artifactId>
|
||||
<version>2.12.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.10</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-dependencies</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<includeScope>runtime</includeScope>
|
||||
<outputDirectory>${basedir}/../tmp/repository</outputDirectory>
|
||||
<useRepositoryLayout>true</useRepositoryLayout>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -16,7 +16,6 @@
|
||||
<module>tacokit/pom.xml</module>
|
||||
<module>tcompv1/pom.xml</module>
|
||||
<module>surefire/pom.xml</module>
|
||||
<module>log4j/pom.xml</module>
|
||||
<module>zip/pom.xml</module>
|
||||
</modules>
|
||||
<properties>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<artifactId>studio-tacokit-dependencies</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<properties>
|
||||
<tacokit.components.version>1.17.0-SNAPSHOT</tacokit.components.version>
|
||||
<tacokit.components.version>1.16.0-SNAPSHOT</tacokit.components.version>
|
||||
</properties>
|
||||
<repositories>
|
||||
<repository>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<tcomp.version>1.29.0-SNAPSHOT</tcomp.version>
|
||||
<tcomp.version>1.1.25</tcomp.version>
|
||||
<slf4j.version>1.7.25</slf4j.version>
|
||||
</properties>
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<artifactItem>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>studio-maven-repository</artifactId>
|
||||
<version>7.4.1.v20201203</version>
|
||||
<version>7.4.1.v20201111</version>
|
||||
<type>zip</type>
|
||||
<overWrite>true</overWrite>
|
||||
<outputDirectory>${project.basedir}/../repository</outputDirectory>
|
||||
|
||||
@@ -82,11 +82,6 @@
|
||||
<artifactId>plexus-utils</artifactId>
|
||||
<version>3.0.24</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>1.15</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
@@ -111,11 +106,6 @@
|
||||
<artifactId>plexus-utils</artifactId>
|
||||
<version>3.0.24</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>1.15</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
||||
@@ -52,7 +52,6 @@ import org.eclipse.swt.widgets.Display;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.IESBService;
|
||||
import org.talend.core.ILibraryManagerService;
|
||||
import org.talend.core.context.Context;
|
||||
import org.talend.core.context.RepositoryContext;
|
||||
@@ -169,10 +168,6 @@ public class AggregatorPomsHelper {
|
||||
}
|
||||
|
||||
public void updateCodeProjects(IProgressMonitor monitor, boolean forceBuild) {
|
||||
updateCodeProjects(monitor, forceBuild, false);
|
||||
}
|
||||
|
||||
public void updateCodeProjects(IProgressMonitor monitor, boolean forceBuild, boolean ignoreM2Cache) {
|
||||
RepositoryWorkUnit workUnit = new RepositoryWorkUnit<Object>("update code project") { //$NON-NLS-1$
|
||||
|
||||
@Override
|
||||
@@ -180,11 +175,8 @@ public class AggregatorPomsHelper {
|
||||
Project currentProject = ProjectManager.getInstance().getCurrentProject();
|
||||
for (ERepositoryObjectType codeType : ERepositoryObjectType.getAllTypesOfCodes()) {
|
||||
try {
|
||||
ITalendProcessJavaProject codeProject = getCodesProject(codeType);
|
||||
if (ERepositoryObjectType.ROUTINES == codeType) {
|
||||
PomUtil.checkExistingLog4j2Dependencies4RoutinePom(projectTechName, codeProject.getProjectPom());
|
||||
}
|
||||
if (ignoreM2Cache || CodeM2CacheManager.needUpdateCodeProject(currentProject, codeType)) {
|
||||
if (CodeM2CacheManager.needUpdateCodeProject(currentProject, codeType)) {
|
||||
ITalendProcessJavaProject codeProject = getCodesProject(codeType);
|
||||
updateCodeProjectPom(monitor, codeType, codeProject.getProjectPom());
|
||||
buildAndInstallCodesProject(monitor, codeType, true, forceBuild);
|
||||
CodeM2CacheManager.updateCodeProjectCache(currentProject, codeType);
|
||||
@@ -352,8 +344,12 @@ public class AggregatorPomsHelper {
|
||||
private static boolean checkIfCanAddToParentModules(Property property, boolean checkFilter) {
|
||||
// Check relation for ESB service job, should not be added into main pom
|
||||
if (property != null) {
|
||||
if (isSOAPServiceProvider(property)) {
|
||||
return false;
|
||||
List<Relation> relations = RelationshipItemBuilder.getInstance().getItemsRelatedTo(property.getId(),
|
||||
property.getVersion(), RelationshipItemBuilder.JOB_RELATION);
|
||||
for (Relation relation : relations) {
|
||||
if (RelationshipItemBuilder.SERVICES_RELATION.equals(relation.getType())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// for import won't add for exclude option
|
||||
@@ -864,7 +860,7 @@ public class AggregatorPomsHelper {
|
||||
}
|
||||
// codes pom
|
||||
monitor.subTask("Synchronize code poms"); //$NON-NLS-1$
|
||||
updateCodeProjects(monitor, true, true);
|
||||
updateCodeProjects(monitor, true);
|
||||
monitor.worked(1);
|
||||
if (monitor.isCanceled()) {
|
||||
return;
|
||||
@@ -900,7 +896,7 @@ public class AggregatorPomsHelper {
|
||||
}
|
||||
IFile pomFile = getItemPomFolder(item.getProperty()).getFile(TalendMavenConstants.POM_FILE_NAME);
|
||||
// filter esb data service node
|
||||
if (!isSOAPServiceProvider(object.getProperty()) && pomFile.exists()) {
|
||||
if (!isDataServiceOperation(object.getProperty()) && pomFile.exists()) {
|
||||
modules.add(getModulePath(pomFile));
|
||||
}
|
||||
}
|
||||
@@ -941,7 +937,7 @@ public class AggregatorPomsHelper {
|
||||
* @param property
|
||||
* @return
|
||||
*/
|
||||
private static boolean isSOAPServiceProvider(Property property) {
|
||||
private boolean isDataServiceOperation(Property property) {
|
||||
if (property != null) {
|
||||
List<Relation> relations = RelationshipItemBuilder.getInstance().getItemsRelatedTo(property.getId(),
|
||||
property.getVersion(), RelationshipItemBuilder.JOB_RELATION);
|
||||
@@ -950,14 +946,6 @@ public class AggregatorPomsHelper {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IESBService.class)) {
|
||||
IESBService service = GlobalServiceRegister.getDefault().getService(IESBService.class);
|
||||
if (service != null) {
|
||||
if (service.isSOAPServiceProvider(property.getItem())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ public class CodeM2CacheManager {
|
||||
}
|
||||
}
|
||||
|
||||
public static File getCacheFile(String projectTechName, ERepositoryObjectType codeType) {
|
||||
private static File getCacheFile(String projectTechName, ERepositoryObjectType codeType) {
|
||||
String cacheFileName = PomIdsHelper.getProjectGroupId(projectTechName) + "." + codeType.name().toLowerCase() + "-" //$NON-NLS-1$ //$NON-NLS-2$
|
||||
+ PomIdsHelper.getCodesVersion(projectTechName) + ".cache"; // $NON-NLS-1$
|
||||
return new File(MavenPlugin.getMaven().getLocalRepositoryPath(), cacheFileName);
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
// ============================================================================
|
||||
package org.talend.designer.maven.tools.creator;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -47,6 +46,7 @@ import org.talend.core.runtime.maven.MavenArtifact;
|
||||
import org.talend.core.runtime.maven.MavenConstants;
|
||||
import org.talend.core.runtime.maven.MavenUrlHelper;
|
||||
import org.talend.core.runtime.process.LastGenerationInfo;
|
||||
import org.talend.core.runtime.process.TalendProcessArgumentConstant;
|
||||
import org.talend.core.runtime.projectsetting.IProjectSettingTemplateConstants;
|
||||
import org.talend.core.runtime.repository.build.IMavenPomCreator;
|
||||
import org.talend.core.ui.ITestContainerProviderService;
|
||||
@@ -136,15 +136,16 @@ public abstract class AbstractMavenProcessorPom extends CreateMavenBundleTemplat
|
||||
|
||||
Map<ETalendMavenVariables, String> variablesValuesMap = new HashMap<ETalendMavenVariables, String>();
|
||||
// no need check property is null or not, because if null, will get default ids.
|
||||
JobInfo lastMainJob = LastGenerationInfo.getInstance().getLastMainJob();
|
||||
if (JobUtils.isJob(property) && ProcessUtils.isChildRouteProcess(process) && lastMainJob != null) {
|
||||
|
||||
if (JobUtils.isJob(property) && ProcessUtils.isChildRouteProcess(process)) {
|
||||
JobInfo lastMainJob = LastGenerationInfo.getInstance().getLastMainJob();
|
||||
variablesValuesMap.put(ETalendMavenVariables.JobGroupId, PomIdsHelper.getJobGroupId(lastMainJob.getProcessor().getProperty()));
|
||||
variablesValuesMap.put(ETalendMavenVariables.JobVersion, PomIdsHelper.getJobVersion(lastMainJob.getProcessor().getProperty()));
|
||||
}else {
|
||||
variablesValuesMap.put(ETalendMavenVariables.JobGroupId, PomIdsHelper.getJobGroupId(property));
|
||||
variablesValuesMap.put(ETalendMavenVariables.JobVersion, PomIdsHelper.getJobVersion(property));
|
||||
}
|
||||
variablesValuesMap.put(ETalendMavenVariables.JobArtifactId, PomIdsHelper.getJobArtifactId(property));
|
||||
variablesValuesMap.put(ETalendMavenVariables.JobArtifactId, PomIdsHelper.getJobArtifactId(property));
|
||||
variablesValuesMap.put(ETalendMavenVariables.TalendJobVersion, property.getVersion());
|
||||
final String jobName = JavaResourcesHelper.escapeFileName(process.getName());
|
||||
variablesValuesMap.put(ETalendMavenVariables.JobName, jobName);
|
||||
@@ -284,11 +285,6 @@ public abstract class AbstractMavenProcessorPom extends CreateMavenBundleTemplat
|
||||
}
|
||||
|
||||
protected void addCodesDependencies(final List<Dependency> dependencies) {
|
||||
dependencies.addAll(getCodesDependencies());
|
||||
}
|
||||
|
||||
protected List<Dependency> getCodesDependencies() {
|
||||
List<Dependency> dependencies = new ArrayList<Dependency>();
|
||||
String projectTechName = ProjectManager.getInstance().getProject(getJobProcessor().getProperty()).getTechnicalLabel();
|
||||
String codeVersion = PomIdsHelper.getCodesVersion(projectTechName);
|
||||
|
||||
@@ -305,7 +301,6 @@ public abstract class AbstractMavenProcessorPom extends CreateMavenBundleTemplat
|
||||
Dependency beansDependency = PomUtil.createDependency(beansGroupId, beansArtifactId, codeVersion, null);
|
||||
dependencies.add(beansDependency);
|
||||
}
|
||||
return dependencies;
|
||||
}
|
||||
|
||||
protected void addChildrenDependencies(final List<Dependency> dependencies) {
|
||||
@@ -324,18 +319,10 @@ public abstract class AbstractMavenProcessorPom extends CreateMavenBundleTemplat
|
||||
String type = null;
|
||||
if (!jobInfo.isJoblet()) {
|
||||
property = jobInfo.getProcessItem().getProperty();
|
||||
groupId = PomIdsHelper.getJobGroupId(property);
|
||||
artifactId = PomIdsHelper.getJobArtifactId(jobInfo);
|
||||
|
||||
JobInfo lastMainJob = LastGenerationInfo.getInstance().getLastMainJob();
|
||||
if (lastMainJob != null && JobUtils.isJob(jobInfo) && JobUtils.isRoute(getJobProcessor().getProperty())) {
|
||||
groupId = PomIdsHelper.getJobGroupId(lastMainJob.getProcessor().getProperty());
|
||||
version = PomIdsHelper.getJobVersion(lastMainJob.getProcessor().getProperty());
|
||||
} else {
|
||||
groupId = PomIdsHelper.getJobGroupId(property);
|
||||
version = PomIdsHelper.getJobVersion(property);
|
||||
}
|
||||
|
||||
|
||||
version = PomIdsHelper.getJobVersion(property);
|
||||
// try to get the pom version of children job and load from the pom file.
|
||||
String childPomFileName = PomUtil.getPomFileName(jobInfo.getJobName(), jobInfo.getJobVersion());
|
||||
IProject codeProject = getJobProcessor().getCodeProject();
|
||||
|
||||
@@ -647,8 +647,7 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
|
||||
|
||||
List<Dependency> dependencies = new ArrayList<>();
|
||||
// codes
|
||||
List<Dependency> codeDependencies = getCodesDependencies();
|
||||
dependencies.addAll(codeDependencies);
|
||||
addCodesDependencies(dependencies);
|
||||
|
||||
// codes dependencies (optional)
|
||||
ERepositoryObjectType.getAllTypesOfCodes().forEach(t -> dependencies.addAll(PomUtil.getCodesDependencies(t)));
|
||||
@@ -685,7 +684,7 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
|
||||
|| _3rdLibCoordinate.contains(coordinate)) {
|
||||
return;
|
||||
}
|
||||
if (MavenConstants.DEFAULT_LIB_GROUP_ID.equals(groupId) || codeDependencies.contains(d)) {
|
||||
if (MavenConstants.DEFAULT_LIB_GROUP_ID.equals(groupId) || groupId.startsWith(projectGroupId)) {
|
||||
if (!optional) {
|
||||
talendLibCoordinate.add(coordinate);
|
||||
}
|
||||
|
||||
@@ -12,18 +12,16 @@
|
||||
// ============================================================================
|
||||
package org.talend.designer.maven.tools.creator;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.maven.model.Model;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.PluginChecker;
|
||||
import org.talend.core.model.general.ILibrariesService;
|
||||
import org.talend.core.model.general.ModuleNeeded;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.designer.maven.template.MavenTemplateManager;
|
||||
import org.talend.repository.model.IRepositoryService;
|
||||
|
||||
/**
|
||||
* DOC ggu class global comment. Detailled comment
|
||||
@@ -48,18 +46,13 @@ public class CreateMavenRoutinePom extends AbstractMavenCodesTemplatePom {
|
||||
// Set<ModuleNeeded> runningModules = routiensService.getRunningModules();
|
||||
// return runningModules;
|
||||
// }
|
||||
Set<ModuleNeeded> runningModules = new HashSet<>();
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ILibrariesService.class)) {
|
||||
ILibrariesService libService = (ILibrariesService) GlobalServiceRegister.getDefault().getService(
|
||||
ILibrariesService.class);
|
||||
runningModules.addAll(libService.getCodesModuleNeededs(ERepositoryObjectType.ROUTINES));
|
||||
Set<ModuleNeeded> runningModules = libService.getCodesModuleNeededs(ERepositoryObjectType.ROUTINES);
|
||||
return runningModules;
|
||||
}
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRepositoryService.class)) {
|
||||
IRepositoryService repositoryService = GlobalServiceRegister.getDefault().getService(IRepositoryService.class);
|
||||
if (PluginChecker.isBigdataRoutineLoaded() && repositoryService.isProjectLevelLog4j2()) {
|
||||
runningModules.addAll(repositoryService.getLog4j2Modules());
|
||||
}
|
||||
}
|
||||
return runningModules;
|
||||
return Collections.emptySet();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,6 @@ import org.talend.commons.utils.io.FilesUtils;
|
||||
import org.talend.commons.utils.workbench.resources.ResourceUtils;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.ILibraryManagerService;
|
||||
import org.talend.core.PluginChecker;
|
||||
import org.talend.core.model.general.Project;
|
||||
import org.talend.core.model.process.IProcess;
|
||||
import org.talend.core.model.process.JobInfo;
|
||||
@@ -99,12 +98,10 @@ import org.talend.designer.maven.model.TalendJavaProjectConstants;
|
||||
import org.talend.designer.maven.model.TalendMavenConstants;
|
||||
import org.talend.designer.maven.template.MavenTemplateManager;
|
||||
import org.talend.designer.maven.tools.AggregatorPomsHelper;
|
||||
import org.talend.designer.maven.tools.CodeM2CacheManager;
|
||||
import org.talend.designer.maven.tools.ProcessorDependenciesManager;
|
||||
import org.talend.designer.runprocess.IProcessor;
|
||||
import org.talend.designer.runprocess.IRunProcessService;
|
||||
import org.talend.repository.ProjectManager;
|
||||
import org.talend.repository.model.IRepositoryService;
|
||||
import org.talend.utils.xml.XmlUtils;
|
||||
import org.w3c.dom.Attr;
|
||||
import org.w3c.dom.DOMImplementation;
|
||||
@@ -1191,49 +1188,4 @@ public class PomUtil {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
public static void checkExistingLog4j2Dependencies4RoutinePom(String projectTechName, IFile pomFile) {
|
||||
if (!PluginChecker.isBigdataRoutineLoaded()) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRepositoryService.class)) {
|
||||
Model model = MODEL_MANAGER.readMavenModel(pomFile);
|
||||
IRepositoryService service = GlobalServiceRegister.getDefault().getService(IRepositoryService.class);
|
||||
boolean isLog4j2 = service.isProjectLevelLog4j2();
|
||||
Map<String, MavenArtifact> GAVMap = service.getLog4j2Modules().stream()
|
||||
.map(m -> MavenUrlHelper.parseMvnUrl(m.getMavenUri()))
|
||||
.collect(Collectors.toMap(MavenArtifact::getArtifactId, MavenArtifact -> MavenArtifact));
|
||||
long existingDependenciesSize = model.getDependencies().stream()
|
||||
.filter(d -> GAVMap.containsKey(d.getArtifactId())
|
||||
&& GAVMap.get(d.getArtifactId()).getGroupId().equals(d.getGroupId())
|
||||
&& GAVMap.get(d.getArtifactId()).getVersion().equals(d.getVersion()))
|
||||
.count();
|
||||
boolean clean = false;
|
||||
// CAUTION
|
||||
// with this fix, project level log4j2 user can use log4j2 api in routine directly in BD project
|
||||
// user should NEVER manually setup log4j2 in routine dependencies
|
||||
// or else routine install cache could always be cleaned
|
||||
if (isLog4j2 && existingDependenciesSize != GAVMap.size()) {
|
||||
// if project level log4j1 -> log4j2
|
||||
// if first time add log4j2 dependencies
|
||||
// if log4j2 upgrade version
|
||||
// then clean cache to add
|
||||
clean = true;
|
||||
} else if (!isLog4j2 && existingDependenciesSize > 0) {
|
||||
// if project level log4j2 -> log4j1
|
||||
// then clean cache to remove
|
||||
clean = true;
|
||||
}
|
||||
if (clean) {
|
||||
File cacheFile = CodeM2CacheManager.getCacheFile(projectTechName, ERepositoryObjectType.ROUTINES);
|
||||
if (cacheFile.exists()) {
|
||||
cacheFile.delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (CoreException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -96,14 +96,10 @@ public final class TalendCodeProjectUtil {
|
||||
return true;
|
||||
}
|
||||
|
||||
try {
|
||||
// because some cases, the project is not opened.
|
||||
if (!codeProject.isOpen()) {
|
||||
// if not opened, will have exception when check nature or such
|
||||
codeProject.open(monitor);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return true;
|
||||
// because some cases, the project is not opened.
|
||||
if (!codeProject.isOpen()) {
|
||||
// if not opened, will have exception when check nature or such
|
||||
codeProject.open(monitor);
|
||||
}
|
||||
|
||||
codeProject.refreshLocal(IResource.DEPTH_ONE, monitor);
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
<classpathentry exported="true" kind="lib" path="lib/woden-api-1.0M9.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/axiom-api-1.2.13.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/axiom-impl-1.2.13.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/axis2-adb-1.7.9.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/axis2-kernel-1.7.9.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/axis2-transport-http-1.7.9.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/axis2-transport-local-1.7.9.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/axis2-adb-1.6.2.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/axis2-kernel-1.6.2.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/axis2-transport-http-1.6.2.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/axis2-transport-local-1.6.2.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/geronimo-stax-api_1.0_spec-1.0.1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/httpcore-4.0.1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/neethi-3.0.1.jar"/>
|
||||
|
||||
@@ -13,10 +13,10 @@ Require-Bundle: org.eclipse.core.runtime,
|
||||
Bundle-ClassPath: lib/activation-1.1.jar,
|
||||
lib/axiom-api-1.2.13.jar,
|
||||
lib/axiom-impl-1.2.13.jar,
|
||||
lib/axis2-adb-1.7.9.jar,
|
||||
lib/axis2-kernel-1.7.9.jar,
|
||||
lib/axis2-transport-http-1.7.9.jar,
|
||||
lib/axis2-transport-local-1.7.9.jar,
|
||||
lib/axis2-adb-1.6.2.jar,
|
||||
lib/axis2-kernel-1.6.2.jar,
|
||||
lib/axis2-transport-http-1.6.2.jar,
|
||||
lib/axis2-transport-local-1.6.2.jar,
|
||||
lib/geronimo-stax-api_1.0_spec-1.0.1.jar,
|
||||
lib/httpcore-4.0.1.jar,
|
||||
lib/mail-1.4.jar,
|
||||
|
||||
BIN
main/plugins/org.talend.libraries.apache.axis2/lib/axis-p1.jar
Normal file
BIN
main/plugins/org.talend.libraries.apache.axis2/lib/axis-p1.jar
Normal file
Binary file not shown.
BIN
main/plugins/org.talend.libraries.apache.axis2/lib/axis.jar
Normal file
BIN
main/plugins/org.talend.libraries.apache.axis2/lib/axis.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -9,48 +9,4 @@
|
||||
</parent>
|
||||
<artifactId>org.talend.libraries.apache.axis2</artifactId>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>3.0.2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.basedir}/lib</outputDirectory>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.apache.axis2</groupId>
|
||||
<artifactId>axis2-kernel</artifactId>
|
||||
<version>1.7.9</version>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.apache.axis2</groupId>
|
||||
<artifactId>axis2-adb</artifactId>
|
||||
<version>1.7.9</version>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.apache.axis2</groupId>
|
||||
<artifactId>axis2-transport-http</artifactId>
|
||||
<version>1.7.9</version>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.apache.axis2</groupId>
|
||||
<artifactId>axis2-transport-local</artifactId>
|
||||
<version>1.7.9</version>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/commons-digester-2.1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/commons-cli-2.0-SNAPSHOT.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/commons-codec-1.15.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/commons-codec-1.6.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/commons-text-1.1.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
||||
@@ -4,7 +4,7 @@ Bundle-Name: Common
|
||||
Bundle-SymbolicName: org.talend.libraries.apache.common
|
||||
Bundle-Version: 7.4.1.qualifier
|
||||
Bundle-ClassPath: .,
|
||||
lib/commons-codec-1.15.jar,
|
||||
lib/commons-codec-1.6.jar,
|
||||
lib/commons-cli-2.0-SNAPSHOT.jar,
|
||||
lib/commons-digester-2.1.jar,
|
||||
lib/commons-math3-3.3.jar,
|
||||
@@ -44,7 +44,6 @@ Export-Package: org.apache.commons.cli2,
|
||||
org.apache.commons.math3.stat.descriptive;version="3.3.0",
|
||||
org.apache.commons.math3.stat.descriptive.rank;version="3.3.0",
|
||||
org.apache.commons.math3.util;version="3.3.0",
|
||||
org.apache.commons.text,
|
||||
org.apache.commons.text.similarity,
|
||||
org.apache.commons.validator;version="1.5.1",
|
||||
org.apache.commons.validator.routines;version="1.5.1"
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<artifactItem>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>1.15</version>
|
||||
<version>1.6</version>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>commons-digester</groupId>
|
||||
@@ -58,11 +58,6 @@
|
||||
<artifactId>commons-pool2</artifactId>
|
||||
<version>2.4.2</version>
|
||||
</artifactItem>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.4</version>
|
||||
</dependency>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
Binary file not shown.
@@ -3,6 +3,7 @@
|
||||
<classpathentry exported="true" kind="lib" path="lib/xml-apis.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/ant.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/apache-mime4j-0.6.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/castor-1.0.3.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/jakarta-oro-2.0.8.jar"/>
|
||||
|
||||
@@ -4,6 +4,7 @@ Bundle-Name: Apache Plug-in
|
||||
Bundle-SymbolicName: org.talend.libraries.apache
|
||||
Bundle-Version: 7.4.1.qualifier
|
||||
Bundle-ClassPath: .,
|
||||
lib/ant.jar,
|
||||
lib/apache-mime4j-0.6.jar,
|
||||
lib/castor-1.0.3.jar,
|
||||
lib/jakarta-oro-2.0.8.jar,
|
||||
@@ -40,6 +41,11 @@ Export-Package:
|
||||
org.apache.oro.text.perl,
|
||||
org.apache.oro.text.regex,
|
||||
org.apache.oro.util,
|
||||
org.apache.tools.ant,
|
||||
org.apache.tools.bzip2,
|
||||
org.apache.tools.mail,
|
||||
org.apache.tools.tar,
|
||||
org.apache.tools.zip,
|
||||
org.apache.xmlbeans,
|
||||
org.apache.xmlbeans.impl.common,
|
||||
org.apache.xmlbeans.impl.config,
|
||||
|
||||
BIN
main/plugins/org.talend.libraries.apache/lib/ant.jar
Normal file
BIN
main/plugins/org.talend.libraries.apache/lib/ant.jar
Normal file
Binary file not shown.
@@ -73,16 +73,6 @@
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.tycho</groupId>
|
||||
<artifactId>target-platform-configuration</artifactId>
|
||||
<version>${tycho.version}</version>
|
||||
<configuration>
|
||||
<dependency-resolution>
|
||||
<optionalDependencies>ignore</optionalDependencies>
|
||||
</dependency-resolution>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
@@ -98,7 +88,6 @@
|
||||
<excludeTypes>pom</excludeTypes>
|
||||
<excludeTransitive>true</excludeTransitive>
|
||||
<outputDirectory>${project.basedir}/lib</outputDirectory>
|
||||
<includeGroupIds>log4j,org.slf4j,org.apache.logging.log4j</includeGroupIds>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry exported="true" kind="lib" path="lib/h2-1.4.198.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/h2-1.3.160.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
||||
@@ -4,7 +4,7 @@ Bundle-Name: H2
|
||||
Bundle-SymbolicName: org.talend.libraries.jdbc.h2
|
||||
Bundle-Version: 7.4.1.qualifier
|
||||
Bundle-ClassPath: .,
|
||||
lib/h2-1.4.198.jar
|
||||
lib/h2-1.3.160.jar
|
||||
Export-Package: org.h2,
|
||||
org.h2.api;uses:="org.h2.command.ddl,org.h2.table",
|
||||
org.h2.bnf;uses:="org.h2.server.web",
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
lib/h2-1.4.198.jar
|
||||
lib/h2-1.3.160.jar,\
|
||||
lib/h2-1.2.139.jar,\
|
||||
lib/h2-1.2.132.jar
|
||||
|
||||
BIN
main/plugins/org.talend.libraries.jdbc.h2/lib/h2-1.2.132.jar
Normal file
BIN
main/plugins/org.talend.libraries.jdbc.h2/lib/h2-1.2.132.jar
Normal file
Binary file not shown.
BIN
main/plugins/org.talend.libraries.jdbc.h2/lib/h2-1.2.139.jar
Normal file
BIN
main/plugins/org.talend.libraries.jdbc.h2/lib/h2-1.2.139.jar
Normal file
Binary file not shown.
BIN
main/plugins/org.talend.libraries.jdbc.h2/lib/h2-1.3.160.jar
Normal file
BIN
main/plugins/org.talend.libraries.jdbc.h2/lib/h2-1.3.160.jar
Normal file
Binary file not shown.
@@ -9,32 +9,4 @@
|
||||
</parent>
|
||||
<artifactId>org.talend.libraries.jdbc.h2</artifactId>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-dependencies</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.basedir}/lib</outputDirectory>
|
||||
<excludeTransitive>true</excludeTransitive>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>1.4.198</version>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
||||
@@ -902,7 +902,6 @@ public class ConfigModuleDialog extends TitleAreaDialog implements IConfigModule
|
||||
MavenArtifact art = data.get(this.searchResultCombo.getSelectionIndex());
|
||||
defaultURIValue = MavenUrlHelper.generateMvnUrl(art);
|
||||
defaultUriTxt.setText(defaultURIValue);
|
||||
customUriText.setText(defaultURIValue);
|
||||
}
|
||||
}
|
||||
useCustomBtn.setSelection(false);
|
||||
@@ -933,7 +932,7 @@ public class ConfigModuleDialog extends TitleAreaDialog implements IConfigModule
|
||||
}
|
||||
}
|
||||
defaultUriTxt.setText(defaultUri);
|
||||
customUriText.setText(defaultUri);
|
||||
customUriText.setText(ModuleMavenURIUtils.MVNURI_TEMPLET);
|
||||
if (!org.apache.commons.lang3.StringUtils.isEmpty(detectUri)
|
||||
&& !ConfigModuleHelper.isSameUri(defaultUri, detectUri)) {
|
||||
customUriText.setText(detectUri);
|
||||
|
||||
@@ -13,9 +13,6 @@
|
||||
package routines.system;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public final class BundleUtils {
|
||||
|
||||
@@ -78,31 +75,6 @@ public final class BundleUtils {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static <T> Map<String, T> getServices(List<?> serviceReferences, Class<T> serviceClass ) {
|
||||
|
||||
Map<String, T> services = new HashMap<String, T>();
|
||||
|
||||
if (BUNDLE == null || SERVICE_REFERENCE_CLASS == null ) {
|
||||
return services;
|
||||
}
|
||||
|
||||
try {
|
||||
for (Object serviceRef : serviceReferences) {
|
||||
Object serviceId = serviceRef.getClass().getMethod("getProperty",
|
||||
java.lang.String.class).invoke(serviceRef, "osgi.jndi.service.name");
|
||||
Method getBundleContext = BUNDLE.getClass().getMethod("getBundleContext");
|
||||
Object context = getBundleContext.invoke(BUNDLE);
|
||||
Class<?> ctxClass = context.getClass();
|
||||
Method getService = ctxClass.getMethod("getService", SERVICE_REFERENCE_CLASS);
|
||||
services.put(serviceId.toString(), serviceClass.cast(getService.invoke(context, serviceRef)));
|
||||
}
|
||||
return services;
|
||||
} catch (Exception e) {
|
||||
return services;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static boolean inOSGi() {
|
||||
return BUNDLE != null;
|
||||
|
||||
@@ -146,9 +146,6 @@ public class ModulesNeededProvider {
|
||||
}
|
||||
}
|
||||
|
||||
private static volatile boolean installModuleForRountine = false;
|
||||
private static Set<ModuleNeeded> modulesForRountine = new HashSet<ModuleNeeded>();
|
||||
|
||||
public static Set<ModuleNeeded> getModulesNeeded() {
|
||||
if (componentImportNeedsList.isEmpty()) {
|
||||
componentImportNeedsList.addAll(getRunningModules());
|
||||
@@ -717,9 +714,12 @@ public class ModulesNeededProvider {
|
||||
isRequired);
|
||||
toAdd.setMavenUri(currentImport.getMVN());
|
||||
if (!isRequired) {
|
||||
if ("BeanItem".equals(routine.eClass().getName()) || "RoutineItem".equals(routine.eClass().getName())) {
|
||||
if ("BeanItem".equals(routine.eClass().getName())) {
|
||||
toAdd.getExtraAttributes().put("IS_OSGI_EXCLUDED", Boolean.TRUE);
|
||||
}
|
||||
if ("RoutineItem".equals(routine.eClass().getName())) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// toAdd.setStatus(ELibraryInstallStatus.INSTALLED);
|
||||
importNeedsList.add(toAdd);
|
||||
@@ -747,14 +747,6 @@ public class ModulesNeededProvider {
|
||||
CommonExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
if (!importNeedsList.isEmpty()) {
|
||||
for (ModuleNeeded mod : importNeedsList) {
|
||||
if (ELibraryInstallStatus.INSTALLED != mod.getStatus()) {
|
||||
installModuleForRountine = true;
|
||||
}
|
||||
}
|
||||
modulesForRountine.addAll(importNeedsList);
|
||||
}
|
||||
return importNeedsList;
|
||||
}
|
||||
|
||||
@@ -784,11 +776,6 @@ public class ModulesNeededProvider {
|
||||
if (System.getProperty("java.version") != null && System.getProperty("java.version").startsWith("11")) {
|
||||
getModulesNeededForRoutesJava11();
|
||||
}
|
||||
for (ModuleNeeded mod : importNeedsListForRoutes) {
|
||||
if (ELibraryInstallStatus.INSTALLED != mod.getStatus()) {
|
||||
installModuleForRountine = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return importNeedsListForRoutes;
|
||||
}
|
||||
@@ -1151,25 +1138,4 @@ public class ModulesNeededProvider {
|
||||
}
|
||||
return mvnPath;
|
||||
}
|
||||
|
||||
public static boolean installModuleForRoutineOrBeans() {
|
||||
return installModuleForRountine;
|
||||
}
|
||||
|
||||
public static void setInstallModuleForRoutineOrBeans() {
|
||||
boolean allSet = true;
|
||||
for (ModuleNeeded mod : modulesForRountine) {
|
||||
if (ELibraryInstallStatus.INSTALLED != mod.getStatus()) {
|
||||
allSet = false;
|
||||
}
|
||||
}
|
||||
for (ModuleNeeded mod : getModulesNeededForBeans()) {
|
||||
if (ELibraryInstallStatus.INSTALLED != mod.getStatus()) {
|
||||
allSet = false;
|
||||
}
|
||||
}
|
||||
if (allSet) {
|
||||
installModuleForRountine = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import org.eclipse.core.resources.IFolder;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.resources.IWorkspaceRunnable;
|
||||
import org.eclipse.core.runtime.Assert;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
@@ -60,10 +61,25 @@ public class CustomUriManager {
|
||||
private final Object reloadingLock = new Object();
|
||||
|
||||
private CustomUriManager() {
|
||||
IFolder resourcePath = getResourcePath();
|
||||
try {
|
||||
customURIObject = loadResources(getResourcePath(), RepositoryConstants.PROJECT_SETTINGS_CUSTOM_URI_MAP);
|
||||
Assert.isNotNull(resourcePath);
|
||||
customURIObject = loadResources(resourcePath, RepositoryConstants.PROJECT_SETTINGS_CUSTOM_URI_MAP);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
try {
|
||||
if (resourcePath != null) {
|
||||
customURIObject = loadResources(resourcePath.getLocation().toPortableString(),
|
||||
RepositoryConstants.PROJECT_SETTINGS_CUSTOM_URI_MAP);
|
||||
}
|
||||
} catch (Exception e1) {
|
||||
ExceptionHandler.process(e1);
|
||||
|
||||
/**
|
||||
* Seems dangrous to load an empty json here, because it may overwrite the existing one
|
||||
*/
|
||||
// customURIObject = new JSONObject();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,10 +279,14 @@ public class CustomUriManager {
|
||||
|
||||
public void reloadCustomMapping() {
|
||||
try {
|
||||
if (isNeedReload) {
|
||||
if (isNeedReload || customURIObject == null) {
|
||||
synchronized (reloadingLock) {
|
||||
if (isNeedReload) {
|
||||
customURIObject.clear();
|
||||
if (isNeedReload || customURIObject == null) {
|
||||
if (customURIObject == null) {
|
||||
customURIObject = new JSONObject();
|
||||
} else {
|
||||
customURIObject.clear();
|
||||
}
|
||||
JSONObject loadResources = loadResources(getResourcePath(),
|
||||
RepositoryConstants.PROJECT_SETTINGS_CUSTOM_URI_MAP);
|
||||
customURIObject.putAll(loadResources);
|
||||
|
||||
@@ -1399,25 +1399,23 @@ public class LocalLibraryManager implements ILibraryManagerService, IChangedLibr
|
||||
ArtifactRepositoryBean customNexusServer = TalendLibsServerManager.getInstance().getCustomNexusServer();
|
||||
IRepositoryArtifactHandler customerRepHandler = RepositoryArtifactHandlerManager
|
||||
.getRepositoryHandler(customNexusServer);
|
||||
if (customerRepHandler != null) {
|
||||
List<MavenArtifact> snapshotResult = new ArrayList<>();
|
||||
List<MavenArtifact> releaseResult = new ArrayList<>();
|
||||
try {
|
||||
snapshotResult = customerRepHandler.search(MavenConstants.DEFAULT_LIB_GROUP_ID, null, null, false, true);
|
||||
if (snapshotResult != null) {
|
||||
for (MavenArtifact result : snapshotResult) {
|
||||
ShareLibrariesUtil.putArtifactToMap(result, snapshotArtifactMap, true);
|
||||
}
|
||||
List<MavenArtifact> snapshotResult = new ArrayList<>();
|
||||
List<MavenArtifact> releaseResult = new ArrayList<>();
|
||||
try {
|
||||
snapshotResult = customerRepHandler.search(MavenConstants.DEFAULT_LIB_GROUP_ID, null, null, false, true);
|
||||
if (snapshotResult != null) {
|
||||
for (MavenArtifact result : snapshotResult) {
|
||||
ShareLibrariesUtil.putArtifactToMap(result, snapshotArtifactMap, true);
|
||||
}
|
||||
releaseResult = customerRepHandler.search(MavenConstants.DEFAULT_LIB_GROUP_ID, null, null, true, false);
|
||||
if (releaseResult != null) {
|
||||
for (MavenArtifact result : releaseResult) {
|
||||
ShareLibrariesUtil.putArtifactToMap(result, releaseArtifactMap, false);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
releaseResult = customerRepHandler.search(MavenConstants.DEFAULT_LIB_GROUP_ID, null, null, true, false);
|
||||
if (releaseResult != null) {
|
||||
for (MavenArtifact result : releaseResult) {
|
||||
ShareLibrariesUtil.putArtifactToMap(result, releaseArtifactMap, false);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
for(File exsitFile:needToDeploy) {
|
||||
if (customerRepHandler != null) {
|
||||
|
||||
@@ -703,7 +703,7 @@ public final class ConnectionContextHelper {
|
||||
Set<String> addedVars = tempVars;
|
||||
|
||||
if (addedVars != null && !addedVars.isEmpty()
|
||||
&& (isGeneric || !isAddContextVar(contextItem, process.getContextManager(), neededVars, true))) {
|
||||
&& (isGeneric || !isAddContextVar(contextItem, process.getContextManager(), neededVars))) {
|
||||
AtomicBoolean added = new AtomicBoolean();
|
||||
if (ignoreContextMode) {
|
||||
addContextVarForJob(process, contextItem, addedVars);
|
||||
@@ -1591,13 +1591,7 @@ public final class ConnectionContextHelper {
|
||||
}
|
||||
|
||||
public static boolean isAddContextVar(ContextItem contextItem, IContextManager contextManager, Set<String> neededVars) {
|
||||
return isAddContextVar(contextItem, contextManager, neededVars, false);
|
||||
}
|
||||
|
||||
public static boolean isAddContextVar(ContextItem contextItem, IContextManager contextManager, Set<String> neededVars,
|
||||
boolean checkByDefault) {
|
||||
boolean isAdd = true;
|
||||
boolean foundGroup = false;
|
||||
Set<String> addedVars = new HashSet<String>();
|
||||
for (IContext context : contextManager.getListContext()) {
|
||||
ContextType contextType = null;
|
||||
@@ -1605,7 +1599,6 @@ public final class ConnectionContextHelper {
|
||||
for (ContextType contye : contextTypeList) {
|
||||
if (context.getName() != null && contye.getName().equalsIgnoreCase(context.getName())) {
|
||||
contextType = contye;
|
||||
foundGroup = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1622,26 +1615,6 @@ public final class ConnectionContextHelper {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// if not found might different groups, check from default context if duplicate var
|
||||
if (checkByDefault && !foundGroup) {
|
||||
IContext jobDefaultContext = contextManager.getDefaultContext();
|
||||
String itemDefaultContextName = contextItem.getDefaultContext();
|
||||
List<ContextType> contextTypeList = contextItem.getContext();
|
||||
ContextType itemDefaultContext = ContextUtils.getContextTypeByName(contextTypeList, itemDefaultContextName);
|
||||
if (itemDefaultContext != null) {
|
||||
for (String var : neededVars) {
|
||||
if (jobDefaultContext.getContextParameter(var) != null) {
|
||||
continue;
|
||||
}
|
||||
ContextParameterType param = ContextUtils.getContextParameterTypeByName(itemDefaultContext, var);
|
||||
if (param != null) {
|
||||
addedVars.add(var);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (addedVars != null && !addedVars.isEmpty()) {
|
||||
isAdd = false;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,6 @@ import org.talend.core.model.general.Project;
|
||||
import org.talend.core.model.metadata.MappingTypeRetriever;
|
||||
import org.talend.core.model.metadata.MetadataTalendType;
|
||||
import org.talend.core.model.metadata.types.JavaDataTypeHelper;
|
||||
import org.talend.core.runtime.util.SharedStudioUtils;
|
||||
import org.talend.datatools.xml.utils.ATreeNode;
|
||||
import org.talend.datatools.xml.utils.NodeCreationObserver;
|
||||
import org.talend.datatools.xml.utils.OdaException;
|
||||
@@ -1076,7 +1075,7 @@ public class TreeUtil {
|
||||
|
||||
private static String copyToTempFile(URL url, String fileName) {
|
||||
try {
|
||||
IPath tempPath = SharedStudioUtils.getTempFolderPath();
|
||||
IPath tempPath = new Path(System.getProperty("user.dir")).append("temp"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
File tempFile = tempPath.toFile();
|
||||
if (!tempFile.exists()) {
|
||||
tempFile.mkdirs();
|
||||
|
||||
@@ -22,7 +22,6 @@ import java.util.Comparator;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
@@ -770,9 +769,13 @@ public class MigrationToolService implements IMigrationToolService {
|
||||
*/
|
||||
@Override
|
||||
public void initNewProjectTasks(Project project) {
|
||||
List<MigrationTask> done = new LinkedList<>();
|
||||
Optional.ofNullable(GetTasksHelper.getMigrationTasks(true)).ifPresent(tasks -> done.addAll(tasks));
|
||||
Optional.ofNullable(GetTasksHelper.getMigrationTasks(false)).ifPresent(tasks -> done.addAll(tasks));
|
||||
List<IProjectMigrationTask> toExecute = GetTasksHelper.getProjectTasks(true);
|
||||
toExecute.addAll(GetTasksHelper.getProjectTasks(false));
|
||||
List<MigrationTask> done = new ArrayList<MigrationTask>();
|
||||
|
||||
for (IProjectMigrationTask task : toExecute) {
|
||||
done.add(MigrationUtil.convertMigrationTask(task));
|
||||
}
|
||||
|
||||
project.getEmfProject().setItemsRelationVersion(RelationshipItemBuilder.INDEX_VERSION);
|
||||
saveProjectMigrationTasksDone(project, done);
|
||||
|
||||
@@ -23,8 +23,6 @@ import org.talend.commons.ui.runtime.exception.ExceptionHandler;
|
||||
import org.talend.commons.utils.workbench.extensions.ExtensionImplementationProvider;
|
||||
import org.talend.commons.utils.workbench.extensions.ExtensionPointLimiterImpl;
|
||||
import org.talend.commons.utils.workbench.extensions.IExtensionPointLimiter;
|
||||
import org.talend.core.model.properties.MigrationTask;
|
||||
import org.talend.core.model.utils.MigrationUtil;
|
||||
import org.talend.migration.IProjectMigrationTask;
|
||||
import org.talend.migration.IWorkspaceMigrationTask;
|
||||
|
||||
@@ -108,34 +106,6 @@ public class GetTasksHelper {
|
||||
return migrationsInstances.get(taskId);
|
||||
}
|
||||
|
||||
public static List<MigrationTask> getMigrationTasks(final boolean beforeLogon) {
|
||||
IExtensionPointLimiter actionExtensionPoint = new ExtensionPointLimiterImpl("org.talend.core.migrationTask", //$NON-NLS-1$
|
||||
"projecttask"); //$NON-NLS-1$
|
||||
|
||||
ExtensionImplementationProvider<MigrationTask> provider = new ExtensionImplementationProvider<MigrationTask>(
|
||||
actionExtensionPoint) {
|
||||
|
||||
@Override
|
||||
protected MigrationTask createImplementation(IExtension extension, IExtensionPointLimiter extensionPointLimiter,
|
||||
IConfigurationElement configurationElement) {
|
||||
try {
|
||||
if (new Boolean(configurationElement.getAttribute("beforeLogon")) == beforeLogon) { //$NON-NLS-1$
|
||||
String id = configurationElement.getAttribute("id"); //$NON-NLS-1$
|
||||
String version = configurationElement.getAttribute("version"); //$NON-NLS-1$
|
||||
String breaks = configurationElement.getAttribute("breaks"); //$NON-NLS-1$
|
||||
return MigrationUtil.createMigrationTask(id, version, breaks, MigrationUtil.DEFAULT_STATUS);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
return provider.createInstances();
|
||||
}
|
||||
|
||||
public static List<IProjectMigrationTask> getProjectTasks(final boolean beforeLogon) {
|
||||
IExtensionPointLimiter actionExtensionPoint = new ExtensionPointLimiterImpl(
|
||||
"org.talend.core.migrationTask", "projecttask"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
@@ -178,7 +178,7 @@ public class Application implements IApplication {
|
||||
if (!SharedStudioUtils.isSharedStudioMode()) {
|
||||
needRelaunch = installLocalPatches();
|
||||
} else {
|
||||
needRelaunch = SharedStudioUtils.isNeedCleanOnSharedMode();
|
||||
needRelaunch = SharedStudioUtils.installedPatch();
|
||||
}
|
||||
if (needRelaunch) {
|
||||
setRelaunchData();
|
||||
|
||||
@@ -158,7 +158,6 @@ import org.talend.core.repository.model.FolderHelper;
|
||||
import org.talend.core.repository.model.ILocalRepositoryFactory;
|
||||
import org.talend.core.repository.model.ILockBean;
|
||||
import org.talend.core.repository.model.ProjectRepositoryNode;
|
||||
import org.talend.core.repository.model.PropertiesProjectResourceImpl;
|
||||
import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.core.repository.model.VersionList;
|
||||
import org.talend.core.repository.recyclebin.RecycleBinManager;
|
||||
@@ -2068,9 +2067,6 @@ public class LocalRepositoryFactory extends AbstractEMFRepositoryFactory impleme
|
||||
if (re == null) {
|
||||
continue;
|
||||
}
|
||||
if (re instanceof PropertiesProjectResourceImpl) {
|
||||
continue;
|
||||
}
|
||||
EcoreUtil.resolveAll(re);
|
||||
needSaves.add(re);
|
||||
}
|
||||
|
||||
@@ -49,7 +49,6 @@ import org.talend.datatools.xml.utils.ATreeNode;
|
||||
import org.talend.metadata.managment.ui.utils.ConnectionContextHelper;
|
||||
import org.talend.metadata.managment.ui.wizard.RepositoryWizard;
|
||||
import org.talend.repository.mdm.i18n.Messages;
|
||||
import org.talend.repository.mdm.util.MDMUtil;
|
||||
import org.talend.repository.model.IProxyRepositoryFactory;
|
||||
import org.talend.repository.model.IRepositoryService;
|
||||
import org.talend.repository.model.RepositoryNode;
|
||||
@@ -244,8 +243,9 @@ public class CreateConceptWizard extends RepositoryWizard implements INewWizard
|
||||
success = true;
|
||||
}
|
||||
|
||||
File sasDir = MDMUtil.getTempTemplateXSDFile().getParentFile();
|
||||
if (sasDir != null && sasDir.exists()) {
|
||||
IPath sasPath = new Path(System.getProperty("user.dir")).append("temp");//$NON-NLS-1$ //$NON-NLS-2$
|
||||
File sasDir = sasPath.toFile();
|
||||
if (sasDir.exists()) {
|
||||
delete(sasDir);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,6 @@ import org.eclipse.xsd.impl.XSDSchemaImpl;
|
||||
import org.talend.core.model.metadata.builder.connection.Concept;
|
||||
import org.talend.core.model.metadata.builder.connection.MDMConnection;
|
||||
import org.talend.core.model.metadata.builder.connection.MetadataTable;
|
||||
import org.talend.core.runtime.util.SharedStudioUtils;
|
||||
import org.talend.metadata.managment.mdm.AbsMdmConnectionHelper;
|
||||
import org.talend.metadata.managment.mdm.S60MdmConnectionHelper;
|
||||
import org.talend.utils.xml.XmlUtils;
|
||||
@@ -96,7 +95,7 @@ public class MDMUtil {
|
||||
}
|
||||
|
||||
public static File getTempTemplateXSDFile() {
|
||||
IPath tempPath = SharedStudioUtils.getTempFolderPath();
|
||||
IPath tempPath = new Path(System.getProperty("user.dir")).append("temp"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
File tempFile = tempPath.toFile();
|
||||
if (!tempFile.exists()) {
|
||||
tempFile.mkdirs();
|
||||
|
||||
@@ -201,8 +201,8 @@ SHOW_IF="USE_FILE_AMBIGUOUS=='true'">
|
||||
<CODEGENERATION>
|
||||
<IMPORTS>
|
||||
<IMPORT NAME="Talen File Enhanced"
|
||||
MODULE="talend_file_enhanced-1.1.jar"
|
||||
MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.1" REQUIRED="true" />
|
||||
MODULE="talend_file_enhanced-1.0.jar"
|
||||
MVN="mvn:org.talend.components.lib/talend_file_enhanced/1.0" REQUIRED="true" />
|
||||
<IMPORT NAME="Talend_CSV" MODULE="talendcsv.jar"
|
||||
MVN="mvn:org.talend.libraries/talendcsv/6.0.0"
|
||||
REQUIRED="true" />
|
||||
@@ -213,4 +213,4 @@ SHOW_IF="USE_FILE_AMBIGUOUS=='true'">
|
||||
<RETURN NAME="NB_LINE" TYPE="id_Integer" AVAILABILITY="AFTER" />
|
||||
</RETURNS>
|
||||
|
||||
</COMPONENT>
|
||||
</COMPONENT>
|
||||
@@ -93,6 +93,5 @@ ITaCoKitUpdateService.exception.notFound=Can't find service: {0}.
|
||||
P2ExtraFeature.progress.unzipPatch=Unzipping patches...
|
||||
|
||||
ShowWizardHandler.exception.commandNotFound=Command not found: [{0}]
|
||||
ShowWizardHandler.warning.notSupportedTitle=Cannot install new features in shared mode
|
||||
ShowWizardHandler.warning.notSupportedMsg=You cannot install new features in the shared mode for Talend Studio. Disable the shared mode to install the feature.
|
||||
|
||||
UIUtils.exception.interrupt=User cancelled.
|
||||
|
||||
@@ -131,16 +131,6 @@ public class SharedStudioPatchInfoProvider {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean updateArtifactsFileSha256Hex(String artifactsFileSha256Hex) {
|
||||
String savedCode = installedPatchInfo.getLastArtifactsFileSha256Hex();
|
||||
if (!StringUtils.equals(savedCode, artifactsFileSha256Hex)) {
|
||||
installedPatchInfo.setLastArtifactsFileSha256Hex(artifactsFileSha256Hex);
|
||||
saveData();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void loadData() {
|
||||
TypeReference<InstalledPatchInfo> typeReference = new TypeReference<InstalledPatchInfo>() {
|
||||
@@ -175,10 +165,6 @@ class InstalledPatchInfo {
|
||||
|
||||
@JsonProperty("installedPatch")
|
||||
private List<InstalledPatch> installedPatchList = new ArrayList<InstalledPatch>();
|
||||
|
||||
@JsonInclude(Include.NON_DEFAULT)
|
||||
@JsonProperty("lastArtifactsFileSha256Hex")
|
||||
private String lastArtifactsFileSha256Hex;
|
||||
|
||||
public List<InstalledPatch> getInstalledPatchList() {
|
||||
return installedPatchList;
|
||||
@@ -187,14 +173,6 @@ class InstalledPatchInfo {
|
||||
public void setInstalledPatchList(List<InstalledPatch> installedPatchList) {
|
||||
this.installedPatchList = installedPatchList;
|
||||
}
|
||||
|
||||
public String getLastArtifactsFileSha256Hex() {
|
||||
return lastArtifactsFileSha256Hex;
|
||||
}
|
||||
|
||||
public void setLastArtifactsFileSha256Hex(String lastArtifactsFileSha256Hex) {
|
||||
this.lastArtifactsFileSha256Hex = lastArtifactsFileSha256Hex;
|
||||
}
|
||||
}
|
||||
|
||||
class InstalledPatch {
|
||||
|
||||
@@ -141,10 +141,5 @@ public class UpdateService implements IUpdateService {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateArtifactsFileSha256Hex(IProgressMonitor monitor, String studioArtifactsFileShaCodeHex) {
|
||||
return SharedStudioPatchInfoProvider.getInstance().updateArtifactsFileSha256Hex(studioArtifactsFileShaCodeHex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,21 +7,15 @@ import org.eclipse.core.commands.AbstractHandler;
|
||||
import org.eclipse.core.commands.Command;
|
||||
import org.eclipse.core.commands.ExecutionEvent;
|
||||
import org.eclipse.core.commands.ExecutionException;
|
||||
import org.eclipse.jface.dialogs.MessageDialog;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.ui.handlers.HandlerUtil;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.core.runtime.util.SharedStudioUtils;
|
||||
import org.talend.updates.runtime.i18n.Messages;
|
||||
import org.talend.updates.runtime.model.ExtraFeature;
|
||||
|
||||
public class ShowWizardHandler extends AbstractHandler {
|
||||
|
||||
public static final String CMD_ID_ADDITIONAL_PACKAGES = "org.talend.updates.show.wizard.command"; //$NON-NLS-1$
|
||||
|
||||
private static final String COMMAND_TYPE_NAME = "type";
|
||||
|
||||
private static final String COMMAND_TYPE_FEATURE_VALUE = "feature";
|
||||
|
||||
public static final Object showWizardLock = new Object();
|
||||
|
||||
@@ -35,7 +29,6 @@ public class ShowWizardHandler extends AbstractHandler {
|
||||
Shell activeShell = HandlerUtil.getActiveShell(event);
|
||||
|
||||
String cmdId = CMD_ID_ADDITIONAL_PACKAGES;
|
||||
boolean withFeature = false;
|
||||
if (event != null) {
|
||||
Command command = event.getCommand();
|
||||
if (command != null) {
|
||||
@@ -44,17 +37,10 @@ public class ShowWizardHandler extends AbstractHandler {
|
||||
cmdId = id;
|
||||
}
|
||||
}
|
||||
if (COMMAND_TYPE_FEATURE_VALUE.equals(event.getParameter(COMMAND_TYPE_NAME))) {
|
||||
withFeature = true;
|
||||
}
|
||||
}
|
||||
switch (cmdId) {
|
||||
case CMD_ID_ADDITIONAL_PACKAGES:
|
||||
if (SharedStudioUtils.isSharedStudioMode() && withFeature) {
|
||||
MessageDialog.openWarning(activeShell, Messages.getString("ShowWizardHandler.warning.notSupportedTitle"), Messages.getString("ShowWizardHandler.warning.notSupportedMsg"));
|
||||
} else {
|
||||
showUpdateWizard(activeShell, null);
|
||||
}
|
||||
showUpdateWizard(activeShell, null);
|
||||
break;
|
||||
default:
|
||||
ExceptionHandler.process(new Exception(Messages.getString("ShowWizardHandler.exception.commandNotFound"))); //$NON-NLS-1$
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
// ============================================================================
|
||||
package org.talend.core.model.general;
|
||||
|
||||
import static org.junit.Assert.fail;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -122,12 +122,12 @@ public class ModuleNeededTest {
|
||||
@Test
|
||||
public void testGetStatus1() throws URISyntaxException, IOException {
|
||||
// test jar installed in platform
|
||||
String mavenURI = "mvn:org.talend.libraries/hadoop-conf-kerberos/6.0.0/jar";
|
||||
String customURI = "mvn:org.talend.libraries/hadoop-conf-kerberos-1.2.1/6.0.0/jar";
|
||||
String platformURL = "platform:/plugin/org.talend.libraries.hadoop/lib/hadoop-conf-kerberos.jar";
|
||||
String mavenURI = "mvn:org.talend.libraries/hadoop-core-1.0.0/6.0.0/jar";
|
||||
String customURI = "mvn:org.talend.libraries/hadoop-core/6.0.0/jar";
|
||||
String platformURL = "platform:/plugin/org.talend.libraries.hadoop/lib/hadoop-core-1.0.0.jar";
|
||||
ILibraryManagerService libService = GlobalServiceRegister.getDefault().getService(
|
||||
ILibraryManagerService.class);
|
||||
ModuleNeeded module1 = new ModuleNeeded("", "hadoop-conf-kerberos.jar", "description", false, null, null,
|
||||
ModuleNeeded module1 = new ModuleNeeded("", "hadoop-core-1.0.0.jar", "description", false, null, null,
|
||||
mavenURI);
|
||||
module1.setModuleLocaion(platformURL);
|
||||
if (ELibraryInstallStatus.NOT_INSTALLED == module1.getStatus() || !libService.checkJarInstalledFromPlatform(platformURL)) {
|
||||
|
||||
@@ -63,7 +63,7 @@ public class PostgreQueryGeneratorTest {
|
||||
StringBuilder expectSql = new StringBuilder();
|
||||
expectSql
|
||||
.append(TalendTextUtils.getQuoteChar())
|
||||
.append("SELECT \n \\\"myschema\\\".\\\"mytable\\\".\\\"newColumn\\\"\nFROM \\\"myschema\\\".\\\"mytable\\\"")
|
||||
.append("SELECT \n \\\"talend\\\".\\\"myschema\\\".\\\"mytable\\\".\\\"newColumn\\\"\nFROM \\\"talend\\\".\\\"myschema\\\".\\\"mytable\\\"")
|
||||
.append(TalendTextUtils.getQuoteChar());
|
||||
|
||||
assertNotNull(resultString);
|
||||
|
||||
@@ -37,14 +37,14 @@ public class CreateMavenJobPomTest {
|
||||
@Test
|
||||
public void testNormalizeSpaces() throws Exception {
|
||||
String inputSh = "#!/bin/sh\n" + "cd `dirname $0`\n" + "ROOT_PATH=`pwd`\n"
|
||||
+ "java -Dtalend.component.manager.m2.repository=$ROOT_PATH/../lib -cp .:$ROOT_PATH:$ROOT_PATH/../lib/routines.jar:$ROOT_PATH/../lib/log4j-slf4j-impl-2.12.1.jar:$ROOT_PATH/../lib/log4j-api-2.12.1.jar:$ROOT_PATH/../lib/log4j-core-2.12.1.jar:$ROOT_PATH/../lib/antlr-runtime-3.5.2.jar:$ROOT_PATH/../lib/org.talend.dataquality.parser.jar:$ROOT_PATH/../lib/crypto-utils.jar:$ROOT_PATH/../lib/talend_file_enhanced-1.1.jar:$ROOT_PATH/../lib/slf4j-api-1.7.25.jar:$ROOT_PATH/../lib/dom4j-2.1.1.jar:$ROOT_PATH/nojvmparam_0_1.jar: local_project.nojvmparam_0_1.noJVMparam --context=Default \"$@\"\n";
|
||||
+ "java -Dtalend.component.manager.m2.repository=$ROOT_PATH/../lib -cp .:$ROOT_PATH:$ROOT_PATH/../lib/routines.jar:$ROOT_PATH/../lib/log4j-slf4j-impl-2.12.1.jar:$ROOT_PATH/../lib/log4j-api-2.12.1.jar:$ROOT_PATH/../lib/log4j-core-2.12.1.jar:$ROOT_PATH/../lib/antlr-runtime-3.5.2.jar:$ROOT_PATH/../lib/org.talend.dataquality.parser.jar:$ROOT_PATH/../lib/crypto-utils.jar:$ROOT_PATH/../lib/talend_file_enhanced-1.0.jar:$ROOT_PATH/../lib/slf4j-api-1.7.25.jar:$ROOT_PATH/../lib/dom4j-2.1.1.jar:$ROOT_PATH/nojvmparam_0_1.jar: local_project.nojvmparam_0_1.noJVMparam --context=Default \"$@\"\n";
|
||||
String expectSh = "#!/bin/sh\n" + "cd `dirname $0`\n" + "ROOT_PATH=`pwd`\n"
|
||||
+ "java -Dtalend.component.manager.m2.repository=$ROOT_PATH/../lib -cp .:$ROOT_PATH:$ROOT_PATH/../lib/routines.jar:$ROOT_PATH/../lib/log4j-slf4j-impl-2.12.1.jar:$ROOT_PATH/../lib/log4j-api-2.12.1.jar:$ROOT_PATH/../lib/log4j-core-2.12.1.jar:$ROOT_PATH/../lib/antlr-runtime-3.5.2.jar:$ROOT_PATH/../lib/org.talend.dataquality.parser.jar:$ROOT_PATH/../lib/crypto-utils.jar:$ROOT_PATH/../lib/talend_file_enhanced-1.1.jar:$ROOT_PATH/../lib/slf4j-api-1.7.25.jar:$ROOT_PATH/../lib/dom4j-2.1.1.jar:$ROOT_PATH/nojvmparam_0_1.jar: local_project.nojvmparam_0_1.noJVMparam --context=Default \"$@\"\n";
|
||||
+ "java -Dtalend.component.manager.m2.repository=$ROOT_PATH/../lib -cp .:$ROOT_PATH:$ROOT_PATH/../lib/routines.jar:$ROOT_PATH/../lib/log4j-slf4j-impl-2.12.1.jar:$ROOT_PATH/../lib/log4j-api-2.12.1.jar:$ROOT_PATH/../lib/log4j-core-2.12.1.jar:$ROOT_PATH/../lib/antlr-runtime-3.5.2.jar:$ROOT_PATH/../lib/org.talend.dataquality.parser.jar:$ROOT_PATH/../lib/crypto-utils.jar:$ROOT_PATH/../lib/talend_file_enhanced-1.0.jar:$ROOT_PATH/../lib/slf4j-api-1.7.25.jar:$ROOT_PATH/../lib/dom4j-2.1.1.jar:$ROOT_PATH/nojvmparam_0_1.jar: local_project.nojvmparam_0_1.noJVMparam --context=Default \"$@\"\n";
|
||||
|
||||
String inputBat = "%~d0\n" + "cd %~dp0\n"
|
||||
+ "java -Dtalend.component.manager.m2.repository=\"%cd%/../lib\" -cp .;../lib/routines.jar;../lib/log4j-slf4j-impl-2.12.1.jar;../lib/log4j-api-2.12.1.jar;../lib/log4j-core-2.12.1.jar;../lib/antlr-runtime-3.5.2.jar;../lib/org.talend.dataquality.parser.jar;../lib/crypto-utils.jar;../lib/talend_file_enhanced-1.1.jar;../lib/slf4j-api-1.7.25.jar;../lib/dom4j-2.1.1.jar;nojvmparam_0_1.jar; local_project.nojvmparam_0_1.noJVMparam --context=Default %*\n";
|
||||
+ "java -Dtalend.component.manager.m2.repository=\"%cd%/../lib\" -cp .;../lib/routines.jar;../lib/log4j-slf4j-impl-2.12.1.jar;../lib/log4j-api-2.12.1.jar;../lib/log4j-core-2.12.1.jar;../lib/antlr-runtime-3.5.2.jar;../lib/org.talend.dataquality.parser.jar;../lib/crypto-utils.jar;../lib/talend_file_enhanced-1.0.jar;../lib/slf4j-api-1.7.25.jar;../lib/dom4j-2.1.1.jar;nojvmparam_0_1.jar; local_project.nojvmparam_0_1.noJVMparam --context=Default %*\n";
|
||||
String expectBat = "%~d0\n" + "cd %~dp0\n"
|
||||
+ "java -Dtalend.component.manager.m2.repository=\"%cd%/../lib\" -cp .;../lib/routines.jar;../lib/log4j-slf4j-impl-2.12.1.jar;../lib/log4j-api-2.12.1.jar;../lib/log4j-core-2.12.1.jar;../lib/antlr-runtime-3.5.2.jar;../lib/org.talend.dataquality.parser.jar;../lib/crypto-utils.jar;../lib/talend_file_enhanced-1.1.jar;../lib/slf4j-api-1.7.25.jar;../lib/dom4j-2.1.1.jar;nojvmparam_0_1.jar; local_project.nojvmparam_0_1.noJVMparam --context=Default %*\n";
|
||||
+ "java -Dtalend.component.manager.m2.repository=\"%cd%/../lib\" -cp .;../lib/routines.jar;../lib/log4j-slf4j-impl-2.12.1.jar;../lib/log4j-api-2.12.1.jar;../lib/log4j-core-2.12.1.jar;../lib/antlr-runtime-3.5.2.jar;../lib/org.talend.dataquality.parser.jar;../lib/crypto-utils.jar;../lib/talend_file_enhanced-1.0.jar;../lib/slf4j-api-1.7.25.jar;../lib/dom4j-2.1.1.jar;nojvmparam_0_1.jar; local_project.nojvmparam_0_1.noJVMparam --context=Default %*\n";
|
||||
|
||||
String actualSh = CreateMavenJobPom.normalizeSpaces(inputSh);
|
||||
assertEquals(expectSh, actualSh);
|
||||
|
||||
@@ -16,13 +16,11 @@ import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.emf.common.util.BasicEList;
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.talend.core.model.context.JobContextManager;
|
||||
import org.talend.core.model.context.JobContextParameter;
|
||||
@@ -33,7 +31,6 @@ import org.talend.core.model.process.IContextParameter;
|
||||
import org.talend.core.model.properties.ContextItem;
|
||||
import org.talend.core.model.properties.PropertiesFactory;
|
||||
import org.talend.core.model.properties.Property;
|
||||
import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextParameterType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.TalendFileFactory;
|
||||
@@ -109,50 +106,4 @@ public class ConnectionContextHelperTest {
|
||||
assertTrue(set.size() == 2);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIsAddedContextVar() {
|
||||
JobContextManager contextManager = new JobContextManager();
|
||||
List<IContextParameter> contextParameterList = contextManager.getDefaultContext().getContextParameterList();
|
||||
IContextParameter contextParam = new JobContextParameter();
|
||||
contextParam.setName("new1");
|
||||
contextParam.setType(JavaTypesManager.getDefaultJavaType().getId());
|
||||
contextParameterList.add(contextParam);
|
||||
|
||||
EList contextTypeList = new BasicEList();
|
||||
ContextType contextType = TalendFileFactory.eINSTANCE.createContextType();
|
||||
contextType.setName("dev");
|
||||
contextTypeList.add(contextType);
|
||||
ContextParameterType contextParameterType = TalendFileFactory.eINSTANCE.createContextParameterType();
|
||||
contextParameterType.setName("new1");
|
||||
contextParameterType.setType(JavaTypesManager.getDefaultJavaType().getId());
|
||||
contextType.getContextParameter().add(contextParameterType);
|
||||
contextParameterType = TalendFileFactory.eINSTANCE.createContextParameterType();
|
||||
contextParameterType.setName("new2");
|
||||
contextParameterType.setType(JavaTypesManager.getDefaultJavaType().getId());
|
||||
contextType.getContextParameter().add(contextParameterType);
|
||||
|
||||
ContextItem contextItem = PropertiesFactory.eINSTANCE.createContextItem();
|
||||
contextItem.getContext().add(contextType);
|
||||
Property myContextProperty = PropertiesFactory.eINSTANCE.createProperty();
|
||||
myContextProperty.setId(ProxyRepositoryFactory.getInstance().getNextId());
|
||||
myContextProperty.setLabel("testContext");
|
||||
myContextProperty.setVersion("0.1");
|
||||
contextItem.setProperty(myContextProperty);
|
||||
contextItem.setDefaultContext("dev");
|
||||
|
||||
Set<String> neededVars = new HashSet<String>();
|
||||
neededVars.add("new1");
|
||||
boolean result = ConnectionContextHelper.isAddContextVar(contextItem, contextManager, neededVars, false);
|
||||
Assert.assertTrue(result);
|
||||
result = ConnectionContextHelper.isAddContextVar(contextItem, contextManager, neededVars, true);
|
||||
Assert.assertTrue(result);
|
||||
|
||||
neededVars.add("new2");
|
||||
result = ConnectionContextHelper.isAddContextVar(contextItem, contextManager, neededVars, false);
|
||||
Assert.assertTrue(result);
|
||||
result = ConnectionContextHelper.isAddContextVar(contextItem, contextManager, neededVars, true);
|
||||
Assert.assertFalse(result);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user