Compare commits
44 Commits
cbadillo/f
...
csun/bugfi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
75034af897 | ||
|
|
545028c2e1 | ||
|
|
70d9f98a0b | ||
|
|
8c6b2fb7f8 | ||
|
|
2989947eef | ||
|
|
b2f3ddb141 | ||
|
|
90b2fe5c37 | ||
|
|
6c97e0b6e5 | ||
|
|
de7f931dfd | ||
|
|
ca37d3d0c7 | ||
|
|
0ca72892fb | ||
|
|
84b3cbbb24 | ||
|
|
059b7114b0 | ||
|
|
684e412b81 | ||
|
|
8bbbf7cba0 | ||
|
|
f79af20cfb | ||
|
|
52e876fbb5 | ||
|
|
56e3502880 | ||
|
|
44c2e7c9ab | ||
|
|
8140ab4596 | ||
|
|
ae9460da3a | ||
|
|
85c180df1b | ||
|
|
04cdb23cd1 | ||
|
|
5e662d4887 | ||
|
|
52f3c458b2 | ||
|
|
9746ff6a27 | ||
|
|
cdc7c347f3 | ||
|
|
e290c02662 | ||
|
|
5fd5de914f | ||
|
|
a272a2a124 | ||
|
|
8c93621b9c | ||
|
|
cf0b077343 | ||
|
|
796e0983a2 | ||
|
|
6bd8346ac8 | ||
|
|
8440e7ac6d | ||
|
|
caf54e3d2b | ||
|
|
6fc753cc5e | ||
|
|
615da11dc4 | ||
|
|
6fa44bc4f9 | ||
|
|
64497228d2 | ||
|
|
4a07807638 | ||
|
|
31de5521c1 | ||
|
|
3cc844081c | ||
|
|
03314aeee8 |
@@ -10,7 +10,8 @@ Require-Bundle: org.eclipse.core.runtime,
|
||||
org.apache.log4j,
|
||||
org.talend.libraries.apache,
|
||||
org.talend.commons.runtime,
|
||||
org.talend.libraries.ui
|
||||
org.talend.libraries.ui,
|
||||
org.apache.ant
|
||||
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>2.3.5</version>
|
||||
<version>5.1.1</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<instructions>
|
||||
|
||||
@@ -108,5 +108,9 @@ 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,6 +135,7 @@ 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;
|
||||
@@ -1798,9 +1799,12 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
* @throws PersistenceException
|
||||
*/
|
||||
private void emptyTempFolder(Project project) throws PersistenceException {
|
||||
String str = (System.getProperty("eclipse.home.location") + "temp").substring(5);
|
||||
FilesUtils.deleteFolder(new File(str), false);
|
||||
|
||||
try {
|
||||
String str = SharedStudioUtils.getTempFolderPath().toPortableString();
|
||||
FilesUtils.deleteFolder(new File(str), false);
|
||||
}catch (Exception ex) {
|
||||
ExceptionHandler.process(ex);
|
||||
}
|
||||
long start = System.currentTimeMillis();
|
||||
IProject fsProject = ResourceUtils.getProject(project);
|
||||
IFolder folder = ResourceUtils.getFolder(fsProject, RepositoryConstants.TEMP_DIRECTORY, false);
|
||||
@@ -2195,6 +2199,14 @@ 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();
|
||||
@@ -2296,8 +2308,6 @@ 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,7 +149,6 @@ 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;
|
||||
@@ -360,8 +359,7 @@ public class ConvertJobsUtil {
|
||||
if (JobBatchFramework.MAPREDUCEFRAMEWORK.getDisplayName().equals(frameworkObj)
|
||||
|| JobBatchFramework.SPARKFRAMEWORK.getDisplayName().equals(frameworkObj)) {
|
||||
return JobType.BIGDATABATCH.getDisplayName();
|
||||
} else if (JobStreamingFramework.STORMFRAMEWORK.getName().equals(frameworkObj)
|
||||
|| JobStreamingFramework.SPARKSTREAMINGFRAMEWORK.getName().equals(frameworkObj)) {
|
||||
} else if (JobStreamingFramework.SPARKSTREAMINGFRAMEWORK.getName().equals(frameworkObj)) {
|
||||
return JobType.BIGDATASTREAMING.getDisplayName();
|
||||
} else {
|
||||
return JobType.STANDARD.getDisplayName();
|
||||
|
||||
@@ -123,7 +123,8 @@ Require-Bundle: org.eclipse.jdt.core,
|
||||
org.apache.servicemix.bundles.avro,
|
||||
jackson-core-asl,
|
||||
org.talend.libraries.jackson,
|
||||
org.eclipse.m2e.core
|
||||
org.eclipse.m2e.core,
|
||||
org.talend.libraries.apache.common
|
||||
Bundle-Activator: org.talend.core.runtime.CoreRuntimePlugin
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-ClassPath: .,
|
||||
|
||||
@@ -0,0 +1,288 @@
|
||||
<?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,4 +94,6 @@ public interface IESBService extends IService {
|
||||
* @return
|
||||
*/
|
||||
public IProcessor createOSGIJavaProcessor(IProcess process, Property property, boolean filenameFromLabel);
|
||||
|
||||
public boolean isSOAPServiceProvider(Item item);
|
||||
}
|
||||
|
||||
@@ -126,6 +126,8 @@ 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$
|
||||
@@ -366,6 +368,10 @@ 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.3.160.jar")), //$NON-NLS-1$
|
||||
H2(new DbVersion4Drivers(EDatabaseTypeName.H2, "h2-1.4.198.jar")), //$NON-NLS-1$
|
||||
|
||||
//
|
||||
JAVADB_EMBEDED(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_EMBEDED, "derby.jar")), //$NON-NLS-1$
|
||||
|
||||
@@ -40,8 +40,6 @@ 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,6 +81,11 @@ 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);
|
||||
}
|
||||
|
||||
|
||||
@@ -60,6 +60,7 @@ 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
|
||||
@@ -1004,8 +1005,6 @@ public final class ProcessUtils {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static boolean isChildRouteProcess(IProcess process) {
|
||||
List n = process.getNodesOfType("tRouteInput");
|
||||
if (n!=null && n.size()!=0) {
|
||||
@@ -1013,4 +1012,8 @@ public final class ProcessUtils {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static String escapeJava(String input) {
|
||||
return StringEscapeUtils.escapeJava(input);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,10 +32,6 @@ 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$
|
||||
|
||||
@@ -108,4 +108,13 @@ 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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,4 +38,12 @@ 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,13 +18,11 @@ 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;
|
||||
|
||||
@@ -33,8 +31,6 @@ 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);
|
||||
@@ -43,8 +39,6 @@ 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".
|
||||
|
||||
@@ -20,6 +20,7 @@ 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;
|
||||
@@ -94,6 +95,8 @@ 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>();
|
||||
@@ -451,9 +454,15 @@ 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();
|
||||
return emfProject.equals(curProject);
|
||||
boolean ret = emfProject.equals(curProject);
|
||||
cachedObjects.put(object, ret);
|
||||
return ret;
|
||||
|
||||
} else {
|
||||
IProjectRepositoryNode root = node.getRoot();
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
// ============================================================================
|
||||
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;
|
||||
@@ -45,6 +47,8 @@ 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.
|
||||
*/
|
||||
@@ -194,6 +198,13 @@ 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,6 +24,7 @@ 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;
|
||||
@@ -144,4 +145,8 @@ public interface IRepositoryService extends IService {
|
||||
|
||||
public void setShouldCheckRepoViewCommonNavigatorDirty(IRepositoryView repView, boolean shouldFlag);
|
||||
|
||||
boolean isProjectLevelLog4j2();
|
||||
|
||||
List<ModuleNeeded> getLog4j2Modules();
|
||||
|
||||
}
|
||||
|
||||
@@ -34,7 +34,8 @@ Require-Bundle: org.apache.commons.lang,
|
||||
org.apache.commons.io,
|
||||
org.apache.httpcomponents.httpcore,
|
||||
org.apache.httpcomponents.httpclient,
|
||||
org.slf4j.api
|
||||
org.slf4j.api,
|
||||
org.apache.ant
|
||||
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=Description: {0}\n
|
||||
RoutinesFunctionProposal.CreatedBy=Created By: {1}\n\n
|
||||
RoutinesFunctionProposal.ReturnType=Return Type: {2}\n
|
||||
RoutinesFunctionProposal.VariableName=Example: {3}\n\n
|
||||
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.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=Description: {0}
|
||||
ContextParameterProposal.ContextVariable=Context Variable: {1}
|
||||
ContextParameterProposal.Type=Type: {2}
|
||||
ContextParameterProposal.VariableName=Variable Name: {3}
|
||||
ContextParameterProposal.Description.v1=Description: {0}
|
||||
ContextParameterProposal.ContextVariable.v1=Default context environment: {1}
|
||||
ContextParameterProposal.Type.v1=Type: {2}
|
||||
ContextParameterProposal.VariableName.v1=Value: {3}
|
||||
ArchiveFileExportOperationFullPath.cannotCreateDir=unable to create directory '{0}'
|
||||
WorkingSetConfigurationDialog_new_label=&New...
|
||||
WorkingSetConfigurationDialog_edit_label=&Edit...
|
||||
|
||||
@@ -68,15 +68,11 @@ 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,7 +102,9 @@ public class HorizontalTabFactory {
|
||||
* @param descriptors
|
||||
*/
|
||||
public void setInput(List<TalendPropertyTabDescriptor> descriptors) {
|
||||
tabbedPropertyViewer.setInput(descriptors);
|
||||
if (tabbedPropertyViewer != null && tabbedPropertyViewer.getControl() != null && !tabbedPropertyViewer.getControl().isDisposed()) {
|
||||
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.getName() };
|
||||
contextParameter.getValue() };
|
||||
return format.format(replaceArgs);
|
||||
}
|
||||
return desc;
|
||||
@@ -88,10 +88,10 @@ public class ContextParameterProposal implements IContentProposal {
|
||||
}
|
||||
|
||||
private String getDescriptionMessagePattern() {
|
||||
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$
|
||||
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$
|
||||
return message;
|
||||
}
|
||||
|
||||
|
||||
@@ -74,10 +74,10 @@ public class RoutinesFunctionProposal implements IContentProposal {
|
||||
*/
|
||||
@Override
|
||||
public String getDescription() {
|
||||
String message = Messages.getString("RoutinesFunctionProposal.Description");
|
||||
message += Messages.getString("RoutinesFunctionProposal.CreatedBy");
|
||||
message += Messages.getString("RoutinesFunctionProposal.ReturnType");
|
||||
message += Messages.getString("RoutinesFunctionProposal.VariableName");
|
||||
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");
|
||||
|
||||
MessageFormat format = new MessageFormat(message);
|
||||
Object[] args = new Object[] { function.getDescription(),
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
// ============================================================================
|
||||
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;
|
||||
@@ -208,4 +209,8 @@ public class CorePlugin extends Plugin {
|
||||
return (ICreateXtextProcessService) GlobalServiceRegister.getDefault().getService(ICreateXtextProcessService.class);
|
||||
}
|
||||
|
||||
public static String threadDump(String message) {
|
||||
return new ThreadDumpMessage(message).toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
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;
|
||||
|
||||
@@ -38,4 +39,23 @@ 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 = new Path(System.getProperty("user.dir")).append("temp"); // NON-NLS-1$// NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-2$
|
||||
IPath tempPath = SharedStudioUtils.getTempFolderPath();
|
||||
File tempFile = tempPath.toFile();
|
||||
if (!tempFile.exists()) {
|
||||
tempFile.mkdirs();
|
||||
|
||||
@@ -54,6 +54,17 @@
|
||||
<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,6 +40,12 @@
|
||||
<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>
|
||||
@@ -78,13 +84,13 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>karaf-maven-plugin-4-2-4-tos</artifactId>
|
||||
<artifactId>karaf-maven-plugin-4-2-10-tos</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>karaf-maven-plugin-4-2-4-tos</artifactId>
|
||||
<artifactId>karaf-maven-plugin-4-2-10-tos</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
@@ -100,37 +106,10 @@
|
||||
<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-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>
|
||||
<?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>
|
||||
@@ -14,7 +14,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
<version>2.3.7</version>
|
||||
<version>5.1.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
<version>2.5.3</version>
|
||||
<version>5.1.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -14,8 +14,18 @@
|
||||
<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,6 +14,17 @@
|
||||
<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-4</module>
|
||||
<module>plugins/karaf-maven-plugin-4-2-10</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,7 +43,18 @@
|
||||
<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>
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
<?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,6 +16,7 @@
|
||||
<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.16.0-SNAPSHOT</tacokit.components.version>
|
||||
<tacokit.components.version>1.17.0-SNAPSHOT</tacokit.components.version>
|
||||
</properties>
|
||||
<repositories>
|
||||
<repository>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<artifactItem>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>studio-maven-repository</artifactId>
|
||||
<version>7.4.1.v20201111</version>
|
||||
<version>7.4.1.v20201203</version>
|
||||
<type>zip</type>
|
||||
<overWrite>true</overWrite>
|
||||
<outputDirectory>${project.basedir}/../repository</outputDirectory>
|
||||
|
||||
@@ -82,6 +82,11 @@
|
||||
<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>
|
||||
@@ -106,6 +111,11 @@
|
||||
<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,6 +52,7 @@ 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;
|
||||
@@ -168,6 +169,10 @@ 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
|
||||
@@ -175,8 +180,11 @@ public class AggregatorPomsHelper {
|
||||
Project currentProject = ProjectManager.getInstance().getCurrentProject();
|
||||
for (ERepositoryObjectType codeType : ERepositoryObjectType.getAllTypesOfCodes()) {
|
||||
try {
|
||||
if (CodeM2CacheManager.needUpdateCodeProject(currentProject, codeType)) {
|
||||
ITalendProcessJavaProject codeProject = getCodesProject(codeType);
|
||||
ITalendProcessJavaProject codeProject = getCodesProject(codeType);
|
||||
if (ERepositoryObjectType.ROUTINES == codeType) {
|
||||
PomUtil.checkExistingLog4j2Dependencies4RoutinePom(projectTechName, codeProject.getProjectPom());
|
||||
}
|
||||
if (ignoreM2Cache || CodeM2CacheManager.needUpdateCodeProject(currentProject, codeType)) {
|
||||
updateCodeProjectPom(monitor, codeType, codeProject.getProjectPom());
|
||||
buildAndInstallCodesProject(monitor, codeType, true, forceBuild);
|
||||
CodeM2CacheManager.updateCodeProjectCache(currentProject, codeType);
|
||||
@@ -344,12 +352,8 @@ 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) {
|
||||
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;
|
||||
}
|
||||
if (isSOAPServiceProvider(property)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// for import won't add for exclude option
|
||||
@@ -860,7 +864,7 @@ public class AggregatorPomsHelper {
|
||||
}
|
||||
// codes pom
|
||||
monitor.subTask("Synchronize code poms"); //$NON-NLS-1$
|
||||
updateCodeProjects(monitor, true);
|
||||
updateCodeProjects(monitor, true, true);
|
||||
monitor.worked(1);
|
||||
if (monitor.isCanceled()) {
|
||||
return;
|
||||
@@ -896,7 +900,7 @@ public class AggregatorPomsHelper {
|
||||
}
|
||||
IFile pomFile = getItemPomFolder(item.getProperty()).getFile(TalendMavenConstants.POM_FILE_NAME);
|
||||
// filter esb data service node
|
||||
if (!isDataServiceOperation(object.getProperty()) && pomFile.exists()) {
|
||||
if (!isSOAPServiceProvider(object.getProperty()) && pomFile.exists()) {
|
||||
modules.add(getModulePath(pomFile));
|
||||
}
|
||||
}
|
||||
@@ -937,7 +941,7 @@ public class AggregatorPomsHelper {
|
||||
* @param property
|
||||
* @return
|
||||
*/
|
||||
private boolean isDataServiceOperation(Property property) {
|
||||
private static boolean isSOAPServiceProvider(Property property) {
|
||||
if (property != null) {
|
||||
List<Relation> relations = RelationshipItemBuilder.getInstance().getItemsRelatedTo(property.getId(),
|
||||
property.getVersion(), RelationshipItemBuilder.JOB_RELATION);
|
||||
@@ -946,6 +950,14 @@ 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 {
|
||||
}
|
||||
}
|
||||
|
||||
private static File getCacheFile(String projectTechName, ERepositoryObjectType codeType) {
|
||||
public 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,6 +12,7 @@
|
||||
// ============================================================================
|
||||
package org.talend.designer.maven.tools.creator;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -46,7 +47,6 @@ 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,16 +136,15 @@ 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.
|
||||
|
||||
if (JobUtils.isJob(property) && ProcessUtils.isChildRouteProcess(process)) {
|
||||
JobInfo lastMainJob = LastGenerationInfo.getInstance().getLastMainJob();
|
||||
JobInfo lastMainJob = LastGenerationInfo.getInstance().getLastMainJob();
|
||||
if (JobUtils.isJob(property) && ProcessUtils.isChildRouteProcess(process) && lastMainJob != null) {
|
||||
variablesValuesMap.put(ETalendMavenVariables.JobGroupId, PomIdsHelper.getJobGroupId(lastMainJob.getProcessor().getProperty()));
|
||||
variablesValuesMap.put(ETalendMavenVariables.JobVersion, PomIdsHelper.getJobVersion(lastMainJob.getProcessor().getProperty()));
|
||||
}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);
|
||||
@@ -285,6 +284,11 @@ 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);
|
||||
|
||||
@@ -301,6 +305,7 @@ 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) {
|
||||
@@ -319,10 +324,18 @@ public abstract class AbstractMavenProcessorPom extends CreateMavenBundleTemplat
|
||||
String type = null;
|
||||
if (!jobInfo.isJoblet()) {
|
||||
property = jobInfo.getProcessItem().getProperty();
|
||||
groupId = PomIdsHelper.getJobGroupId(property);
|
||||
artifactId = PomIdsHelper.getJobArtifactId(jobInfo);
|
||||
|
||||
JobInfo lastMainJob = LastGenerationInfo.getInstance().getLastMainJob();
|
||||
if (lastMainJob != null && JobUtils.isJob(jobInfo) && 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,7 +647,8 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
|
||||
|
||||
List<Dependency> dependencies = new ArrayList<>();
|
||||
// codes
|
||||
addCodesDependencies(dependencies);
|
||||
List<Dependency> codeDependencies = getCodesDependencies();
|
||||
dependencies.addAll(codeDependencies);
|
||||
|
||||
// codes dependencies (optional)
|
||||
ERepositoryObjectType.getAllTypesOfCodes().forEach(t -> dependencies.addAll(PomUtil.getCodesDependencies(t)));
|
||||
@@ -684,7 +685,7 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
|
||||
|| _3rdLibCoordinate.contains(coordinate)) {
|
||||
return;
|
||||
}
|
||||
if (MavenConstants.DEFAULT_LIB_GROUP_ID.equals(groupId) || groupId.startsWith(projectGroupId)) {
|
||||
if (MavenConstants.DEFAULT_LIB_GROUP_ID.equals(groupId) || codeDependencies.contains(d)) {
|
||||
if (!optional) {
|
||||
talendLibCoordinate.add(coordinate);
|
||||
}
|
||||
|
||||
@@ -12,16 +12,18 @@
|
||||
// ============================================================================
|
||||
package org.talend.designer.maven.tools.creator;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
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
|
||||
@@ -46,13 +48,18 @@ 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);
|
||||
Set<ModuleNeeded> runningModules = libService.getCodesModuleNeededs(ERepositoryObjectType.ROUTINES);
|
||||
return runningModules;
|
||||
runningModules.addAll(libService.getCodesModuleNeededs(ERepositoryObjectType.ROUTINES));
|
||||
}
|
||||
return Collections.emptySet();
|
||||
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRepositoryService.class)) {
|
||||
IRepositoryService repositoryService = GlobalServiceRegister.getDefault().getService(IRepositoryService.class);
|
||||
if (PluginChecker.isBigdataRoutineLoaded() && repositoryService.isProjectLevelLog4j2()) {
|
||||
runningModules.addAll(repositoryService.getLog4j2Modules());
|
||||
}
|
||||
}
|
||||
return runningModules;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,6 +76,7 @@ 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;
|
||||
@@ -98,10 +99,12 @@ 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;
|
||||
@@ -1188,4 +1191,49 @@ 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,10 +96,14 @@ public final class TalendCodeProjectUtil {
|
||||
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);
|
||||
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;
|
||||
}
|
||||
|
||||
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.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/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/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.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/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/geronimo-stax-api_1.0_spec-1.0.1.jar,
|
||||
lib/httpcore-4.0.1.jar,
|
||||
lib/mail-1.4.jar,
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -9,4 +9,48 @@
|
||||
</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.6.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/commons-codec-1.15.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.6.jar,
|
||||
lib/commons-codec-1.15.jar,
|
||||
lib/commons-cli-2.0-SNAPSHOT.jar,
|
||||
lib/commons-digester-2.1.jar,
|
||||
lib/commons-math3-3.3.jar,
|
||||
@@ -44,6 +44,7 @@ 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.6</version>
|
||||
<version>1.15</version>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>commons-digester</groupId>
|
||||
|
||||
Binary file not shown.
@@ -3,7 +3,6 @@
|
||||
<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,7 +4,6 @@ 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,
|
||||
@@ -41,11 +40,6 @@ 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,
|
||||
|
||||
Binary file not shown.
@@ -73,6 +73,16 @@
|
||||
</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>
|
||||
@@ -88,6 +98,7 @@
|
||||
<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.3.160.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/h2-1.4.198.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.3.160.jar
|
||||
lib/h2-1.4.198.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,6 +1,4 @@
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
lib/h2-1.3.160.jar,\
|
||||
lib/h2-1.2.139.jar,\
|
||||
lib/h2-1.2.132.jar
|
||||
lib/h2-1.4.198.jar
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -9,4 +9,32 @@
|
||||
</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,6 +902,7 @@ 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);
|
||||
@@ -932,7 +933,7 @@ public class ConfigModuleDialog extends TitleAreaDialog implements IConfigModule
|
||||
}
|
||||
}
|
||||
defaultUriTxt.setText(defaultUri);
|
||||
customUriText.setText(ModuleMavenURIUtils.MVNURI_TEMPLET);
|
||||
customUriText.setText(defaultUri);
|
||||
if (!org.apache.commons.lang3.StringUtils.isEmpty(detectUri)
|
||||
&& !ConfigModuleHelper.isSameUri(defaultUri, detectUri)) {
|
||||
customUriText.setText(detectUri);
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
package routines.system;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public final class BundleUtils {
|
||||
|
||||
@@ -75,6 +78,31 @@ 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,6 +146,9 @@ 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());
|
||||
@@ -747,6 +750,14 @@ 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;
|
||||
}
|
||||
|
||||
@@ -776,6 +787,11 @@ 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;
|
||||
}
|
||||
@@ -1138,4 +1154,25 @@ 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1399,23 +1399,25 @@ public class LocalLibraryManager implements ILibraryManagerService, IChangedLibr
|
||||
ArtifactRepositoryBean customNexusServer = TalendLibsServerManager.getInstance().getCustomNexusServer();
|
||||
IRepositoryArtifactHandler customerRepHandler = RepositoryArtifactHandlerManager
|
||||
.getRepositoryHandler(customNexusServer);
|
||||
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);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
releaseResult = customerRepHandler.search(MavenConstants.DEFAULT_LIB_GROUP_ID, null, null, true, false);
|
||||
if (releaseResult != null) {
|
||||
for (MavenArtifact result : releaseResult) {
|
||||
ShareLibrariesUtil.putArtifactToMap(result, releaseArtifactMap, false);
|
||||
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);
|
||||
}
|
||||
} 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))) {
|
||||
&& (isGeneric || !isAddContextVar(contextItem, process.getContextManager(), neededVars, true))) {
|
||||
AtomicBoolean added = new AtomicBoolean();
|
||||
if (ignoreContextMode) {
|
||||
addContextVarForJob(process, contextItem, addedVars);
|
||||
@@ -1591,7 +1591,13 @@ 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;
|
||||
@@ -1599,6 +1605,7 @@ public final class ConnectionContextHelper {
|
||||
for (ContextType contye : contextTypeList) {
|
||||
if (context.getName() != null && contye.getName().equalsIgnoreCase(context.getName())) {
|
||||
contextType = contye;
|
||||
foundGroup = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1615,6 +1622,26 @@ 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,6 +49,7 @@ 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;
|
||||
@@ -1075,7 +1076,7 @@ public class TreeUtil {
|
||||
|
||||
private static String copyToTempFile(URL url, String fileName) {
|
||||
try {
|
||||
IPath tempPath = new Path(System.getProperty("user.dir")).append("temp"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
IPath tempPath = SharedStudioUtils.getTempFolderPath();
|
||||
File tempFile = tempPath.toFile();
|
||||
if (!tempFile.exists()) {
|
||||
tempFile.mkdirs();
|
||||
|
||||
@@ -22,6 +22,7 @@ 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;
|
||||
@@ -769,13 +770,9 @@ public class MigrationToolService implements IMigrationToolService {
|
||||
*/
|
||||
@Override
|
||||
public void initNewProjectTasks(Project project) {
|
||||
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));
|
||||
}
|
||||
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));
|
||||
|
||||
project.getEmfProject().setItemsRelationVersion(RelationshipItemBuilder.INDEX_VERSION);
|
||||
saveProjectMigrationTasksDone(project, done);
|
||||
|
||||
@@ -23,6 +23,8 @@ 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;
|
||||
|
||||
@@ -106,6 +108,34 @@ 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$
|
||||
|
||||
@@ -158,6 +158,7 @@ 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;
|
||||
@@ -2067,6 +2068,9 @@ public class LocalRepositoryFactory extends AbstractEMFRepositoryFactory impleme
|
||||
if (re == null) {
|
||||
continue;
|
||||
}
|
||||
if (re instanceof PropertiesProjectResourceImpl) {
|
||||
continue;
|
||||
}
|
||||
EcoreUtil.resolveAll(re);
|
||||
needSaves.add(re);
|
||||
}
|
||||
|
||||
@@ -49,6 +49,7 @@ 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;
|
||||
@@ -243,9 +244,8 @@ public class CreateConceptWizard extends RepositoryWizard implements INewWizard
|
||||
success = true;
|
||||
}
|
||||
|
||||
IPath sasPath = new Path(System.getProperty("user.dir")).append("temp");//$NON-NLS-1$ //$NON-NLS-2$
|
||||
File sasDir = sasPath.toFile();
|
||||
if (sasDir.exists()) {
|
||||
File sasDir = MDMUtil.getTempTemplateXSDFile().getParentFile();
|
||||
if (sasDir != null && sasDir.exists()) {
|
||||
delete(sasDir);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ 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;
|
||||
@@ -95,7 +96,7 @@ public class MDMUtil {
|
||||
}
|
||||
|
||||
public static File getTempTemplateXSDFile() {
|
||||
IPath tempPath = new Path(System.getProperty("user.dir")).append("temp"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
IPath tempPath = SharedStudioUtils.getTempFolderPath();
|
||||
File tempFile = tempPath.toFile();
|
||||
if (!tempFile.exists()) {
|
||||
tempFile.mkdirs();
|
||||
|
||||
@@ -63,7 +63,7 @@ public class PostgreQueryGeneratorTest {
|
||||
StringBuilder expectSql = new StringBuilder();
|
||||
expectSql
|
||||
.append(TalendTextUtils.getQuoteChar())
|
||||
.append("SELECT \n \\\"talend\\\".\\\"myschema\\\".\\\"mytable\\\".\\\"newColumn\\\"\nFROM \\\"talend\\\".\\\"myschema\\\".\\\"mytable\\\"")
|
||||
.append("SELECT \n \\\"myschema\\\".\\\"mytable\\\".\\\"newColumn\\\"\nFROM \\\"myschema\\\".\\\"mytable\\\"")
|
||||
.append(TalendTextUtils.getQuoteChar());
|
||||
|
||||
assertNotNull(resultString);
|
||||
|
||||
@@ -16,11 +16,13 @@ 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;
|
||||
@@ -31,6 +33,7 @@ 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;
|
||||
@@ -106,4 +109,50 @@ 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