Compare commits

..

1 Commits

Author SHA1 Message Date
Jenkins Continuous Build server
cea6cfbf2a Set version to 7.2.1 M2 2019-01-29 16:18:28 +01:00
186 changed files with 291 additions and 379 deletions

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.common.ui.runtime.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.commons.runtime.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.commons.ui.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.core.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.core.repository.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.core.runtime.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.core.ui.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.cwm.mip.edit.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.cwm.mip.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.maven.ui.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.help.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.helpers.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.librariesmanager.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.librariesmanager.ui.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.metadata.managment.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.metadata.managment.ui.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.migrationTool.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.model.edit.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.model.migration.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.model.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.presentation.onboarding.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.rcp.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.registration.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.items.importexport.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.items.importexport.ui.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.localprovider.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.mdm.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.metadata.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.repository.view.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.resources.nl</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.commons.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.core.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.fragment.jars.common.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.help.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.jdt.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.libraries.jdbc.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.m2e.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.model.migration.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.rcp.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.update.p2.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.updates.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.utils.feature</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.common.ui.runtime</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.commons.runtime</artifactId>

View File

@@ -12,7 +12,7 @@
<parent>
<groupId>org.talend</groupId>
<artifactId>org.talend.tos</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../pom_server.xml</relativePath>
</parent>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.commons.ui</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.core.repository</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.core.runtime</artifactId>

View File

@@ -16,7 +16,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.apache.commons.collections.MultiMap;
@@ -335,7 +334,7 @@ public class MappingTypeRetriever {
return mappingType.getDbType();
}
/**
* Getter for the current loaded dbms.
*

View File

@@ -94,8 +94,8 @@ public final class JavaTypesManager {
public static final JavaType PASSWORD = new JavaType(String.class, true, "Password"); //$NON-NLS-1$
public static final JavaType[] JAVA_TYPES = new JavaType[] { BOOLEAN, BYTE, BYTE_ARRAY, CHARACTER, DATE, DOUBLE,
FLOAT, BIGDECIMAL, INTEGER, LONG, OBJECT, SHORT, STRING, LIST };
public static final JavaType[] JAVA_TYPES = new JavaType[] { BOOLEAN, BYTE, BYTE_ARRAY, CHARACTER, DATE, DOUBLE, FLOAT,
BIGDECIMAL, INTEGER, LONG, OBJECT, SHORT, STRING, LIST };
private static Map<String, Map<String, List<DBTypeUtil>>> javaTypeMappingFromExtension;
@@ -144,16 +144,12 @@ public final class JavaTypesManager {
for (IConfigurationElement configurationElement : configurationElements) {
try {
String className = configurationElement.getAttribute("nullableClass");
Class myClass =
Platform.getBundle(configurationElement.getContributor().getName()).loadClass(
className);
boolean isGenerateWithCanonicalName =
configurationElement.getAttribute("generateWithCanonicalName") == null ? false
: Boolean.valueOf(configurationElement
.getAttribute("generateWithCanonicalName"));
boolean isObjectBased =
configurationElement.getAttribute("objectBased") == null ? false : Boolean
.valueOf(configurationElement.getAttribute("objectBased"));
Class myClass = Platform.getBundle(configurationElement.getContributor().getName()).loadClass(
className);
boolean isGenerateWithCanonicalName = configurationElement.getAttribute("generateWithCanonicalName") == null ? false
: Boolean.valueOf(configurationElement.getAttribute("generateWithCanonicalName"));
boolean isObjectBased = configurationElement.getAttribute("objectBased") == null ? false : Boolean
.valueOf(configurationElement.getAttribute("objectBased"));
JavaType javaType = new JavaType(myClass, isGenerateWithCanonicalName, isObjectBased);
addJavaType(javaType);
@@ -164,18 +160,14 @@ public final class JavaTypesManager {
IConfigurationElement[] dbTypeElements = dbMappingElement.getChildren();
List<DBTypeUtil> dbTypes = new ArrayList<DBTypeUtil>();
for (IConfigurationElement dbTypeElement : dbTypeElements) {
boolean isDefault =
dbTypeElement.getAttribute("default") == null ? false : Boolean
.valueOf(dbTypeElement.getAttribute("default"));
boolean isIgnoreLen =
dbTypeElement.getAttribute("ignoreLen") == null ? false : Boolean
.valueOf(dbTypeElement.getAttribute("ignoreLen"));
boolean isIgnorePre =
dbTypeElement.getAttribute("ignorePre") == null ? false : Boolean
.valueOf(dbTypeElement.getAttribute("ignorePre"));
DBTypeUtil dbType =
new DBTypeUtil(dbTypeElement.getAttribute("DbType"), isDefault,
isIgnoreLen, isIgnorePre);
boolean isDefault = dbTypeElement.getAttribute("default") == null ? false : Boolean
.valueOf(dbTypeElement.getAttribute("default"));
boolean isIgnoreLen = dbTypeElement.getAttribute("ignoreLen") == null ? false : Boolean
.valueOf(dbTypeElement.getAttribute("ignoreLen"));
boolean isIgnorePre = dbTypeElement.getAttribute("ignorePre") == null ? false : Boolean
.valueOf(dbTypeElement.getAttribute("ignorePre"));
DBTypeUtil dbType = new DBTypeUtil(dbTypeElement.getAttribute("DbType"), isDefault,
isIgnoreLen, isIgnorePre);
dbTypes.add(dbType);
}
dbAndDBType.put(mappingId, dbTypes);
@@ -527,16 +519,16 @@ public final class JavaTypesManager {
/**
* the numerical types with id_.
*/
public final static String[] NUMBERS = new String[] { JavaTypesManager.INTEGER.getId(),
JavaTypesManager.FLOAT.getId(), JavaTypesManager.DOUBLE.getId(), JavaTypesManager.LONG.getId(),
JavaTypesManager.SHORT.getId(), JavaTypesManager.BIGDECIMAL.getId(), JavaTypesManager.BYTE.getId() };
public final static String[] NUMBERS = new String[] { JavaTypesManager.INTEGER.getId(), JavaTypesManager.FLOAT.getId(),
JavaTypesManager.DOUBLE.getId(), JavaTypesManager.LONG.getId(), JavaTypesManager.SHORT.getId(),
JavaTypesManager.BIGDECIMAL.getId(), JavaTypesManager.BYTE.getId() };
public static boolean isNumber(String type) {
return ArrayUtils.contains(NUMBERS, type);
}
public static boolean isString(String type) {
return JavaTypesManager.STRING.getId().equals(type) || JavaTypesManager.CHARACTER.getId().equals(type);
return JavaTypesManager.STRING.getId().equals(type);
}
public static boolean isBoolean(String type) {

View File

@@ -23,7 +23,6 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Level;
@@ -130,6 +129,8 @@ public class RelationshipItemBuilder {
private Map<Relation, Set<Relation>> referencesItemsRelations;
private Map<String, String> hadoopItemReferences = new HashMap<String, String>();
private boolean loaded = false;
private boolean loading = false;
@@ -669,8 +670,8 @@ public class RelationshipItemBuilder {
return;
}
loading = true;
currentProjectItemsRelations = new ConcurrentHashMap<Relation, Set<Relation>>();
referencesItemsRelations = new ConcurrentHashMap<Relation, Set<Relation>>();
currentProjectItemsRelations = new HashMap<Relation, Set<Relation>>();
referencesItemsRelations = new HashMap<Relation, Set<Relation>>();
loadRelations(currentProjectItemsRelations, getAimProject());
@@ -1125,11 +1126,10 @@ public class RelationshipItemBuilder {
Map<Relation, Set<Relation>> relations = handler.find(item);
mergeRelationship(itemRelations, relations);
}
// check if there is any changes on the relations.
Set<Relation> newProjectRelations = currentProjectItemsRelations.get(relation);
if (oldProjectRelations == null && newProjectRelations == null) {
relationsModified = false;
} else if (oldProjectRelations != null) {
if (oldProjectRelations != null) {
// check if there is any changes on the relations.
Set<Relation> newProjectRelations = currentProjectItemsRelations.get(relation);
if (oldProjectRelations.size() == newProjectRelations.size()) {
relationsModified = false;
for (Relation newRelation : newProjectRelations) {

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.core.ui</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.core</artifactId>

View File

@@ -507,7 +507,7 @@ public class ProcessorUtilities {
mainRelation.setId(jobInfo.getJobId());
mainRelation.setVersion(jobInfo.getJobVersion());
mainRelation.setType(RelationshipItemBuilder.JOB_RELATION);
hasLoopDependency = checkLoopDependencies(mainRelation, new HashMap<String, String>());
hasLoopDependency = checkLoopDependencies(mainRelation);
// clean the previous code in case it has deleted subjob
cleanSourceFolder(progressMonitor, currentProcess, processor);
}
@@ -607,29 +607,28 @@ public class ProcessorUtilities {
return processor;
}
private static boolean checkLoopDependencies(Relation mainJobInfo, Map<String, String> idToLastestVersionMap)
throws ProcessorException {
List<Relation> itemsJobRelatedTo = getItemsRelation(mainJobInfo, idToLastestVersionMap);
private static boolean checkLoopDependencies(Relation mainJobInfo) throws ProcessorException {
List<Relation> itemsJobRelatedTo = getItemsRelation(mainJobInfo);
List<Relation> relationChecked = new ArrayList<>();
relationChecked.add(mainJobInfo);
return checkLoopDependencies(mainJobInfo, itemsJobRelatedTo, relationChecked, idToLastestVersionMap);
return checkLoopDependencies(mainJobInfo, itemsJobRelatedTo, relationChecked);
}
private static boolean checkLoopDependencies(Relation mainRelation, List<Relation> itemsJobRelatedTo,
List<Relation> relationChecked, Map<String, String> idToLastestVersionMap) throws ProcessorException {
List<Relation> relationChecked) throws ProcessorException {
boolean hasDependency = false;
for (Relation relation : itemsJobRelatedTo) {
hasDependency = relation.getId().equals(mainRelation.getId())
&& relation.getVersion().equals(mainRelation.getVersion());
if (!hasDependency) {
List<Relation> itemsChildJob = getItemsRelation(relation, idToLastestVersionMap);
List<Relation> itemsChildJob = getItemsRelation(relation);
if (!relationChecked.contains(relation)) {
relationChecked.add(relation);
hasDependency = checkLoopDependencies(mainRelation, itemsChildJob, relationChecked, idToLastestVersionMap);
hasDependency = checkLoopDependencies(mainRelation, itemsChildJob, relationChecked);
}
if (!hasDependency) {
for (Relation childRelation : itemsChildJob) {
hasDependency = checkLoopDependencies(childRelation, idToLastestVersionMap);
hasDependency = checkLoopDependencies(childRelation);
if (hasDependency) {
break;
}
@@ -644,7 +643,7 @@ public class ProcessorUtilities {
return hasDependency;
}
private static List<Relation> getItemsRelation(Relation mainJobInfo, Map<String, String> idToLastestVersionMap) throws ProcessorException {
private static List<Relation> getItemsRelation(Relation mainJobInfo) throws ProcessorException {
List<Relation> itemsJobRelatedTo = new ArrayList<Relation>();
try {
List<Project> allProjects = new ArrayList<Project>();
@@ -658,17 +657,12 @@ public class ProcessorUtilities {
mainJobInfo.getType(), RelationshipItemBuilder.JOBLET_RELATION));
for (Relation relation : itemsJobRelatedTo) {
if (relation.getVersion().equals(RelationshipItemBuilder.LATEST_VERSION)) {
if (idToLastestVersionMap.containsKey(relation.getId())) {
relation.setVersion(idToLastestVersionMap.get(relation.getId()));
} else {
for (Project project : allProjects) {
IRepositoryViewObject lastVersion =
ProxyRepositoryFactory.getInstance().getLastVersion(project, relation.getId());
if (lastVersion != null) {
relation.setVersion(lastVersion.getVersion());
idToLastestVersionMap.put(relation.getId(), relation.getVersion());
break;
}
for (Project project : allProjects) {
IRepositoryViewObject lastVersion =
ProxyRepositoryFactory.getInstance().getLastVersion(project, relation.getId());
if (lastVersion != null) {
relation.setVersion(lastVersion.getVersion());
break;
}
}
}
@@ -1027,7 +1021,7 @@ public class ProcessorUtilities {
mainRelation.setId(jobInfo.getJobId());
mainRelation.setVersion(jobInfo.getJobVersion());
mainRelation.setType(RelationshipItemBuilder.JOB_RELATION);
hasLoopDependency = checkLoopDependencies(mainRelation, new HashMap<String, String>());
hasLoopDependency = checkLoopDependencies(mainRelation);
// clean the previous code in case it has deleted subjob
cleanSourceFolder(progressMonitor, currentProcess, processor);
}
@@ -2181,7 +2175,7 @@ public class ProcessorUtilities {
EList<NodeType> nodes = ptype.getNode();
String jobletPaletteType = null;
String frameWork = ptype.getFramework();
if (StringUtils.isBlank(frameWork)) {
if (frameWork == null) {
jobletPaletteType = ComponentCategory.CATEGORY_4_DI.getName();
} else if (frameWork.equals(HadoopConstants.FRAMEWORK_SPARK)) {
jobletPaletteType = ComponentCategory.CATEGORY_4_SPARK.getName();

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.cwm.mip.edit</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.cwm.mip.editor</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.cwm.mip</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.datatools.xml</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.maven.aether</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.maven.tos</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>studio-maven-repository-tos</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>features-maven-plugin-2-2-9-tos</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>studio-maven-repository-tos</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>maven-bundle-plugin-2-3-7-tos</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>studio-maven-repository-tos</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>maven-bundle-plugin-2-5-3-tos</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>studio-maven-repository-tos</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>maven-install-plugin-2-5-1-tos</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>studio-maven-repository-tos</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>spring-boot-maven-plugin-1-5-9-RELEASE-tos</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>studio-maven-repository-tos</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../</relativePath>
</parent>
<artifactId>studio-maven-repository-build</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>studio-maven-repository-tos</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../</relativePath>
</parent>
<artifactId>studio-components-dependencies</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../../</relativePath>
</parent>
<artifactId>studio-maven-repository-tos</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>studio-maven-repository-tos</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../</relativePath>
</parent>
<artifactId>studio-surefire-dependencies</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>studio-maven-repository-tos</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../</relativePath>
</parent>
<artifactId>studio-tcompv1-dependencies</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>studio-maven-repository-tos</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../</relativePath>
</parent>
<artifactId>studio-maven-repository-unzip</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>studio-maven-repository-tos</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../</relativePath>
</parent>
<artifactId>studio-maven-repository-zip</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.maven.ui</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.designer.maven</artifactId>

View File

@@ -147,21 +147,21 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
/*
* (non-Javadoc)
*
*
* @see org.talend.designer.maven.tools.creator.CreateMavenBundleTemplatePom#getTemplateStream()
*/
@Override
protected InputStream getTemplateStream() throws IOException {
File templateFile = PomUtil
.getTemplateFile(getObjectTypeFolder(), getItemRelativePath(), TalendMavenConstants.POM_FILE_NAME);
File templateFile = PomUtil.getTemplateFile(getObjectTypeFolder(), getItemRelativePath(),
TalendMavenConstants.POM_FILE_NAME);
if (!FilesUtils.allInSameFolder(templateFile, TalendMavenConstants.ASSEMBLY_FILE_NAME)) {
templateFile = null; // force to set null, in order to use the template from other places.
}
try {
final Map<String, Object> templateParameters = PomUtil.getTemplateParameters(getJobProcessor());
return MavenTemplateManager
.getTemplateStream(templateFile, IProjectSettingPreferenceConstants.TEMPLATE_STANDALONE_JOB_POM,
JOB_TEMPLATE_BUNDLE, getBundleTemplatePath(), templateParameters);
return MavenTemplateManager.getTemplateStream(templateFile,
IProjectSettingPreferenceConstants.TEMPLATE_STANDALONE_JOB_POM, JOB_TEMPLATE_BUNDLE,
getBundleTemplatePath(), templateParameters);
} catch (Exception e) {
throw new IOException(e);
}
@@ -174,7 +174,7 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
}
/**
*
*
* Add the properties for job.
*/
@Override
@@ -191,9 +191,9 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
if (ProcessUtils.isTestContainer(process)) {
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITestContainerProviderService.class)) {
ITestContainerProviderService testService = (ITestContainerProviderService) GlobalServiceRegister
.getDefault()
.getService(ITestContainerProviderService.class);
ITestContainerProviderService testService =
(ITestContainerProviderService) GlobalServiceRegister.getDefault().getService(
ITestContainerProviderService.class);
try {
property = testService.getParentJobItem(property.getItem()).getProperty();
process = testService.getParentJobProcess(process);
@@ -224,7 +224,7 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
/*
* for jobInfo.properties
*
*
* should be same as JobInfoBuilder
*/
String contextName = getOptionString(TalendProcessArgumentConstant.ARG_CONTEXT_NAME);
@@ -397,9 +397,8 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
boolean set = false;
// read template from project setting
try {
File templateFile = PomUtil
.getTemplateFile(getObjectTypeFolder(), getItemRelativePath(),
TalendMavenConstants.ASSEMBLY_FILE_NAME);
File templateFile = PomUtil.getTemplateFile(getObjectTypeFolder(), getItemRelativePath(),
TalendMavenConstants.ASSEMBLY_FILE_NAME);
if (!FilesUtils.allInSameFolder(templateFile, TalendMavenConstants.POM_FILE_NAME)) {
templateFile = null; // force to set null, in order to use the template from other places.
}
@@ -411,23 +410,22 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
Object needLauncher = processor.getArguments().get(TalendProcessArgumentConstant.ARG_NEED_LAUNCHER);
if (needLauncher != null) {
if ((Boolean) needLauncher) {
Object launcherObj =
processor.getArguments().get(TalendProcessArgumentConstant.ARG_LAUNCHER_NAME);
Object launcherObj = processor.getArguments().get(TalendProcessArgumentConstant.ARG_LAUNCHER_NAME);
if (launcherObj != null) {
launcherName = (String) launcherObj;
}
}
}
}
String content = MavenTemplateManager
.getTemplateContent(templateFile,
String content =
MavenTemplateManager.getTemplateContent(templateFile,
IProjectSettingPreferenceConstants.TEMPLATE_STANDALONE_JOB_ASSEMBLY,
JOB_TEMPLATE_BUNDLE,
IProjectSettingTemplateConstants.PATH_STANDALONE + '/'
+ IProjectSettingTemplateConstants.ASSEMBLY_JOB_TEMPLATE_FILE_NAME,
templateParameters);
if (content != null) {
content = TemplateFileUtils.handleAssemblyJobTemplate(content, launcherName);
content = TemplateFileUtils.handleAssemblyJobTemplate(content, launcherName);
ByteArrayInputStream source = new ByteArrayInputStream(content.getBytes());
if (assemblyFile.exists()) {
assemblyFile.setContents(source, true, false, monitor);
@@ -452,7 +450,7 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
if (codeProject == null) {
return;
}
Property property = codeProject.getPropery() != null ? codeProject.getPropery() : processor.getProperty();
Property property = codeProject.getPropery();
if (property == null) {
return;
}
@@ -478,8 +476,8 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
addScriptAddition(unixScriptAdditionValue, contextPart);
}
// context params
List paramsList = ProcessUtils
.getOptionValue(getArgumentsMap(), TalendProcessArgumentConstant.ARG_CONTEXT_PARAMS, (List) null);
List paramsList = ProcessUtils.getOptionValue(getArgumentsMap(),
TalendProcessArgumentConstant.ARG_CONTEXT_PARAMS, (List) null);
if (paramsList != null && !paramsList.isEmpty()) {
StringBuffer contextParamPart = new StringBuffer(100);
// do codes same as JobScriptsManager.getSettingContextParametersValue
@@ -556,32 +554,29 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
}
}
final Map<String, Object> templateParameters = PomUtil.getTemplateParameters(property);
String batContent = MavenTemplateManager
.getProjectSettingValue(IProjectSettingPreferenceConstants.TEMPLATE_BAT, templateParameters);
batContent = StringUtils
.replaceEach(batContent,
new String[] { "${talend.job.jvmargs}", "${talend.job.bat.classpath}", "${talend.job.class}",
"${talend.job.bat.addition}" },
new String[] { jvmArgsStr.toString().trim(), getWindowsClasspath(), jobClass,
windowsScriptAdditionValue.toString() });
String batContent = MavenTemplateManager.getProjectSettingValue(IProjectSettingPreferenceConstants.TEMPLATE_BAT,
templateParameters);
batContent = StringUtils.replaceEach(batContent,
new String[] { "${talend.job.jvmargs}", "${talend.job.bat.classpath}", "${talend.job.class}",
"${talend.job.bat.addition}" },
new String[] { jvmArgsStr.toString().trim(), getWindowsClasspath(), jobClass,
windowsScriptAdditionValue.toString() });
String shContent = MavenTemplateManager
.getProjectSettingValue(IProjectSettingPreferenceConstants.TEMPLATE_SH, templateParameters);
shContent = StringUtils
.replaceEach(shContent,
new String[] { "${talend.job.jvmargs}", "${talend.job.sh.classpath}", "${talend.job.class}",
"${talend.job.sh.addition}" },
new String[] { jvmArgsStr.toString().trim(), getUnixClasspath(), jobClass,
unixScriptAdditionValue.toString() });
String shContent = MavenTemplateManager.getProjectSettingValue(IProjectSettingPreferenceConstants.TEMPLATE_SH,
templateParameters);
shContent = StringUtils.replaceEach(shContent,
new String[] { "${talend.job.jvmargs}", "${talend.job.sh.classpath}", "${talend.job.class}",
"${talend.job.sh.addition}" },
new String[] { jvmArgsStr.toString().trim(), getUnixClasspath(), jobClass,
unixScriptAdditionValue.toString() });
String psContent = MavenTemplateManager
.getProjectSettingValue(IProjectSettingPreferenceConstants.TEMPLATE_PS, templateParameters);
psContent = StringUtils
.replaceEach(psContent,
new String[] { "${talend.job.jvmargs.ps1}", "${talend.job.ps1.classpath}",
"${talend.job.class}", "${talend.job.bat.addition}" },
new String[] { jvmArgsStrPs1.toString().trim(), getWindowsClasspathForPs1(), jobClass,
windowsScriptAdditionValue.toString() });
String psContent = MavenTemplateManager.getProjectSettingValue(IProjectSettingPreferenceConstants.TEMPLATE_PS,
templateParameters);
psContent = StringUtils.replaceEach(psContent,
new String[] { "${talend.job.jvmargs.ps1}", "${talend.job.ps1.classpath}", "${talend.job.class}",
"${talend.job.bat.addition}" },
new String[] { jvmArgsStrPs1.toString().trim(), getWindowsClasspathForPs1(), jobClass,
windowsScriptAdditionValue.toString() });
String jobInfoContent = MavenTemplateManager
.getProjectSettingValue(IProjectSettingPreferenceConstants.TEMPLATE_JOB_INFO, templateParameters);
@@ -616,15 +611,12 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
protected ITalendProcessJavaProject getTalendJobJavaProject(JobInfo jobInfo) {
IProcessor processor = jobInfo.getProcessor();
if (processor == null) {
processor = getJobProcessor();
}
ITalendProcessJavaProject talendProcessJavaProject = processor.getTalendJavaProject();
if (talendProcessJavaProject == null) {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
IRunProcessService service =
(IRunProcessService) GlobalServiceRegister.getDefault().getService(IRunProcessService.class);
IRunProcessService service = (IRunProcessService) GlobalServiceRegister.getDefault()
.getService(IRunProcessService.class);
if (processor.getProperty() == null) {
processor = jobInfo.getReloadedProcessor();
}
@@ -640,8 +632,8 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
if (talendProcessJavaProject == null) {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
IRunProcessService service =
(IRunProcessService) GlobalServiceRegister.getDefault().getService(IRunProcessService.class);
IRunProcessService service = (IRunProcessService) GlobalServiceRegister.getDefault()
.getService(IRunProcessService.class);
talendProcessJavaProject = service.getTalendJobJavaProject(processor.getProperty());
}
@@ -659,17 +651,16 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
// add children jobs
for (JobInfo jobInfo : childrenJobInfo) {
Property property = jobInfo.getProcessItem().getProperty();
String coordinate =
getCoordinate(PomIdsHelper.getJobGroupId(property), PomIdsHelper.getJobArtifactId(jobInfo),
MavenConstants.PACKAGING_JAR, PomIdsHelper.getJobVersion(property));
String coordinate = getCoordinate(PomIdsHelper.getJobGroupId(property), PomIdsHelper.getJobArtifactId(jobInfo),
MavenConstants.PACKAGING_JAR, PomIdsHelper.getJobVersion(property));
jobCoordinate.add(coordinate);
}
// add parent job
Property parentProperty = this.getJobProcessor().getProperty();
String parentCoordinate =
getCoordinate(PomIdsHelper.getJobGroupId(parentProperty), PomIdsHelper.getJobArtifactId(parentProperty),
MavenConstants.PACKAGING_JAR, PomIdsHelper.getJobVersion(parentProperty));
String parentCoordinate = getCoordinate(PomIdsHelper.getJobGroupId(parentProperty),
PomIdsHelper.getJobArtifactId(parentProperty), MavenConstants.PACKAGING_JAR,
PomIdsHelper.getJobVersion(parentProperty));
jobCoordinate.add(parentCoordinate);
// add talend libraries and codes
@@ -686,9 +677,8 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
// libraries
dependencies.clear();
Set<ModuleNeeded> modules = getJobProcessor()
.getNeededModules(TalendProcessOptionConstants.MODULES_WITH_JOBLET
| TalendProcessOptionConstants.MODULES_EXCLUDE_SHADED);
Set<ModuleNeeded> modules = getJobProcessor().getNeededModules(
TalendProcessOptionConstants.MODULES_WITH_JOBLET | TalendProcessOptionConstants.MODULES_EXCLUDE_SHADED);
for (ModuleNeeded module : modules) {
String mavenUri = module.getMavenUri();
Dependency dependency = PomUtil.createModuleDependency(mavenUri);
@@ -724,10 +714,8 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
// add missing modules from the job generation of children
Set<ModuleNeeded> fullModulesList = new HashSet<>();
for (JobInfo jobInfo : childrenJobInfo) {
fullModulesList
.addAll(LastGenerationInfo
.getInstance()
.getModulesNeededWithSubjobPerJob(jobInfo.getJobId(), jobInfo.getJobVersion()));
fullModulesList.addAll(LastGenerationInfo.getInstance().getModulesNeededWithSubjobPerJob(jobInfo.getJobId(),
jobInfo.getJobVersion()));
}
for (ModuleNeeded moduleNeeded : fullModulesList) {
if (moduleNeeded.isExcluded()) {
@@ -743,9 +731,8 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
talendLibCoordinate.add(coordinate);
} else {
_3rdDepLib.add(coordinate);
Dependency dependency = PomUtil
.createDependency(artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(),
artifact.getType(), artifact.getClassifier());
Dependency dependency = PomUtil.createDependency(artifact.getGroupId(), artifact.getArtifactId(),
artifact.getVersion(), artifact.getType(), artifact.getClassifier());
addToDuplicateLibs(duplicateLibs, dependency);
}
}
@@ -769,8 +756,7 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
try {
Document document = PomUtil.loadAssemblyFile(null, assemblyFile);
// add talend libs & codes
setupDependencySetNode(document, talendLibCoordinate, "lib", "${artifact.artifactId}.${artifact.extension}",
false);
setupDependencySetNode(document, talendLibCoordinate, "lib", "${artifact.artifactId}.${artifact.extension}", false);
// add 3rd party libs <dependencySet>
setupDependencySetNode(document, _3rdDepLib, "lib", null, false);
// add jobs
@@ -786,8 +772,7 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
}
private String getCoordinate(Dependency dependency) {
return getCoordinate(dependency.getGroupId(), dependency.getArtifactId(), dependency.getType(),
dependency.getVersion());
return getCoordinate(dependency.getGroupId(), dependency.getArtifactId(), dependency.getType(), dependency.getVersion());
}
protected String getCoordinate(String groupId, String artifactId, String type, String version) {
@@ -804,8 +789,7 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
}
private void addToDuplicateLibs(Map<String, Set<Dependency>> map, Dependency dependency) {
String coordinate =
getCoordinate(dependency.getGroupId(), dependency.getArtifactId(), dependency.getType(), null);
String coordinate = getCoordinate(dependency.getGroupId(), dependency.getArtifactId(), dependency.getType(), null);
if (!map.containsKey(coordinate)) {
Set<Dependency> set = new HashSet<>();
map.put(coordinate, set);
@@ -813,8 +797,8 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
map.get(coordinate).add(dependency);
}
protected void setupDependencySetNode(Document document, Set<String> libIncludes, String outputDir,
String fileNameMapping, boolean useProjectArtifact) {
protected void setupDependencySetNode(Document document, Set<String> libIncludes, String outputDir, String fileNameMapping,
boolean useProjectArtifact) {
if (libIncludes.isEmpty()) {
return;
}
@@ -861,9 +845,8 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
for (Entry<String, Set<Dependency>> entry : duplicateDependencies.entrySet()) {
Set<Dependency> dependencies = entry.getValue();
for (Dependency dependency : dependencies) {
String sourceLocation = maven
.getArtifactPath(repository, dependency.getGroupId(), dependency.getArtifactId(),
dependency.getVersion(), dependency.getType(), dependency.getClassifier());
String sourceLocation = maven.getArtifactPath(repository, dependency.getGroupId(), dependency.getArtifactId(),
dependency.getVersion(), dependency.getType(), dependency.getClassifier());
Path path = new File(repository.getBasedir()).toPath().resolve(sourceLocation);
sourceLocation = path.toString();
String destName = path.getFileName().toString();

View File

@@ -31,7 +31,6 @@ import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import javax.xml.parsers.DocumentBuilder;
@@ -117,9 +116,7 @@ public class PomUtil {
if (pomFile == null) {
throw new NullPointerException("the output file is null.");
}
Properties properties = new Properties();
properties.putAll(model.getProperties());
model.setProperties(properties);
/*
* copied the codes from createMavenModel of MavenModelManager
*/
@@ -141,9 +138,7 @@ public class PomUtil {
if (pomFile == null) {
throw new NullPointerException("the output file is null.");
}
Properties properties = new Properties();
properties.putAll(model.getProperties());
model.setProperties(properties);
ByteArrayOutputStream buf = new ByteArrayOutputStream();
MavenPlugin.getMaven().writeModel(model, buf);

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.developpement</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.helpers</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.libraries.apache.axis2</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.libraries.apache.batik</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.libraries.apache.cassandra</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.libraries.apache.chemistry</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.libraries.apache.common</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.libraries.apache.cxf</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.libraries.apache.google</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.libraries.apache.http</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.libraries.apache.lucene</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.libraries.apache.lucene4</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.libraries.apache.lucene6</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.libraries.apache.xml</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.libraries.apache</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.libraries.csv</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.libraries.dom4j-jaxen</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.libraries.jackson</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.libraries.javacsv.jars</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.libraries.javacsv</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.libraries.jboss.jars</artifactId>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>org.talend.studio</groupId>
<artifactId>tcommon-studio-se</artifactId>
<version>7.2.1-M3</version>
<version>7.2.1-M2</version>
<relativePath>../../../</relativePath>
</parent>
<artifactId>org.talend.libraries.jboss</artifactId>

Some files were not shown because too many files have changed in this diff Show More