Compare commits
57 Commits
cmeng/back
...
patchrelea
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f1b9ed2e86 | ||
|
|
de48a67805 | ||
|
|
55723c1a48 | ||
|
|
7bb5692418 | ||
|
|
4010656564 | ||
|
|
966becc5e5 | ||
|
|
8bd1fd724f | ||
|
|
92d31aa477 | ||
|
|
b4f77effd8 | ||
|
|
3086f9be45 | ||
|
|
8dc5f853fd | ||
|
|
dfae595cbe | ||
|
|
b3271f70e0 | ||
|
|
486650da91 | ||
|
|
2885482d6f | ||
|
|
e35338ca0a | ||
|
|
76452e3799 | ||
|
|
4b0c75070d | ||
|
|
1ac63975c1 | ||
|
|
dffa6d97c9 | ||
|
|
eee0169c90 | ||
|
|
124ec1357d | ||
|
|
3e2f12848c | ||
|
|
22e607210d | ||
|
|
5780ce2693 | ||
|
|
04c0e2f42c | ||
|
|
3b6ffd8f49 | ||
|
|
61d8e73084 | ||
|
|
fffdd9a78e | ||
|
|
9186869001 | ||
|
|
c3f8ae1d53 | ||
|
|
294e8a23f5 | ||
|
|
637a2423a0 | ||
|
|
6ad0a9ac92 | ||
|
|
161e5d97a7 | ||
|
|
e6a9513d45 | ||
|
|
74174c14c6 | ||
|
|
2ec51860a5 | ||
|
|
bc3e338910 | ||
|
|
a823899d39 | ||
|
|
436af2427e | ||
|
|
d7252412ed | ||
|
|
af38e2a0b6 | ||
|
|
c3d3fcf665 | ||
|
|
987c6667ac | ||
|
|
f0401b97d1 | ||
|
|
26992f7cf9 | ||
|
|
169ab1c4cc | ||
|
|
f04049abc0 | ||
|
|
7e6f2dee19 | ||
|
|
2dd7ce6fac | ||
|
|
be373dd141 | ||
|
|
43876863e6 | ||
|
|
4ac2a830a9 | ||
|
|
3d6d3e77e3 | ||
|
|
71b4ccc531 | ||
|
|
48289a3c72 |
BIN
main/plugins/org.talend.common.ui.runtime/icons1/share.png
Normal file
BIN
main/plugins/org.talend.common.ui.runtime/icons1/share.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
@@ -166,6 +166,7 @@ public enum ECoreImage implements IImage {
|
||||
RECYCLE_BIN_OVERLAY("/icons1/recycle_bin_overlay.gif"), //$NON-NLS-1$
|
||||
DELETED_OVERLAY("/icons1/deleted_overlay.gif"), //$NON-NLS-1$
|
||||
IMPORT_JAR("/icons1/importjar.gif"), //$NON-NLS-1$
|
||||
SHARE_LIBS("/icons1/share.png"), //$NON-NLS-1$
|
||||
REFERENCED_ICON("/icons1/referenced.png"), //$NON-NLS-1$
|
||||
|
||||
CDC_ADDED_OVERLAY("/icons1/cdc_added_overlay.png"), //$NON-NLS-1$
|
||||
|
||||
@@ -16,6 +16,8 @@ import org.eclipse.core.internal.runtime.InternalPlatform;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* DOC root class global comment. Detailled comment <br/>
|
||||
@@ -52,5 +54,9 @@ public class WindowSystem {
|
||||
public static boolean isOSX() {
|
||||
return Platform.WS_CARBON.equals(ws) || Platform.WS_COCOA.equals(ws);
|
||||
}
|
||||
|
||||
public static boolean isBigSurOrLater () {
|
||||
return isOSX() && ("10.16".compareTo(System.getProperty("os.version","0")) <= 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ public class SAPHanaDataBaseMetadata extends FakeDatabaseMetaData {
|
||||
}
|
||||
|
||||
// For Calculation View
|
||||
if (ArrayUtils.contains(neededTypes, NEEDED_TYPES[3])) {
|
||||
if (ArrayUtils.contains(neededTypes, NEEDED_TYPES[3]) && "_SYS_BIC".equalsIgnoreCase(schemaPattern)) { //$NON-NLS-1$
|
||||
// check if the type is contained is in the types needed.
|
||||
String sqlcv = "SELECT OBJECT_NAME,PACKAGE_ID FROM _SYS_REPO.ACTIVE_OBJECT WHERE OBJECT_SUFFIX = 'calculationview'"; //$NON-NLS-1$
|
||||
if (tableNamePattern != null && !tableNamePattern.equals("%")) { //$NON-NLS-1$
|
||||
@@ -171,7 +171,7 @@ public class SAPHanaDataBaseMetadata extends FakeDatabaseMetaData {
|
||||
packageId = packageId.trim();
|
||||
}
|
||||
String name = packageId + "/" + objectName; //$NON-NLS-1$
|
||||
String[] r = new String[] { "", "_SYS_BIC", name, NEEDED_TYPES[3], "", packageId }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
String[] r = new String[] { "", schemaPattern, name, NEEDED_TYPES[3], "", packageId }; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
listcv.add(r);
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
@@ -355,4 +355,16 @@ public class SAPHanaDataBaseMetadata extends FakeDatabaseMetaData {
|
||||
tableResultSet.setData(list);
|
||||
return tableResultSet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDatabaseProductName() throws SQLException {
|
||||
return this.connection.getMetaData().getDatabaseProductName();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDatabaseProductVersion() throws SQLException {
|
||||
return this.connection.getMetaData().getDatabaseProductVersion();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -240,7 +240,11 @@ public class BackgroundRefresher implements IBackgroundRefresher {
|
||||
|
||||
gc.dispose();
|
||||
|
||||
drawableComposite.getBgDrawableComposite().setBackgroundImage(newImage);
|
||||
if (WindowSystem.isBigSurOrLater()) {
|
||||
drawableComposite.refreshBgDrawableCompsite(newImage);
|
||||
} else {
|
||||
drawableComposite.getBgDrawableComposite().setBackgroundImage(newImage);
|
||||
}
|
||||
|
||||
clearImage(oldImage);
|
||||
oldImage = newImage;
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
package org.talend.commons.ui.swt.drawing.background;
|
||||
|
||||
import org.eclipse.swt.graphics.GC;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.graphics.Point;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
|
||||
@@ -28,6 +29,8 @@ public interface IBgDrawableComposite {
|
||||
|
||||
public Composite getBgDrawableComposite();
|
||||
|
||||
public void refreshBgDrawableCompsite(Image image);
|
||||
|
||||
public void setOffset(Point offsetPoint);
|
||||
|
||||
public Point getOffset();
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.eclipse.swt.widgets.Event;
|
||||
import org.eclipse.swt.widgets.Label;
|
||||
import org.eclipse.swt.widgets.Listener;
|
||||
import org.eclipse.swt.widgets.Text;
|
||||
import org.talend.commons.ui.runtime.ws.WindowSystem;
|
||||
|
||||
/**
|
||||
* Create a Label and a Text.
|
||||
@@ -153,7 +154,14 @@ public class LabelledText {
|
||||
});
|
||||
GridDataFactory.swtDefaults().applyTo(label);
|
||||
|
||||
text = new Text(composite, styleField);
|
||||
// For Big Sur, to avoid the password autofill dialog.
|
||||
if (WindowSystem.isBigSurOrLater() && ((styleField & SWT.PASSWORD) != 0)) {
|
||||
styleField ^= SWT.PASSWORD;
|
||||
text = new Text(composite, styleField);
|
||||
text.setEchoChar('*');
|
||||
} else {
|
||||
text = new Text(composite, styleField);
|
||||
}
|
||||
text.selectAll(); // enable fast erase use
|
||||
int gridDataStyle = SWT.NONE;
|
||||
if (isFill) {
|
||||
|
||||
@@ -12,7 +12,12 @@
|
||||
// ============================================================================
|
||||
package org.talend.commons.ui.swt.linking;
|
||||
|
||||
import org.eclipse.swt.events.DisposeEvent;
|
||||
import org.eclipse.swt.events.DisposeListener;
|
||||
import org.eclipse.swt.events.PaintEvent;
|
||||
import org.eclipse.swt.events.PaintListener;
|
||||
import org.eclipse.swt.graphics.GC;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.graphics.Point;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.talend.commons.ui.swt.drawing.background.IBgDrawableComposite;
|
||||
@@ -28,6 +33,8 @@ public abstract class BgDrawableComposite implements IBgDrawableComposite {
|
||||
private Composite commonParent;
|
||||
|
||||
private Point offsetPoint = new Point(0, 0);
|
||||
|
||||
private Image backgroundImage;
|
||||
|
||||
/**
|
||||
* DOC amaumont DrawableBackground constructor comment.
|
||||
@@ -36,9 +43,36 @@ public abstract class BgDrawableComposite implements IBgDrawableComposite {
|
||||
*/
|
||||
public BgDrawableComposite(Composite commonParent) {
|
||||
this.commonParent = commonParent;
|
||||
this.commonParent.addPaintListener(new PaintListener() {
|
||||
|
||||
@Override
|
||||
public void paintControl(PaintEvent arg0) {
|
||||
if (backgroundImage != null) {
|
||||
arg0.gc.drawImage(backgroundImage, 0, 0);
|
||||
}
|
||||
}
|
||||
});
|
||||
this.commonParent.addDisposeListener(new DisposeListener() {
|
||||
|
||||
@Override
|
||||
public void widgetDisposed(DisposeEvent arg0) {
|
||||
if (backgroundImage != null && !backgroundImage.isDisposed()) {
|
||||
backgroundImage.dispose();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
@Override
|
||||
public void refreshBgDrawableCompsite(Image image) {
|
||||
if (backgroundImage != null) {
|
||||
backgroundImage.dispose();
|
||||
}
|
||||
backgroundImage = image;
|
||||
this.commonParent.redraw();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.talend.commons.ui.swt.drawing.background.IDrawableComposite#drawBackground(org.eclipse.swt.graphics.GC)
|
||||
|
||||
@@ -15,6 +15,7 @@ package org.talend.commons.ui.swt.linking;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
@@ -77,6 +78,8 @@ public class TreeToTablesLinker<D1, D2> extends BgDrawableComposite implements I
|
||||
|
||||
private List<LinkableTable> linkableTableList;
|
||||
|
||||
private HashMap<Table, Point> tableToCommonPointMap = new HashMap<Table, Point>();
|
||||
|
||||
/**
|
||||
* DOC amaumont TreeToTableLinker constructor comment.
|
||||
*
|
||||
@@ -258,8 +261,34 @@ public class TreeToTablesLinker<D1, D2> extends BgDrawableComposite implements I
|
||||
|
||||
Point offset = getOffset();
|
||||
|
||||
gc.drawLine(pointStartStraight.x + offset.x, pointStartStraight.y + offset.y, pointEndStraight.x + offset.x,
|
||||
pointEndStraight.y + offset.y);
|
||||
if (WindowSystem.isBigSurOrLater()) {
|
||||
if (yStraight < tree.getBounds().y + treeItemHeight) {
|
||||
yStraight = tree.getBounds().y + treeItemHeight;
|
||||
}
|
||||
if (yStraight > tree.getBounds().height + tree.getBounds().y + treeItemHeight) {
|
||||
yStraight = tree.getBounds().height + tree.getBounds().y + treeItemHeight;
|
||||
}
|
||||
pointEndStraight = new Point(treeToCommonPoint.x + tree.getClientArea().width, yStraight);
|
||||
if (tableToCommonPointMap.get(table) == null) {
|
||||
tableToCommonPointMap.put(table, display.map(table, getBgDrawableComposite(), new Point(0, 0)));
|
||||
}
|
||||
// scroll issue for table
|
||||
if (tableToCommonPoint.y != tableToCommonPointMap.get(table).y) {
|
||||
pointEndCentralCurve.y = tableToCommonPoint.y + tableItemBounds.y
|
||||
+ table.getItemHeight() / 2;
|
||||
}
|
||||
if (pointEndCentralCurve.y < tableToCommonPointMap.get(table).y) {
|
||||
pointEndCentralCurve.y = tableToCommonPointMap.get(table).y;
|
||||
}
|
||||
if (pointEndCentralCurve.y > tableToCommonPointMap.get(table).y + tableBounds.height - table.getBorderWidth()
|
||||
- table.getHeaderHeight()) {
|
||||
pointEndCentralCurve.y = tableToCommonPointMap.get(table).y + tableBounds.height - table.getBorderWidth()
|
||||
- table.getHeaderHeight();
|
||||
}
|
||||
} else {
|
||||
gc.drawLine(pointStartStraight.x + offset.x, pointStartStraight.y + offset.y, pointEndStraight.x + offset.x,
|
||||
pointEndStraight.y + offset.y);
|
||||
}
|
||||
|
||||
pointEndStraight.x += offset.x;
|
||||
pointEndStraight.y += offset.y;
|
||||
|
||||
@@ -109,4 +109,8 @@ public interface FileConstants {
|
||||
|
||||
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.core.service.IUpdateService;
|
||||
import org.talend.cwm.helper.SubItemHelper;
|
||||
@@ -1799,9 +1800,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);
|
||||
@@ -2201,6 +2205,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();
|
||||
@@ -2302,8 +2314,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);
|
||||
|
||||
@@ -205,6 +205,27 @@ public class StandaloneConnectionContextUtils {
|
||||
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_ADDITIONAL_JDBC_SETTINGS,
|
||||
getOriginalValue(contextProperties, additionalJDBCSettings));
|
||||
|
||||
String dataprocProjectId = cloneConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_PROJECT_ID);
|
||||
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_PROJECT_ID,
|
||||
getOriginalValue(contextProperties, dataprocProjectId));
|
||||
|
||||
String dataprocClusterId = cloneConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_CLUSTER_ID);
|
||||
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_CLUSTER_ID,
|
||||
getOriginalValue(contextProperties, dataprocClusterId));
|
||||
|
||||
String dataprocRegion = cloneConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_REGION);
|
||||
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_REGION,
|
||||
getOriginalValue(contextProperties, dataprocRegion));
|
||||
|
||||
String dataprocJarsBucket = cloneConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_JARS_BUCKET);
|
||||
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_JARS_BUCKET,
|
||||
getOriginalValue(contextProperties, dataprocJarsBucket));
|
||||
|
||||
String dataprocPathToCredentials = cloneConn.getParameters()
|
||||
.get(ConnParameterKeys.CONN_PARA_KEY_HIVE_AUTHENTICATION_PATH_TO_GOOGLE_CREDENTIALS);
|
||||
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_AUTHENTICATION_PATH_TO_GOOGLE_CREDENTIALS,
|
||||
getOriginalValue(contextProperties, dataprocPathToCredentials));
|
||||
|
||||
String hiveEnableHa = cloneConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_ENABLE_HA);
|
||||
cloneConn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_ENABLE_HA,
|
||||
getOriginalValue(contextProperties, hiveEnableHa));
|
||||
|
||||
@@ -122,7 +122,8 @@ Require-Bundle: org.eclipse.jdt.core,
|
||||
org.talend.components.api,
|
||||
org.apache.servicemix.bundles.avro,
|
||||
jackson-core-asl,
|
||||
org.talend.libraries.jackson
|
||||
org.talend.libraries.jackson,
|
||||
org.talend.libraries.apache.common
|
||||
Bundle-Activator: org.talend.core.runtime.CoreRuntimePlugin
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-ClassPath: .,
|
||||
|
||||
@@ -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$
|
||||
@@ -364,6 +366,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);
|
||||
|
||||
@@ -163,6 +163,18 @@ public class ConnParameterKeys {
|
||||
|
||||
public static final String CONN_PARA_KEY_HIVE_AUTHENTICATION_MAPRTICKET_DURATION = "CONN_PARA_KEY_HIVE_AUTHENTICATION_MAPRTICKET_DURATION";//$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_HIVE_GOOGLE_PROJECT_ID = "CONN_PARA_KEY_HIVE_GOOGLE_PROJECT_ID";//$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_HIVE_GOOGLE_CLUSTER_ID = "CONN_PARA_KEY_HIVE_GOOGLE_CLUSTER_ID";//$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_HIVE_GOOGLE_REGION = "CONN_PARA_KEY_HIVE_GOOGLE_REGION";//$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_HIVE_GOOGLE_JARS_BUCKET = "CONN_PARA_KEY_HIVE_GOOGLE_JARS_BUCKET";//$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_HIVE_AUTHENTICATION_DEFINE_PATH_TO_GOOGLE_CREDENTIALS = "CONN_PARA_KEY_HIVE_AUTHENTICATION_DEFINE_PATH_TO_GOOGLE_CREDENTIALS";//$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_HIVE_AUTHENTICATION_PATH_TO_GOOGLE_CREDENTIALS = "CONN_PARA_KEY_HIVE_AUTHENTICATION_PATH_TO_GOOGLE_CREDENTIALS";//$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* The key is for metastore server.
|
||||
*/
|
||||
|
||||
@@ -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$
|
||||
|
||||
@@ -20,6 +20,8 @@ package org.talend.core.hadoop;
|
||||
public class HadoopConstants {
|
||||
|
||||
public static final String SPARK_LOCAL_MODE = "SPARK_LOCAL_MODE";
|
||||
|
||||
public static final String SPARK_LOCAL_VERSION = "SPARK_LOCAL_VERSION";
|
||||
|
||||
public static final String SPARK_MODE = "SPARK_MODE";
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ public class ContextUtils {
|
||||
"static", "void", "class", "finally", "long", "strictfp", "volatile", "const", "float", "native", "super", "while")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
|
||||
|
||||
private static final Set<String> SECURE_SENSITIVE_CONTEXT_NAMES_EXP = new HashSet<String>(Arrays.asList("resource_flow_temp_folder", "resource_webhook_payload", "resource_file_[\\w]+",
|
||||
"resource_directory_[\\w]+", "connection_[a-zA-Z0-9]+_[\\w]"));
|
||||
"resource_directory_[\\w]+", "connection_[a-zA-Z0-9]+_[\\w]+"));
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1769,6 +1769,38 @@ public class RepositoryToComponentProperty {
|
||||
if ("IMPALA_DRIVER".equals(value)) {
|
||||
return connection.getParameters().get(ConnParameterKeys.IMPALA_DRIVER);
|
||||
}
|
||||
|
||||
if (value.equals("GOOGLE_PROJECT_ID")) {
|
||||
String projectId = connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_PROJECT_ID);
|
||||
return getAppropriateValue(connection, projectId);
|
||||
}
|
||||
|
||||
if (value.equals("GOOGLE_CLUSTER_ID")) {
|
||||
String clusterId = connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_CLUSTER_ID);
|
||||
return getAppropriateValue(connection, clusterId);
|
||||
}
|
||||
|
||||
if (value.equals("GOOGLE_REGION")) {
|
||||
String region = connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_REGION);
|
||||
return getAppropriateValue(connection, region);
|
||||
}
|
||||
|
||||
if (value.equals("GOOGLE_JARS_BUCKET")) {
|
||||
String jarsBucket = connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_GOOGLE_JARS_BUCKET);
|
||||
return getAppropriateValue(connection, jarsBucket);
|
||||
}
|
||||
|
||||
if (value.equals("DEFINE_PATH_TO_GOOGLE_CREDENTIALS")) {
|
||||
String usePathToCredentials = connection.getParameters()
|
||||
.get(ConnParameterKeys.CONN_PARA_KEY_HIVE_AUTHENTICATION_DEFINE_PATH_TO_GOOGLE_CREDENTIALS);
|
||||
return Boolean.parseBoolean(usePathToCredentials);
|
||||
}
|
||||
|
||||
if (value.equals("PATH_TO_GOOGLE_CREDENTIALS")) {
|
||||
String pathToCredentials = connection.getParameters()
|
||||
.get(ConnParameterKeys.CONN_PARA_KEY_HIVE_AUTHENTICATION_PATH_TO_GOOGLE_CREDENTIALS);
|
||||
return getAppropriateValue(connection, pathToCredentials);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -232,4 +232,6 @@ public interface IElementParameter {
|
||||
public boolean isSerialized();
|
||||
|
||||
public void setSerialized(boolean isSerialized);
|
||||
|
||||
public boolean isSelectedFromItemValue();
|
||||
}
|
||||
|
||||
@@ -131,4 +131,6 @@ public interface IProcess extends IElement {
|
||||
public void checkStartNodes();
|
||||
|
||||
public String getComponentsType();
|
||||
|
||||
public INode getNodeByUniqueName(String uniqueName);
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.commons.utils.VersionUtils;
|
||||
@@ -53,6 +54,7 @@ import org.talend.core.utils.BitwiseOptionUtils;
|
||||
import org.talend.designer.core.IDesignerCoreService;
|
||||
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.ElementParameterType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.MetadataType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.NodeType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ProcessType;
|
||||
@@ -60,6 +62,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
|
||||
@@ -1003,12 +1006,49 @@ public final class ProcessUtils {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public static boolean isChildRouteProcess(IProcess process) {
|
||||
List n = process.getNodesOfType("tRouteInput");
|
||||
if (n!=null && n.size()!=0) {
|
||||
return true;
|
||||
if (process != null) {
|
||||
for (INode node : process.getGraphicalNodes()) {
|
||||
if ((node.getComponent().getName() != null) &&
|
||||
(node.getComponent().getName().compareTo("tRouteInput") == 0)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static String escapeJava(String input) {
|
||||
return StringEscapeUtils.escapeJava(input);
|
||||
}
|
||||
|
||||
public static boolean hasJettyEndpoint(ProcessType process) {
|
||||
|
||||
EList<NodeType> nodesList = process.getNode();
|
||||
|
||||
boolean hasJettyEndpoint = hasJettyEndpoint(nodesList);
|
||||
|
||||
return hasJettyEndpoint;
|
||||
}
|
||||
|
||||
private static boolean hasJettyEndpoint(EList<NodeType> nodesList) {
|
||||
for (NodeType node : nodesList) {
|
||||
if ("cMessagingEndpoint".equals(node.getComponentName())) {
|
||||
for (Object elementParameter : node.getElementParameter()) {
|
||||
ElementParameterType elementParameterType = (ElementParameterType)elementParameter;
|
||||
|
||||
String name = elementParameterType.getName();
|
||||
String value = elementParameterType.getValue();
|
||||
|
||||
if ("URI".equals(name) && (value != null && StringUtils.startsWith(value.trim(), "\"jetty:"))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -231,7 +231,12 @@ public class TalendLibsServerManager {
|
||||
return canConnect;
|
||||
}
|
||||
|
||||
public ArtifactRepositoryBean getTalentArtifactServer() {
|
||||
public boolean isProxyArtifactRepoConfigured() {
|
||||
ArtifactRepositoryBean serverBean = getProxyArtifactServer();
|
||||
return serverBean == null ? false : true;
|
||||
}
|
||||
|
||||
public ArtifactRepositoryBean getProxyArtifactServer() {
|
||||
ArtifactRepositoryBean serverBean = new ArtifactRepositoryBean();
|
||||
// get from ini file first
|
||||
String url = System.getProperty(NEXUS_PROXY_URL);
|
||||
@@ -255,9 +260,16 @@ public class TalendLibsServerManager {
|
||||
serverBean.setType(prefManager.getValue(TalendLibsServerManager.NEXUS_PROXY_TYPE));
|
||||
}
|
||||
}
|
||||
hasProxySetting = StringUtils.isNotEmpty(serverBean.getServer());
|
||||
// use default
|
||||
if (!hasProxySetting) {
|
||||
if (StringUtils.isNotEmpty(serverBean.getServer())) {
|
||||
return serverBean;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public ArtifactRepositoryBean getTalentArtifactServer() {
|
||||
ArtifactRepositoryBean serverBean = getProxyArtifactServer();
|
||||
if (serverBean == null) {
|
||||
serverBean = new ArtifactRepositoryBean();
|
||||
serverBean.setServer(TALEND_LIB_SERVER);
|
||||
serverBean.setUserName(TALEND_LIB_USER);
|
||||
serverBean.setPassword(TALEND_LIB_PASSWORD);
|
||||
|
||||
@@ -208,4 +208,8 @@ public interface ITalendCorePrefConstants {
|
||||
|
||||
public static final int ARTIFACT_PROXY_SETTING = 1;
|
||||
|
||||
public static final String NEXUS_SHARE_LIBS = "NEXUS_SHARE_LIBS";
|
||||
|
||||
public static final boolean NEXUS_SHARE_LIBS_DEFAULT = false;
|
||||
|
||||
}
|
||||
|
||||
@@ -30,5 +30,7 @@ public interface IHDistribution {
|
||||
IHDistributionVersion getHDVersion(String v, boolean byDisplay);
|
||||
|
||||
boolean useCustom();
|
||||
|
||||
boolean isSparkLocal();
|
||||
|
||||
}
|
||||
|
||||
@@ -46,6 +46,8 @@ public interface MavenConstants {
|
||||
|
||||
static final String EXCLUDE_DELETED_ITEMS = "EXCLUDE_DELETED_ITEMS";
|
||||
|
||||
static final String SKIP_FOLDERS = "SKIP_FOLDERS";
|
||||
|
||||
/*
|
||||
* for lib
|
||||
*/
|
||||
|
||||
@@ -51,6 +51,8 @@ public interface TalendProcessArgumentConstant {
|
||||
static final String ARG_NEED_XMLMAPPINGS = "NEED_XMLMAPPINGS";
|
||||
|
||||
static final String ARG_NEED_RULES = "NEED_RULES";
|
||||
|
||||
static final String ARG_NEED_JETTY_SERVER = "NEED_JETTY_SERVER";
|
||||
|
||||
static final String ARG_ENABLE_WATCH = "ENABLE_WATCH";
|
||||
|
||||
|
||||
@@ -13,7 +13,10 @@
|
||||
package org.talend.core.runtime.util;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
@@ -25,6 +28,7 @@ import org.talend.core.model.components.IComponentsFactory;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.core.service.IUpdateService;
|
||||
import org.talend.utils.io.FilesUtils;
|
||||
import org.talend.utils.string.DigestUtil;
|
||||
|
||||
public class SharedStudioUtils {
|
||||
|
||||
@@ -84,6 +88,29 @@ public class SharedStudioUtils {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isNeedCleanOnSharedMode() {
|
||||
if (SharedStudioUtils.isSharedStudioMode()) {
|
||||
boolean isNeedClean = installedPatch();
|
||||
String studioArtifactsFileSha256Hex = getStudioArtifactsFileSha256Hex();
|
||||
if (updateArtifactsFileSha256Hex(studioArtifactsFileSha256Hex)) {
|
||||
isNeedClean = true;
|
||||
}
|
||||
return isNeedClean;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean updateArtifactsFileSha256Hex(String studioArtifactsFileSha256Hex) {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IUpdateService.class)) {
|
||||
IUpdateService updateService = GlobalServiceRegister.getDefault().getService(IUpdateService.class);
|
||||
try {
|
||||
return updateService.updateArtifactsFileSha256Hex(new NullProgressMonitor(), studioArtifactsFileSha256Hex);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public static boolean installedPatch() {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IUpdateService.class)) {
|
||||
IUpdateService updateService = GlobalServiceRegister.getDefault().getService(IUpdateService.class);
|
||||
@@ -108,4 +135,37 @@ public class SharedStudioUtils {
|
||||
File extchangeFolder = new File (componentFolder, path.toOSString());
|
||||
return extchangeFolder;
|
||||
}
|
||||
|
||||
public static IPath getTempFolderPath() {
|
||||
if (SharedStudioUtils.isSharedStudioMode()) {
|
||||
Path wsPath = new Path(Platform.getInstanceLocation().getURL().getPath());
|
||||
return wsPath.append("temp");
|
||||
} else {
|
||||
return new Path(System.getProperty("user.dir")).append("temp");
|
||||
}
|
||||
}
|
||||
|
||||
public static String getStudioArtifactsFileSha256Hex() {
|
||||
File studioArtifactsFile = new File(Platform.getInstallLocation().getURL().getPath(), "artifacts.xml");//$NON-NLS-1$
|
||||
if (studioArtifactsFile.exists()) {
|
||||
InputStream inputStream = null;
|
||||
try {
|
||||
inputStream = new FileInputStream(studioArtifactsFile);
|
||||
return DigestUtil.sha256Hex(inputStream);
|
||||
} catch (FileNotFoundException e) {
|
||||
ExceptionHandler.process(e);
|
||||
} catch (IOException e) {
|
||||
ExceptionHandler.process(e);
|
||||
} finally {
|
||||
if (inputStream != null) {
|
||||
try {
|
||||
inputStream.close();
|
||||
} catch (IOException ex) {
|
||||
ExceptionHandler.process(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
@@ -17,9 +17,11 @@ import java.nio.file.Path;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.talend.core.IService;
|
||||
import org.talend.core.model.components.IComponent;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
|
||||
/**
|
||||
* For documentation, see implementation in org.talend.sdk.component.studio-integration plugin
|
||||
@@ -33,4 +35,6 @@ public interface ITaCoKitDependencyService extends IService {
|
||||
Stream<IComponent> getJobComponents(Item item);
|
||||
|
||||
Path findM2Path();
|
||||
|
||||
Image getTaCoKitImageByRepositoryType(ERepositoryObjectType repObjType);
|
||||
}
|
||||
|
||||
@@ -24,5 +24,7 @@ public interface IUpdateService extends IService {
|
||||
public boolean syncSharedStudioLibraryInPatch(IProgressMonitor monitor) throws Exception;
|
||||
|
||||
public String getSharedStudioMissingPatchVersion();
|
||||
|
||||
public boolean updateArtifactsFileSha256Hex(IProgressMonitor monitor, String studioArtifactsFileShaCodeHex);
|
||||
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ import org.eclipse.ui.IWorkbench;
|
||||
import org.eclipse.ui.IWorkbenchPreferencePage;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
import org.talend.commons.ui.runtime.exception.ExceptionHandler;
|
||||
import org.talend.commons.ui.runtime.update.PreferenceKeys;
|
||||
import org.talend.commons.ui.runtime.utils.ZipFileUtils;
|
||||
import org.talend.commons.ui.swt.advanced.dataeditor.LabelFieldEditor;
|
||||
import org.talend.commons.ui.utils.workbench.preferences.OneLineComboFieldEditor;
|
||||
@@ -540,6 +541,7 @@ public abstract class I18nPreferencePage extends FieldEditorPreferencePage imple
|
||||
boolean ok = super.performOk();
|
||||
saveLanguageType();
|
||||
CorePlugin.getDefault().savePluginPreferences();
|
||||
PlatformUI.getPreferenceStore().setValue(PreferenceKeys.NEED_OSGI_CLEAN, true);
|
||||
if (isBabiliButtonClicked) {
|
||||
refreshAll();
|
||||
}
|
||||
@@ -557,6 +559,13 @@ public abstract class I18nPreferencePage extends FieldEditorPreferencePage imple
|
||||
protected void performApply() {
|
||||
saveLanguageType();
|
||||
CorePlugin.getDefault().savePluginPreferences();
|
||||
PlatformUI.getPreferenceStore().setValue(PreferenceKeys.NEED_OSGI_CLEAN, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void performDefaults() {
|
||||
super.performDefaults();
|
||||
PlatformUI.getPreferenceStore().setValue(PreferenceKeys.NEED_OSGI_CLEAN, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1046,4 +1046,10 @@ public class ObjectElementParameter implements IElementParameter {
|
||||
public void setSerialized(boolean isSerialized) {
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSelectedFromItemValue() {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -30,6 +30,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarOutputStream;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
@@ -59,6 +60,7 @@ import org.talend.commons.exception.CommonExceptionHandler;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.commons.runtime.model.repository.ERepositoryStatus;
|
||||
import org.talend.commons.runtime.utils.io.FileCopyUtils;
|
||||
import org.talend.commons.utils.PasswordEncryptUtil;
|
||||
import org.talend.commons.utils.generation.JavaUtils;
|
||||
import org.talend.commons.utils.time.TimeMeasure;
|
||||
@@ -620,7 +622,7 @@ public class ProcessorUtilities {
|
||||
*/
|
||||
generateBuildInfo(jobInfo, progressMonitor, isMainJob, currentProcess, currentJobName, processor, option);
|
||||
|
||||
copyDependenciedResources(currentProcess);
|
||||
copyDependenciedResources(currentProcess, progressMonitor);
|
||||
|
||||
return processor;
|
||||
}
|
||||
@@ -1010,7 +1012,8 @@ public class ProcessorUtilities {
|
||||
checkedContext = checkCleanSecureContextParameterValue(checkedContext, jobInfo);
|
||||
processor.setContext(checkedContext); // generate current context.
|
||||
} else {
|
||||
processor.setContext(context);
|
||||
IContext checkedContext = checkCleanSecureContextParameterValue(context, jobInfo);
|
||||
processor.setContext(checkedContext);
|
||||
}
|
||||
LastGenerationInfo.getInstance().getContextPerJob(jobInfo.getJobId(), jobInfo.getJobVersion()).add(
|
||||
context.getName());
|
||||
@@ -1082,8 +1085,8 @@ public class ProcessorUtilities {
|
||||
}
|
||||
|
||||
private static IContext checkCleanSecureContextParameterValue(IContext currentContext, JobInfo jobInfo) {
|
||||
|
||||
JobInfo job = null;
|
||||
|
||||
JobInfo job = null;
|
||||
|
||||
if (jobInfo.getFatherJobInfo() == null) {
|
||||
job = jobInfo;
|
||||
@@ -1095,10 +1098,10 @@ public class ProcessorUtilities {
|
||||
return currentContext;
|
||||
}
|
||||
}
|
||||
|
||||
if (job.getArgumentsMap() == null
|
||||
|| job.getArgumentsMap().get(TalendProcessArgumentConstant.ARG_CLEAR_PASSWORD_CONTEXT_PARAMETERS) == null
|
||||
|| !Boolean.parseBoolean((ProcessUtils.getOptionValue(job.getArgumentsMap(), TalendProcessArgumentConstant.ARG_CLEAR_PASSWORD_CONTEXT_PARAMETERS,
|
||||
|
||||
if (job.getArgumentsMap() == null
|
||||
|| job.getArgumentsMap().get(TalendProcessArgumentConstant.ARG_CLEAR_PASSWORD_CONTEXT_PARAMETERS) == null
|
||||
|| !Boolean.parseBoolean((ProcessUtils.getOptionValue(job.getArgumentsMap(), TalendProcessArgumentConstant.ARG_CLEAR_PASSWORD_CONTEXT_PARAMETERS,
|
||||
(String) null)))) {
|
||||
return currentContext;
|
||||
}
|
||||
@@ -1369,7 +1372,7 @@ public class ProcessorUtilities {
|
||||
generateBuildInfo(jobInfo, progressMonitor, isMainJob, currentProcess, currentJobName, processor, option);
|
||||
TimeMeasure.step(idTimer, "generateBuildInfo");
|
||||
|
||||
copyDependenciedResources(currentProcess);
|
||||
copyDependenciedResources(currentProcess, progressMonitor);
|
||||
|
||||
return processor;
|
||||
} finally {
|
||||
@@ -1382,7 +1385,40 @@ public class ProcessorUtilities {
|
||||
}
|
||||
}
|
||||
|
||||
private static Set<ModuleNeeded> getAllJobTestcaseModules(ProcessItem selectedProcessItem) {
|
||||
private static void syncContextResourcesForParentJob(IProcess currentProcess, IProgressMonitor progressMonitor) {
|
||||
ITalendProcessJavaProject processJavaProject = mainJobInfo.getProcessor().getTalendJavaProject();
|
||||
|
||||
final IFolder mainResourcesFolder = processJavaProject.getExternalResourcesFolder();
|
||||
final File targetFolder = mainResourcesFolder.getLocation().toFile();
|
||||
|
||||
final Set<JobInfo> dependenciesItems = mainJobInfo.getProcessor().getBuildChildrenJobs();
|
||||
|
||||
final IRunProcessService runProcessService = (IRunProcessService) GlobalServiceRegister.getDefault().getService(
|
||||
IRunProcessService.class);
|
||||
|
||||
List<ProcessItem> dependenciesItemsFiltered = dependenciesItems.stream().filter(jobInfo -> !jobInfo.isJoblet())
|
||||
.map(JobInfo::getProcessItem).collect(Collectors.toList());
|
||||
|
||||
if (dependenciesItemsFiltered.size() > 0) {
|
||||
dependenciesItemsFiltered.forEach(item -> {
|
||||
ITalendProcessJavaProject childJavaProject = runProcessService.getTalendJobJavaProject(item.getProperty());
|
||||
if (childJavaProject != null) {
|
||||
final IFolder childResourcesFolder = childJavaProject.getExternalResourcesFolder();
|
||||
if (childResourcesFolder.exists()) {
|
||||
FileCopyUtils.syncFolder(childResourcesFolder.getLocation().toFile(), targetFolder, false);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
mainResourcesFolder.refreshLocal(IResource.DEPTH_INFINITE, progressMonitor);
|
||||
} catch (CoreException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static Set<ModuleNeeded> getAllJobTestcaseModules(ProcessItem selectedProcessItem) {
|
||||
Set<ModuleNeeded> neededLibraries = new HashSet<>();
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITestContainerProviderService.class)) {
|
||||
ITestContainerProviderService testcontainerService =
|
||||
@@ -1516,7 +1552,7 @@ public class ProcessorUtilities {
|
||||
*
|
||||
* @param currentProcess
|
||||
*/
|
||||
private static void copyDependenciedResources(IProcess currentProcess) {
|
||||
private static void copyDependenciedResources(IProcess currentProcess, IProgressMonitor progressMonitor) {
|
||||
if (!(currentProcess instanceof IProcess2)) {
|
||||
return;
|
||||
}
|
||||
@@ -1573,6 +1609,7 @@ public class ProcessorUtilities {
|
||||
}
|
||||
}
|
||||
}
|
||||
syncContextResourcesForParentJob(currentProcess, progressMonitor);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -126,16 +126,16 @@ public class MavenLibraryResolverProvider {
|
||||
|
||||
}
|
||||
|
||||
public ArtifactResult resolveArtifact(MavenArtifact aritfact, boolean is4Parent) throws Exception {
|
||||
public ArtifactResult resolveArtifact(MavenArtifact artifact, boolean is4Parent) throws Exception {
|
||||
ArtifactRequest artifactRequest = new ArtifactRequest();
|
||||
RemoteRepository remoteRepo = getRemoteRepositroy(aritfact);
|
||||
RemoteRepository remoteRepo = getRemoteRepositroy(artifact);
|
||||
artifactRequest.addRepository(remoteRepo);
|
||||
if (is4Parent) {
|
||||
artifactRequest.addRepository(dynamicRemoteRepository);
|
||||
}
|
||||
Artifact artifact = new DefaultArtifact(aritfact.getGroupId(), aritfact.getArtifactId(), aritfact.getClassifier(),
|
||||
aritfact.getType(), aritfact.getVersion());
|
||||
artifactRequest.setArtifact(artifact);
|
||||
// Classifier must not be specified if type is pom
|
||||
artifactRequest.setArtifact(new DefaultArtifact(artifact.getGroupId(), artifact.getArtifactId(), "pom".equals(artifact.getType()) ? "" : artifact.getClassifier(),
|
||||
artifact.getType(), artifact.getVersion()));
|
||||
ArtifactResult result = null;
|
||||
if (is4Parent) {
|
||||
result = dynamicRepoSystem.resolveArtifact(dynamicRepoSystemSession, artifactRequest);
|
||||
|
||||
@@ -135,6 +135,12 @@
|
||||
<groupId>org.talend.components</groupId>
|
||||
<artifactId>components-marketo-runtime</artifactId>
|
||||
<version>${components.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>txw2</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.talend.components</groupId>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<artifactId>studio-tacokit-dependencies</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<properties>
|
||||
<tacokit.components.version>1.15.0</tacokit.components.version>
|
||||
<tacokit.components.version>1.17.1</tacokit.components.version>
|
||||
</properties>
|
||||
<repositories>
|
||||
<repository>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<tcomp.version>1.1.25</tcomp.version>
|
||||
<tcomp.version>1.29.1</tcomp.version>
|
||||
<slf4j.version>1.7.25</slf4j.version>
|
||||
</properties>
|
||||
|
||||
|
||||
@@ -14,4 +14,5 @@ AbstractPersistentProjectSettingPage.syncAllPoms=Do you want to update all poms?
|
||||
MavenProjectSettingPage.filterExampleMessage=Filter examples:\nlabel=myJob \t\t\t\t=> Generate only the job named "myJob"\n!(label=myJob) \t\t\t\t=> Generate any job except the one named "myJob"\n(path=folder1/folder2) \t\t\t=> Generate any job in the folder "folder1/folder2"\n(path=folder1/folder2)or(label=myJob)\t=> Generate any job in the folder "folder1/folder2" or named "myJob"\n(label=myJob)and(version=0.2) \t=> Generate only the job named "myJob" with version 0.2\n!((label=myJob)and(version=0.1)) \t=> Generate every jobs except the "myJob" version 0.1
|
||||
MavenProjectSettingPage.refModuleText=Set reference project modules in profile
|
||||
MavenProjectSettingPage.excludeDeletedItems=Exclude deleted items
|
||||
MavenProjectSettingPage.syncAllPomsWarning=Click the Force full re-synchronize poms button to apply the new settings.
|
||||
MavenProjectSettingPage.syncAllPomsWarning=Click the Force full re-synchronize poms button to apply the new settings.
|
||||
MavenProjectSettingPage.skipFolders=Skip folders
|
||||
@@ -55,6 +55,8 @@ public class MavenProjectSettingPage extends AbstractProjectSettingPage {
|
||||
|
||||
private Button excludeDeletedItemsCheckbox;
|
||||
|
||||
private Button skipFoldersCheckbox;
|
||||
|
||||
public MavenProjectSettingPage() {
|
||||
noDefaultAndApplyButton();
|
||||
}
|
||||
@@ -111,6 +113,17 @@ public class MavenProjectSettingPage extends AbstractProjectSettingPage {
|
||||
}
|
||||
});
|
||||
|
||||
skipFoldersCheckbox = new Button(parent, SWT.CHECK);
|
||||
skipFoldersCheckbox.setText(Messages.getString("MavenProjectSettingPage.skipFolders")); //$NON-NLS-1$
|
||||
skipFoldersCheckbox.setSelection(preferenceStore.getBoolean(MavenConstants.SKIP_FOLDERS));
|
||||
skipFoldersCheckbox.addSelectionListener(new SelectionAdapter() {
|
||||
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
addSyncWarning();
|
||||
}
|
||||
});
|
||||
|
||||
filterText.setText(filter);
|
||||
filterText.addModifyListener(new ModifyListener() {
|
||||
|
||||
@@ -169,6 +182,7 @@ public class MavenProjectSettingPage extends AbstractProjectSettingPage {
|
||||
preferenceStore.setValue(MavenConstants.POM_FILTER, getRealVersionFilter(filter));
|
||||
preferenceStore.setValue(MavenConstants.USE_PROFILE_MODULE, useProfileModuleCheckbox.getSelection());
|
||||
preferenceStore.setValue(MavenConstants.EXCLUDE_DELETED_ITEMS, excludeDeletedItemsCheckbox.getSelection());
|
||||
preferenceStore.setValue(MavenConstants.SKIP_FOLDERS, skipFoldersCheckbox.getSelection());
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
@@ -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,14 +352,9 @@ 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
|
||||
if (property.getItem() != null && property.getItem().getState() != null && property.getItem().getState().isDeleted()
|
||||
&& PomIdsHelper.getIfExcludeDeletedItems(property)) {
|
||||
@@ -604,7 +607,12 @@ public class AggregatorPomsHelper {
|
||||
String version = realVersion == null ? property.getVersion() : realVersion;
|
||||
String jobFolderName = getJobProjectFolderName(property.getLabel(), version);
|
||||
ERepositoryObjectType type = ERepositoryObjectType.getItemType(property.getItem());
|
||||
IFolder jobFolder = helper.getProcessFolder(type).getFolder(itemRelativePath).getFolder(jobFolderName);
|
||||
IFolder jobFolder = null;
|
||||
if (PomIdsHelper.skipFolders()) {
|
||||
jobFolder = helper.getProcessFolder(type).getFolder(jobFolderName);
|
||||
} else {
|
||||
jobFolder = helper.getProcessFolder(type).getFolder(itemRelativePath).getFolder(jobFolderName);
|
||||
}
|
||||
List<ERepositoryObjectType> allTypesOfProcess2 = ERepositoryObjectType.getAllTypesOfProcess2();
|
||||
if (allTypesOfProcess2.contains(type)) {
|
||||
createFoldersIfNeeded(jobFolder);
|
||||
@@ -860,7 +868,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 +904,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 +945,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 +954,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);
|
||||
|
||||
@@ -118,6 +118,8 @@ public abstract class AbstractMavenCodesTemplatePom extends AbstractMavenGeneral
|
||||
}
|
||||
if (isDeployed) {
|
||||
dependency = PomUtil.createModuleDependency(module.getMavenUri());
|
||||
if (module.isExcluded())
|
||||
dependency.setScope("provided");
|
||||
}
|
||||
if (dependency != null) {
|
||||
existedDependencies.add(dependency);
|
||||
|
||||
@@ -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;
|
||||
@@ -284,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);
|
||||
|
||||
@@ -300,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) {
|
||||
@@ -321,7 +327,7 @@ public abstract class AbstractMavenProcessorPom extends CreateMavenBundleTemplat
|
||||
artifactId = PomIdsHelper.getJobArtifactId(jobInfo);
|
||||
|
||||
JobInfo lastMainJob = LastGenerationInfo.getInstance().getLastMainJob();
|
||||
if (lastMainJob != null && JobUtils.isJob(jobInfo)) {
|
||||
if (lastMainJob != null && JobUtils.isJob(jobInfo) && JobUtils.isRoute(getJobProcessor().getProperty())) {
|
||||
groupId = PomIdsHelper.getJobGroupId(lastMainJob.getProcessor().getProperty());
|
||||
version = PomIdsHelper.getJobVersion(lastMainJob.getProcessor().getProperty());
|
||||
} else {
|
||||
|
||||
@@ -668,14 +668,16 @@ 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)));
|
||||
|
||||
// libraries of talend/3rd party
|
||||
Set<Dependency> parentJobDependencies = processor.getNeededModules(TalendProcessOptionConstants.MODULES_EXCLUDE_SHADED).stream()
|
||||
.filter(m -> !m.isExcluded()).map(m -> createDenpendency(m, false)).collect(Collectors.toSet());
|
||||
.filter(m -> !m.isExcluded()).map(m -> createDenpendency(m, false))
|
||||
.collect(Collectors.toSet());
|
||||
dependencies.addAll(parentJobDependencies);
|
||||
|
||||
// missing modules from the job generation of children
|
||||
@@ -705,7 +707,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);
|
||||
}
|
||||
@@ -761,6 +763,7 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// remove duplicate job dependencies and only keep the latest one
|
||||
// keep high priority dependencies if set by tLibraryLoad
|
||||
// FIXME not used now since tacokit component use specific dependency version. so we must include all job dependencies.
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -317,6 +317,12 @@ public class PomIdsHelper {
|
||||
return PREFIX_DEFAULT_GROUPID + projectName.toLowerCase();
|
||||
}
|
||||
|
||||
public static boolean skipFolders() {
|
||||
String projectTechName = ProjectManager.getInstance().getCurrentProject().getTechnicalLabel();
|
||||
ProjectPreferenceManager manager = getPreferenceManager(projectTechName);
|
||||
return manager.getBoolean(MavenConstants.SKIP_FOLDERS);
|
||||
}
|
||||
|
||||
public static boolean isValidGroupId(String text) {
|
||||
if (text != null && text.matches("[\\w\\.]+")) { //$NON-NLS-1$
|
||||
return true;
|
||||
|
||||
@@ -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;
|
||||
@@ -1178,7 +1181,7 @@ public class PomUtil {
|
||||
IRunProcessService runProcessService = GlobalServiceRegister.getDefault().getService(IRunProcessService.class);
|
||||
try {
|
||||
Model model = MODEL_MANAGER.readMavenModel(runProcessService.getTalendCodeJavaProject(codeType).getProjectPom());
|
||||
return model.getDependencies().stream().map(
|
||||
return model.getDependencies().stream().filter(d -> !"provided".equals(d.getScope())).map(
|
||||
d -> createDependency(d.getGroupId(), d.getArtifactId(), d.getVersion(), d.getType(), d.getClassifier()))
|
||||
.peek(d -> ((SortableDependency) d).setAssemblyOptional(true)).collect(Collectors.toSet());
|
||||
} catch (CoreException e) {
|
||||
@@ -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);
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -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"
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
@@ -1,28 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>org.talend.libraries.apache.google</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -1,6 +0,0 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Google
|
||||
Bundle-SymbolicName: org.talend.libraries.apache.google
|
||||
Bundle-Version: 7.3.1.qualifier
|
||||
Eclipse-BundleShape: dir
|
||||
@@ -1 +0,0 @@
|
||||
jarprocessor.exclude.children=true
|
||||
@@ -1,4 +0,0 @@
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
lib/
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.libraries.apache.google</artifactId>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
</project>
|
||||
@@ -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.3.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>
|
||||
|
||||
@@ -72,7 +72,8 @@ download.external.dialog.desciption=List of modules to be downloaded automatical
|
||||
download.external.dialog.help.url=https://help.talend.com/display/KB/How+to+install+external+modules+in+the+Talend+products
|
||||
download.external.dialog.warning=Warning
|
||||
download.external.dialog.message=Select at least one module not installed.
|
||||
|
||||
Module.view.sharelibsAction.title=Share libraries
|
||||
Module.view.sharelibsAction.info=Libraries sharing finished successfully.
|
||||
|
||||
AcceptModuleLicensesWizard.title=Download external modules
|
||||
AcceptModuleLicensesWizardDialog.button.acceptAll=Accept all
|
||||
|
||||
@@ -1,136 +0,0 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2019 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.librariesmanager.ui.actions;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.jface.action.Action;
|
||||
import org.eclipse.swt.custom.BusyIndicator;
|
||||
import org.eclipse.swt.events.SelectionEvent;
|
||||
import org.eclipse.swt.events.SelectionListener;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.swt.widgets.TableItem;
|
||||
import org.eclipse.ui.ISharedImages;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.core.model.general.ModuleNeeded;
|
||||
import org.talend.librariesmanager.ui.LibManagerUiPlugin;
|
||||
import org.talend.librariesmanager.ui.views.ModulesViewComposite;
|
||||
|
||||
/**
|
||||
* qzhang class global comment. Detailled comment <br/>
|
||||
*
|
||||
*/
|
||||
public class RemoveExternalJarAction extends Action {
|
||||
|
||||
/**
|
||||
* qzhang RemoveExternalJarAction constructor comment.
|
||||
*/
|
||||
public RemoveExternalJarAction() {
|
||||
super();
|
||||
setText("Remove external JARs"); //$NON-NLS-1$
|
||||
setDescription("Remove external JARs"); //$NON-NLS-1$
|
||||
setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));
|
||||
setDisabledImageDescriptor(PlatformUI.getWorkbench().getSharedImages()
|
||||
.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE_DISABLED));
|
||||
setEnabled(true);
|
||||
init();
|
||||
}
|
||||
|
||||
List<ModuleNeeded> modules;
|
||||
|
||||
public void init() {
|
||||
modules = new ArrayList<ModuleNeeded>();
|
||||
if (ModulesViewComposite.getTableViewerCreator() != null) {
|
||||
ModulesViewComposite.getTableViewerCreator().getTable().addSelectionListener(new SelectionListener() {
|
||||
|
||||
@Override
|
||||
public void widgetDefaultSelected(SelectionEvent e) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
modules.clear();
|
||||
TableItem[] selection = ModulesViewComposite.getTableViewerCreator().getTable().getSelection();
|
||||
for (TableItem tableItem : selection) {
|
||||
ModuleNeeded needed = (ModuleNeeded) tableItem.getData();
|
||||
if (ModuleNeeded.UNKNOWN.equals(needed.getContext())) {
|
||||
modules.add(needed);
|
||||
} else {
|
||||
setEnabled(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
setEnabled(true);
|
||||
}
|
||||
});
|
||||
setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.jface.action.Action#run()
|
||||
*/
|
||||
@Override
|
||||
public void run() {
|
||||
BusyIndicator.showWhile(Display.getDefault(), new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
for (ModuleNeeded module : modules) {
|
||||
try {
|
||||
LibManagerUiPlugin.getDefault().getLibrariesService().undeployLibrary(module.getModuleName());
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
// no use since use maven
|
||||
// if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
|
||||
// IRunProcessService processService = (IRunProcessService) GlobalServiceRegister.getDefault().getService(
|
||||
// IRunProcessService.class);
|
||||
// ITalendProcessJavaProject talendProcessJavaProject = processService.getTalendProcessJavaProject();
|
||||
// if (talendProcessJavaProject != null) {
|
||||
// IJavaProject javaProject = talendProcessJavaProject.getJavaProject();
|
||||
// List<IClasspathEntry> projectLibraries = new ArrayList<IClasspathEntry>();
|
||||
// try {
|
||||
// IClasspathEntry[] resolvedClasspath = javaProject.getResolvedClasspath(true);
|
||||
// projectLibraries.addAll(Arrays.asList(resolvedClasspath));
|
||||
// for (ModuleNeeded module : modules) {
|
||||
// IClasspathEntry foundEntry = null;
|
||||
// for (IClasspathEntry entry : resolvedClasspath) {
|
||||
// if (entry.getPath().toPortableString().contains(module.getModuleName())) {
|
||||
// foundEntry = entry;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// if (foundEntry != null) {
|
||||
// projectLibraries.remove(foundEntry);
|
||||
// }
|
||||
// }
|
||||
// javaProject.setRawClasspath(projectLibraries.toArray(new IClasspathEntry[projectLibraries.size()]),
|
||||
// null);
|
||||
// setEnabled(false);
|
||||
// } catch (JavaModelException e) {
|
||||
// ExceptionHandler.process(e);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2020 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.librariesmanager.ui.actions;
|
||||
|
||||
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
|
||||
import org.eclipse.core.runtime.jobs.IJobChangeListener;
|
||||
import org.eclipse.jface.action.Action;
|
||||
import org.eclipse.jface.dialogs.MessageDialog;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.talend.commons.ui.runtime.image.ECoreImage;
|
||||
import org.talend.commons.ui.runtime.image.ImageProvider;
|
||||
import org.talend.core.nexus.ArtifactRepositoryBean;
|
||||
import org.talend.core.nexus.IRepositoryArtifactHandler;
|
||||
import org.talend.core.nexus.RepositoryArtifactHandlerManager;
|
||||
import org.talend.core.nexus.TalendLibsServerManager;
|
||||
import org.talend.librariesmanager.ui.i18n.Messages;
|
||||
import org.talend.librariesmanager.ui.startup.ShareLibsJob;
|
||||
|
||||
|
||||
/*
|
||||
* Created by bhe on Dec 17, 2020
|
||||
*/
|
||||
public class ShareLibsAction extends Action {
|
||||
|
||||
public ShareLibsAction() {
|
||||
super();
|
||||
this.setText(Messages.getString("Module.view.sharelibsAction.title")); //$NON-NLS-1$
|
||||
this.setDescription(Messages.getString("Module.view.sharelibsAction.title")); //$NON-NLS-1$
|
||||
this.setImageDescriptor(ImageProvider.getImageDesc(ECoreImage.SHARE_LIBS));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.jface.action.Action#run()
|
||||
*/
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
ShareLibsJob job = new ShareLibsJob();
|
||||
job.addJobChangeListener(new IJobChangeListener() {
|
||||
|
||||
@Override
|
||||
public void scheduled(IJobChangeEvent event) {
|
||||
ShareLibsAction.this.setEnabled(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void running(IJobChangeEvent event) {
|
||||
ShareLibsAction.this.setEnabled(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void done(IJobChangeEvent event) {
|
||||
ShareLibsAction.this.setEnabled(true);
|
||||
Display.getDefault().asyncExec(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
MessageDialog.open(MessageDialog.INFORMATION, Display.getDefault().getActiveShell(), "",
|
||||
Messages.getString("Module.view.sharelibsAction.info"), SWT.NONE);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void awake(IJobChangeEvent event) {
|
||||
ShareLibsAction.this.setEnabled(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void aboutToRun(IJobChangeEvent event) {
|
||||
ShareLibsAction.this.setEnabled(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sleeping(IJobChangeEvent event) {
|
||||
ShareLibsAction.this.setEnabled(false);
|
||||
}
|
||||
});
|
||||
job.schedule();
|
||||
}
|
||||
|
||||
public boolean show() {
|
||||
boolean ret = false;
|
||||
try {
|
||||
ArtifactRepositoryBean customNexusServer = TalendLibsServerManager.getInstance().getCustomNexusServer();
|
||||
IRepositoryArtifactHandler customerRepHandler = RepositoryArtifactHandlerManager
|
||||
.getRepositoryHandler(customNexusServer);
|
||||
if (customerRepHandler != null) {
|
||||
ret = customerRepHandler.checkConnection();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2020 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.librariesmanager.ui.startup;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.SubMonitor;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.utils.MojoType;
|
||||
import org.talend.commons.utils.VersionUtils;
|
||||
import org.talend.core.model.general.ModuleNeeded;
|
||||
import org.talend.core.nexus.TalendMavenResolver;
|
||||
import org.talend.core.runtime.maven.MavenConstants;
|
||||
import org.talend.core.runtime.maven.MavenUrlHelper;
|
||||
import org.talend.designer.maven.model.TalendMavenConstants;
|
||||
import org.talend.librariesmanager.ui.i18n.Messages;
|
||||
|
||||
|
||||
/*
|
||||
* Created by bhe on Dec 24, 2020
|
||||
*/
|
||||
public class ShareCIJarsOnStartup extends ShareMavenArtifactsOnStartup {
|
||||
|
||||
@Override
|
||||
public Map<ModuleNeeded, File> getFilesToShare(IProgressMonitor monitor) {
|
||||
SubMonitor mainSubMonitor = SubMonitor.convert(monitor, 1);
|
||||
mainSubMonitor.setTaskName(Messages.getString("ShareLibsJob.getFilesToShare")); //$NON-NLS-1$
|
||||
Map<ModuleNeeded, File> files = new HashMap<>();
|
||||
// get plugin artifacts to share
|
||||
Stream.of(MojoType.values()).forEach(m -> {
|
||||
String mvnUrl = MavenUrlHelper.generateMvnUrl(TalendMavenConstants.DEFAULT_CI_GROUP_ID, m.getArtifactId(),
|
||||
VersionUtils.getMojoVersion(m), null, null);
|
||||
// try to resolve locally
|
||||
String localMvnUrl = mvnUrl.replace(MavenUrlHelper.MVN_PROTOCOL,
|
||||
MavenUrlHelper.MVN_PROTOCOL + MavenConstants.LOCAL_RESOLUTION_URL + MavenUrlHelper.REPO_SEPERATOR);
|
||||
File file = null;
|
||||
try {
|
||||
file = TalendMavenResolver.resolve(localMvnUrl);
|
||||
} catch (IOException | RuntimeException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
if (file != null) {
|
||||
ModuleNeeded module = new ModuleNeeded("", mvnUrl, "", true);
|
||||
files.put(module, file);
|
||||
}
|
||||
});
|
||||
|
||||
mainSubMonitor.worked(1);
|
||||
return files;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2020 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.librariesmanager.ui.startup;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.jobs.Job;
|
||||
|
||||
/*
|
||||
* Created by bhe on Dec 24, 2020
|
||||
*/
|
||||
public class ShareCILibsJob extends Job {
|
||||
|
||||
/**
|
||||
* @param name
|
||||
*/
|
||||
public ShareCILibsJob() {
|
||||
super("");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IStatus run(IProgressMonitor monitor) {
|
||||
ShareCIJarsOnStartup task = new ShareCIJarsOnStartup();
|
||||
return task.shareLibs(this, monitor);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -22,10 +22,6 @@ import org.eclipse.core.runtime.jobs.Job;
|
||||
*/
|
||||
public class ShareLibsJob extends Job {
|
||||
|
||||
private final String TYPE_NEXUS = "nexus";
|
||||
|
||||
private final String TYPE_SVN = "svn";
|
||||
|
||||
/**
|
||||
* DOC Talend ShareLibsJob constructor comment.
|
||||
*
|
||||
|
||||
@@ -14,12 +14,17 @@ package org.talend.librariesmanager.ui.startup;
|
||||
|
||||
import org.eclipse.ui.IStartup;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
import org.talend.librariesmanager.prefs.LibrariesManagerUtils;
|
||||
|
||||
/**
|
||||
* created by wchen on 2015-6-15 Detailled comment
|
||||
*
|
||||
*/
|
||||
public class ShareLibsSynchronizer implements IStartup {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(ShareLibsSynchronizer.class.getCanonicalName());
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
@@ -27,8 +32,16 @@ public class ShareLibsSynchronizer implements IStartup {
|
||||
*/
|
||||
@Override
|
||||
public void earlyStartup() {
|
||||
ShareLibsJob job = new ShareLibsJob();
|
||||
job.schedule();
|
||||
}
|
||||
|
||||
// share ci jars anyway
|
||||
ShareCILibsJob ciJob = new ShareCILibsJob();
|
||||
ciJob.schedule();
|
||||
|
||||
if (LibrariesManagerUtils.shareLibsAtStartup()) {
|
||||
ShareLibsJob job = new ShareLibsJob();
|
||||
job.schedule();
|
||||
} else {
|
||||
LOGGER.info("Skip sharing libraries");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,25 +91,6 @@ public class ShareMavenArtifactsOnStartup extends ShareLibrareisHelper {
|
||||
}
|
||||
}
|
||||
|
||||
// get plugin artifacts to share
|
||||
Stream.of(MojoType.values()).forEach(m -> {
|
||||
String mvnUrl = MavenUrlHelper.generateMvnUrl(TalendMavenConstants.DEFAULT_CI_GROUP_ID, m.getArtifactId(),
|
||||
VersionUtils.getMojoVersion(m), null, null);
|
||||
// try to resolve locally
|
||||
String localMvnUrl = mvnUrl.replace(MavenUrlHelper.MVN_PROTOCOL,
|
||||
MavenUrlHelper.MVN_PROTOCOL + MavenConstants.LOCAL_RESOLUTION_URL + MavenUrlHelper.REPO_SEPERATOR);
|
||||
File file = null;
|
||||
try {
|
||||
file = TalendMavenResolver.resolve(localMvnUrl);
|
||||
} catch (IOException | RuntimeException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
if (file != null) {
|
||||
ModuleNeeded module = new ModuleNeeded("", mvnUrl, "", true);
|
||||
files.put(module, file);
|
||||
}
|
||||
});
|
||||
|
||||
mainSubMonitor.worked(1);
|
||||
return files;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ import org.talend.librariesmanager.ui.actions.DownloadExternalJarAction;
|
||||
import org.talend.librariesmanager.ui.actions.ExportCustomSettingsAction;
|
||||
import org.talend.librariesmanager.ui.actions.ImportCustomSettingsAction;
|
||||
import org.talend.librariesmanager.ui.actions.ImportExternalJarAction;
|
||||
import org.talend.librariesmanager.ui.actions.RemoveExternalJarAction;
|
||||
import org.talend.librariesmanager.ui.actions.ShareLibsAction;
|
||||
|
||||
/**
|
||||
* DOC nrousseau class global comment. Detailled comment <br/>
|
||||
@@ -129,12 +129,16 @@ public class ModulesView extends ViewPart {
|
||||
manager.add(importSettingAction);
|
||||
ExportCustomSettingsAction exportSettingAction = new ExportCustomSettingsAction();
|
||||
manager.add(exportSettingAction);
|
||||
RemoveExternalJarAction removeAction = new RemoveExternalJarAction();
|
||||
manager.add(removeAction);
|
||||
ImportExternalJarAction importAction = new ImportExternalJarAction();
|
||||
manager.add(importAction);
|
||||
DownloadExternalJarAction downloadAcion = new DownloadExternalJarAction(this);
|
||||
manager.add(downloadAcion);
|
||||
|
||||
ShareLibsAction shareAction = new ShareLibsAction();
|
||||
if (shareAction.show()) {
|
||||
manager.add(shareAction);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,8 @@ import java.lang.reflect.Method;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.lang.String;
|
||||
import java.util.Dictionary;
|
||||
|
||||
public final class BundleUtils {
|
||||
|
||||
@@ -61,6 +63,23 @@ public final class BundleUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static Object getService(String svcClass) {
|
||||
if (BUNDLE == null) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
Method getBundleContext = BUNDLE.getClass().getMethod("getBundleContext");
|
||||
Object context = getBundleContext.invoke(BUNDLE);
|
||||
Class<?> ctxClass = context.getClass();
|
||||
Method getServiceReference = ctxClass.getMethod("getServiceReference", String.class);
|
||||
Object serviceReference = getServiceReference.invoke(context, svcClass);
|
||||
Method getService = ctxClass.getMethod("getService", SERVICE_REFERENCE_CLASS);
|
||||
return (Object)getService.invoke(context, serviceReference);
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static <T> T getService(Class<T> svcClass, Object bundleContext) {
|
||||
if (BUNDLE_CONTEXT_CLASS == null || bundleContext == null) {
|
||||
return null;
|
||||
@@ -102,7 +121,25 @@ public final class BundleUtils {
|
||||
return services;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static Dictionary<String, Object> getJobProperties(String jobName) {
|
||||
|
||||
try {
|
||||
Object configAdminObject = getService("org.osgi.service.cm.ConfigurationAdmin");
|
||||
|
||||
Method getConfigurationMethod = configAdminObject.getClass().getMethod("getConfiguration", String.class);
|
||||
|
||||
Object configAdminJobConfiguration = getConfigurationMethod.invoke(configAdminObject, jobName);
|
||||
|
||||
Method getPropertiesMethod = configAdminJobConfiguration.getClass().getMethod("getProperties", null);
|
||||
|
||||
Dictionary<String, Object> jobProperties = (Dictionary<String, Object>)getPropertiesMethod.invoke(configAdminJobConfiguration, null);
|
||||
|
||||
return jobProperties;
|
||||
} catch(Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean inOSGi() {
|
||||
return BUNDLE != null;
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<%
|
||||
EXTRACT(__GROUPBY__);
|
||||
EXTRACT(__OPERATION__);
|
||||
String operation = "";
|
||||
boolean flag=false;
|
||||
for(int i=0; i < __OPERATION_INPUT_COLUMN__.length; i++){
|
||||
if(flag){
|
||||
operation += ",";
|
||||
}else{
|
||||
flag=true;
|
||||
}
|
||||
if (__OPERATION_FUNCTION__[i]!= null && __OPERATION_FUNCTION__[i].indexOf("@COLUMN") != -1) {
|
||||
operation += __OPERATION_FUNCTION__[i].replaceAll("@COLUMN", __OPERATION_INPUT_COLUMN__[i]);
|
||||
} else {
|
||||
operation += (__OPERATION_FUNCTION__[i] + "(" + __OPERATION_INPUT_COLUMN__[i] + ")");
|
||||
}
|
||||
}
|
||||
|
||||
%>
|
||||
|
||||
INSERT INTO <%=__DATABASE_NAME__%>.<%=__TABLE_NAME_TARGET__%>
|
||||
SELECT <%= operation %>, <%= StringUtils.list(__GROUPBY_INPUT_COLUMN__, ",") %> FROM <%=__DATABASE_NAME__%>.<%= __TABLE_NAME__ %>
|
||||
GROUP BY <%=StringUtils.list(__GROUPBY_INPUT_COLUMN__, ",", "", "") %>;
|
||||
@@ -0,0 +1,29 @@
|
||||
<%
|
||||
EXTRACT(__SCHEMA__);
|
||||
String fieldsCreated = "";
|
||||
boolean flagCreated=false;
|
||||
|
||||
for(int i=0; i < __SCHEMA__.length; i++){
|
||||
if(flagCreated){
|
||||
fieldsCreated += ",";
|
||||
}else{
|
||||
flagCreated=true;
|
||||
}
|
||||
if(__SCHEMA_DBTYPE__[i].contains("VARCHAR")) {
|
||||
__SCHEMA_DBTYPE__[i] = "STRING";
|
||||
}
|
||||
if( __SCHEMA_DBTYPE__[i].equals("DECIMAL")){
|
||||
fieldsCreated += (__SCHEMA_NAME__[i] + " " + __SCHEMA_DBTYPE__[i] +" ("+ __SCHEMA_LENGTH__[i] +","+ __SCHEMA_PRECISION__[i] +") ");
|
||||
} else {
|
||||
fieldsCreated += (__SCHEMA_NAME__[i] + " " + __SCHEMA_DBTYPE__[i]);
|
||||
}
|
||||
if(__SCHEMA_NULLABLE__[i].equals("false")){
|
||||
fieldsCreated += " NOT NULL";
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
CREATE TABLE <%=__DATABASE_NAME__%>.<%= __TABLE_NAME__ %>
|
||||
(
|
||||
<%= fieldsCreated %>
|
||||
) USING DELTA;
|
||||
@@ -0,0 +1,29 @@
|
||||
<%
|
||||
EXTRACT(__SCHEMA__);
|
||||
String fieldsCreated = "";
|
||||
boolean flagCreated=false;
|
||||
|
||||
for(int i=0; i < __SCHEMA__.length; i++){
|
||||
if(flagCreated){
|
||||
fieldsCreated += ",";
|
||||
}else{
|
||||
flagCreated=true;
|
||||
}
|
||||
if(__SCHEMA_DBTYPE__[i].contains("VARCHAR")) {
|
||||
__SCHEMA_DBTYPE__[i] = "STRING";
|
||||
}
|
||||
if( __SCHEMA_DBTYPE__[i].equals("DECIMAL")){
|
||||
fieldsCreated += (__SCHEMA_NAME__[i] + " " + __SCHEMA_DBTYPE__[i] +" ("+ __SCHEMA_LENGTH__[i] +","+ __SCHEMA_PRECISION__[i] +") ");
|
||||
} else {
|
||||
fieldsCreated += (__SCHEMA_NAME__[i] + " " + __SCHEMA_DBTYPE__[i]);
|
||||
}
|
||||
if(__SCHEMA_NULLABLE__[i].equals("false")){
|
||||
fieldsCreated += " NOT NULL";
|
||||
}
|
||||
}
|
||||
%>
|
||||
|
||||
CREATE TABLE <%=__DATABASE_NAME__%>.<%= __TABLE_NAME__ %>
|
||||
(
|
||||
<%= fieldsCreated %>
|
||||
);
|
||||
@@ -0,0 +1,2 @@
|
||||
-- DROP SOURCE TABLE
|
||||
DROP TABLE <%=__DATABASE_NAME__%>.<%= __TABLE_NAME__ %>;
|
||||
@@ -0,0 +1,15 @@
|
||||
<%
|
||||
EXTRACT(__TABLE_SCHEMA__);
|
||||
String fields = "";
|
||||
boolean flag=false;
|
||||
for(int i=0; i < __TABLE_SCHEMA_LENGTH__; i++){
|
||||
if(__TABLE_SCHEMA_KEY_ATTRIBUTE__[i].equals("true")){
|
||||
fields += __TABLE_SCHEMA_SCHEMA_COLUMN__[i] +",";
|
||||
}
|
||||
}
|
||||
if(!fields.equals("") && fields.length()>0){
|
||||
fields = fields.substring(0,fields.length()-1);
|
||||
}
|
||||
%>
|
||||
INSERT INTO <%=__DATABASE_NAME__%>.<%=__TABLE_NAME_TARGET__%>
|
||||
SELECT <%= fields %> FROM <%=__DATABASE_NAME__%>.<%= __TABLE_NAME__ %>;
|
||||
@@ -0,0 +1,7 @@
|
||||
<%
|
||||
EXTRACT(__SCHEMA__);
|
||||
EXTRACT(__SCHEMA_TARGET__);
|
||||
%>
|
||||
INSERT INTO <%=__DATABASE_NAME__%>.<%=__TABLE_NAME_TARGET__%>
|
||||
SELECT <%= StringUtils.list(__SCHEMA_NAME__, ",") %> FROM <%=__DATABASE_NAME__%>.<%= __TABLE_NAME__ %>
|
||||
WHERE <%=__WHERE_CLAUSE__%>;
|
||||
@@ -0,0 +1,101 @@
|
||||
-- This pattern generates a merge statement for Snowflake
|
||||
--(c) 2019 Talend Inc.
|
||||
<%
|
||||
EXTRACT(__MERGE_ON__);
|
||||
EXTRACT(__UPDATE_MAPPING__);
|
||||
EXTRACT(__ADDITIONAL_UPDATE_COLUMNS__);
|
||||
EXTRACT(__INSERT_MAPPING__);
|
||||
EXTRACT(__ADDITIONAL_INSERT_COLUMNS__);
|
||||
String dbType = "__DBTYPE__";
|
||||
boolean hasUpdateClause = __USE_UPDATE__;
|
||||
boolean hasAddtionalUpdateColumns = __SPECIFY_ADDITIONAL_UPDATE_COLUMNS__;
|
||||
boolean hasUpdateWhereClause = __SPECIFY_UPDATE_WHERE_CLAUSE__;
|
||||
boolean hasInsertClause = __USE_INSERT__;
|
||||
boolean hasAdditionalInsertColumns = __SPECIFY_ADDITIONAL_INSERT_COLUMNS__;
|
||||
boolean hasInsertWhereClause = __SPECIFY_INSERT_WHERE_CLAUSE__;
|
||||
|
||||
boolean flag = false;
|
||||
String mergeOnStr = "";
|
||||
for(int i=0; i < __MERGE_ON_SRC_COLUMN__.length; i++){
|
||||
if (flag) {
|
||||
mergeOnStr += " AND ";
|
||||
} else {
|
||||
flag = true;
|
||||
}
|
||||
mergeOnStr += (__TARGET_TABLE__ + "." + __MERGE_ON_TRG_COLUMN__[i] + " = " + __SOURCE_TABLE__ + "." + __MERGE_ON_SRC_COLUMN__[i]);
|
||||
}
|
||||
|
||||
String updateStr = "";
|
||||
String updateWhereStr = "";
|
||||
flag = false;
|
||||
if (hasUpdateClause) {
|
||||
for(int i=0; i < __UPDATE_MAPPING_SRC_COLUMN__.length; i++) {
|
||||
if (flag) {
|
||||
updateStr += ",";
|
||||
} else {
|
||||
flag = true;
|
||||
}
|
||||
updateStr += (__TARGET_TABLE__ + "." + __UPDATE_MAPPING_TRG_COLUMN__[i] + " = " + __SOURCE_TABLE__ + "." + __UPDATE_MAPPING_SRC_COLUMN__[i]);
|
||||
}
|
||||
if (hasAddtionalUpdateColumns) {
|
||||
for(int i=0; i < __ADDITIONAL_UPDATE_COLUMNS_TRG_COLUMN_VALUE__.length; i++) {
|
||||
if (flag) {
|
||||
updateStr += ",";
|
||||
} else {
|
||||
flag = true;
|
||||
}
|
||||
updateStr += (__TARGET_TABLE__ + "." + __ADDITIONAL_UPDATE_COLUMNS_TRG_COLUMN_NAME__[i] + " = " + __ADDITIONAL_UPDATE_COLUMNS_TRG_COLUMN_VALUE__[i]);
|
||||
}
|
||||
}
|
||||
if (hasUpdateWhereClause) {
|
||||
updateWhereStr = " " + __UPDATE_WHERE_CLAUSE__ + " ";
|
||||
}
|
||||
}
|
||||
|
||||
String insertColumnsStr = "";
|
||||
String insertValuesStr = "";
|
||||
String insertWhereStr = "";
|
||||
String insertStr = "";
|
||||
flag = false;
|
||||
if (hasInsertClause) {
|
||||
for(int i=0; i < __INSERT_MAPPING_TRG_COLUMN__.length; i++) {
|
||||
if (flag) {
|
||||
insertColumnsStr += ",";
|
||||
insertValuesStr += ",";
|
||||
} else {
|
||||
flag = true;
|
||||
}
|
||||
insertColumnsStr += (__TARGET_TABLE__ + "." + __INSERT_MAPPING_TRG_COLUMN__[i]);
|
||||
insertValuesStr += (__SOURCE_TABLE__ + "." + __INSERT_MAPPING_SRC_COLUMN__[i]);
|
||||
}
|
||||
if (hasAdditionalInsertColumns) {
|
||||
for(int i=0; i < __ADDITIONAL_INSERT_COLUMNS_TRG_COLUMN_NAME__.length; i++) {
|
||||
if (flag) {
|
||||
insertColumnsStr += ",";
|
||||
insertValuesStr += ",";
|
||||
} else {
|
||||
flag = true;
|
||||
}
|
||||
insertColumnsStr += (__TARGET_TABLE__ + "." + __ADDITIONAL_INSERT_COLUMNS_TRG_COLUMN_NAME__[i]);
|
||||
insertValuesStr += (__ADDITIONAL_INSERT_COLUMNS_TRG_COLUMN_VALUE__[i]);
|
||||
}
|
||||
}
|
||||
if (hasInsertWhereClause) {
|
||||
insertWhereStr = " " + __INSERT_WHERE_CLAUSE__ + " ";
|
||||
}
|
||||
|
||||
insertStr = "(" + insertColumnsStr + ") VALUES (" + insertValuesStr + ")";
|
||||
}
|
||||
|
||||
String mergeString = "";
|
||||
|
||||
if (hasInsertClause || hasUpdateClause) {
|
||||
mergeString = "MERGE INTO " + __TARGET_TABLE__ + " USING " + __SOURCE_TABLE__ +
|
||||
" ON (" + mergeOnStr + ")" +
|
||||
(hasUpdateClause ? (" WHEN MATCHED " + (hasUpdateWhereClause ? ("AND " + updateWhereStr) : "") + " THEN UPDATE SET " + updateStr) : "") +
|
||||
(hasInsertClause ? (" WHEN NOT MATCHED " + (hasInsertWhereClause ? ("AND " + insertWhereStr) : "") + " THEN INSERT " + insertStr) : "");
|
||||
} else {
|
||||
mergeString = "DELETE FROM " + __TARGET_TABLE__ + " WHERE 1=0";
|
||||
}
|
||||
%>
|
||||
<%=mergeString%>;
|
||||
@@ -54,114 +54,112 @@ public abstract class ShareLibrareisHelper {
|
||||
// deploy to maven if needed and share to custom nexus
|
||||
try {
|
||||
setJobName(job, Messages.getString("ShareLibsJob.message", TYPE_NEXUS));
|
||||
|
||||
Map<String, List<MavenArtifact>> snapshotArtifactMap = new HashMap<String, List<MavenArtifact>>();
|
||||
Map<String, List<MavenArtifact>> releaseArtifactMap = new HashMap<String, List<MavenArtifact>>();
|
||||
|
||||
ArtifactRepositoryBean customNexusServer = TalendLibsServerManager.getInstance().getCustomNexusServer();
|
||||
IRepositoryArtifactHandler customerRepHandler = RepositoryArtifactHandlerManager
|
||||
.getRepositoryHandler(customNexusServer);
|
||||
if (customerRepHandler != null) {
|
||||
filesToShare = getFilesToShare(monitor);
|
||||
if (filesToShare == null) {
|
||||
return Status.CANCEL_STATUS;
|
||||
}
|
||||
|
||||
// collect groupId to search
|
||||
Set<String> groupIds = new HashSet<String>();
|
||||
Map<String, List<MavenArtifact>> snapshotArtifactMap = new HashMap<String, List<MavenArtifact>>();
|
||||
Map<String, List<MavenArtifact>> releaseArtifactMap = new HashMap<String, List<MavenArtifact>>();
|
||||
Set<String> snapshotGroupIdSet = new HashSet<String>();
|
||||
Set<String> releaseGroupIdSet = new HashSet<String>();
|
||||
for (ModuleNeeded module : filesToShare.keySet()) {
|
||||
checkCancel(monitor);
|
||||
if (module.getMavenUri() != null) {
|
||||
MavenArtifact parseMvnUrl = MavenUrlHelper.parseMvnUrl(module.getMavenUri());
|
||||
if (parseMvnUrl != null) {
|
||||
groupIds.add(parseMvnUrl.getGroupId());
|
||||
if (isSnapshotVersion(parseMvnUrl.getVersion())) {
|
||||
snapshotGroupIdSet.add(parseMvnUrl.getGroupId());
|
||||
} else {
|
||||
releaseGroupIdSet.add(parseMvnUrl.getGroupId());
|
||||
}
|
||||
ArtifactRepositoryBean proxyServer = TalendLibsServerManager.getInstance().getProxyArtifactServer();
|
||||
IRepositoryArtifactHandler proxyArtifactHandler = RepositoryArtifactHandlerManager.getRepositoryHandler(proxyServer);
|
||||
|
||||
if (customerRepHandler == null) {
|
||||
return Status.CANCEL_STATUS;
|
||||
}
|
||||
|
||||
filesToShare = getFilesToShare(monitor);
|
||||
if (filesToShare == null || filesToShare.isEmpty()) {
|
||||
return Status.CANCEL_STATUS;
|
||||
}
|
||||
|
||||
// collect groupId to search
|
||||
Set<String> snapshotGroupIdSet = new HashSet<String>();
|
||||
Set<String> releaseGroupIdSet = new HashSet<String>();
|
||||
checkCancel(monitor);
|
||||
for (ModuleNeeded module : filesToShare.keySet()) {
|
||||
checkCancel(monitor);
|
||||
if (module.getMavenUri() != null) {
|
||||
MavenArtifact parseMvnUrl = MavenUrlHelper.parseMvnUrl(module.getMavenUri());
|
||||
if (parseMvnUrl != null) {
|
||||
if (isSnapshotVersion(parseMvnUrl.getVersion())) {
|
||||
snapshotGroupIdSet.add(parseMvnUrl.getGroupId());
|
||||
} else {
|
||||
releaseGroupIdSet.add(parseMvnUrl.getGroupId());
|
||||
}
|
||||
}
|
||||
}
|
||||
List<MavenArtifact> searchResults = new ArrayList<MavenArtifact>();
|
||||
for (String groupId : groupIds) {
|
||||
checkCancel(monitor);
|
||||
if (releaseGroupIdSet.contains(groupId)) {
|
||||
searchResults = customerRepHandler.search(groupId, null, null, true, false);
|
||||
if (searchResults != null) {
|
||||
for (MavenArtifact result : searchResults) {
|
||||
checkCancel(monitor);
|
||||
ShareLibrariesUtil.putArtifactToMap(result, releaseArtifactMap, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
checkCancel(monitor);
|
||||
if (snapshotGroupIdSet.contains(groupId)) {
|
||||
searchResults = customerRepHandler.search(groupId, null, null, false, true);
|
||||
if (searchResults != null) {
|
||||
for (MavenArtifact result : searchResults) {
|
||||
checkCancel(monitor);
|
||||
ShareLibrariesUtil.putArtifactToMap(result, snapshotArtifactMap, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// search from custom artifact repositories if any
|
||||
seachArtifacts(monitor, customerRepHandler, snapshotArtifactMap, releaseArtifactMap, snapshotGroupIdSet,
|
||||
releaseGroupIdSet);
|
||||
|
||||
try {
|
||||
// search from proxy artifact repository if any
|
||||
seachArtifacts(monitor, proxyArtifactHandler, snapshotArtifactMap, releaseArtifactMap, snapshotGroupIdSet,
|
||||
releaseGroupIdSet);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
checkCancel(monitor);
|
||||
|
||||
Iterator<ModuleNeeded> iterator = filesToShare.keySet().iterator();
|
||||
Map<File, MavenArtifact> shareFiles = new HashMap<>();
|
||||
while (iterator.hasNext()) {
|
||||
checkCancel(monitor);
|
||||
ModuleNeeded next = iterator.next();
|
||||
File file = filesToShare.get(next);
|
||||
MavenArtifact artifact = MavenUrlHelper.parseMvnUrl(next.getMavenUri());
|
||||
if (artifact == null) {
|
||||
continue;
|
||||
}
|
||||
// If from custom component definition file
|
||||
if (LocalLibraryManager.isSystemCacheFile(file.getName())
|
||||
|| (LocalLibraryManager.isComponentDefinitionFileType(file.getName())
|
||||
&& isTalendLibraryGroupId(artifact))) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
Integer.parseInt(artifact.getType());
|
||||
// FIXME unexpected type if it's an integer, should fix it in component module definition.
|
||||
continue;
|
||||
} catch (NumberFormatException e) {
|
||||
//
|
||||
}
|
||||
boolean isSnapshotVersion = isSnapshotVersion(artifact.getVersion());
|
||||
String key = ShareLibrariesUtil.getArtifactKey(artifact, isSnapshotVersion);
|
||||
List<MavenArtifact> artifactList = null;
|
||||
if (isSnapshotVersion) {
|
||||
artifactList = snapshotArtifactMap.get(key);
|
||||
} else {
|
||||
artifactList = releaseArtifactMap.get(key);
|
||||
// skip checksum for release artifact.
|
||||
if (artifactList != null && artifactList.contains(artifact)
|
||||
&& !Boolean.getBoolean("force_libs_release_update")) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
Iterator<ModuleNeeded> iterator = filesToShare.keySet().iterator();
|
||||
Map<File, MavenArtifact> shareFiles = new HashMap<>();
|
||||
while (iterator.hasNext()) {
|
||||
checkCancel(monitor);
|
||||
ModuleNeeded next = iterator.next();
|
||||
File file = filesToShare.get(next);
|
||||
MavenArtifact artifact = MavenUrlHelper.parseMvnUrl(next.getMavenUri());
|
||||
if (artifact == null) {
|
||||
if (artifactList != null && artifactList.size() > 0) {
|
||||
if (ShareLibrariesUtil.isSameFileWithRemote(file, artifactList, customNexusServer, customerRepHandler,
|
||||
isSnapshotVersion)) {
|
||||
continue;
|
||||
}
|
||||
// If from custom component definition file
|
||||
if (LocalLibraryManager.isSystemCacheFile(file.getName())
|
||||
|| (LocalLibraryManager.isComponentDefinitionFileType(file.getName())
|
||||
&& isTalendLibraryGroupId(artifact))) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
Integer.parseInt(artifact.getType());
|
||||
// FIXME unexpected type if it's an integer, should fix it in component module definition.
|
||||
continue;
|
||||
} catch (NumberFormatException e) {
|
||||
//
|
||||
}
|
||||
boolean isSnapshotVersion = isSnapshotVersion(artifact.getVersion());
|
||||
String key = ShareLibrariesUtil.getArtifactKey(artifact, isSnapshotVersion);
|
||||
List<MavenArtifact> artifactList = null;
|
||||
if (isSnapshotVersion) {
|
||||
artifactList = snapshotArtifactMap.get(key);
|
||||
} else {
|
||||
artifactList = releaseArtifactMap.get(key);
|
||||
// skip checksum for release artifact.
|
||||
if (artifactList != null && artifactList.contains(artifact)
|
||||
&& !Boolean.getBoolean("force_libs_release_update")) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (artifactList != null && artifactList.size() > 0) {
|
||||
if (ShareLibrariesUtil.isSameFileWithRemote(file, artifactList, customNexusServer, customerRepHandler,
|
||||
isSnapshotVersion)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
shareFiles.put(file, artifact);
|
||||
}
|
||||
SubMonitor mainSubMonitor = SubMonitor.convert(monitor, shareFiles.size());
|
||||
for (Map.Entry<File, MavenArtifact> entry : shareFiles.entrySet()) {
|
||||
checkCancel(monitor);
|
||||
try {
|
||||
File k = entry.getKey();
|
||||
MavenArtifact v = entry.getValue();
|
||||
mainSubMonitor.setTaskName(Messages.getString("ShareLibsJob.sharingLibraries", k.getName()));
|
||||
shareToRepository(k, v);
|
||||
mainSubMonitor.worked(1);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
shareFiles.put(file, artifact);
|
||||
}
|
||||
SubMonitor mainSubMonitor = SubMonitor.convert(monitor, shareFiles.size());
|
||||
for (Map.Entry<File, MavenArtifact> entry : shareFiles.entrySet()) {
|
||||
checkCancel(monitor);
|
||||
try {
|
||||
File k = entry.getKey();
|
||||
MavenArtifact v = entry.getValue();
|
||||
mainSubMonitor.setTaskName(Messages.getString("ShareLibsJob.sharingLibraries", k.getName()));
|
||||
shareToRepository(k, v);
|
||||
mainSubMonitor.worked(1);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
@@ -175,6 +173,38 @@ public abstract class ShareLibrareisHelper {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Search artifacts based on given snapshotGroupIdSet and releaseGroupIdSet from remote artifact repositories
|
||||
* represented by artifactHandler, the search results are put to snapshotArtifactMap and releaseArtifactMap
|
||||
*/
|
||||
protected void seachArtifacts(IProgressMonitor monitor, IRepositoryArtifactHandler artifactHandler,
|
||||
Map<String, List<MavenArtifact>> snapshotArtifactMap, Map<String, List<MavenArtifact>> releaseArtifactMap,
|
||||
Set<String> snapshotGroupIdSet, Set<String> releaseGroupIdSet) throws Exception {
|
||||
if (artifactHandler != null) {
|
||||
checkCancel(monitor);
|
||||
List<MavenArtifact> searchResults = new ArrayList<MavenArtifact>();
|
||||
for (String groupId : releaseGroupIdSet) {
|
||||
searchResults = artifactHandler.search(groupId, null, null, true, false);
|
||||
if (searchResults != null) {
|
||||
for (MavenArtifact result : searchResults) {
|
||||
checkCancel(monitor);
|
||||
ShareLibrariesUtil.putArtifactToMap(result, releaseArtifactMap, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
checkCancel(monitor);
|
||||
for (String groupId : snapshotGroupIdSet) {
|
||||
searchResults = artifactHandler.search(groupId, null, null, false, true);
|
||||
if (searchResults != null) {
|
||||
for (MavenArtifact result : searchResults) {
|
||||
checkCancel(monitor);
|
||||
ShareLibrariesUtil.putArtifactToMap(result, snapshotArtifactMap, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isTalendLibraryGroupId(MavenArtifact artifact) {
|
||||
if ("org.talend.libraries".equalsIgnoreCase(artifact.getGroupId())) {
|
||||
return true;
|
||||
|
||||
@@ -714,11 +714,9 @@ public class ModulesNeededProvider {
|
||||
isRequired);
|
||||
toAdd.setMavenUri(currentImport.getMVN());
|
||||
if (!isRequired) {
|
||||
if ("BeanItem".equals(routine.eClass().getName())) {
|
||||
toAdd.getExtraAttributes().put("IS_OSGI_EXCLUDED", Boolean.TRUE);
|
||||
}
|
||||
toAdd.getExtraAttributes().put("IS_OSGI_EXCLUDED", Boolean.TRUE);
|
||||
if ("RoutineItem".equals(routine.eClass().getName())) {
|
||||
continue;
|
||||
toAdd.setExcluded(true);
|
||||
}
|
||||
}
|
||||
// toAdd.setStatus(ELibraryInstallStatus.INSTALLED);
|
||||
|
||||
@@ -1359,7 +1359,13 @@ public class LocalLibraryManager implements ILibraryManagerService, IChangedLibr
|
||||
}
|
||||
|
||||
private void deployLibsFromCustomComponents(IComponentsService service, Map<String, String> platformURLMap) {
|
||||
Set<File> needToDeploy = new HashSet<>();
|
||||
boolean deployToRemote = true;
|
||||
if (!LibrariesManagerUtils.shareLibsAtStartup()) {
|
||||
log.info("Skip deploying libs from custom components");
|
||||
deployToRemote = false;
|
||||
}
|
||||
|
||||
Set<File> needToDeploy = new HashSet<>();
|
||||
List<ComponentProviderInfo> componentsFolders = service.getComponentsFactory().getComponentsProvidersInfo();
|
||||
for (ComponentProviderInfo providerInfo : componentsFolders) {
|
||||
String id = providerInfo.getId();
|
||||
@@ -1390,6 +1396,19 @@ public class LocalLibraryManager implements ILibraryManagerService, IChangedLibr
|
||||
}
|
||||
}
|
||||
|
||||
if (!deployToRemote) {
|
||||
needToDeploy.forEach(libFile -> {
|
||||
try {
|
||||
// install as release version if can't find mvn url from index
|
||||
install(libFile, null, false, true);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// deploy needed jars for User and Exchange component providers
|
||||
Map<String, List<MavenArtifact>> snapshotArtifactMap = new HashMap<String, List<MavenArtifact>>();
|
||||
Map<String, List<MavenArtifact>> releaseArtifactMap = new HashMap<String, List<MavenArtifact>>();
|
||||
@@ -1399,23 +1418,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) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user