Compare commits
137 Commits
patch/7.3.
...
release/7.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e09d3b98eb | ||
|
|
774e01ef34 | ||
|
|
5dac1b510a | ||
|
|
cdcba355d4 | ||
|
|
80d00edde3 | ||
|
|
b30b349b9b | ||
|
|
fc1c8d067b | ||
|
|
b762239fa2 | ||
|
|
13d7814fd5 | ||
|
|
bf855a7bb1 | ||
|
|
f3b2637867 | ||
|
|
e405558bd4 | ||
|
|
915701e64b | ||
|
|
4038574557 | ||
|
|
69a2741416 | ||
|
|
e43cc1f85b | ||
|
|
250ff496ba | ||
|
|
c99b037c7b | ||
|
|
810b694e5d | ||
|
|
7e66cf70d2 | ||
|
|
0285fdc191 | ||
|
|
59990aa2ca | ||
|
|
2eff81da52 | ||
|
|
13a40cfda7 | ||
|
|
e5ada32a75 | ||
|
|
cdfd2170ba | ||
|
|
5a7f0e8fe9 | ||
|
|
cacdff8623 | ||
|
|
e462ba015b | ||
|
|
8223b8f650 | ||
|
|
489c28c19f | ||
|
|
22f764d543 | ||
|
|
6c48bc0f4e | ||
|
|
5256afcd57 | ||
|
|
38f32f5d5e | ||
|
|
43b4b220d5 | ||
|
|
c476f7bfbd | ||
|
|
448217029f | ||
|
|
a046c641b0 | ||
|
|
982e319f9d | ||
|
|
48ab34ef4a | ||
|
|
b52c6e53e9 | ||
|
|
ae6b3f729b | ||
|
|
185064bf0f | ||
|
|
7dfd4d8e81 | ||
|
|
a561e95c43 | ||
|
|
ea0b76f84c | ||
|
|
b8a08d2228 | ||
|
|
c36ca11190 | ||
|
|
450cf88fbb | ||
|
|
273dbaff1d | ||
|
|
6d502306dc | ||
|
|
4f7bd39423 | ||
|
|
44bfd08c04 | ||
|
|
2237c0b071 | ||
|
|
6c77d40d68 | ||
|
|
0017db5b19 | ||
|
|
09adee337e | ||
|
|
b83227af06 | ||
|
|
16586b7bfa | ||
|
|
c2ce08daeb | ||
|
|
40c71f6911 | ||
|
|
776c0725b6 | ||
|
|
1228c42ed9 | ||
|
|
75df15acaa | ||
|
|
992ae04ae9 | ||
|
|
2b8ff4f36a | ||
|
|
30d8840a31 | ||
|
|
3ea2179438 | ||
|
|
e22daaaedf | ||
|
|
571a496303 | ||
|
|
86171f4473 | ||
|
|
ebe668a985 | ||
|
|
cff7a54f6f | ||
|
|
13309d3297 | ||
|
|
311c5680d3 | ||
|
|
743d863776 | ||
|
|
9a87e0c49e | ||
|
|
78522294dc | ||
|
|
2854fa80b5 | ||
|
|
7389610259 | ||
|
|
ae319f0d85 | ||
|
|
98a80d18b6 | ||
|
|
f878723f81 | ||
|
|
1ac0beea10 | ||
|
|
cc0cab9532 | ||
|
|
0d7971730f | ||
|
|
75cc28c0be | ||
|
|
f8e3b6d5cb | ||
|
|
8a82cff8f3 | ||
|
|
ab9d3d1db2 | ||
|
|
05779d09a3 | ||
|
|
d40317d16a | ||
|
|
0c3625940c | ||
|
|
00c0652cbb | ||
|
|
823b72bcd9 | ||
|
|
f760212388 | ||
|
|
9da9e8199a | ||
|
|
baf574ea55 | ||
|
|
892065d2c4 | ||
|
|
724dc1b72d | ||
|
|
132d794131 | ||
|
|
2298c44339 | ||
|
|
03e462f8ff | ||
|
|
f7fb174301 | ||
|
|
54fc6ecd51 | ||
|
|
779e9a8086 | ||
|
|
f2d189c792 | ||
|
|
84edc461db | ||
|
|
b06ee57323 | ||
|
|
4590b8456d | ||
|
|
b2c74643a7 | ||
|
|
b35fb11251 | ||
|
|
576d3abf29 | ||
|
|
14ca2dfaa7 | ||
|
|
b607ed6fb3 | ||
|
|
acd02c4c18 | ||
|
|
615a4f209e | ||
|
|
172f3c3483 | ||
|
|
a4ce2f457e | ||
|
|
f2af89413f | ||
|
|
0c8c872bd6 | ||
|
|
38ed0b9f1f | ||
|
|
4df14e99d0 | ||
|
|
0c3e5175dd | ||
|
|
4ed8a4a803 | ||
|
|
365700699e | ||
|
|
dab6da165f | ||
|
|
b33018d422 | ||
|
|
81ec1966bd | ||
|
|
d3246a9713 | ||
|
|
b098e18278 | ||
|
|
f635d5a9f6 | ||
|
|
49b4be0929 | ||
|
|
39afb9e94a | ||
|
|
d119efe8d6 | ||
|
|
66cdd796fd |
@@ -65,7 +65,7 @@ Module.view.download.external.modules.action.text=Download external modules
|
||||
Module.view.download.external.modules.action.description=Download external modules
|
||||
download.external.dialog.title=The following modules are not yet installed. Please download and install all required modules.
|
||||
download.external.dialog.desciption=List of modules to be downloaded automatically or imported manually.
|
||||
download.external.dialog.help.url=https://help.talend.com/display/KB/How+to+install+external+modules+in+the+Talend+products
|
||||
download.external.dialog.help.url=https://document-link.us.cloud.talend.com/ts_ig_install-external-modules?version=73&lang=en&env=prd
|
||||
AcceptModuleLicensesWizard.title=Download external modules
|
||||
AcceptModuleLicensesWizardDialog.button.acceptAll=Accept all
|
||||
AcceptModuleLicensesWizardDialog.cancelConfirmation.title=Confirmation
|
||||
|
||||
@@ -1136,7 +1136,7 @@ DatabaseForm.hc.link.none=None
|
||||
DatabaseForm.hc.link.repository=Repository
|
||||
DatabaseForm.hc.link.title=Hadoop Cluster
|
||||
DatabaseForm.checkFileExist=The file {0} is invalid or doesn't exist
|
||||
DatabaseForm.helpInfo.installDriverLink.url=https://help.talend.com/pages/viewpage.action?pageId=14230347
|
||||
DatabaseForm.helpInfo.installDriverLink.url=https://document-link.us.cloud.talend.com/ts_ig_install-external-modules?version=73&lang=en&env=prd
|
||||
DatabaseForm.helpInfo.installDriverLink.label=How to install a driver
|
||||
SelectorTableForm.toolTip=Not available with this database
|
||||
FileStep1.modeButText=Read excel2007 file format(xlsx)
|
||||
|
||||
@@ -95,11 +95,10 @@
|
||||
<version>2.12.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.16</version>
|
||||
<type>bundle</type>
|
||||
</dependency>
|
||||
<groupId>ch.qos.reload4j</groupId>
|
||||
<artifactId>reload4j</artifactId>
|
||||
<version>1.2.19</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -57,6 +57,8 @@ public class CommonsPlugin implements BundleActivator {
|
||||
// TESB-17856: For commandline builds ESB Micorservice bundle
|
||||
private static boolean isESBMicorservice = false;
|
||||
|
||||
private static Boolean isJunitWorking;
|
||||
|
||||
private static ServiceTracker proxyTracker;
|
||||
|
||||
public static boolean isWorkbenchCreated() {
|
||||
@@ -123,6 +125,35 @@ public class CommonsPlugin implements BundleActivator {
|
||||
return "org.talend.rcp.branding.tuj.product".equals(Platform.getProduct().getId()); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public static boolean isJunitWorking() {
|
||||
if (isJunitWorking == null) {
|
||||
try {
|
||||
String[] args = Platform.getCommandLineArgs();
|
||||
String applicationId = null;
|
||||
|
||||
for (int i = 0; i < args.length - 1; i++) {
|
||||
if (args[i].equalsIgnoreCase("-application")) { //$NON-NLS-1$
|
||||
applicationId = args[i + 1];
|
||||
}
|
||||
}
|
||||
|
||||
if (applicationId != null
|
||||
&& (applicationId.equals("org.eclipse.swtbot.eclipse.junit.headless.swtbottestapplication") //$NON-NLS-1$
|
||||
|| applicationId.equals("org.eclipse.pde.junit.runtime.uitestapplication"))) { //$NON-NLS-1$
|
||||
isJunitWorking = true;
|
||||
} else {
|
||||
isJunitWorking = false;
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
isJunitWorking = false;
|
||||
}
|
||||
}
|
||||
if (isJunitWorking == null) {
|
||||
isJunitWorking = false;
|
||||
}
|
||||
return isJunitWorking;
|
||||
}
|
||||
|
||||
/**
|
||||
* Answer the file associated with name. This handles the case of running as a plugin and running standalone which
|
||||
* happens during testing.
|
||||
|
||||
@@ -56,6 +56,19 @@ public class Hex {
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
public static boolean isNeedConvertToHex(String value) {
|
||||
if (value == null || "".equals(value.trim())) {
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < value.length(); i++) {
|
||||
int ch = value.charAt(i);
|
||||
if (ch < 32) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static int toDigit(char ch, int index) {
|
||||
int digit = Character.digit(ch, 16);
|
||||
|
||||
@@ -277,6 +277,10 @@ public class NetworkUtil {
|
||||
if (wrapIpV6 && Inet6Address.class.isInstance(inetAddress)) {
|
||||
String addr = inetAddress.getHostAddress();
|
||||
if (!addr.startsWith("[") || !addr.endsWith("]")) {
|
||||
int idx = addr.indexOf("%");
|
||||
if (idx > 0) {
|
||||
addr = addr.substring(0, idx);
|
||||
}
|
||||
addr = "[" + addr + "]";
|
||||
}
|
||||
return addr;
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2021 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.commons.ui.swt.advanced.composite;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.layout.GridData;
|
||||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Event;
|
||||
import org.eclipse.swt.widgets.Listener;
|
||||
import org.eclipse.swt.widgets.Sash;
|
||||
|
||||
/**
|
||||
* This class is used for constructing 2 composites, putting 1 sashes in the middle composite, which is used for
|
||||
* changing other 2 composites.
|
||||
*
|
||||
*/
|
||||
public class TwoCompositesSashForm extends Composite {
|
||||
|
||||
public static final int SASH_WIDTH = 3;
|
||||
|
||||
private Composite leftComposite;
|
||||
|
||||
private Composite rightComposite;
|
||||
|
||||
private Sash midSash;
|
||||
|
||||
/**
|
||||
* Initialize.
|
||||
*
|
||||
* @param parent
|
||||
* @param style
|
||||
*/
|
||||
public TwoCompositesSashForm(Composite parent, int style) {
|
||||
super(parent, style);
|
||||
final GridLayout gridLayout = new GridLayout();
|
||||
gridLayout.numColumns = 3;
|
||||
gridLayout.marginBottom = 0;
|
||||
gridLayout.marginHeight = 0;
|
||||
gridLayout.marginLeft = 0;
|
||||
gridLayout.marginRight = 0;
|
||||
gridLayout.marginTop = 0;
|
||||
gridLayout.marginWidth = 0;
|
||||
gridLayout.horizontalSpacing = 0;
|
||||
|
||||
setLayout(gridLayout);
|
||||
final GridData gridData = new GridData(GridData.FILL_BOTH);
|
||||
setLayoutData(gridData);
|
||||
|
||||
addComponents();
|
||||
addSashListeners();
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes all widgets's position when sash was moved.
|
||||
*
|
||||
* @param shift
|
||||
*/
|
||||
private void setCompositesBounds(int shift) {
|
||||
// Set mid Composite Width.
|
||||
int midSashPreLocation = midSash.getBounds().x;
|
||||
midSash.setLocation(midSashPreLocation + shift, midSash.getBounds().y);
|
||||
if (midSash.getBounds().x > 0) {
|
||||
if (midSashPreLocation < 0) {
|
||||
leftComposite.setSize(leftComposite.getBounds().width + shift + midSashPreLocation, leftComposite
|
||||
.getBounds().height);
|
||||
} else {
|
||||
leftComposite.setSize(leftComposite.getBounds().width + shift, leftComposite.getBounds().height);
|
||||
}
|
||||
} else {
|
||||
leftComposite.setSize(0, leftComposite.getBounds().height);
|
||||
}
|
||||
// Set Right Composte Width.
|
||||
rightComposite.setLocation(rightComposite.getBounds().x + shift, rightComposite.getBounds().y);
|
||||
rightComposite.setSize(rightComposite.getBounds().width - shift, rightComposite.getBounds().height);
|
||||
}
|
||||
|
||||
public Composite getLeftComposite() {
|
||||
return this.leftComposite;
|
||||
}
|
||||
|
||||
public Composite getRightComposite() {
|
||||
return this.rightComposite;
|
||||
}
|
||||
|
||||
private void addSashListeners() {
|
||||
midSash.addListener(SWT.Selection, new Listener() {
|
||||
|
||||
/*
|
||||
* (non-Java)
|
||||
*
|
||||
* @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
|
||||
*/
|
||||
public void handleEvent(Event event) {
|
||||
int shift = event.x - midSash.getBounds().x;
|
||||
setCompositesBounds(shift);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
private void addComponents() {
|
||||
leftComposite = new Composite(this, SWT.NONE);
|
||||
GridLayout gridLayout = new GridLayout();
|
||||
gridLayout.marginBottom = 0;
|
||||
gridLayout.marginHeight = 0;
|
||||
gridLayout.marginLeft = 0;
|
||||
gridLayout.marginRight = 0;
|
||||
gridLayout.marginTop = 0;
|
||||
gridLayout.marginWidth = 0;
|
||||
gridLayout.horizontalSpacing = 0;
|
||||
GridData gridData = new GridData(GridData.FILL_BOTH);
|
||||
|
||||
leftComposite.setLayout(gridLayout);
|
||||
leftComposite.setLayoutData(gridData);
|
||||
|
||||
midSash = new Sash(this, SWT.VERTICAL | SWT.SMOOTH);
|
||||
GridData gridData2 = new GridData(GridData.FILL_VERTICAL);
|
||||
midSash.setLayoutData(gridData2);
|
||||
midSash.setSize(SASH_WIDTH, midSash.getBounds().height);
|
||||
|
||||
rightComposite = new Composite(this, SWT.NONE);
|
||||
GridLayout gridLayout3 = new GridLayout();
|
||||
gridLayout3.marginBottom = 0;
|
||||
gridLayout3.marginHeight = 0;
|
||||
gridLayout3.marginLeft = 0;
|
||||
gridLayout3.marginRight = 0;
|
||||
gridLayout3.marginTop = 0;
|
||||
gridLayout3.marginWidth = 0;
|
||||
gridLayout3.horizontalSpacing = 0;
|
||||
rightComposite.setLayout(gridLayout3);
|
||||
GridData gridData4 = new GridData(GridData.FILL_BOTH);
|
||||
rightComposite.setLayoutData(gridData4);
|
||||
}
|
||||
|
||||
public void setGridDatas() {
|
||||
Composite composite = (Composite) leftComposite.getChildren()[0];
|
||||
GridLayout gridLayout2 = new GridLayout();
|
||||
gridLayout2.marginBottom = 0;
|
||||
gridLayout2.marginHeight = 0;
|
||||
gridLayout2.marginLeft = 0;
|
||||
gridLayout2.marginRight = 0;
|
||||
gridLayout2.marginTop = 0;
|
||||
gridLayout2.marginWidth = 0;
|
||||
gridLayout2.horizontalSpacing = 0;
|
||||
composite.setLayout(gridLayout2);
|
||||
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
|
||||
|
||||
Composite composite2 = (Composite) rightComposite.getChildren()[0];
|
||||
gridLayout2 = new GridLayout();
|
||||
gridLayout2.marginBottom = 0;
|
||||
gridLayout2.marginHeight = 0;
|
||||
gridLayout2.marginLeft = 0;
|
||||
gridLayout2.marginRight = 0;
|
||||
gridLayout2.marginTop = 0;
|
||||
gridLayout2.marginWidth = 0;
|
||||
gridLayout2.horizontalSpacing = 0;
|
||||
composite2.setLayout(gridLayout2);
|
||||
composite2.setLayoutData(new GridData(GridData.FILL_BOTH));
|
||||
|
||||
}
|
||||
}
|
||||
@@ -463,4 +463,8 @@ public interface IRepositoryFactory {
|
||||
public boolean isRepositoryBusy();
|
||||
|
||||
public RepositoryWorkUnit getWorkUnitInProgress();
|
||||
|
||||
public void deleteOldVersionPhysical(Project project, IRepositoryViewObject objToDelete, String version) throws PersistenceException;
|
||||
|
||||
public void batchDeleteOldVersionsPhysical(Project project, List<IRepositoryViewObject> objToDeleteList, boolean isDeleteOnRemote, IProgressMonitor monitor) throws PersistenceException;
|
||||
}
|
||||
|
||||
@@ -110,6 +110,7 @@ import org.talend.core.model.properties.Property;
|
||||
import org.talend.core.model.properties.RoutineItem;
|
||||
import org.talend.core.model.properties.SpagoBiServer;
|
||||
import org.talend.core.model.properties.Status;
|
||||
import org.talend.core.model.properties.TDQItem;
|
||||
import org.talend.core.model.properties.User;
|
||||
import org.talend.core.model.properties.impl.FolderItemImpl;
|
||||
import org.talend.core.model.relationship.RelationshipItemBuilder;
|
||||
@@ -141,6 +142,7 @@ 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.core.service.IDetectCVEService;
|
||||
import org.talend.core.utils.CodesJarResourceCache;
|
||||
import org.talend.cwm.helper.SubItemHelper;
|
||||
import org.talend.cwm.helper.TableHelper;
|
||||
@@ -411,7 +413,8 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
}
|
||||
|
||||
boolean isThrow = true;
|
||||
if (tdqRepService != null && CoreRuntimePlugin.getInstance().isDataProfilePerspectiveSelected()) {
|
||||
if (tdqRepService != null && (CoreRuntimePlugin.getInstance().isDataProfilePerspectiveSelected()
|
||||
|| item instanceof TDQItem)) {
|
||||
// change MessageBox to DeleteModelElementConfirmDialog
|
||||
InputDialog inputDialog = tdqRepService.getInputDialog(item);
|
||||
if (MessageDialog.OK == inputDialog.open()) {
|
||||
@@ -2281,6 +2284,9 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
IRunProcessService runProcessService = getRunProcessService();
|
||||
if (runProcessService != null) {
|
||||
runProcessService.initMavenJavaProject(monitor, project);
|
||||
|
||||
// before afterLogon migration execute, check and update daikon dependency
|
||||
runProcessService.checkAndUpdateDaikonDependencies();
|
||||
}
|
||||
|
||||
currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
|
||||
@@ -2462,6 +2468,15 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
if (runProcessService != null) {
|
||||
runProcessService.clearProjectRelatedSettings();
|
||||
}
|
||||
|
||||
// clear detect CVE cache
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IDetectCVEService.class)) {
|
||||
IDetectCVEService detectCVESvc = GlobalServiceRegister.getDefault().getService(IDetectCVEService.class);
|
||||
if (detectCVESvc != null) {
|
||||
detectCVESvc.clearCache();
|
||||
}
|
||||
}
|
||||
|
||||
ReferenceProjectProvider.clearTacReferenceList();
|
||||
ReferenceProjectProblemManager.getInstance().clearAll();
|
||||
fullLogonFinished = false;
|
||||
@@ -2784,4 +2799,81 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteOldVersionPhysical(Project project, IRepositoryViewObject objToDelete, String version) throws PersistenceException {
|
||||
if (project == null || objToDelete == null || objToDelete.getProperty() == null) {
|
||||
return;
|
||||
}
|
||||
// RepositoryViewObject is dynamic, so force to use in all case the RepositoryObject with fixed object.
|
||||
IRepositoryViewObject object = new RepositoryObject(objToDelete.getProperty());
|
||||
|
||||
ERepositoryObjectType repositoryObjectType = object.getRepositoryObjectType();
|
||||
|
||||
ICoreService coreService = getCoreService();
|
||||
if (coreService != null) {
|
||||
if (repositoryObjectType == ERepositoryObjectType.PROCESS) {
|
||||
// delete the job launch, for bug 8878
|
||||
coreService.removeJobLaunch(object);
|
||||
}
|
||||
}
|
||||
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
|
||||
IRunProcessService service = GlobalServiceRegister.getDefault()
|
||||
.getService(IRunProcessService.class);
|
||||
service.deleteOldVersionTalendJobProject(objToDelete);
|
||||
}
|
||||
|
||||
this.repositoryFactoryFromProvider.deleteOldVersionPhysical(project, object, version);
|
||||
|
||||
// i18n
|
||||
//log.info("Physical deletion [" + objToDelete + "] by " + getRepositoryContext().getUser() + ".");
|
||||
String str[] = new String[] { object.toString()+ "_" + version, getRepositoryContext().getUser().toString() };
|
||||
log.info(Messages.getString("ProxyRepositoryFactory.log.physicalDeletion", str)); //$NON-NLS-1$ }
|
||||
}
|
||||
|
||||
@Override
|
||||
public void batchDeleteOldVersionPhysical4Remote(Project project, List<IRepositoryViewObject> objToDeleteList, IProgressMonitor monitor) throws PersistenceException {
|
||||
if (project == null || objToDeleteList == null || objToDeleteList.size() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
List<String> idList = new ArrayList<>();
|
||||
List<IRepositoryViewObject> repositoryObjectList = new ArrayList<>();
|
||||
String label = "",lastLabel = "";
|
||||
for (IRepositoryViewObject objToDelete : objToDeleteList) {
|
||||
label = objToDelete.getProperty().getLabel();
|
||||
String versionedLabel = objToDelete.getProperty().getLabel() + "_" + objToDelete.getProperty().getVersion();
|
||||
monitor.setTaskName("Removing " + objToDelete.getRepositoryObjectType() + ":"+ versionedLabel);
|
||||
|
||||
IRepositoryViewObject object = new RepositoryObject(objToDelete.getProperty());
|
||||
boolean isExtendPoint = false;
|
||||
|
||||
idList.add(object.getProperty().getId());
|
||||
ERepositoryObjectType repositoryObjectType = object.getRepositoryObjectType();
|
||||
|
||||
ICoreService coreService = getCoreService();
|
||||
if (coreService != null) {
|
||||
if (repositoryObjectType == ERepositoryObjectType.PROCESS) {
|
||||
// delete the job launch, for bug 8878
|
||||
coreService.removeJobLaunch(object);
|
||||
}
|
||||
}
|
||||
|
||||
repositoryObjectList.add(object);
|
||||
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
|
||||
IRunProcessService service = GlobalServiceRegister.getDefault()
|
||||
.getService(IRunProcessService.class);
|
||||
service.deleteOldVersionTalendJobProject(objToDelete);
|
||||
}
|
||||
this.repositoryFactoryFromProvider.deleteOldVersionPhysical(project, objToDelete,objToDelete.getProperty().getVersion());
|
||||
if (label != null && !label.equals(lastLabel)) monitor.worked(1); //for different versions in progress bar
|
||||
lastLabel = label;
|
||||
}
|
||||
|
||||
// save project will handle git/svn update
|
||||
this.repositoryFactoryFromProvider.saveProject(project);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,280 +1,304 @@
|
||||
<?xml version="1.0"?>
|
||||
<mapping>
|
||||
<dbms product="AMAZON_AURORA" id="amazon_aurora_id" label="Mapping AMAZON_AURORA"
|
||||
default="true">
|
||||
<dbTypes>
|
||||
<dbType type="BIGINT" ignorePre="true"/>
|
||||
<dbType type="BIGINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BINARY" ignorePre="true"/>
|
||||
<dbType type="BIT" ignorePre="true" />
|
||||
<dbType type="BLOB" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="CHAR" defaultLength="200" ignorePre="true"/>
|
||||
<dbType type="DATE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="DATETIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="DECIMAL" defaultLength="20" defaultPrecision="10" preBeforelen="false"/>
|
||||
<dbType type="DOUBLE" defaultLength="20" defaultPrecision="10"/>
|
||||
<dbType type="DOUBLE UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="ENUM" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="FLOAT" defaultPrecision="2"/>
|
||||
<dbType type="FLOAT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="GEOMETRY" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="GEOMETRYCOLLECTION" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INT" ignorePre="true" />
|
||||
<dbType type="INT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LINESTRING" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LONGTEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LONGBLOB" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="MEDIUMBLOB" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MEDIUMINT" ignorePre="true" />
|
||||
<dbType type="MEDIUMINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MEDIUMTEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MULTILINESTRING" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MULTIPOINT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MULTIPOLYGON" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="POINT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="POLYGON" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="SMALLINT" ignorePre="true" />
|
||||
<dbType type="SMALLINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="SET" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIMESTAMP" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TINYBLOB" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TINYINT" ignorePre="true" />
|
||||
<dbType type="TINYINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TINYTEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="VARBINARY" ignorePre="true" />
|
||||
<dbType type="VARCHAR" default="true" defaultLength="100" ignorePre="true"/>
|
||||
<dbType type="YEAR" ignorePre="true"/>
|
||||
</dbTypes>
|
||||
|
||||
<language name="java">
|
||||
<talendToDbTypes><!-- Adviced mappings -->
|
||||
<talendType type="id_List"/>
|
||||
<talendType type="id_Boolean">
|
||||
<dbType type="BIT" default="true" />
|
||||
</talendType>
|
||||
<talendType type="id_Byte">
|
||||
<dbType type="TINYINT" default="true" />
|
||||
<dbType type="BIGINT" />
|
||||
<dbType type="INT" />
|
||||
<dbType type="MEDIUMINT" />
|
||||
<dbType type="SMALLINT" />
|
||||
</talendType>
|
||||
<talendType type="id_byte[]">
|
||||
</talendType>
|
||||
<talendType type="id_Character">
|
||||
<dbType type="CHAR" default="true" />
|
||||
<dbType type="VARCHAR"/>
|
||||
</talendType>
|
||||
<talendType type="id_Date">
|
||||
<dbType type="DATE" />
|
||||
<dbType type="DATETIME" default="true" />
|
||||
<dbType type="TIME" />
|
||||
<dbType type="YEAR" />
|
||||
<dbType type="TIMESTAMP" />
|
||||
</talendType>
|
||||
<talendType type="id_BigDecimal">
|
||||
<dbType type="DECIMAL" default="true" />
|
||||
<dbType type="FLOAT"/>
|
||||
<dbType type="DOUBLE" />
|
||||
</talendType>
|
||||
<talendType type="id_Double">
|
||||
<dbType type="DOUBLE" default="true" />
|
||||
<dbType type="FLOAT"/>
|
||||
<dbType type="DECIMAL" />
|
||||
</talendType>
|
||||
<talendType type="id_Float">
|
||||
<dbType type="FLOAT" default="true" />
|
||||
<dbType type="DOUBLE"/>
|
||||
<dbType type="DECIMAL" />
|
||||
</talendType>
|
||||
<talendType type="id_Integer">
|
||||
<dbType type="INT" default="true" />
|
||||
<dbType type="BIGINT" />
|
||||
</talendType>
|
||||
<talendType type="id_Long">
|
||||
<dbType type="BIGINT" default="true" />
|
||||
</talendType>
|
||||
<talendType type="id_Object">
|
||||
<dbType type="BLOB" default="true"/>
|
||||
<dbType type="ENUM" />
|
||||
<dbType type="GEOMETRY" />
|
||||
<dbType type="GEOMETRYCOLLECTION" />
|
||||
<dbType type="MEDIUMINT" />
|
||||
<dbType type="LONGBLOB" />
|
||||
<dbType type="MEDIUMBLOB" />
|
||||
<dbType type="MULTIPOINT" />
|
||||
<dbType type="MULTIPOLYGON" />
|
||||
<dbType type="POINT" />
|
||||
<dbType type="POLYGON" />
|
||||
<dbType type="SET" />
|
||||
<dbType type="TINYBLOB" />
|
||||
</talendType>
|
||||
<talendType type="id_Short">
|
||||
<dbType type="SMALLINT" default="true" />
|
||||
<dbType type="INT" />
|
||||
<dbType type="BIGINT"/>
|
||||
<dbType type="MEDIUMINT" />
|
||||
</talendType>
|
||||
<talendType type="id_String">
|
||||
<dbType type="VARCHAR" default="true" />
|
||||
<dbType type="LINESTRING" />
|
||||
<dbType type="LONGTEXT"/>
|
||||
<dbType type="MEDIUMTEXT" />
|
||||
<dbType type="MULTILINESTRING" />
|
||||
<dbType type="TEXT" />
|
||||
<dbType type="TINYTEXT" />
|
||||
</talendType>
|
||||
</talendToDbTypes>
|
||||
<dbToTalendTypes>
|
||||
<dbType type="BIGINT">
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BINARY">
|
||||
<talendType type="id_Boolean" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BIT">
|
||||
<talendType type="id_Boolean" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BLOB">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="CHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="DATE">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="DATETIME">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="DECIMAL">
|
||||
<talendType type="id_Float"/>
|
||||
<talendType type="id_Double"/>
|
||||
<talendType type="id_BigDecimal" default="true"/>
|
||||
</dbType>
|
||||
<dbType type="DOUBLE">
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="ENUM">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="FLOAT">
|
||||
<talendType type="id_Float" default="true" />
|
||||
<talendType type="id_Double"/>
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="GEOMETRY">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="GEOMETRYCOLLECTION">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INT">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="LINESTRING">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="LONGTEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="LONGBLOB">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MEDIUMBLOB">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MEDIUMINT">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="MEDIUMTEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MULTILINESTRING">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MULTIPOINT">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MULTIPOLYGON">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="POINT">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="POLYGON">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="SMALLINT">
|
||||
<talendType type="id_Short" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
<talendType type="id_Integer"/>
|
||||
</dbType>
|
||||
<dbType type="SET">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIME">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIMESTAMP">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TINYBLOB">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TINYINT">
|
||||
<talendType type="id_Byte" default="true" />
|
||||
<talendType type="id_Integer"/>
|
||||
<talendType type="id_Long"/>
|
||||
<talendType type="id_Short"/>
|
||||
</dbType>
|
||||
<dbType type="TINYTEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="VARBINARY">
|
||||
</dbType>
|
||||
<dbType type="VARCHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="YEAR">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BIGINT UNSIGNED" >
|
||||
</dbType>
|
||||
<dbType type="DOUBLE UNSIGNED" >
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="FLOAT UNSIGNED" >
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="INT UNSIGNED" >
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MEDIUMINT UNSIGNED" >
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long" />
|
||||
</dbType>
|
||||
<dbType type="SMALLINT UNSIGNED" >
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long" />
|
||||
</dbType>
|
||||
<dbType type="TINYINT UNSIGNED" >
|
||||
<talendType type="id_Short" default="true" />
|
||||
<talendType type="id_Integer" />
|
||||
<talendType type="id_Long" />
|
||||
</dbType>
|
||||
</dbToTalendTypes>
|
||||
</language>
|
||||
</dbms>
|
||||
|
||||
</mapping>
|
||||
<?xml version="1.0"?>
|
||||
<mapping>
|
||||
<dbms product="AMAZON_AURORA" id="amazon_aurora_id" label="Mapping AMAZON_AURORA"
|
||||
default="true">
|
||||
<dbTypes>
|
||||
<dbType type="BIGINT" ignorePre="true"/>
|
||||
<dbType type="BIGINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="BINARY" ignorePre="true"/>
|
||||
<dbType type="BIT" ignorePre="true" />
|
||||
<dbType type="BLOB" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="CHAR" defaultLength="200" ignorePre="true"/>
|
||||
<dbType type="DATE" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="DATETIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="DECIMAL" defaultLength="20" defaultPrecision="10" preBeforelen="false"/>
|
||||
<dbType type="DOUBLE" defaultLength="20" defaultPrecision="10"/>
|
||||
<dbType type="DOUBLE UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="ENUM" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="FLOAT" defaultPrecision="2"/>
|
||||
<dbType type="FLOAT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="GEOMETRY" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="GEOMETRYCOLLECTION" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INT" ignorePre="true" />
|
||||
<dbType type="INT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INTEGER" ignorePre="true" />
|
||||
<dbType type="INTEGER UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LINESTRING" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LONGTEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LONGBLOB" ignoreLen="true" ignorePre="true"/>
|
||||
<dbType type="MEDIUMBLOB" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MEDIUMINT" ignorePre="true" />
|
||||
<dbType type="MEDIUMINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MEDIUMTEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MULTILINESTRING" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MULTIPOINT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="MULTIPOLYGON" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="POINT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="POLYGON" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="SMALLINT" ignorePre="true" />
|
||||
<dbType type="SMALLINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="SET" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIME" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TIMESTAMP" ignoreLen="true" ignorePre="false" />
|
||||
<dbType type="TINYBLOB" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TINYINT" ignorePre="true" />
|
||||
<dbType type="TINYINT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="TINYTEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="VARBINARY" ignorePre="true" />
|
||||
<dbType type="VARCHAR" default="true" defaultLength="100" ignorePre="true"/>
|
||||
<dbType type="YEAR" ignorePre="true"/>
|
||||
</dbTypes>
|
||||
|
||||
<language name="java">
|
||||
<talendToDbTypes><!-- Adviced mappings -->
|
||||
<talendType type="id_List"/>
|
||||
<talendType type="id_Boolean">
|
||||
<dbType type="BIT" default="true" />
|
||||
</talendType>
|
||||
<talendType type="id_Byte">
|
||||
<dbType type="TINYINT" default="true" />
|
||||
<dbType type="BIGINT" />
|
||||
<dbType type="INT" />
|
||||
<dbType type="MEDIUMINT" />
|
||||
<dbType type="SMALLINT" />
|
||||
</talendType>
|
||||
<talendType type="id_byte[]">
|
||||
<dbType type="VARBINARY" default="true" />
|
||||
<dbType type="BINARY" />
|
||||
<dbType type="BIT" />
|
||||
<dbType type="BLOB" />
|
||||
<dbType type="LONGBLOB" />
|
||||
<dbType type="MEDIUMBLOB" />
|
||||
<dbType type="TINYBLOB" />
|
||||
</talendType>
|
||||
<talendType type="id_Character">
|
||||
<dbType type="CHAR" default="true" />
|
||||
<dbType type="VARCHAR"/>
|
||||
</talendType>
|
||||
<talendType type="id_Date">
|
||||
<dbType type="DATE" />
|
||||
<dbType type="DATETIME" default="true" />
|
||||
<dbType type="TIME" />
|
||||
<dbType type="YEAR" />
|
||||
<dbType type="TIMESTAMP" />
|
||||
</talendType>
|
||||
<talendType type="id_BigDecimal">
|
||||
<dbType type="DECIMAL" default="true" />
|
||||
<dbType type="FLOAT"/>
|
||||
<dbType type="DOUBLE" />
|
||||
</talendType>
|
||||
<talendType type="id_Double">
|
||||
<dbType type="DOUBLE" default="true" />
|
||||
<dbType type="FLOAT"/>
|
||||
<dbType type="DECIMAL" />
|
||||
</talendType>
|
||||
<talendType type="id_Float">
|
||||
<dbType type="FLOAT" default="true" />
|
||||
<dbType type="DOUBLE"/>
|
||||
<dbType type="DECIMAL" />
|
||||
</talendType>
|
||||
<talendType type="id_Integer">
|
||||
<dbType type="INT" default="true" />
|
||||
<dbType type="BIGINT" />
|
||||
</talendType>
|
||||
<talendType type="id_Long">
|
||||
<dbType type="BIGINT" default="true" />
|
||||
</talendType>
|
||||
<talendType type="id_Object">
|
||||
<dbType type="BLOB" default="true"/>
|
||||
<dbType type="ENUM" />
|
||||
<dbType type="GEOMETRY" />
|
||||
<dbType type="GEOMETRYCOLLECTION" />
|
||||
<dbType type="MEDIUMINT" />
|
||||
<dbType type="LONGBLOB" />
|
||||
<dbType type="MEDIUMBLOB" />
|
||||
<dbType type="MULTIPOINT" />
|
||||
<dbType type="MULTIPOLYGON" />
|
||||
<dbType type="POINT" />
|
||||
<dbType type="POLYGON" />
|
||||
<dbType type="SET" />
|
||||
<dbType type="TINYBLOB" />
|
||||
</talendType>
|
||||
<talendType type="id_Short">
|
||||
<dbType type="SMALLINT" default="true" />
|
||||
<dbType type="INT" />
|
||||
<dbType type="BIGINT"/>
|
||||
<dbType type="MEDIUMINT" />
|
||||
</talendType>
|
||||
<talendType type="id_String">
|
||||
<dbType type="VARCHAR" default="true" />
|
||||
<dbType type="LINESTRING" />
|
||||
<dbType type="LONGTEXT"/>
|
||||
<dbType type="MEDIUMTEXT" />
|
||||
<dbType type="MULTILINESTRING" />
|
||||
<dbType type="TEXT" />
|
||||
<dbType type="TINYTEXT" />
|
||||
<dbType type="CHAR" />
|
||||
</talendType>
|
||||
</talendToDbTypes>
|
||||
<dbToTalendTypes>
|
||||
<dbType type="BIGINT">
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BINARY">
|
||||
<talendType type="id_byte[]" />
|
||||
<talendType type="id_Boolean" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BIT">
|
||||
<talendType type="id_byte[]" />
|
||||
<talendType type="id_Boolean" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BLOB">
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
<talendType type="id_Object" />
|
||||
</dbType>
|
||||
<dbType type="CHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="DATE">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="DATETIME">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="DECIMAL">
|
||||
<talendType type="id_Float"/>
|
||||
<talendType type="id_Double"/>
|
||||
<talendType type="id_BigDecimal" default="true"/>
|
||||
</dbType>
|
||||
<dbType type="DOUBLE">
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="ENUM">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="FLOAT">
|
||||
<talendType type="id_Float" default="true" />
|
||||
<talendType type="id_Double"/>
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="GEOMETRY">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="GEOMETRYCOLLECTION">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INT">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="INTEGER">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="LINESTRING">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="LONGTEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="LONGBLOB">
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
<talendType type="id_Object" />
|
||||
</dbType>
|
||||
<dbType type="MEDIUMBLOB">
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
<talendType type="id_Object" />
|
||||
</dbType>
|
||||
<dbType type="MEDIUMINT">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="MEDIUMTEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MULTILINESTRING">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MULTIPOINT">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MULTIPOLYGON">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="POINT">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="POLYGON">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="SMALLINT">
|
||||
<talendType type="id_Short" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
<talendType type="id_Integer"/>
|
||||
</dbType>
|
||||
<dbType type="SET">
|
||||
<talendType type="id_Object" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIME">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TIMESTAMP">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="TINYBLOB">
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
<talendType type="id_Object" />
|
||||
</dbType>
|
||||
<dbType type="TINYINT">
|
||||
<talendType type="id_Byte" default="true" />
|
||||
<talendType type="id_Integer"/>
|
||||
<talendType type="id_Long"/>
|
||||
<talendType type="id_Short"/>
|
||||
</dbType>
|
||||
<dbType type="TINYTEXT">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="VARBINARY">
|
||||
<talendType type="id_byte[]" default="true" />
|
||||
</dbType>
|
||||
<dbType type="VARCHAR">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="YEAR">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="BIGINT UNSIGNED" >
|
||||
</dbType>
|
||||
<dbType type="DOUBLE UNSIGNED" >
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="FLOAT UNSIGNED" >
|
||||
<talendType type="id_Double" default="true" />
|
||||
<talendType type="id_BigDecimal"/>
|
||||
</dbType>
|
||||
<dbType type="INT UNSIGNED" >
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INTEGER UNSIGNED" >
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MEDIUMINT UNSIGNED" >
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long" />
|
||||
</dbType>
|
||||
<dbType type="SMALLINT UNSIGNED" >
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long" />
|
||||
</dbType>
|
||||
<dbType type="TINYINT UNSIGNED" >
|
||||
<talendType type="id_Short" default="true" />
|
||||
<talendType type="id_Integer" />
|
||||
<talendType type="id_Long" />
|
||||
</dbType>
|
||||
</dbToTalendTypes>
|
||||
</language>
|
||||
</dbms>
|
||||
|
||||
</mapping>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<dbType type="INT" ignorePre="true" />
|
||||
<dbType type="INT UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INTEGER" ignorePre="true" />
|
||||
<dbType type="INTEGER UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="INTEGER UNSIGNED" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LINESTRING" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LONGTEXT" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="LONGBLOB" ignoreLen="true" ignorePre="true"/>
|
||||
@@ -190,9 +190,9 @@
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="INTEGER">
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long"/>
|
||||
</dbType>
|
||||
<dbType type="LINESTRING">
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
@@ -282,8 +282,8 @@
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="INTEGER UNSIGNED" >
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="MEDIUMINT UNSIGNED" >
|
||||
<talendType type="id_Integer" default="true" />
|
||||
<talendType type="id_Long" />
|
||||
|
||||
@@ -21,6 +21,7 @@ import java.util.Set;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.talend.core.model.general.ModuleNeeded;
|
||||
import org.talend.core.model.general.RetrieveResult;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.nexus.ArtifactRepositoryBean;
|
||||
import org.talend.core.nexus.TalendLibsServerManager;
|
||||
@@ -77,6 +78,8 @@ public interface ILibraryManagerService extends IService {
|
||||
public void saveMavenIndex(Map<String, String> libsToMavenUri, IProgressMonitor... monitorWrap);
|
||||
|
||||
public void createModulesIndexFromComponentAndExtension(IProgressMonitor... monitorWrap);
|
||||
|
||||
public Map<String,String> buildModulesIndexFromComponentAndExtension(IProgressMonitor... monitorWrap);
|
||||
|
||||
/**
|
||||
* DOC ycbai Comment method "retrieve".
|
||||
@@ -107,6 +110,8 @@ public interface ILibraryManagerService extends IService {
|
||||
|
||||
public boolean retrieve(ModuleNeeded module, String pathToStore, boolean showDialog, IProgressMonitor... monitorWrap);
|
||||
|
||||
RetrieveResult retrieveModules(ERepositoryObjectType codeType, Set<ModuleNeeded> modulesNeeded, String pathToStore,
|
||||
boolean showDialog, IProgressMonitor... monitorWrap);
|
||||
/**
|
||||
*
|
||||
* Resolve the jar from custom nexus
|
||||
@@ -155,13 +160,6 @@ public interface ILibraryManagerService extends IService {
|
||||
|
||||
public boolean checkJarInstalledFromPlatform(String uriPath);
|
||||
|
||||
/**
|
||||
* deploy jars from lib/java to local maven if any jar already exist in maven and need update , for jars that not
|
||||
* exist in maven won't be deploy by this funciton , those jars should be deploy when it is needed Comment method
|
||||
* "synToLocalMaven".
|
||||
*/
|
||||
public void synToLocalMaven();
|
||||
|
||||
public String getMavenUriFromIndex(String jarName);
|
||||
|
||||
public void setCustomMavenURI(String orignalURI, String customURI);
|
||||
|
||||
@@ -149,7 +149,9 @@ public enum EDatabaseTypeName {
|
||||
"HBase", "HBase", Boolean.FALSE, "HBASE", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Column_Family, true), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
MAPRDB(
|
||||
"MapRDB", "MapRDB", Boolean.FALSE, "MAPRDB", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Column_Family, true);//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
"MapRDB", "MapRDB", Boolean.FALSE, "MAPRDB", EDatabaseSchemaOrCatalogMapping.Sid, EDatabaseSchemaOrCatalogMapping.Column_Family, true),//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
SNOWFLAKE(
|
||||
"SNOWFLAKE","SNOWFLAKE",Boolean.TRUE,"SNOWFLAKE",EDatabaseSchemaOrCatalogMapping.None, EDatabaseSchemaOrCatalogMapping.None);
|
||||
|
||||
// displayName is used in Java code.
|
||||
private String displayName;
|
||||
|
||||
@@ -214,6 +214,36 @@ public class ConnParameterKeys {
|
||||
|
||||
/******************************************/
|
||||
|
||||
/*********** Azure Synapse keys ***************/
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_HOST = "CONN_PARA_KEY_SYNAPSE_HOST"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_AUTH_TOKEN = "CONN_PARA_KEY_SYNAPSE_AUTH_TOKEN"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_SPARK_POOLS = "CONN_PARA_KEY_SYNAPSE_SPARK_POOLS"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_FS_HOSTNAME = "CONN_PARA_KEY_SYNAPSE_FS_HOSTNAME"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_FS_CONTAINER = "CONN_PARA_KEY_SYNAPSE_FS_CONTAINER"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_FS_USERNAME = "CONN_PARA_KEY_SYNAPSE_FS_USERNAME"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_FS_PASSWORD = "CONN_PARA_KEY_SYNAPSE_FS_PASSWORD"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_FS_STORAGE = "CONN_PARA_KEY_SYNAPSE_FS_STORAGE"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_SYNAPSE_DEPLOY_BLOB = "CONN_PARA_KEY_SYNAPSE_DEPLOY_BLOB"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_DRIVER_MEMORY = "CONN_PARA_KEY_DRIVER_MEMORY"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_DRIVER_CORES = "CONN_PARA_KEY_DRIVER_CORES"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_EXECUTOR_MEMORY = "CONN_PARA_KEY_EXECUTOR_MEMORY"; //$NON-NLS-1$
|
||||
|
||||
public static final String CONN_PARA_KEY_TUNING_PROPERTIES = "CONN_PARA_KEY_TUNING_PROPERTIES"; //$NON-NLS-1$
|
||||
|
||||
/******************************************/
|
||||
|
||||
/**
|
||||
* HBase keys.
|
||||
*/
|
||||
@@ -321,6 +351,8 @@ public class ConnParameterKeys {
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_ENDPOINT="CONN_PARA_KEY_DATABRICKS_ENDPOINT";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_CLOUD_PROVIDER = "CONN_PARA_KEY_DATABRICKS_CLOUD_PROVIDER";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_RUN_MODE = "CONN_PARA_KEY_DATABRICKS_RUN_MODE";
|
||||
|
||||
public static final String CONN_PARA_KEY_DATABRICKS_CLUSTER_ID="CONN_PARA_KEY_DATABRICKS_CLUSTER_ID";
|
||||
|
||||
@@ -334,5 +366,19 @@ public class ConnParameterKeys {
|
||||
public static final String CONN_PARA_KEY_SET_HADOOP_CONF = "CONN_PARA_KEY_SET_HADOOP_CONF";
|
||||
|
||||
public static final String CONN_PARA_KEY_HADOOP_CONF_SPECIFIC_JAR = "CONN_PARA_KEY_HADOOP_CONF_SPECIFIC_JAR";
|
||||
|
||||
/**Knox*/
|
||||
public static final String CONN_PARA_KEY_SPARK_MODE="CONN_PARA_KEY_SPARK_MODE";
|
||||
|
||||
public static final String CONN_PARA_KEY_USE_KNOX="CONN_PARA_KEY_USE_KNOX";
|
||||
|
||||
public static final String CONN_PARA_KEY_KNOX_URL="CONN_PARA_KEY_KNOX_URL";
|
||||
|
||||
public static final String CONN_PARA_KEY_KNOX_USER = "CONN_PARA_KEY_KNOX_USER";
|
||||
|
||||
public static final String CONN_PARA_KEY_KNOX_PASSWORD="CONN_PARA_KEY_KNOX_PASSWORD";
|
||||
|
||||
public static final String CONN_PARA_KEY_KNOX_DIRECTORY="CONN_PARA_KEY_KNOX_DIRECTORY";
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -300,13 +300,20 @@ public class DatabaseConnStrUtil {
|
||||
if (!url.endsWith(";")) { //$NON-NLS-1$
|
||||
url = url + ";"; //$NON-NLS-1$
|
||||
}
|
||||
url = url + "ssl=true;"; //$NON-NLS-1$
|
||||
|
||||
boolean isHiveDriver = url.startsWith(DbConnStrForHive.URL_HIVE_2_TEMPLATE);
|
||||
|
||||
url = url + ( isHiveDriver ? "ssl=true;" : "SSL=1;" ); //$NON-NLS-1$
|
||||
|
||||
String trustStorePath = dbConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_SSL_TRUST_STORE_PATH);
|
||||
|
||||
if (trustStorePath != null) {
|
||||
url = url + "sslTrustStore=" + trustStorePath + ";"; //$NON-NLS-1$//$NON-NLS-2$
|
||||
url = url + ( isHiveDriver ? "sslTrustStore=" : "SSLTrustStore=" ) + trustStorePath + ";"; //$NON-NLS-1$//$NON-NLS-2$
|
||||
}
|
||||
|
||||
String trustStorePassword = null;
|
||||
trustStorePassword = dbConn.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_SSL_TRUST_STORE_PASSWORD);
|
||||
|
||||
if (trustStorePassword != null) {
|
||||
if (encryptPassword) {
|
||||
trustStorePassword = "encrypted"; //$NON-NLS-1$
|
||||
@@ -318,7 +325,7 @@ public class DatabaseConnStrUtil {
|
||||
if (trustStorePassword == null) {
|
||||
trustStorePassword = ""; //$NON-NLS-1$
|
||||
}
|
||||
url = url + "trustStorePassword=" + trustStorePassword; //$NON-NLS-1$
|
||||
url = url + ( isHiveDriver ? "trustStorePassword=" : "SSLTrustStorePwd=" ) + trustStorePassword; //$NON-NLS-1$
|
||||
}
|
||||
if (url.endsWith(";")) { //$NON-NLS-1$
|
||||
url = url.substring(0, url.length() - 1);
|
||||
@@ -385,7 +392,8 @@ public class DatabaseConnStrUtil {
|
||||
template = EDatabaseConnTemplate.IMPALA_IMPALA_DRIVER.getUrlTemplate(null);
|
||||
}
|
||||
String standardURlString = getImpalaURlString(template, supportContext, server, port, sid);
|
||||
String principalSuffix = "principal="; //$NON-NLS-1$
|
||||
|
||||
String principalSuffix = "IMPALA".equals(driver) ? "AuthMech=1" : "principal="; //$NON-NLS-1$
|
||||
boolean hasPrinc = false;
|
||||
String[] urlArray = standardURlString.split(SEMICOLON);
|
||||
if (urlArray[urlArray.length - 1].startsWith(principalSuffix)) {
|
||||
@@ -397,7 +405,21 @@ public class DatabaseConnStrUtil {
|
||||
}
|
||||
} else {
|
||||
if (Principal != null) {
|
||||
standardURlString = urlArray[0].concat(SEMICOLON).concat(principalSuffix).concat(Principal);
|
||||
|
||||
if("IMPALA".equals(driver)) {
|
||||
String krbServiceName = (Principal.split("/")[0]);
|
||||
String krbHostFQDN = (Principal.split("/")[1].split("@")[0]);
|
||||
String krbRealm = (Principal.split("/")[1].split("@")[1]);
|
||||
String urlKerberosParameter = ";KrbServiceName=" + krbServiceName
|
||||
+ ";KrbHostFQDN=" + krbHostFQDN
|
||||
+ ";KrbRealm=" + krbRealm;
|
||||
|
||||
standardURlString = urlArray[0].concat(SEMICOLON).concat(principalSuffix).concat(urlKerberosParameter);
|
||||
|
||||
} else {
|
||||
|
||||
standardURlString = urlArray[0].concat(SEMICOLON).concat(principalSuffix).concat(Principal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ public enum EDatabaseConnTemplate {
|
||||
MYSQL(new DbConnStr(EDatabaseTypeName.MYSQL, //
|
||||
"jdbc:mysql://<host>:<port>/<sid>?<property>", //$NON-NLS-1$
|
||||
"3306", //$NON-NLS-1$
|
||||
"noDatetimeStringSync=true")), //$NON-NLS-1$
|
||||
"noDatetimeStringSync=true&enabledTLSProtocols=TLSv1.2,TLSv1.1,TLSv1")), //$NON-NLS-1$
|
||||
|
||||
AMAZON_AURORA(new DbConnStr(EDatabaseTypeName.AMAZON_AURORA, //
|
||||
"jdbc:mysql://<host>:<port>/<sid>?<property>", //$NON-NLS-1$
|
||||
|
||||
@@ -58,7 +58,7 @@ public enum EDatabaseVersion4Drivers {
|
||||
HSQLDB_SERVER(new DbVersion4Drivers(EDatabaseTypeName.HSQLDB_SERVER, "hsqldb.jar")), //$NON-NLS-1$
|
||||
HSQLDB_WEBSERVER(new DbVersion4Drivers(EDatabaseTypeName.HSQLDB_WEBSERVER, "hsqldb.jar")), //$NON-NLS-1$
|
||||
|
||||
H2(new DbVersion4Drivers(EDatabaseTypeName.H2, "h2-1.4.198.jar")), //$NON-NLS-1$
|
||||
H2(new DbVersion4Drivers(EDatabaseTypeName.H2, "h2-2.1.210.jar")), //$NON-NLS-1$
|
||||
|
||||
//
|
||||
JAVADB_EMBEDED(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_EMBEDED, "derby.jar")), //$NON-NLS-1$
|
||||
@@ -71,13 +71,14 @@ public enum EDatabaseVersion4Drivers {
|
||||
INFORMIX(new DbVersion4Drivers(EDatabaseTypeName.INFORMIX, "ifxjdbc.jar")), //$NON-NLS-1$
|
||||
|
||||
SAS_9_1(new DbVersion4Drivers(EDatabaseTypeName.SAS, "SAS 9.1", "SAS_9.1", new String[] { "sas.core.jar", //$NON-NLS-1$
|
||||
"sas.intrnet.javatools.jar", "sas.svc.connection.jar", "org.apache.log4j_1.2.15.v201012070815.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"sas.intrnet.javatools.jar", "sas.svc.connection.jar", "reload4j-1.2.19.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
SAS_9_2(new DbVersion4Drivers(EDatabaseTypeName.SAS,
|
||||
"SAS 9.2", "SAS_9.2", new String[] { "sas.core.jar", "sas.security.sspi.jar", "sas.svc.connection.jar", "org.apache.log4j_1.2.15.v201012070815.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"SAS 9.2", "SAS_9.2", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new String[] { "sas.core.jar", "sas.security.sspi.jar", "sas.svc.connection.jar", "reload4j-1.2.19jar" })),
|
||||
SAPHana(new DbVersion4Drivers(EDatabaseTypeName.SAPHana, "HDB 1.0", "HDB_1_0", "ngdbc.jar")), //$NON-NLS-1$
|
||||
// MYSQL, add for 9594
|
||||
MYSQL_8(new DbVersion4Drivers(EDatabaseTypeName.MYSQL, "MySQL 8", "MYSQL_8", "mysql-connector-java-8.0.18.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
MYSQL_5(new DbVersion4Drivers(EDatabaseTypeName.MYSQL, "MySQL 5", "MYSQL_5", "mysql-connector-java-5.1.30-bin.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
MYSQL_5(new DbVersion4Drivers(EDatabaseTypeName.MYSQL, "MySQL 5", "MYSQL_5", "mysql-connector-java-5.1.49.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
MARIADB(new DbVersion4Drivers(EDatabaseTypeName.MYSQL, "MariaDB", "MARIADB", "mariadb-java-client-2.5.3.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
// add for 9594
|
||||
MSSQL(new DbVersion4Drivers(EDatabaseTypeName.MSSQL,"Open source JTDS", "JTDS", "jtds-1.3.1-patch-20190523.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
@@ -85,10 +86,10 @@ public enum EDatabaseVersion4Drivers {
|
||||
"Microsoft SQL Server 2012", "Microsoft SQL Server 2012", "jtds-1.3.1-patch-20190523.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
MSSQL_PROP(new DbVersion4Drivers(EDatabaseTypeName.MSSQL,
|
||||
"Microsoft", "MSSQL_PROP", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new String[] { "mssql-jdbc.jar", "slf4j-api-1.7.25.jar", "slf4j-log4j12-1.7.25.jar", "adal4j-1.6.5.jar", //$NON-NLS-1$
|
||||
"commons-lang3-3.10.jar", "commons-codec-1.14.jar", "gson-2.8.6.jar", "oauth2-oidc-sdk-6.5.jar",
|
||||
"json-smart-2.4.2.jar", "nimbus-jose-jwt-8.11.jar", "javax.mail-1.6.2.jar", "log4j-1.2.17.jar",
|
||||
"accessors-smart-1.1.jar", "asm-5.0.3.jar" })),
|
||||
new String[] { "mssql-jdbc.jar", "slf4j-api-1.7.25.jar", "slf4j-log4j12-1.7.25.jar", "adal4j-1.6.7.jar", //$NON-NLS-1$
|
||||
"commons-lang3-3.10.jar", "commons-codec-1.14.jar", "gson-2.8.6.jar", "oauth2-oidc-sdk-9.7.jar",
|
||||
"json-smart-2.4.7.jar", "nimbus-jose-jwt-8.11.jar", "javax.mail-1.6.2.jar", "reload4j-1.2.19.jar",
|
||||
"accessors-smart-2.4.7.jar", "asm-9.1.jar", "content-type-2.1.jar" })),
|
||||
|
||||
VERTICA_9(new DbVersion4Drivers(EDatabaseTypeName.VERTICA, "VERTICA 9.X", "VERTICA_9_0", "vertica-jdbc-9.3.1-0.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
VERTICA_7_1_X(new DbVersion4Drivers(EDatabaseTypeName.VERTICA, "VERTICA 7.1.X (Deprecated)", "VERTICA_7_1_X", "vertica-jdbc-7.1.2-0.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
@@ -106,12 +107,12 @@ public enum EDatabaseVersion4Drivers {
|
||||
GREENPLUM_PSQL(new DbVersion4Drivers(EDatabaseTypeName.GREENPLUM,"PostgreSQL", "POSTGRESQL", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$
|
||||
GREENPLUM(new DbVersion4Drivers(EDatabaseTypeName.GREENPLUM,"Greenplum", "GREENPLUM", "greenplum-5.1.4.000275.jar")), //$NON-NLS-1$
|
||||
// PSQL_V10(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v10", "V10", "postgresql-42.2.5.jar")),
|
||||
PSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v9 and later", "V9_X", "postgresql-42.2.14.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "v9 and later", "V9_X", "postgresql-42.2.25.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PSQL_PRIOR_TO_V9(new DbVersion4Drivers(EDatabaseTypeName.PSQL, "Prior to v9", "PRIOR_TO_V9", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
PLUSPSQL_PRIOR_TO_V9(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL,
|
||||
"Prior to v9", "PRIOR_TO_V9", "postgresql-8.4-703.jdbc4.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PLUSPSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL, "v9 and later", "V9_X", "postgresql-42.2.14.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
PLUSPSQL_V9_X(new DbVersion4Drivers(EDatabaseTypeName.PLUSPSQL, "v9 and later", "V9_X", "postgresql-42.2.25.jar")), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
IBMDB2(new DbVersion4Drivers(EDatabaseTypeName.IBMDB2, new String[] { "db2jcc4.jar", "db2jcc_license_cu.jar", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"db2jcc_license_cisuz.jar" })), //$NON-NLS-1$
|
||||
IBMDB2ZOS(new DbVersion4Drivers(EDatabaseTypeName.IBMDB2ZOS, new String[] { "db2jcc4.jar", "db2jcc_license_cu.jar", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
@@ -168,13 +169,13 @@ public enum EDatabaseVersion4Drivers {
|
||||
MAPRDB(new DbVersion4Drivers(EDatabaseTypeName.MAPRDB, new String[] {})),
|
||||
|
||||
REDSHIFT(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT, "redshift", "REDSHIFT", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
"redshift-jdbc42-no-awssdk-1.2.37.1061.jar")), //$NON-NLS-1$
|
||||
new String[]{ "redshift-jdbc42-no-awssdk-1.2.55.1083.jar", "antlr4-runtime-4.8-1.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
REDSHIFT_SSO(new DbVersion4Drivers(EDatabaseTypeName.REDSHIFT_SSO, "redshift sso", "REDSHIFT_SSO", //$NON-NLS-1$ //$NON-NLS-2$
|
||||
new String[] { "redshift-jdbc42-no-awssdk-1.2.37.1061.jar", "aws-java-sdk-1.11.848.jar", "jackson-core-2.10.1.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
new String[] { "redshift-jdbc42-no-awssdk-1.2.55.1083.jar", "antlr4-runtime-4.8-1.jar", "aws-java-sdk-1.11.848.jar", "jackson-core-2.10.1.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||
"jackson-databind-2.10.1.jar", "jackson-annotations-2.10.1.jar", "httpcore-4.4.11.jar", "httpclient-4.5.9.jar", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
|
||||
"joda-time-2.8.1.jar", "commons-logging-1.2.jar", "commons-codec-1.11.jar" })), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
|
||||
AMAZON_AURORA(new DbVersion4Drivers(EDatabaseTypeName.AMAZON_AURORA, "mysql-connector-java-5.1.30-bin.jar")); //$NON-NLS-1$
|
||||
AMAZON_AURORA(new DbVersion4Drivers(EDatabaseTypeName.AMAZON_AURORA, "mysql-connector-java-5.1.49.jar")); //$NON-NLS-1$
|
||||
|
||||
private DbVersion4Drivers dbVersionBean;
|
||||
|
||||
|
||||
@@ -101,22 +101,59 @@ public enum EHadoopProperties {
|
||||
HD_AZURE_DEPLOYBOLB,
|
||||
|
||||
HD_JOB_RESULT_FOLDER,
|
||||
|
||||
|
||||
SYNAPSE_ENDPOINT,
|
||||
|
||||
SYNAPSE_TOKEN,
|
||||
|
||||
SPARK_POOL_NAME,
|
||||
|
||||
SYNAPSE_STORAGE_HOST,
|
||||
|
||||
SYNAPSE_STORAGE_CONTAINER,
|
||||
|
||||
SYNAPSE_STORAGE_USERNAME,
|
||||
|
||||
SYNAPSE_STORAGE_PASSWORD,
|
||||
|
||||
DEPLOY_FOLDER,
|
||||
|
||||
SPARK_DRIVER_MEM,
|
||||
|
||||
SPARK_DRIVER_CORES,
|
||||
|
||||
SPARK_EXECUTOR_MEMORY,
|
||||
|
||||
QUBOLE_API_TOKEN,
|
||||
|
||||
QUBOLE_CLUSTER,
|
||||
|
||||
QUBOLE_CLUSTER_LABEL,
|
||||
|
||||
QUBOLE_ENDPOINT,
|
||||
|
||||
QUBOLE_ENDPOINT_URL,
|
||||
|
||||
QUBOLE_S3_ACCESS_KEY,
|
||||
|
||||
QUBOLE_S3_SECRET_KEY,
|
||||
|
||||
QUBOLE_S3_BUCKET_NAME,
|
||||
|
||||
QUBOLE_S3_BUCKET_KEY,
|
||||
|
||||
QUBOLE_S3_REGION,
|
||||
|
||||
DATABRICKS_ENDPOINT,
|
||||
|
||||
DATABRICKS_CLOUD_PROVIDER,
|
||||
|
||||
DATABRICKS_RUN_MODE,
|
||||
|
||||
DATABRICKS_CLUSTER_ID,
|
||||
|
||||
DATABRICKS_TOKEN,
|
||||
|
||||
DATABRICKS_DBFS_DEP_FOLDER;
|
||||
|
||||
public String getName() {
|
||||
|
||||
@@ -34,6 +34,8 @@ public enum EHadoopDistributions {
|
||||
PIVOTAL_HD("Pivotal HD"), //$NON-NLS-1$
|
||||
|
||||
MICROSOFT_HD_INSIGHT("Microsoft HD Insight"), //$NON-NLS-1$
|
||||
|
||||
AZURE_SYNAPSE("Azure Synapse Runtime for Apache Spark 3.0"), //$NON-NLS-1$
|
||||
|
||||
GOOGLE_CLOUD_DATAPROC("Google Cloud Dataproc"), //$NON-NLS-1$
|
||||
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// 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.core.hadoop.version;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public enum ESynapseStorage {
|
||||
|
||||
ADLS_GEN2("ADLS Gen2"); //$NON-NLS-1$
|
||||
|
||||
private String displayName;
|
||||
|
||||
ESynapseStorage(String displayName) {
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name();
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
public static List<String> getAllSynapseStorageDisplayNames() {
|
||||
return getAllSynapseStorageNames(true);
|
||||
}
|
||||
|
||||
public static List<String> getAllSynapseStorageNames(boolean display) {
|
||||
List<String> names = new ArrayList<String>();
|
||||
ESynapseStorage[] values = values();
|
||||
for (ESynapseStorage storage : values) {
|
||||
if (display) {
|
||||
names.add(storage.getDisplayName());
|
||||
} else {
|
||||
names.add(storage.getName());
|
||||
}
|
||||
}
|
||||
return names;
|
||||
}
|
||||
|
||||
public static ESynapseStorage getSynapseStoragenByDisplayName(String name) {
|
||||
return getSynapseStorageByName(name, true);
|
||||
}
|
||||
|
||||
public static ESynapseStorage getSynapseStorageByName(String name, boolean display) {
|
||||
if (name != null) {
|
||||
for (ESynapseStorage storage : values()) {
|
||||
if (display) {
|
||||
if (name.equalsIgnoreCase(storage.getDisplayName())) {
|
||||
return storage;
|
||||
}
|
||||
} else {
|
||||
if (name.equalsIgnoreCase(storage.getName())) {
|
||||
return storage;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -57,6 +57,11 @@ public class ConnectionBean implements Cloneable {
|
||||
private static final String TOKEN = "token"; //$NON-NLS-1$
|
||||
|
||||
private static final String URL = "url"; //$NON-NLS-1$
|
||||
|
||||
private static final String STORECREDENTIALS = "storeCredentials"; //$NON-NLS-1$
|
||||
|
||||
private String credentials = ""; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* DOC smallet ConnectionBean constructor comment.
|
||||
*/
|
||||
@@ -178,6 +183,9 @@ public class ConnectionBean implements Cloneable {
|
||||
public String getPassword() {
|
||||
try {
|
||||
if (conDetails.has(PASSWORD)) {
|
||||
if (isStoreCredentials() && credentials != null) {
|
||||
return this.credentials;
|
||||
}
|
||||
return conDetails.getString(PASSWORD);
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
@@ -326,6 +334,7 @@ public class ConnectionBean implements Cloneable {
|
||||
toReturn.setWorkSpace(st[i++]);
|
||||
toReturn.setComplete(new Boolean(st[i++]));
|
||||
toReturn.setToken(new Boolean(st[i++]));
|
||||
toReturn.setStoreCredentials(new Boolean(st[i++]));
|
||||
JSONObject dynamicJson = new JSONObject();
|
||||
toReturn.getConDetails().put(DYNAMICFIELDS, dynamicJson);
|
||||
while (i < st.length) {
|
||||
@@ -408,4 +417,30 @@ public class ConnectionBean implements Cloneable {
|
||||
return "";
|
||||
}
|
||||
|
||||
public boolean isStoreCredentials() {
|
||||
try {
|
||||
if (conDetails.has(STORECREDENTIALS)) {
|
||||
return (Boolean) conDetails.get(STORECREDENTIALS);
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setStoreCredentials(boolean store) {
|
||||
try {
|
||||
conDetails.put(STORECREDENTIALS, store);
|
||||
} catch (JSONException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
public String getCredentials() {
|
||||
return this.credentials;
|
||||
}
|
||||
|
||||
public void setCredentials(String credentials) {
|
||||
this.credentials = credentials;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,12 +14,14 @@ package org.talend.core.model.general;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.osgi.framework.Version;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.ILibraryManagerService;
|
||||
import org.talend.core.database.conn.version.DatabaseDriversCache;
|
||||
@@ -29,6 +31,9 @@ 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.utils.TalendQuoteUtils;
|
||||
import org.talend.utils.json.JSONException;
|
||||
import org.talend.utils.json.JSONObject;
|
||||
import org.talend.utils.json.JSONTokener;
|
||||
|
||||
/**
|
||||
* This bean is use to manage needed moduless (perl) and libraries (java).<br/>
|
||||
@@ -38,6 +43,10 @@ import org.talend.core.utils.TalendQuoteUtils;
|
||||
*/
|
||||
public class ModuleNeeded {
|
||||
|
||||
public static final String ATTR_USED_BY_DYNAMIC_DISTRIBUTION = "dynamicDistribution";
|
||||
|
||||
public static final String ATTR_DYNAMIC_DISTRIBUTION_VERSION = "distributionVersion";
|
||||
|
||||
private String id;
|
||||
|
||||
private String context;
|
||||
@@ -94,8 +103,11 @@ public class ModuleNeeded {
|
||||
*/
|
||||
private boolean useReleaseVersion = false;
|
||||
|
||||
private Map<String, String> attributes;
|
||||
|
||||
ILibraryManagerService libManagerService = (ILibraryManagerService) GlobalServiceRegister.getDefault()
|
||||
.getService(ILibraryManagerService.class);
|
||||
|
||||
|
||||
/**
|
||||
* DOC smallet ModuleNeeded class global comment. Detailled comment <br/>
|
||||
@@ -162,6 +174,10 @@ public class ModuleNeeded {
|
||||
this.required = required;
|
||||
this.installURL = installURL;
|
||||
this.requiredIf = requiredIf;
|
||||
this.attributes = analyseMessage(informationMsg);
|
||||
if (!this.attributes.isEmpty()) {
|
||||
this.informationMsg = "";
|
||||
}
|
||||
String name = moduleName;
|
||||
String uri = mavenUrl;
|
||||
if (moduleName != null) {
|
||||
@@ -184,6 +200,32 @@ public class ModuleNeeded {
|
||||
setMavenUri(uri);
|
||||
}
|
||||
|
||||
private Map<String, String> analyseMessage(String msg) {
|
||||
Map<String, String> attrMap = new HashMap<>();
|
||||
if (StringUtils.isBlank(msg) || !msg.startsWith("{") || !msg.endsWith("}")) {
|
||||
return attrMap;
|
||||
}
|
||||
try {
|
||||
JSONObject jo = new JSONObject(new JSONTokener(msg));
|
||||
Iterator<String> keys = jo.keys();
|
||||
keys.forEachRemaining(key -> {
|
||||
try {
|
||||
Object object = jo.get(key);
|
||||
if (object != null) {
|
||||
attrMap.put(key, object.toString());
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
if (Boolean.getBoolean("talend.studio.moduleNeeded.init.debug")) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
return attrMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModuleNeeded clone() {
|
||||
ModuleNeeded cloned = new ModuleNeeded(context, moduleName, informationMsg, mrRequired, installURL, requiredIf, mavenUri);
|
||||
@@ -212,6 +254,7 @@ public class ModuleNeeded {
|
||||
cloned.requiredIf = requiredIf;
|
||||
cloned.status = status;
|
||||
cloned.useReleaseVersion = useReleaseVersion;
|
||||
cloned.attributes = attributes;
|
||||
|
||||
return cloned;
|
||||
}
|
||||
@@ -671,6 +714,10 @@ public class ModuleNeeded {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean usedByDynamicDistribution() {
|
||||
return Boolean.valueOf(attributes.get(ATTR_USED_BY_DYNAMIC_DISTRIBUTION));
|
||||
}
|
||||
|
||||
public boolean isDynamic() {
|
||||
return this.dynamic;
|
||||
}
|
||||
@@ -709,5 +756,12 @@ public class ModuleNeeded {
|
||||
public void setUseReleaseVersion(boolean useReleaseVersion) {
|
||||
this.useReleaseVersion = useReleaseVersion;
|
||||
}
|
||||
|
||||
|
||||
public String getDynamicDistributionVersion() {
|
||||
return attributes.get(ATTR_DYNAMIC_DISTRIBUTION_VERSION);
|
||||
}
|
||||
|
||||
public void setDynamicDistributionVersion(String distribution) {
|
||||
attributes.put(ATTR_DYNAMIC_DISTRIBUTION_VERSION, distribution);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2022 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.core.model.general;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class RetrieveResult {
|
||||
|
||||
private boolean allResolved;
|
||||
|
||||
private Set<ModuleNeeded> resovledModules = new HashSet<>();
|
||||
|
||||
private Set<ModuleNeeded> unresolvedModules = new HashSet<>();
|
||||
|
||||
public boolean isAllResolved() {
|
||||
return allResolved;
|
||||
}
|
||||
|
||||
public void setAllResolved(boolean allResolved) {
|
||||
this.allResolved = allResolved;
|
||||
}
|
||||
|
||||
public Set<ModuleNeeded> getResovledModules() {
|
||||
return resovledModules;
|
||||
}
|
||||
|
||||
public Set<ModuleNeeded> getUnresolvedModules() {
|
||||
return unresolvedModules;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -69,6 +69,8 @@ public interface IMetadataTable {
|
||||
|
||||
public boolean sameMetadataAs(IMetadataTable other, int options);
|
||||
|
||||
public boolean sameMetadataAs(List<IMetadataColumn> otherMetadataTableColumns, int options);
|
||||
|
||||
public void sortCustomColumns();
|
||||
|
||||
public boolean isReadOnly();
|
||||
|
||||
@@ -252,8 +252,13 @@ public class MetadataTable implements IMetadataTable, Cloneable {
|
||||
if (!(input instanceof IMetadataTable)) {
|
||||
return false;
|
||||
}
|
||||
List<IMetadataColumn> thisColumnListWithUnselected = this.getListColumns(true);
|
||||
List<IMetadataColumn> inputColumnListWithUnselected = input.getListColumns(true);
|
||||
return sameMetadataAs(inputColumnListWithUnselected, options);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean sameMetadataAs(List<IMetadataColumn> inputColumnListWithUnselected, int options) {
|
||||
List<IMetadataColumn> thisColumnListWithUnselected = this.getListColumns(true);
|
||||
if (thisColumnListWithUnselected == null) {
|
||||
if (inputColumnListWithUnselected != null) {
|
||||
return false;
|
||||
|
||||
@@ -16,8 +16,8 @@ package org.talend.core.model.metadata.designerproperties;
|
||||
* DOC talend class global comment. Detailled comment
|
||||
*/
|
||||
public enum SapJcoVersion {
|
||||
SAP2("sap jco 2.*", "sapjco.jar"), //$NON-NLS-1$
|
||||
SAP3("sap jco 3.*", "sapjco3.jar");//$NON-NLS-1$
|
||||
SAP2("sap jco 2.*", "sapjco.jar"), //$NON-NLS-1$ //$NON-NLS-2$
|
||||
SAP3("sap jco 3.*", "com.sap.conn.jco.sapjco.jar");//$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
private String displayName;
|
||||
|
||||
|
||||
@@ -139,4 +139,8 @@ public enum EParameterFieldType {
|
||||
}
|
||||
return TEXT; // Default Value
|
||||
}
|
||||
|
||||
public static boolean isPassword(EParameterFieldType type) {
|
||||
return EParameterFieldType.PASSWORD.equals(type) || EParameterFieldType.LICENSEKEY.equals(type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,6 +58,11 @@ public interface IProcess extends IElement {
|
||||
|
||||
public static final String SCREEN_OFFSET_Y = "SCREEN_OFFSET_Y"; //$NON-NLS-1$
|
||||
|
||||
public static final String PROP_ERR_ON_COMPONENT_MISSING = "error.on.component.missing";
|
||||
|
||||
public static final boolean ERR_ON_COMPONENT_MISSING = Boolean
|
||||
.valueOf(System.getProperty(PROP_ERR_ON_COMPONENT_MISSING, Boolean.TRUE.toString()));
|
||||
|
||||
public String getName();
|
||||
|
||||
public String getId();
|
||||
|
||||
@@ -728,6 +728,46 @@ public final class ProcessUtils {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static boolean isRoute(Property property) {
|
||||
return property!= null && (ERepositoryObjectType.getType(property).equals(ERepositoryObjectType.PROCESS_ROUTE) ||
|
||||
ERepositoryObjectType.getType(property).equals(ERepositoryObjectType.PROCESS_ROUTE_MICROSERVICE));
|
||||
}
|
||||
|
||||
public static boolean isRouteWithChildJobs(IProcess process) {
|
||||
|
||||
if (process instanceof IProcess2) {
|
||||
Property p = ((IProcess2) process).getProperty();
|
||||
if (isRoute(p)) {
|
||||
return false;
|
||||
}
|
||||
Item item = p.getItem();
|
||||
return isRouteWithChildJobs(item);
|
||||
} else {
|
||||
for (INode node : process.getGraphicalNodes()) {
|
||||
if (node.getComponent().getName().equals("cTalendJob")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public static boolean isRouteWithChildJobs(Item item) {
|
||||
|
||||
if (item!= null && item instanceof ProcessItem) {
|
||||
for (Object obj : ((ProcessItem) item).getProcess().getNode()) {
|
||||
if (obj instanceof NodeType) {
|
||||
if (((NodeType) obj).getComponentName().equals("cTalendJob")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
public static int getAssertAmount(IProcess process) {
|
||||
int count = 0;
|
||||
@@ -1046,6 +1086,18 @@ public final class ProcessUtils {
|
||||
}
|
||||
}
|
||||
}
|
||||
if ("cHttp".equals(node.getComponentName())) {
|
||||
for (Object elementParameter : node.getElementParameter()) {
|
||||
ElementParameterType elementParameterType = (ElementParameterType)elementParameter;
|
||||
|
||||
String name = elementParameterType.getName();
|
||||
String value = elementParameterType.getValue();
|
||||
|
||||
if ("SERVER".equals(name) && (value != null && "true".equals(value.toString()))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -54,4 +54,10 @@ public interface IRepositoryPrefConstants {
|
||||
public static final String REF_PROJECT_BRANCH_SETTING = "ref_project_branch_setting";
|
||||
|
||||
public static final String ITEM_EXPORT_DEPENDENCIES = "item_export_dependencies";
|
||||
|
||||
public static final String ITEM_IMPORT_DEPENDENCIES = "item_import_dependencies";
|
||||
|
||||
public static final String ITEM_IMPORT_BRANCH_DEPENDENCIES = "item_import_from_branch_dependencies";
|
||||
|
||||
public static final String ITEM_DISABLE_SCREENSHOT = "item_disable_screenshot";
|
||||
}
|
||||
|
||||
@@ -2023,8 +2023,8 @@ public abstract class RepositoryUpdateManager {
|
||||
|
||||
};
|
||||
repositoryUpdateManager.checkAddContextGroup = detectAddContextGroup;
|
||||
repositoryUpdateManager.isConfigContextGroup = repositoryContextManager.isConfigContextGroup();
|
||||
if (repositoryContextManager != null) {
|
||||
repositoryUpdateManager.isConfigContextGroup = repositoryContextManager.isConfigContextGroup();
|
||||
// add for bug 9119 context group
|
||||
Map<ContextItem, List<IContext>> repositoryContextGroupMap = new HashMap<ContextItem, List<IContext>>();
|
||||
List<IContext> addGroupContext = repositoryContextManager.getAddGroupContext();
|
||||
|
||||
@@ -310,8 +310,8 @@ public enum UpdateManagerProviderDetector {
|
||||
Item item = node.getObject().getProperty().getItem();
|
||||
List<Relation> allRelations = new ArrayList<Relation>();
|
||||
if (node.getObject() != null) {
|
||||
List<Relation> relations = RelationshipItemBuilder.getInstance().getItemsRelatedTo(item.getProperty().getId(),
|
||||
RelationshipItemBuilder.LATEST_VERSION, RelationshipItemBuilder.PROPERTY_RELATION);
|
||||
List<Relation> relations = RelationshipItemBuilder.getInstance().getItemsHaveRelationWith(item.getProperty().getId(),
|
||||
RelationshipItemBuilder.LATEST_VERSION);
|
||||
if (relations != null && relations.size() > 0) {
|
||||
allRelations.addAll(relations);
|
||||
}
|
||||
|
||||
@@ -1492,4 +1492,29 @@ public class NodeUtil {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* TUP-32758:Used to judge if two components are compatible from name
|
||||
* for example tAmazonMysqlConnection and tMysqlConnection ,tAmazonOracleCommit and tOracleCommit
|
||||
*/
|
||||
public static boolean isCompatibleByName(String componentName1, String componentName2) {
|
||||
boolean isCompatable = false;
|
||||
if ( componentName1 ==null || componentName2 == null
|
||||
|| componentName1.length()<1 || componentName2.length() < 1) return false;
|
||||
if (componentName1.replaceFirst("t", "tAmazon").equals(componentName2) ||
|
||||
componentName2.replaceFirst("t", "tAmazon").equals(componentName1)) {
|
||||
isCompatable = true;
|
||||
}
|
||||
return isCompatable;
|
||||
}
|
||||
|
||||
public static boolean isDatabaseFamily(String orginalFamilyName) {
|
||||
boolean isDatabaseFamily = false;
|
||||
String rootFamily = "";
|
||||
rootFamily = orginalFamilyName != null ? orginalFamilyName.split("/")[0] : "";
|
||||
if (rootFamily.equals("Databases")) {
|
||||
isDatabaseFamily = true;
|
||||
}
|
||||
return isDatabaseFamily;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,8 +22,6 @@ import org.ops4j.pax.url.mvn.MavenResolver;
|
||||
import org.osgi.framework.BundleContext;
|
||||
import org.osgi.framework.ServiceReference;
|
||||
import org.osgi.service.cm.ManagedService;
|
||||
import org.osgi.util.tracker.ServiceTracker;
|
||||
import org.osgi.util.tracker.ServiceTrackerCustomizer;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.utils.network.IProxySelectorProvider;
|
||||
import org.talend.commons.utils.network.TalendProxySelector;
|
||||
@@ -47,39 +45,6 @@ public class TalendMavenResolver {
|
||||
|
||||
private static MavenResolver mavenResolver = null;
|
||||
|
||||
/**
|
||||
*
|
||||
* DOC wchen TalendMavenResolver constructor comment.
|
||||
*/
|
||||
static {
|
||||
// the tracker is use in case the service is modifed
|
||||
final BundleContext context = CoreRuntimePlugin.getInstance().getBundle().getBundleContext();
|
||||
ServiceTracker<org.ops4j.pax.url.mvn.MavenResolver, org.ops4j.pax.url.mvn.MavenResolver> serviceTracker = new ServiceTracker<org.ops4j.pax.url.mvn.MavenResolver, org.ops4j.pax.url.mvn.MavenResolver>(
|
||||
context, org.ops4j.pax.url.mvn.MavenResolver.class,
|
||||
new ServiceTrackerCustomizer<org.ops4j.pax.url.mvn.MavenResolver, org.ops4j.pax.url.mvn.MavenResolver>() {
|
||||
|
||||
@Override
|
||||
public org.ops4j.pax.url.mvn.MavenResolver addingService(
|
||||
ServiceReference<org.ops4j.pax.url.mvn.MavenResolver> reference) {
|
||||
return context.getService(reference);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void modifiedService(ServiceReference<org.ops4j.pax.url.mvn.MavenResolver> reference,
|
||||
org.ops4j.pax.url.mvn.MavenResolver service) {
|
||||
mavenResolver = null;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removedService(ServiceReference<org.ops4j.pax.url.mvn.MavenResolver> reference,
|
||||
org.ops4j.pax.url.mvn.MavenResolver service) {
|
||||
mavenResolver = null;
|
||||
}
|
||||
});
|
||||
serviceTracker.open();
|
||||
}
|
||||
|
||||
public static void updateMavenResolver(String resolverKey, Dictionary<String, String> props) throws Exception {
|
||||
if (!needUpdate(resolverKey)) {
|
||||
return;
|
||||
|
||||
@@ -210,6 +210,14 @@ public class ProjectPreferenceManager {
|
||||
setValue(IRepositoryPrefConstants.ALLOW_SPECIFIC_CHARACTERS_FOR_SCHEMA_COLUMNS, isAllow);
|
||||
}
|
||||
|
||||
public boolean isDisableScreenshot() {
|
||||
return getPreferenceStore().getBoolean(IRepositoryPrefConstants.ITEM_DISABLE_SCREENSHOT);
|
||||
}
|
||||
|
||||
public void setDisableScreenshot(boolean isDisable) {
|
||||
getPreferenceStore().setValue(IRepositoryPrefConstants.ITEM_DISABLE_SCREENSHOT, isDisable);
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the configurations.
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,11 @@
|
||||
// ============================================================================
|
||||
package org.talend.core.runtime.services;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.jdt.core.IClasspathEntry;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.IService;
|
||||
import org.talend.core.model.properties.RoutineItem;
|
||||
@@ -25,6 +30,10 @@ public interface IDesignerMavenService extends IService {
|
||||
|
||||
void updateCodeJarMavenProject(CodesJarInfo info, boolean needReSync) throws Exception;
|
||||
|
||||
void enableMavenNature(IProgressMonitor monitor, IProject project);
|
||||
|
||||
void addProjectClasspathEntry(IProgressMonitor monitor, IProject project, List<IClasspathEntry> entries);
|
||||
|
||||
public static IDesignerMavenService get() {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerMavenService.class)) {
|
||||
return GlobalServiceRegister.getDefault().getService(IDesignerMavenService.class);
|
||||
|
||||
@@ -27,47 +27,12 @@ import org.talend.core.GlobalServiceRegister;
|
||||
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 {
|
||||
|
||||
public static final String FILE_EXTRA_FEATURE_INDEX = "extra_feature.index"; //$NON-NLS-1$
|
||||
|
||||
public static final String SIGNATURE_FILE_NAME_SUFFIX = ".sig"; //$NON-NLS-1$
|
||||
public static final String PROP_DEVMODE = "osgi.dev"; //$NON-NLS-1$
|
||||
|
||||
public static boolean updateExtraFeatureFile() {
|
||||
File userConfigFolder = new File(Platform.getConfigurationLocation().getURL().getPath());
|
||||
File studioConfigFolder = new File(Platform.getInstallLocation().getURL().getPath(), "configuration");//$NON-NLS-1$
|
||||
if (!userConfigFolder.getAbsolutePath().equals(studioConfigFolder.getAbsolutePath())) {
|
||||
File studioExtraFile = new File(studioConfigFolder, FILE_EXTRA_FEATURE_INDEX);
|
||||
File studioExtraSignFile = new File(studioConfigFolder, FILE_EXTRA_FEATURE_INDEX + SIGNATURE_FILE_NAME_SUFFIX);
|
||||
File userExtraFile = new File(userConfigFolder, FILE_EXTRA_FEATURE_INDEX);
|
||||
File userExtraSignFile = new File(userConfigFolder, FILE_EXTRA_FEATURE_INDEX + SIGNATURE_FILE_NAME_SUFFIX);
|
||||
boolean isNeedUpdate = false;
|
||||
if (!studioExtraSignFile.exists() && userExtraSignFile.exists()) {
|
||||
userExtraSignFile.delete();
|
||||
if (userExtraFile.exists()) {
|
||||
userExtraFile.delete();
|
||||
}
|
||||
return true;
|
||||
} else if (studioExtraSignFile.exists()) {
|
||||
isNeedUpdate = true;
|
||||
}
|
||||
if (isNeedUpdate) {
|
||||
try {
|
||||
FilesUtils.copyFile(studioExtraFile, userExtraFile);
|
||||
FilesUtils.copyFile(studioExtraSignFile, userExtraSignFile);
|
||||
} catch (IOException ex) {
|
||||
ExceptionHandler.process(ex);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isSharedStudioMode() {
|
||||
if (isDevEnvironment()) {
|
||||
return false;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,7 @@
|
||||
package org.talend.core.service;
|
||||
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.IService;
|
||||
import org.talend.core.model.process.IProcess;
|
||||
import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
@@ -14,6 +15,8 @@ public interface IResourcesDependenciesService extends IService {
|
||||
|
||||
public String getResourcePathForContext(IProcess process, String resourceContextValue);
|
||||
|
||||
public String getResourcePathForContext(IProcess process, String resourceContextValue, boolean forceRelative);
|
||||
|
||||
public String getResourceItemFilePath(String resourceContextValue);
|
||||
|
||||
public void refreshDependencyViewer();
|
||||
@@ -21,4 +24,12 @@ public interface IResourcesDependenciesService extends IService {
|
||||
public void setContextParameterChangeDirtyManually();
|
||||
|
||||
public void removeBuildJobCacheForResource(String resourceId);
|
||||
|
||||
public static IResourcesDependenciesService get() {
|
||||
GlobalServiceRegister register = GlobalServiceRegister.getDefault();
|
||||
if (register.isServiceRegistered(IResourcesDependenciesService.class)) {
|
||||
return register.getService(IResourcesDependenciesService.class);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -264,6 +264,40 @@ public final class TalendQuoteUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isStartEndsWithQuotation(String expression, boolean checkStart, boolean checkEnd) {
|
||||
if (StringUtils.isBlank(expression)) {
|
||||
return false;
|
||||
}
|
||||
boolean startsWith = false;
|
||||
boolean endsWith = false;
|
||||
|
||||
ECodeLanguage language = LanguageManager.getCurrentLanguage();
|
||||
switch (language) {
|
||||
case JAVA:
|
||||
startsWith = expression.startsWith(QUOTATION_MARK);
|
||||
endsWith = expression.endsWith(QUOTATION_MARK);
|
||||
if (checkStart && checkEnd) {
|
||||
return startsWith & endsWith;
|
||||
} else if (checkStart) {
|
||||
return startsWith;
|
||||
} else if (checkEnd) {
|
||||
return endsWith;
|
||||
}
|
||||
default: // PERL
|
||||
startsWith = expression.startsWith(SINGLE_QUOTE);
|
||||
endsWith = expression.endsWith(SINGLE_QUOTE);
|
||||
if (checkStart && checkEnd) {
|
||||
return startsWith & endsWith;
|
||||
} else if (checkStart) {
|
||||
return startsWith;
|
||||
} else if (checkEnd) {
|
||||
return endsWith;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static String removeQuotes(String text, String quotation) {
|
||||
if (text == null) {
|
||||
return null;
|
||||
@@ -429,6 +463,8 @@ public final class TalendQuoteUtils {
|
||||
return QUOTATION_MARK;
|
||||
case H2:
|
||||
return QUOTATION_ESC_MARK;
|
||||
case SNOWFLAKE:
|
||||
return QUOTATION_MARK;
|
||||
// case JAVADB_DERBYCLIENT:
|
||||
// return QUOTATION_MARK;
|
||||
// case JAVADB_JCCJDBC:
|
||||
|
||||
@@ -196,6 +196,7 @@ public abstract class AbstractTalendFunctionParser extends AbstractFunctionParse
|
||||
function.setName(funcName);
|
||||
function.setDescription(des);
|
||||
function.setParameters(Arrays.asList(paras));
|
||||
function.setFullQualifiedName(fullName);
|
||||
if (!category.equals(EMPTY_STRING)) {
|
||||
function.setCategory(category);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.utils.generation.JavaUtils;
|
||||
import org.talend.core.runtime.i18n.Messages;
|
||||
import org.talend.utils.json.JSONArray;
|
||||
import org.talend.utils.json.JSONException;
|
||||
@@ -45,6 +46,10 @@ public class Function implements Cloneable {
|
||||
|
||||
private boolean isUserDefined;
|
||||
|
||||
private boolean rountineJarDependencyMissing = true;
|
||||
|
||||
private String fullQualifiedName;
|
||||
|
||||
/**
|
||||
* yzhang Function constructor comment.
|
||||
*/
|
||||
@@ -517,6 +522,40 @@ public class Function implements Cloneable {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
public String getFullQualifiedName() {
|
||||
return fullQualifiedName;
|
||||
}
|
||||
|
||||
public void setFullQualifiedName(String fullQualifiedName) {
|
||||
this.fullQualifiedName = fullQualifiedName;
|
||||
}
|
||||
|
||||
public String getRoutineJarName() {
|
||||
String[] fqns = fullQualifiedName.split("\\.");
|
||||
if (fqns.length > 1) {
|
||||
return fqns[fqns.length - 2];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isRoutineJar() {
|
||||
if (this.fullQualifiedName == null || this.fullQualifiedName.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
return this.fullQualifiedName.contains("." + JavaUtils.JAVA_ROUTINESJAR_DIRECTORY + ".");
|
||||
}
|
||||
|
||||
public boolean isRoutineJarDependencyMissing() {
|
||||
if (!this.isRoutineJar()) {
|
||||
return false;
|
||||
}
|
||||
return this.rountineJarDependencyMissing;
|
||||
}
|
||||
|
||||
public void setRountineJarDependencyMissing(boolean rountineJarDependencyMissing) {
|
||||
this.rountineJarDependencyMissing = rountineJarDependencyMissing;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public String toSerialized() throws JSONException {
|
||||
JSONObject functionObj = new JSONObject();
|
||||
|
||||
@@ -109,6 +109,11 @@ public class FunctionManager {
|
||||
parser = new RoutineFunctionParser();
|
||||
parser.parse();
|
||||
talendTypes = parser.getList();
|
||||
|
||||
parser = new RoutineJarsFunctionParser();
|
||||
parser.parse();
|
||||
talendTypes.addAll(parser.getList());
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
||||
@@ -0,0 +1,276 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2021 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.designer.rowgenerator.data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.eclipse.core.resources.IFolder;
|
||||
import org.eclipse.jdt.core.ICompilationUnit;
|
||||
import org.eclipse.jdt.core.IJavaElement;
|
||||
import org.eclipse.jdt.core.IMember;
|
||||
import org.eclipse.jdt.core.IMethod;
|
||||
import org.eclipse.jdt.core.IPackageFragment;
|
||||
import org.eclipse.jdt.core.IPackageFragmentRoot;
|
||||
import org.eclipse.jdt.core.IType;
|
||||
import org.eclipse.jdt.core.JavaModelException;
|
||||
import org.eclipse.jdt.internal.core.SourceType;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.commons.utils.generation.JavaUtils;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.model.general.Project;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.JobletProcessItem;
|
||||
import org.talend.core.model.properties.ProcessItem;
|
||||
import org.talend.core.model.repository.IRepositoryObject;
|
||||
import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
import org.talend.core.model.routines.CodesJarInfo;
|
||||
import org.talend.core.runtime.maven.MavenConstants;
|
||||
import org.talend.core.runtime.process.ITalendProcessJavaProject;
|
||||
import org.talend.core.runtime.projectsetting.ProjectPreferenceManager;
|
||||
import org.talend.core.utils.CodesJarResourceCache;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ProcessType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.RoutinesParameterType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.TalendFilePackage;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.impl.ProcessTypeImpl;
|
||||
import org.talend.designer.runprocess.IRunProcessService;
|
||||
import org.talend.repository.ProjectManager;
|
||||
import org.talend.repository.model.IProxyRepositoryService;
|
||||
|
||||
/**
|
||||
* Created by bhe on Jun 24, 2021
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class RoutineJarsFunctionParser extends AbstractTalendFunctionParser {
|
||||
|
||||
public static final String MAVEN_PLUGIN_ID = "org.talend.designer.maven";
|
||||
|
||||
private List<String> systems = new ArrayList<String>();
|
||||
|
||||
private final Set<CodesJarInfo> infos = new HashSet<CodesJarInfo>();
|
||||
|
||||
public RoutineJarsFunctionParser() {
|
||||
super();
|
||||
initProcessCodesJarInfo();
|
||||
}
|
||||
|
||||
private void initProcessCodesJarInfo() {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
|
||||
IRunProcessService service = (IRunProcessService) GlobalServiceRegister.getDefault()
|
||||
.getService(IRunProcessService.class);
|
||||
IRepositoryObject process = (IRepositoryObject) service.getActiveProcess();
|
||||
|
||||
if (process == null || process.getProperty() == null || process.getProperty().getItem() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Item processItem = process.getProperty().getItem();
|
||||
|
||||
Set<CodesJarInfo> allSet = CodesJarResourceCache.getAllCodesJars();
|
||||
Set<RoutinesParameterType> rps = new HashSet<RoutinesParameterType>();
|
||||
if (processItem instanceof ProcessItem) {
|
||||
ProcessType pt = ((ProcessItem) processItem).getProcess();
|
||||
|
||||
rps.addAll(pt.getParameters().getRoutinesParameter());
|
||||
|
||||
// if it is test process
|
||||
int pidFeature = TalendFilePackage.PROCESS_TYPE_FEATURE_COUNT + 2;
|
||||
int versionFeature = TalendFilePackage.PROCESS_TYPE_FEATURE_COUNT + 4;
|
||||
ProcessTypeImpl pi = (ProcessTypeImpl) pt;
|
||||
if (pi.eClass() != null && StringUtils.equals(pi.eClass().getName(), "TestContainer")) {
|
||||
|
||||
try {
|
||||
Object pid = pi.eGet(pidFeature, true, false);
|
||||
Object version = pi.eGet(versionFeature, true, false);
|
||||
if (pid != null) {
|
||||
IProxyRepositoryService svc = IProxyRepositoryService.get();
|
||||
try {
|
||||
List<IRepositoryViewObject> vos = svc.getProxyRepositoryFactory().getAllVersion(pid.toString());
|
||||
for (IRepositoryViewObject vo : vos) {
|
||||
if (StringUtils.equals(vo.getVersion(), String.valueOf(version))) {
|
||||
Item parentProcessItem = vo.getProperty().getItem();
|
||||
if (parentProcessItem instanceof ProcessItem) {
|
||||
pt = ((ProcessItem) parentProcessItem).getProcess();
|
||||
rps.addAll(pt.getParameters().getRoutinesParameter());
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (PersistenceException e) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
|
||||
} else if (processItem instanceof JobletProcessItem) {
|
||||
ProcessType pt = ((JobletProcessItem) processItem).getJobletProcess();
|
||||
rps.addAll(pt.getParameters().getRoutinesParameter());
|
||||
}
|
||||
|
||||
if (!rps.isEmpty()) {
|
||||
rps.forEach(rp -> {
|
||||
for (CodesJarInfo info : allSet) {
|
||||
if (StringUtils.equals(info.getId(), rp.getId())) {
|
||||
infos.add(info);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("restriction")
|
||||
public void parse() {
|
||||
typeMethods.clear();
|
||||
try {
|
||||
|
||||
Set<CodesJarInfo> jarInfos = CodesJarResourceCache.getAllCodesJars();
|
||||
|
||||
jarInfos.forEach(e -> {
|
||||
try {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
|
||||
IRunProcessService service = (IRunProcessService) GlobalServiceRegister.getDefault()
|
||||
.getService(IRunProcessService.class);
|
||||
ITalendProcessJavaProject talendProcessJavaProject = service.getTalendCodesJarJavaProject(e);
|
||||
if (talendProcessJavaProject != null) {
|
||||
IFolder srcFolder = talendProcessJavaProject.getSrcFolder();
|
||||
IPackageFragmentRoot root = talendProcessJavaProject.getJavaProject()
|
||||
.getPackageFragmentRoot(srcFolder);
|
||||
final List<IJavaElement> elements = new ArrayList<IJavaElement>();
|
||||
|
||||
addEveryProjectElements(root, elements,
|
||||
getGroupId() + "." + JavaUtils.JAVA_ROUTINESJAR_DIRECTORY + "." + e.getLabel().toLowerCase());
|
||||
|
||||
// for (IJavaElement element : elements) {
|
||||
// see bug 8055,reversal the getLastName() method
|
||||
for (int i = elements.size(); i > 0; i--) {
|
||||
IJavaElement element = elements.get(i - 1);
|
||||
if (element instanceof ICompilationUnit) {
|
||||
ICompilationUnit compilationUnit = (ICompilationUnit) element;
|
||||
IType[] types = compilationUnit.getAllTypes();
|
||||
if (types.length > 0) {
|
||||
// SourceType sourceType = (SourceType) types[0];
|
||||
IMember sourceType = types[0];
|
||||
if (sourceType != null) {
|
||||
// processSourceType(sourceType, sourceType.getElementName(),
|
||||
// sourceType.getFullyQualifiedName(),
|
||||
// sourceType.getElementName(), false);
|
||||
processSourceType(sourceType, sourceType.getElementName(),
|
||||
types[0].getFullyQualifiedName(), sourceType.getElementName(), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
ExceptionHandler.process(ex);
|
||||
}
|
||||
});
|
||||
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.talend.designer.rowgenerator.data.AbstractTalendFunctionParser#processSourceType(org.eclipse.jdt.internal
|
||||
* .core.SourceType)
|
||||
*/
|
||||
@SuppressWarnings("restriction")
|
||||
@Override
|
||||
protected void processSourceType(IMember member, String className, String fullName, String funcName, boolean isSystem) {
|
||||
try {
|
||||
if (member instanceof SourceType) {
|
||||
IMethod[] methods = ((SourceType) member).getMethods();
|
||||
for (IMethod method : methods) {
|
||||
super.processSourceType(method, className, fullName, method.getElementName(), systems.contains(className));
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.talend.designer.rowgenerator.data.AbstractTalendFunctionParser#getPackageFragment()
|
||||
*/
|
||||
@Override
|
||||
protected String getPackageFragment() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ITalendProcessJavaProject getTalendCodeProject() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Function parseJavaCommentToFunctions(String string, String className, String fullName, String funcName,
|
||||
boolean isSystem) {
|
||||
Function func = super.parseJavaCommentToFunctions(string, className, fullName, funcName, isSystem);
|
||||
|
||||
// set routine jars dependency missing or not
|
||||
infos.forEach(info -> {
|
||||
if (func.getRoutineJarName().equals(info.getLabel().toLowerCase())) {
|
||||
func.setRountineJarDependencyMissing(false);
|
||||
}
|
||||
});
|
||||
|
||||
return func;
|
||||
}
|
||||
|
||||
protected void addEveryProjectElements(IPackageFragmentRoot root, List<IJavaElement> elements, String packageFragment)
|
||||
throws JavaModelException {
|
||||
if (root == null || elements == null) {
|
||||
return;
|
||||
}
|
||||
// system
|
||||
IPackageFragment Pkg = root.getPackageFragment(packageFragment);
|
||||
if (Pkg != null && Pkg.exists()) {
|
||||
elements.addAll(Arrays.asList(Pkg.getChildren()));
|
||||
}
|
||||
|
||||
ProjectManager projectManager = ProjectManager.getInstance();
|
||||
|
||||
// referenced project.
|
||||
projectManager.retrieveReferencedProjects();
|
||||
for (Project p : projectManager.getReferencedProjects()) {
|
||||
IPackageFragment userPkg = root.getPackageFragment(packageFragment + "." + p.getLabel().toLowerCase()); //$NON-NLS-1$
|
||||
if (userPkg != null && userPkg.exists()) {
|
||||
elements.addAll(Arrays.asList(userPkg.getChildren()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static String getGroupId() {
|
||||
Project p = ProjectManager.getInstance().getCurrentProject();
|
||||
ProjectPreferenceManager preferenceManager = new ProjectPreferenceManager(p, MAVEN_PLUGIN_ID, false);
|
||||
return preferenceManager.getValue(MavenConstants.PROJECT_GROUPID);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -39,6 +39,7 @@ import org.talend.core.model.process.JobInfo;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.Property;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
import org.talend.core.model.routines.CodesJarInfo;
|
||||
import org.talend.core.runtime.process.ITalendProcessJavaProject;
|
||||
import org.talend.core.runtime.projectsetting.ProjectPreferenceManager;
|
||||
@@ -132,7 +133,7 @@ public interface IRunProcessService extends IService {
|
||||
public void updateLibraries(Set<ModuleNeeded> jobModuleList, IProcess process, Set<ModuleNeeded> alreadyRetrievedModules)
|
||||
throws ProcessorException;
|
||||
|
||||
public void updateLibraries(Item routineItem);
|
||||
public boolean updateLibraries(Item routineItem);
|
||||
|
||||
public void refreshView();
|
||||
|
||||
@@ -233,6 +234,8 @@ public interface IRunProcessService extends IService {
|
||||
|
||||
void clearProjectRelatedSettings();
|
||||
|
||||
void clearAllBuildCaches();
|
||||
|
||||
void batchDeleteAllVersionTalendJobProject(List<String> idList);
|
||||
|
||||
boolean isExportConfig();
|
||||
@@ -271,5 +274,9 @@ public interface IRunProcessService extends IService {
|
||||
|
||||
void deleteTalendCodesJarProject(ERepositoryObjectType type, String projectTechName, String codesJarName,
|
||||
boolean deleteContent);
|
||||
|
||||
public void deleteOldVersionTalendJobProject(IRepositoryViewObject object);
|
||||
|
||||
public void checkAndUpdateDaikonDependencies();
|
||||
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ import java.util.Map;
|
||||
|
||||
import org.eclipse.core.resources.IFolder;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.talend.commons.exception.BusinessException;
|
||||
import org.talend.commons.exception.LoginException;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
@@ -565,4 +566,8 @@ public interface IProxyRepositoryFactory {
|
||||
|
||||
public void batchDeleteObjectPhysical4Remote(Project project, List<IRepositoryViewObject> objToDeleteList)
|
||||
throws PersistenceException;
|
||||
|
||||
public void deleteOldVersionPhysical(Project project, IRepositoryViewObject objToDelete, String version) throws PersistenceException;
|
||||
|
||||
public void batchDeleteOldVersionPhysical4Remote(Project project, List<IRepositoryViewObject> objToDeleteList, IProgressMonitor monitor) throws PersistenceException;
|
||||
}
|
||||
|
||||
@@ -636,6 +636,7 @@ public class ContextNebulaGridComposite extends AbstractContextTabEditComposite
|
||||
visibleItemCount = 20;
|
||||
}
|
||||
contextsCombo.setVisibleItemCount(visibleItemCount);
|
||||
contextsCombo.getParent().getParent().pack();
|
||||
}
|
||||
|
||||
private void checkContextGroupSource() {
|
||||
|
||||
@@ -337,7 +337,6 @@ public class ContextTreeTable {
|
||||
|
||||
private void attachCheckColumnTip(NatTable nt) {
|
||||
DefaultToolTip toolTip = new ContextNatTableToolTip(nt);
|
||||
toolTip.setBackgroundColor(natTable.getDisplay().getSystemColor(7));
|
||||
toolTip.setPopupDelay(500);
|
||||
toolTip.activate();
|
||||
toolTip.setShift(new Point(10, 10));
|
||||
|
||||
@@ -379,8 +379,11 @@ public class MetadataDialog extends Dialog {
|
||||
metadataTableEditor = new MetadataTableEditor(outputMetaTable, titleOutput);
|
||||
}
|
||||
//enable dbcolumn manipulate feature only on Database output component
|
||||
String nodeFamily = outputNode.getComponent().getOriginalFamilyName();
|
||||
String rootFamily = nodeFamily != null ? nodeFamily.split("/")[0] : "";
|
||||
String nodeFamily = "", rootFamily = "";
|
||||
if ( outputNode != null && outputNode.getComponent() != null ) {
|
||||
nodeFamily = outputNode.getComponent().getOriginalFamilyName();
|
||||
rootFamily = nodeFamily != null ? nodeFamily.split("/")[0] : "";
|
||||
}
|
||||
if (rootFamily.equals("Databases")) {
|
||||
outputMetaView = new DialogMetadataDBOutputTableEditorView(composite, SWT.NONE, metadataTableEditor, outputReadOnly, true,
|
||||
true, false);
|
||||
@@ -555,8 +558,11 @@ public class MetadataDialog extends Dialog {
|
||||
metadataTableEditorForOutput = new MetadataTableEditor(outputMetaTable, titleOutput + " (Output)");
|
||||
}
|
||||
//Enable dbcolumn manipulate feature only on Database output component
|
||||
String nodeFamily = outputNode.getComponent().getOriginalFamilyName();
|
||||
String rootFamily = nodeFamily != null ? nodeFamily.split("/")[0] : "";
|
||||
String nodeFamily = "", rootFamily = "";
|
||||
if ( outputNode != null && outputNode.getComponent() != null ) {
|
||||
nodeFamily = outputNode.getComponent().getOriginalFamilyName();
|
||||
rootFamily = nodeFamily != null ? nodeFamily.split("/")[0] : "";
|
||||
}
|
||||
if (rootFamily.equals("Databases")) {
|
||||
outputMetaView = new DialogMetadataDBOutputTableEditorView(compositesSachForm.getRightComposite(), SWT.NONE,
|
||||
metadataTableEditorForOutput, outputReadOnly, true, true, false);
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="owner.project.facets" value="java"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/log4j-api-2.12.1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/log4j-core-2.12.1.jar"/>
|
||||
<classpathentry kind="src" path="src/main/java/"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry exported="true" kind="lib" path="lib/log4j-api-2.17.1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/log4j-core-2.17.1.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="owner.project.facets" value="java"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src/main/java/"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
||||
|
||||
@@ -55,6 +55,6 @@ Export-Package: org.talend.core,
|
||||
org.talend.core.views,
|
||||
org.talend.designer.runprocess
|
||||
Import-Package: org.apache.commons.collections4.map
|
||||
Bundle-ClassPath: lib/log4j-api-2.12.1.jar,
|
||||
lib/log4j-core-2.12.1.jar,
|
||||
.
|
||||
Bundle-ClassPath: .,
|
||||
lib/log4j-api-2.17.1.jar,
|
||||
lib/log4j-core-2.17.1.jar
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>2.12.1</version>
|
||||
<version>2.17.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
|
||||
@@ -374,6 +374,13 @@ public class TalendTextUtils {
|
||||
// for bug 12092
|
||||
boolean isSqlKeyword = KeywordsValidator.isSqlKeyword(temp, name.getProduct());
|
||||
|
||||
/*******************************************
|
||||
* This is a temp fix for snowflake database https://jira.talendforge.org/browse/TUP-31883
|
||||
*******************************************/
|
||||
if (EDatabaseTypeName.GENERAL_JDBC.equals(name) && temp.toUpperCase().equals("KEY")) {
|
||||
isSqlKeyword = false;
|
||||
}
|
||||
|
||||
boolean isH2 = EDatabaseTypeName.H2 == name;
|
||||
|
||||
// if the database type is IBMDB2/ORACLE and the field name contain lowercase character, should add quotes
|
||||
|
||||
@@ -46,6 +46,7 @@ import org.apache.logging.log4j.core.config.builder.api.RootLoggerComponentBuild
|
||||
import org.apache.logging.log4j.core.config.builder.impl.BuiltConfiguration;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IFolder;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.resources.IWorkspace;
|
||||
import org.eclipse.core.resources.IWorkspaceDescription;
|
||||
@@ -56,13 +57,15 @@ import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
import org.eclipse.jdt.core.IClasspathAttribute;
|
||||
import org.eclipse.jdt.core.IClasspathEntry;
|
||||
import org.eclipse.jdt.core.JavaCore;
|
||||
import org.eclipse.ui.IEditorPart;
|
||||
import org.talend.commons.CommonsPlugin;
|
||||
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;
|
||||
@@ -98,6 +101,7 @@ import org.talend.core.model.process.JobInfo;
|
||||
import org.talend.core.model.process.ProcessUtils;
|
||||
import org.talend.core.model.process.ReplaceNodesInProcessProvider;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.JobletProcessItem;
|
||||
import org.talend.core.model.properties.ProcessItem;
|
||||
import org.talend.core.model.properties.Property;
|
||||
import org.talend.core.model.relationship.RelationshipItemBuilder;
|
||||
@@ -119,6 +123,7 @@ import org.talend.core.runtime.process.TalendProcessArgumentConstant;
|
||||
import org.talend.core.runtime.process.TalendProcessOptionConstants;
|
||||
import org.talend.core.runtime.projectsetting.ProjectPreferenceManager;
|
||||
import org.talend.core.runtime.repository.build.BuildExportManager;
|
||||
import org.talend.core.runtime.services.IDesignerMavenService;
|
||||
import org.talend.core.service.IResourcesDependenciesService;
|
||||
import org.talend.core.services.ICoreTisService;
|
||||
import org.talend.core.services.ISVNProviderService;
|
||||
@@ -198,6 +203,8 @@ public class ProcessorUtilities {
|
||||
private static boolean isDynamicJobAndCITest = false;
|
||||
|
||||
private static JobInfo mainJobInfo;
|
||||
|
||||
private static boolean needExportItemsForDQ = false;
|
||||
|
||||
public static void addOpenEditor(IEditorPart editor) {
|
||||
openedEditors.add(editor);
|
||||
@@ -699,7 +706,6 @@ public class ProcessorUtilities {
|
||||
|
||||
processor.setArguments(argumentsMap);
|
||||
|
||||
copyDQDroolsToSrc(selectedProcessItem);
|
||||
// generate the code of the father after the childrens
|
||||
// so the code won't have any error during the check, and it will help to check
|
||||
// if the generation is really needed.
|
||||
@@ -715,6 +721,8 @@ public class ProcessorUtilities {
|
||||
*/
|
||||
generateBuildInfo(jobInfo, progressMonitor, isMainJob, currentProcess, currentJobName, processor, option);
|
||||
|
||||
handelDQComponents(selectedProcessItem, currentProcess);
|
||||
|
||||
copyDependenciedResources(currentProcess, progressMonitor);
|
||||
|
||||
return processor;
|
||||
@@ -1243,8 +1251,6 @@ public class ProcessorUtilities {
|
||||
|
||||
processor.setArguments(argumentsMap);
|
||||
|
||||
copyDQDroolsToSrc(selectedProcessItem);
|
||||
|
||||
generateContextInfo(jobInfo, selectedContextName, statistics, trace, needContext, progressMonitor,
|
||||
currentProcess, currentJobName, processor, isMainJob, codeGenerationNeeded);
|
||||
|
||||
@@ -1260,6 +1266,8 @@ public class ProcessorUtilities {
|
||||
generateBuildInfo(jobInfo, progressMonitor, isMainJob, currentProcess, currentJobName, processor, option);
|
||||
TimeMeasure.step(idTimer, "generateBuildInfo");
|
||||
|
||||
handelDQComponents(selectedProcessItem, currentProcess);
|
||||
|
||||
copyDependenciedResources(currentProcess, progressMonitor);
|
||||
|
||||
return processor;
|
||||
@@ -1273,39 +1281,6 @@ public class ProcessorUtilities {
|
||||
}
|
||||
}
|
||||
|
||||
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)) {
|
||||
@@ -1380,12 +1355,13 @@ public class ProcessorUtilities {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* copy the current item's drools file from 'workspace/metadata/survivorship' to '.Java/src/resources'
|
||||
*
|
||||
*
|
||||
* Specail operation for DQ components:
|
||||
* - For tdqReportRun, set 'needExportItemsForDQ'to true so as the item folder can be exported
|
||||
* - For tRuleSurvivorship, copy the current item's drools file from 'workspace/metadata/survivorship' to '.Java/src/resources'
|
||||
* @param processItem
|
||||
*/
|
||||
private static void copyDQDroolsToSrc(ProcessItem processItem) {
|
||||
private static void handelDQComponents(ProcessItem processItem,IProcess currentProcess) {
|
||||
// 1.TDQ-12474 copy the "metadata/survivorship/rulePackage" to ".Java/src/main/resources/". so that it will be
|
||||
// used by
|
||||
// maven command 'include-survivorship-rules' to export.
|
||||
@@ -1397,6 +1373,20 @@ public class ProcessorUtilities {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
// TDQ-19637 if it includes 'tDqReportRun',must export item folder
|
||||
if (!needExportItemsForDQ) {
|
||||
for (INode node : currentProcess.getGeneratingNodes()) {
|
||||
String componentName = node.getComponent().getName();
|
||||
if ("tDqReportRun".equals(componentName)) {
|
||||
needExportItemsForDQ = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* 1.TDQ-12474 copy the "metadata/survivorship/rulePackage" to ".Java/src/main/resources/". so that it will be
|
||||
used by maven command 'include-survivorship-rules' to export.
|
||||
2.TDQ-14308 current drools file in 'src/resourcesmetadata/survivorship/' should be included to job jar.
|
||||
*/
|
||||
ExportFileResource resouece = new ExportFileResource();
|
||||
BuildExportManager.getInstance().exportDependencies(resouece, processItem);
|
||||
if (resouece.getAllResources().isEmpty()) {
|
||||
@@ -1497,7 +1487,6 @@ public class ProcessorUtilities {
|
||||
}
|
||||
}
|
||||
}
|
||||
syncContextResourcesForParentJob(currentProcess, progressMonitor);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1553,6 +1542,7 @@ public class ProcessorUtilities {
|
||||
}
|
||||
jobInfo.setProcessItem(null);
|
||||
if (!BitwiseOptionUtils.containOption(option, GENERATE_MAIN_ONLY)) {
|
||||
List<JobInfo> firstSubjobs = new ArrayList<JobInfo>();
|
||||
// handle subjob in joblet. see bug 004937: tRunJob in a Joblet
|
||||
for (INode node : currentProcess.getGeneratingNodes()) {
|
||||
String componentName = node.getComponent().getName();
|
||||
@@ -1641,6 +1631,8 @@ public class ProcessorUtilities {
|
||||
|
||||
if (!BitwiseOptionUtils.containOption(option, GENERATE_WITH_FIRST_CHILD)) {
|
||||
currentProcess.setNeedRegenerateCode(true);
|
||||
} else {
|
||||
firstSubjobs.add(subJobInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1649,6 +1641,9 @@ public class ProcessorUtilities {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (BitwiseOptionUtils.containOption(option, GENERATE_WITH_FIRST_CHILD)) {
|
||||
handleGenerateFirstChildOnlyClasspath(progressMonitor, jobInfo, firstSubjobs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1658,6 +1653,32 @@ public class ProcessorUtilities {
|
||||
jobInfo.setIncludeESBFlag(includeESBFlag);
|
||||
}
|
||||
|
||||
private static void handleGenerateFirstChildOnlyClasspath(IProgressMonitor progressMonitor, JobInfo jobInfo,
|
||||
List<JobInfo> subjobInfoList) {
|
||||
IDesignerMavenService mavenService = IDesignerMavenService.get();
|
||||
if (mavenService == null || jobInfo == null || subjobInfoList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
List<IClasspathEntry> classpathEntries = new ArrayList<IClasspathEntry>();
|
||||
for (JobInfo subJobInfo : subjobInfoList) {
|
||||
if (subJobInfo.getProcessor() != null) {
|
||||
IProject codeProject = subJobInfo.getProcessor().getCodeProject();
|
||||
if (codeProject != null) {
|
||||
mavenService.enableMavenNature(progressMonitor, codeProject);
|
||||
IClasspathEntry classpathEntry = JavaCore.newSourceEntry(codeProject.getFullPath(), new IPath[0],
|
||||
new IPath[0], null, new IClasspathAttribute[] {});
|
||||
classpathEntries.add(classpathEntry);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (jobInfo.getProcessor() != null) {
|
||||
IProject codeProject = jobInfo.getProcessor().getCodeProject();
|
||||
if (codeProject != null) {
|
||||
mavenService.addProjectClasspathEntry(progressMonitor, codeProject, classpathEntries);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void setGenerationInfoWithChildrenJob(INode node, JobInfo jobInfo, final JobInfo subJobInfo) {
|
||||
final LastGenerationInfo generationInfo = LastGenerationInfo.getInstance();
|
||||
|
||||
@@ -2031,7 +2052,7 @@ public class ProcessorUtilities {
|
||||
}
|
||||
|
||||
public static IProcessor generateCode(IProcess process, IContext context, boolean statistics, boolean trace,
|
||||
boolean properties, int option) throws ProcessorException {
|
||||
boolean properties, int option, IProgressMonitor progressMonitor) throws ProcessorException {
|
||||
// added by nma, to refresh routines when generating code in SVN mode. 10225.
|
||||
ISVNProviderService service = null;
|
||||
if (PluginChecker.isSVNProviderPluginLoaded()) {
|
||||
@@ -2043,8 +2064,7 @@ public class ProcessorUtilities {
|
||||
// achen modify to fix 0006107
|
||||
JobInfo jobInfo = new JobInfo(process, context);
|
||||
resetBuildFlagsAndCaches();
|
||||
IProcessor genCode = generateCode(jobInfo, context.getName(), statistics, trace, properties, option,
|
||||
new NullProgressMonitor());
|
||||
IProcessor genCode = generateCode(jobInfo, context.getName(), statistics, trace, properties, option, progressMonitor);
|
||||
resetBuildFlagsAndCaches();
|
||||
return genCode;
|
||||
}
|
||||
@@ -2502,6 +2522,13 @@ public class ProcessorUtilities {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
// TUP-35219 avoid resource unload
|
||||
if (property != null && property.getItem() != null
|
||||
&& property.getItem() instanceof JobletProcessItem) {
|
||||
((JobletProcessItem) property.getItem()).getJobletProcess();
|
||||
}
|
||||
|
||||
JobInfo jobInfo = new JobInfo(property, jobletProcess.getDefaultContext());
|
||||
if (!jobInfos.contains(jobInfo)) {
|
||||
jobInfos.add(jobInfo);
|
||||
@@ -2920,4 +2947,8 @@ public class ProcessorUtilities {
|
||||
public static boolean isDynamicJobAndCITest() {
|
||||
return isDynamicJobAndCITest;
|
||||
}
|
||||
|
||||
public static boolean isNeedExportItemsForDQ() {
|
||||
return needExportItemsForDQ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,6 +54,17 @@
|
||||
<groupId>org.apache.maven.wagon</groupId>
|
||||
<artifactId>wagon-http</artifactId>
|
||||
<version>${wagon.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
<version>1.14.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.wagon</groupId>
|
||||
|
||||
@@ -19,6 +19,10 @@
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-compat</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -31,6 +35,11 @@
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.8.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
@@ -23,8 +23,29 @@
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-compat</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-archiver</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-compress</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-compat</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>jcl-over-slf4j</artifactId>
|
||||
@@ -67,6 +88,21 @@
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.8.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-archiver</artifactId>
|
||||
<version>3.6.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
<version>1.14.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
@@ -21,6 +21,23 @@
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
<version>2.5.3</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-archiver</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-archiver</artifactId>
|
||||
<version>3.6.0</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-compress</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -19,6 +19,10 @@
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -10,10 +10,40 @@
|
||||
<artifactId>talend-compiler-plugin-tos</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.tycho</groupId>
|
||||
<artifactId>tycho-compiler-jdt</artifactId>
|
||||
<version>1.4.0</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-compat</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-archiver</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-archiver</artifactId>
|
||||
<version>3.6.0</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-compress</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
|
||||
@@ -30,6 +30,11 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
@@ -39,6 +44,10 @@
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -50,6 +59,10 @@
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -61,6 +74,14 @@
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-compress</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -75,7 +96,15 @@
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
</exclusion>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-compat</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -88,6 +117,16 @@
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.20</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-compat</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-compress</artifactId>
|
||||
<version>1.21</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
@@ -14,22 +14,22 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-slf4j-impl</artifactId>
|
||||
<version>2.12.1</version>
|
||||
<version>2.17.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>2.12.1</version>
|
||||
<version>2.17.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-api</artifactId>
|
||||
<version>2.12.1</version>
|
||||
<version>2.17.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-1.2-api</artifactId>
|
||||
<version>2.12.1</version>
|
||||
<version>2.17.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
@@ -55,4 +55,4 @@
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
</project>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<module>zip/pom.xml</module>
|
||||
</modules>
|
||||
<properties>
|
||||
<m2.fasterxml.jackson.version>2.11.4</m2.fasterxml.jackson.version>
|
||||
<jackson-codehaus.version>1.9.15-TALEND</jackson-codehaus.version>
|
||||
<m2.fasterxml.jackson.version>2.13.2</m2.fasterxml.jackson.version>
|
||||
<jackson-codehaus.version>1.9.16-TALEND</jackson-codehaus.version>
|
||||
</properties>
|
||||
</project>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<artifactId>studio-tacokit-dependencies</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<properties>
|
||||
<tacokit.components.version>1.22.0</tacokit.components.version>
|
||||
<tacokit.components.version>1.27.10</tacokit.components.version>
|
||||
</properties>
|
||||
<repositories>
|
||||
<repository>
|
||||
|
||||
@@ -1,139 +1,192 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>studio-maven-repository-tos</artifactId>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../</relativePath>
|
||||
</parent>
|
||||
<artifactId>studio-tcompv1-dependencies</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<tcomp.version>1.33.1</tcomp.version>
|
||||
<slf4j.version>1.7.28</slf4j.version>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>talend_open</id>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
<url>https://artifacts-oss.talend.com/nexus/content/repositories/TalendOpenSourceRelease/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>talend_open_snapshots</id>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
<url>https://artifacts-oss.talend.com/nexus/content/repositories/TalendOpenSourceSnapshot/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>sonatype_releases</id>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
<url>https://oss.sonatype.org/content/repositories/releases/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>sonatype_snapshots</id>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.talend.sdk.component</groupId>
|
||||
<artifactId>component-runtime</artifactId>
|
||||
<version>${tcomp.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.talend.sdk.component</groupId>
|
||||
<artifactId>component-server</artifactId>
|
||||
<version>${tcomp.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.talend.sdk.component</groupId>
|
||||
<artifactId>component-runtime-di</artifactId>
|
||||
<version>${tcomp.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.talend.sdk.component</groupId>
|
||||
<artifactId>component-api</artifactId>
|
||||
<version>${tcomp.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.talend.sdk.component</groupId>
|
||||
<artifactId>slf4j-standard</artifactId>
|
||||
<version>${tcomp.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-jdk14</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>1.14</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.10</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-dependencies</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<includeScope>runtime</includeScope>
|
||||
<outputDirectory>${basedir}/../tmp/repository</outputDirectory>
|
||||
<useRepositoryLayout>true</useRepositoryLayout>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>studio-maven-repository-tos</artifactId>
|
||||
<version>7.3.1-PATCH</version>
|
||||
<relativePath>../</relativePath>
|
||||
</parent>
|
||||
<artifactId>studio-tcompv1-dependencies</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<tcomp.version>1.38.6</tcomp.version>
|
||||
<slf4j.version>1.7.32</slf4j.version>
|
||||
<log4j2.version>2.17.1</log4j2.version>
|
||||
<reload4j.version>1.2.19</reload4j.version>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>talend_open</id>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
<url>https://artifacts-oss.talend.com/nexus/content/repositories/TalendOpenSourceRelease/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>talend_open_snapshots</id>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
<url>https://artifacts-oss.talend.com/nexus/content/repositories/TalendOpenSourceSnapshot/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>sonatype_releases</id>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
<url>https://oss.sonatype.org/content/repositories/releases/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>sonatype_snapshots</id>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>${log4j2.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-api</artifactId>
|
||||
<version>${log4j2.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-slf4j-impl</artifactId>
|
||||
<version>${log4j2.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-jul</artifactId>
|
||||
<version>${log4j2.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-jcl</artifactId>
|
||||
<version>${log4j2.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-1.2-api</artifactId>
|
||||
<version>${log4j2.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-to-slf4j</artifactId>
|
||||
<version>${log4j2.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-web</artifactId>
|
||||
<version>${log4j2.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.talend.sdk.component</groupId>
|
||||
<artifactId>component-runtime</artifactId>
|
||||
<version>${tcomp.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.talend.sdk.component</groupId>
|
||||
<artifactId>component-server</artifactId>
|
||||
<version>${tcomp.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.talend.sdk.component</groupId>
|
||||
<artifactId>component-runtime-di</artifactId>
|
||||
<version>${tcomp.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.talend.sdk.component</groupId>
|
||||
<artifactId>component-api</artifactId>
|
||||
<version>${tcomp.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.talend.sdk.component</groupId>
|
||||
<artifactId>slf4j-standard</artifactId>
|
||||
<version>${tcomp.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-jdk14</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ch.qos.reload4j</groupId>
|
||||
<artifactId>reload4j</artifactId>
|
||||
<version>${reload4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>1.14</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.10</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-dependencies</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<includeScope>runtime</includeScope>
|
||||
<outputDirectory>${basedir}/../tmp/repository</outputDirectory>
|
||||
<useRepositoryLayout>true</useRepositoryLayout>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<artifactItem>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>studio-maven-repository</artifactId>
|
||||
<version>7.3.1.v20210520</version>
|
||||
<version>7.3.1.v20220325</version>
|
||||
<type>zip</type>
|
||||
<overWrite>true</overWrite>
|
||||
<outputDirectory>${project.basedir}/../repository</outputDirectory>
|
||||
|
||||
@@ -49,13 +49,28 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-compress</artifactId>
|
||||
<version>1.19</version>
|
||||
<version>1.21</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>1.15</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-compat</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-archiver</artifactId>
|
||||
<version>3.6.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
@@ -73,6 +88,11 @@
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
<version>3.3.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
@@ -88,13 +108,28 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-compress</artifactId>
|
||||
<version>1.19</version>
|
||||
<version>1.21</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
<version>3.3.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-archiver</artifactId>
|
||||
<version>3.6.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-io</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<configuration>
|
||||
<archive>
|
||||
@@ -120,8 +155,23 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-compress</artifactId>
|
||||
<version>1.19</version>
|
||||
<version>1.21</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-compat</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-archiver</artifactId>
|
||||
<version>3.6.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
@@ -134,6 +184,11 @@
|
||||
<artifactId>plexus-utils</artifactId>
|
||||
<version>3.0.24</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-core</artifactId>
|
||||
<version>3.8.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
@@ -151,6 +206,11 @@
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>1.15</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-shared-utils</artifactId>
|
||||
<version>3.3.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
||||
@@ -12,11 +12,17 @@
|
||||
// ============================================================================
|
||||
package org.talend.designer.maven;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.jdt.core.IClasspathEntry;
|
||||
import org.talend.core.model.properties.RoutineItem;
|
||||
import org.talend.core.model.routines.CodesJarInfo;
|
||||
import org.talend.core.runtime.services.IDesignerMavenService;
|
||||
import org.talend.designer.maven.tools.CodesJarM2CacheManager;
|
||||
import org.talend.designer.maven.utils.CodesJarMavenUtil;
|
||||
import org.talend.designer.maven.utils.MavenProjectUtils;
|
||||
|
||||
public class DesignerMavenService implements IDesignerMavenService {
|
||||
|
||||
@@ -35,4 +41,14 @@ public class DesignerMavenService implements IDesignerMavenService {
|
||||
CodesJarM2CacheManager.updateCodesJarProject(info, needReSync);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enableMavenNature(IProgressMonitor monitor, IProject project) {
|
||||
MavenProjectUtils.enableMavenNature(monitor, project);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addProjectClasspathEntry(IProgressMonitor monitor, IProject project, List<IClasspathEntry> entries) {
|
||||
MavenProjectUtils.addProjectClasspathEntry(monitor, project, entries);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,7 +14,9 @@ package org.talend.designer.maven.tools;
|
||||
|
||||
import static org.talend.designer.maven.model.TalendJavaProjectConstants.*;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
@@ -23,13 +25,17 @@ import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
|
||||
import org.apache.maven.model.Activation;
|
||||
import org.apache.maven.model.Dependency;
|
||||
import org.apache.maven.model.Model;
|
||||
import org.apache.maven.model.Plugin;
|
||||
import org.apache.maven.model.Profile;
|
||||
import org.eclipse.core.resources.IContainer;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
@@ -51,6 +57,7 @@ import org.eclipse.m2e.core.MavenPlugin;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.commons.exception.PersistenceException;
|
||||
import org.talend.commons.utils.MojoType;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.IESBService;
|
||||
import org.talend.core.ILibraryManagerService;
|
||||
@@ -72,6 +79,7 @@ import org.talend.core.model.routines.CodesJarInfo;
|
||||
import org.talend.core.repository.model.ProxyRepositoryFactory;
|
||||
import org.talend.core.repository.utils.ItemResourceUtil;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
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.ITalendProcessJavaProject;
|
||||
@@ -139,8 +147,7 @@ public class AggregatorPomsHelper {
|
||||
public void installRootPom(boolean force) throws Exception {
|
||||
IFile pomFile = getProjectRootPom();
|
||||
if (pomFile.exists()) {
|
||||
Model model = MavenPlugin.getMaven().readModel(pomFile.getLocation().toFile());
|
||||
if (force || !isPomInstalled(model.getGroupId(), model.getArtifactId(), model.getVersion())) {
|
||||
if (force || needInstallRootPom(pomFile)) {
|
||||
MavenPomCommandLauncher launcher =
|
||||
new MavenPomCommandLauncher(pomFile, TalendMavenConstants.GOAL_INSTALL);
|
||||
Map<String, Object> argumentsMap = new HashMap<>();
|
||||
@@ -152,9 +159,40 @@ public class AggregatorPomsHelper {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isPomInstalled(String groupId, String artifactId, String version) {
|
||||
String mvnUrl = MavenUrlHelper.generateMvnUrl(groupId, artifactId, version, MavenConstants.PACKAGING_POM, null);
|
||||
return PomUtil.isAvailable(mvnUrl);
|
||||
public boolean needInstallRootPom(IFile pomFile) {
|
||||
try {
|
||||
Model model = MavenPlugin.getMaven().readModel(pomFile.getLocation().toFile());
|
||||
String mvnUrl = MavenUrlHelper.generateMvnUrl(model.getGroupId(), model.getArtifactId(), model.getVersion(),
|
||||
MavenConstants.PACKAGING_POM, null);
|
||||
MavenArtifact artifact = MavenUrlHelper.parseMvnUrl(mvnUrl);
|
||||
if (artifact != null) {
|
||||
String artifactPath = PomUtil.getAbsArtifactPath(artifact);
|
||||
if (artifactPath == null) {
|
||||
return true;
|
||||
}
|
||||
Model installedModel = MavenPlugin.getMaven().readModel(new File(artifactPath));
|
||||
// check ci-builder
|
||||
String currentCIBuilderVersion = model.getBuild().getPlugins().stream()
|
||||
.filter(p -> p.getArtifactId().equals(MojoType.CI_BUILDER.getArtifactId())).findFirst().get()
|
||||
.getVersion();
|
||||
String installedCIBuilderVersion = installedModel.getBuild().getPlugins().stream()
|
||||
.filter(p -> p.getArtifactId().equals(MojoType.CI_BUILDER.getArtifactId())).findFirst().get()
|
||||
.getVersion();
|
||||
if (!currentCIBuilderVersion.equals(installedCIBuilderVersion)) {
|
||||
return true;
|
||||
}
|
||||
// check signer
|
||||
String currentSignerVersion = model.getProperties().getProperty(MojoType.SIGNER.getVersionKey());
|
||||
String installedSignerVersion = installedModel.getProperties().getProperty(MojoType.SIGNER.getVersionKey());
|
||||
if (!currentSignerVersion.equals(installedSignerVersion)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public IFolder getProjectPomsFolder() {
|
||||
@@ -176,31 +214,36 @@ public class AggregatorPomsHelper {
|
||||
|
||||
@Override
|
||||
protected void run() {
|
||||
Project currentProject = ProjectManager.getInstance().getCurrentProject();
|
||||
try {
|
||||
for (ERepositoryObjectType codeType : ERepositoryObjectType.getAllTypesOfCodes()) {
|
||||
ITalendProcessJavaProject codeProject = getCodesProject(codeType);
|
||||
if (ERepositoryObjectType.ROUTINES == codeType) {
|
||||
PomUtil.checkExistingLog4j2Dependencies4RoutinePom(projectTechName, codeProject.getProjectPom());
|
||||
}
|
||||
if (ignoreM2Cache || CodeM2CacheManager.needUpdateCodeProject(currentProject, codeType)) {
|
||||
updateCodeProjectPom(monitor, codeType, codeProject.getProjectPom());
|
||||
MavenProjectUtils.updateMavenProject(monitor, codeProject.getProject());
|
||||
buildAndInstallCodesProject(monitor, codeType, true, forceBuild);
|
||||
CodeM2CacheManager.updateCodeProjectCache(currentProject, codeType);
|
||||
} else if (buildIfNoUpdate) {
|
||||
buildAndInstallCodesProject(monitor, codeType, false, true);
|
||||
}
|
||||
updateCodeProject(monitor, codeType, forceBuild, ignoreM2Cache, buildIfNoUpdate);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
workUnit.setAvoidUnloadResources(true);
|
||||
ProxyRepositoryFactory.getInstance().executeRepositoryWorkUnit(workUnit);
|
||||
}
|
||||
|
||||
|
||||
public void updateCodeProject(IProgressMonitor monitor, ERepositoryObjectType codeType, boolean forceBuild, boolean ignoreM2Cache,
|
||||
boolean buildIfNoUpdate) throws Exception, CoreException {
|
||||
Project currentProject = ProjectManager.getInstance().getCurrentProject();
|
||||
ITalendProcessJavaProject codeProject = getCodesProject(codeType);
|
||||
if (ERepositoryObjectType.ROUTINES == codeType) {
|
||||
PomUtil.checkExistingLog4j2Dependencies4RoutinePom(projectTechName, codeProject.getProjectPom());
|
||||
}
|
||||
if (ignoreM2Cache || CodeM2CacheManager.needUpdateCodeProject(currentProject, codeType)) {
|
||||
updateCodeProjectPom(monitor, codeType, codeProject.getProjectPom());
|
||||
MavenProjectUtils.updateMavenProject(monitor, codeProject.getProject());
|
||||
buildAndInstallCodesProject(monitor, codeType, true, forceBuild);
|
||||
CodeM2CacheManager.updateCodeProjectCache(currentProject, codeType);
|
||||
} else if (buildIfNoUpdate) {
|
||||
buildAndInstallCodesProject(monitor, codeType, false, true);
|
||||
}
|
||||
}
|
||||
public void updateCodeProjectPom(IProgressMonitor monitor, ERepositoryObjectType type, IFile pomFile)
|
||||
throws Exception {
|
||||
if (type != null) {
|
||||
@@ -891,16 +934,26 @@ public class AggregatorPomsHelper {
|
||||
} else {
|
||||
model.getModules().addAll(collectRefProjectModules(null));
|
||||
}
|
||||
Boolean isCIMode = false;
|
||||
if (IRunProcessService.get() != null) {
|
||||
isCIMode = IRunProcessService.get().isCIMode();
|
||||
}
|
||||
|
||||
createRootPom(model, true, monitor);
|
||||
installRootPom(true);
|
||||
monitor.worked(1);
|
||||
if (monitor.isCanceled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// codes pom
|
||||
monitor.subTask("Synchronize code poms"); //$NON-NLS-1$
|
||||
|
||||
System.setProperty("ignore.ci.mode", isCIMode.toString());
|
||||
updateCodeProjects(monitor, true, true);
|
||||
CodesJarM2CacheManager.updateCodesJarProject(monitor, true, true, true);
|
||||
System.setProperty("ignore.ci.mode", Boolean.FALSE.toString());
|
||||
|
||||
monitor.worked(1);
|
||||
if (monitor.isCanceled()) {
|
||||
return;
|
||||
@@ -956,6 +1009,17 @@ public class AggregatorPomsHelper {
|
||||
if (monitor.isCanceled()) {
|
||||
return;
|
||||
}
|
||||
if (isCIMode) {
|
||||
for (ERepositoryObjectType codeType : ERepositoryObjectType.getAllTypesOfCodes()) {
|
||||
ITalendProcessJavaProject codeProject = getCodesProject(codeType);
|
||||
if (codeProject != null) {
|
||||
updateCodeProjectPom(monitor, codeType, codeProject.getProjectPom());
|
||||
}
|
||||
}
|
||||
CodesJarResourceCache.getAllCodesJars().stream().filter(CodesJarInfo::isInCurrentMainProject)
|
||||
.forEach(info -> CodesJarM2CacheManager.updateCodesJarProjectPom(monitor, info));
|
||||
}
|
||||
|
||||
monitor.done();
|
||||
}
|
||||
|
||||
@@ -1029,4 +1093,45 @@ public class AggregatorPomsHelper {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void checkAndUpdateDaikonDependencies() {
|
||||
try {
|
||||
IFile rootPomFile = getProjectRootPom();
|
||||
if (rootPomFile.exists()) {
|
||||
boolean isRegeneratePoms = false;
|
||||
Model model = MavenPlugin.getMaven().readModel(rootPomFile.getLocation().toFile());
|
||||
if (model.getModules() != null) {
|
||||
for (String module : model.getModules()) {
|
||||
java.nio.file.Path modPath = Paths.get(rootPomFile.getLocation().toFile().getParent(), module, "pom.xml");
|
||||
Model modModel = MavenPlugin.getMaven().readModel(modPath.toFile());
|
||||
List<Dependency> deps = modModel.getDependencies();
|
||||
if (deps != null && !deps.isEmpty()) {
|
||||
DefaultArtifactVersion targetVersion = new DefaultArtifactVersion("0.31.12");
|
||||
|
||||
for (Dependency dep : deps) {
|
||||
DefaultArtifactVersion actualVersion = new DefaultArtifactVersion(dep.getVersion());
|
||||
int cmp = targetVersion.compareTo(actualVersion);
|
||||
|
||||
if (StringUtils.equals("org.talend.daikon", dep.getGroupId()) && cmp > 0) {
|
||||
if (StringUtils.equals("crypto-utils", dep.getArtifactId())
|
||||
|| StringUtils.equals("daikon", dep.getArtifactId())) {
|
||||
isRegeneratePoms = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isRegeneratePoms) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isRegeneratePoms) {
|
||||
syncAllPomsWithoutProgress(new NullProgressMonitor());
|
||||
BuildCacheManager.getInstance().clearAllCodesCache();
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -324,7 +324,8 @@ public class BuildCacheManager {
|
||||
Parent parent = new Parent();
|
||||
parent.setGroupId(PomIdsHelper.getProjectGroupId());
|
||||
parent.setArtifactId(PomIdsHelper.getProjectArtifactId());
|
||||
parent.setVersion(PomIdsHelper.getProjectVersion());
|
||||
parent.setVersion(PomIdsHelper.getProjectVersion());
|
||||
parent.setRelativePath(".");
|
||||
model.setParent(parent);
|
||||
PomUtil.savePom(null, model, pomFile);
|
||||
}
|
||||
|
||||
@@ -97,16 +97,19 @@ public class ProcessorDependenciesManager {
|
||||
if (uniqueDependencies.contains(mavenUri)) {
|
||||
continue; // must be same GAV, avoid the different other attrs for modules
|
||||
}
|
||||
Object object = module.getExtraAttributes().get("ROUTINE_EXCLUDE");
|
||||
if (object != null && Boolean.valueOf(object.toString())) {
|
||||
continue;
|
||||
}
|
||||
uniqueDependencies.add(mavenUri);
|
||||
Dependency dependency = PomUtil.createModuleDependency(mavenUri);
|
||||
if (dependency != null) {
|
||||
((SortableDependency) dependency).setAssemblyOptional(optional);
|
||||
if (module.isExcludeDependencies()) {
|
||||
Exclusion exclusion = new Exclusion();
|
||||
exclusion.setGroupId("*"); //$NON-NLS-1$
|
||||
exclusion.setArtifactId("*"); //$NON-NLS-1$
|
||||
dependency.addExclusion(exclusion);
|
||||
}
|
||||
Exclusion exclusion = new Exclusion();
|
||||
exclusion.setGroupId("*"); //$NON-NLS-1$
|
||||
exclusion.setArtifactId("*"); //$NON-NLS-1$
|
||||
dependency.addExclusion(exclusion);
|
||||
|
||||
neededDependencies.add(dependency);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +102,11 @@ public abstract class AbstractMavenCodesTemplatePom extends AbstractMavenGeneral
|
||||
existedDependencies = new ArrayList<Dependency>();
|
||||
model.setDependencies(existedDependencies);
|
||||
}
|
||||
|
||||
boolean isCIMode = false;
|
||||
if (IRunProcessService.get() != null) {
|
||||
isCIMode = IRunProcessService.get().isCIMode();
|
||||
}
|
||||
boolean ignoreCIMode = Boolean.getBoolean("ignore.ci.mode");
|
||||
for (ModuleNeeded module : needModules) {
|
||||
Dependency dependency = null;
|
||||
// TDI-37032 add dependency only if jar available in maven
|
||||
@@ -117,11 +121,8 @@ public abstract class AbstractMavenCodesTemplatePom extends AbstractMavenGeneral
|
||||
} else {
|
||||
isDeployed = true;
|
||||
}
|
||||
boolean isCIMode = false;
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
|
||||
IRunProcessService runProcessService = GlobalServiceRegister.getDefault()
|
||||
.getService(IRunProcessService.class);
|
||||
isCIMode = runProcessService.isCIMode();
|
||||
if (!isDeployed && ignoreCIMode) {
|
||||
continue;
|
||||
}
|
||||
if (isCIMode || ignoreModuleInstallationStatus() || isDeployed) {
|
||||
dependency = PomUtil.createModuleDependency(module.getMavenUri());
|
||||
|
||||
@@ -927,7 +927,6 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
|
||||
|
||||
IMaven maven = MavenPlugin.getMaven();
|
||||
ArtifactRepository repository = maven.getLocalRepository();
|
||||
boolean isDIJob = ERepositoryObjectType.getItemType(getJobProcessor().getProperty().getItem()) == ERepositoryObjectType.PROCESS;
|
||||
for (Dependency dependency : duplicateDependencies) {
|
||||
if (((SortableDependency) dependency).isAssemblyOptional()) {
|
||||
continue;
|
||||
@@ -938,7 +937,7 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
|
||||
sourceLocation = path.toString();
|
||||
|
||||
boolean latestVersionOrLowerVersionInChildJob = isLatestVersionOrLowerVersionInChildJob(parentJobDependencies, childJobDependencies, duplicateLibs, dependency);
|
||||
if (isDIJob && !latestVersionOrLowerVersionInChildJob && !new File(sourceLocation).exists()) {
|
||||
if (!latestVersionOrLowerVersionInChildJob && !new File(sourceLocation).exists()) {
|
||||
CommonExceptionHandler.warn("Job dependency [" + sourceLocation + "] does not exist!");
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ package org.talend.designer.maven.utils;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -145,6 +146,23 @@ public class MavenProjectUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static void addProjectClasspathEntry(IProgressMonitor monitor, IProject project, List<IClasspathEntry> entries) {
|
||||
try {
|
||||
Set<IClasspathEntry> classpathentries = new LinkedHashSet<IClasspathEntry>();
|
||||
IJavaProject javaProject = JavaCore.create(project);
|
||||
IClasspathEntry[] rawClasspathEntries = javaProject.getRawClasspath();
|
||||
for (IClasspathEntry entry : rawClasspathEntries) {
|
||||
classpathentries.add(entry);
|
||||
}
|
||||
classpathentries.addAll(entries);
|
||||
rawClasspathEntries = classpathentries.toArray(new IClasspathEntry[] {});
|
||||
javaProject.setRawClasspath(rawClasspathEntries, monitor);
|
||||
javaProject.setOutputLocation(project.getFolder(MavenSystemFolders.JAVA.getOutputPath()).getFullPath(), monitor);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Clear compliance settings from project, and set them into Eclipse compliance settings
|
||||
|
||||
@@ -1,35 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/txw2-2.3.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/jakarta.xml.ws-api-2.3.3.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/wsdl4j-1.6.3.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/istack-commons-runtime-3.0.12.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/jaxb-runtime-2.3.4.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/woodstox-core-6.2.6.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-core-3.4.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-bindings-soap-3.4.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-bindings-xml-3.4.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-databinding-jaxb-3.4.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-features-clustering-3.4.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-frontend-jaxrs-3.4.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-frontend-jaxws-3.4.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-frontend-simple-3.4.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-rs-client-3.4.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-security-3.4.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-security-saml-3.4.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-transports-http-3.4.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-ws-addr-3.4.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-wsdl-3.4.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-ws-policy-3.4.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-ws-security-3.4.7.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/jakarta.activation-1.2.2.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-wsdl-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/jakarta.activation-api-1.2.2.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/woodstox-core-6.2.1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/jakarta.annotation-api-1.3.5.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/stax2-api-4.2.1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/neethi-3.1.1.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/jakarta.ws.rs-api-2.1.6.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-core-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-bindings-xml-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-frontend-jaxrs-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-rs-client-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-transports-http-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-bindings-soap-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-databinding-jaxb-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-features-clustering-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-frontend-jaxws-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-frontend-simple-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-security-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-security-saml-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-ws-addr-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-ws-policy-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/cxf-rt-ws-security-3.3.10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/javax.ws.rs-api-2.0-m10.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/jakarta.xml.bind-api-2.3.3.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/xmlschema-core-2.2.5.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/jaxb-runtime-2.3.3.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/jakarta.jws-api-2.1.0.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/istack-commons-runtime-3.0.11.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/jakarta.xml.soap-api-1.4.2.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
|
||||
@@ -5,66 +5,39 @@ Bundle-SymbolicName: org.talend.libraries.apache.cxf;singleton:=true
|
||||
Bundle-Version: 7.3.1.qualifier
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-ClassPath: .,
|
||||
lib/cxf-core-3.4.7.jar,
|
||||
lib/cxf-rt-bindings-soap-3.4.7.jar,
|
||||
lib/cxf-rt-bindings-xml-3.4.7.jar,
|
||||
lib/cxf-rt-databinding-jaxb-3.4.7.jar,
|
||||
lib/cxf-rt-features-clustering-3.4.7.jar,
|
||||
lib/cxf-rt-frontend-jaxrs-3.4.7.jar,
|
||||
lib/cxf-rt-frontend-jaxws-3.4.7.jar,
|
||||
lib/cxf-rt-frontend-simple-3.4.7.jar,
|
||||
lib/cxf-rt-rs-client-3.4.7.jar,
|
||||
lib/cxf-rt-security-3.4.7.jar,
|
||||
lib/cxf-rt-security-saml-3.4.7.jar,
|
||||
lib/cxf-rt-transports-http-3.4.7.jar,
|
||||
lib/cxf-rt-ws-addr-3.4.7.jar,
|
||||
lib/cxf-rt-wsdl-3.4.7.jar,
|
||||
lib/cxf-rt-ws-security-3.4.7.jar,
|
||||
lib/cxf-rt-ws-policy-3.4.7.jar,
|
||||
lib/istack-commons-runtime-3.0.12.jar,
|
||||
lib/jakarta.activation-1.2.2.jar,
|
||||
lib/jakarta.activation-api-1.2.2.jar,
|
||||
lib/jakarta.annotation-api-1.3.5.jar,
|
||||
lib/jakarta.jws-api-2.1.0.jar,
|
||||
lib/jakarta.ws.rs-api-2.1.6.jar,
|
||||
lib/jakarta.xml.bind-api-2.3.3.jar,
|
||||
lib/jakarta.xml.soap-api-1.4.2.jar,
|
||||
lib/jakarta.xml.ws-api-2.3.3.jar,
|
||||
lib/jaxb-runtime-2.3.4.jar,
|
||||
lib/neethi-3.1.1.jar,
|
||||
lib/stax2-api-4.2.1.jar,
|
||||
lib/javax.activation-1.2.0.jar,
|
||||
lib/cxf-core-3.3.10.jar,
|
||||
lib/cxf-rt-bindings-xml-3.3.10.jar,
|
||||
lib/cxf-rt-frontend-jaxrs-3.3.10.jar,
|
||||
lib/cxf-rt-rs-client-3.3.10.jar,
|
||||
lib/cxf-rt-transports-http-3.3.10.jar,
|
||||
lib/cxf-rt-wsdl-3.3.10.jar,
|
||||
lib/cxf-rt-bindings-soap-3.3.10.jar,
|
||||
lib/cxf-rt-databinding-jaxb-3.3.10.jar,
|
||||
lib/cxf-rt-features-clustering-3.3.10.jar,
|
||||
lib/cxf-rt-frontend-jaxws-3.3.10.jar,
|
||||
lib/cxf-rt-frontend-simple-3.3.10.jar,
|
||||
lib/cxf-rt-security-3.3.10.jar,
|
||||
lib/cxf-rt-security-saml-3.3.10.jar,
|
||||
lib/cxf-rt-ws-addr-3.3.10.jar,
|
||||
lib/cxf-rt-ws-policy-3.3.10.jar,
|
||||
lib/cxf-rt-ws-security-3.3.10.jar,
|
||||
lib/jakarta.ws.rs-api-2.1.6.jar,
|
||||
lib/jakarta.annotation-api-1.3.5.jar,
|
||||
lib/woodstox-core-6.2.1.jar,
|
||||
lib/jakarta.xml.bind-api-2.3.3.jar,
|
||||
lib/jakarta.activation-api-1.2.2.jar,
|
||||
lib/jakarta.activation-1.2.2.jar,
|
||||
lib/javax.ws.rs-api-2.0-m10.jar,
|
||||
lib/txw2-2.3.4.jar,
|
||||
lib/xmlschema-core-2.2.5.jar,
|
||||
lib/jaxb-runtime-2.3.3.jar,
|
||||
lib/jakarta.jws-api-2.1.0.jar,
|
||||
lib/istack-commons-runtime-3.0.11.jar,
|
||||
lib/jakarta.xml.soap-api-1.4.2.jar
|
||||
Export-Package: com.sun.istack,
|
||||
com.sun.istack.localization,
|
||||
com.sun.istack.logging,
|
||||
com.sun.xml.bind,
|
||||
com.sun.xml.bind.annotation,
|
||||
com.sun.xml.bind.api,
|
||||
com.sun.xml.bind.api.impl,
|
||||
com.sun.xml.bind.marshaller,
|
||||
com.sun.xml.bind.unmarshaller,
|
||||
com.sun.xml.bind.util,
|
||||
com.sun.xml.bind.v2,
|
||||
com.sun.xml.bind.v2.bytecode,
|
||||
com.sun.xml.bind.v2.model.annotation,
|
||||
com.sun.xml.bind.v2.model.core,
|
||||
com.sun.xml.bind.v2.model.impl,
|
||||
com.sun.xml.bind.v2.model.nav,
|
||||
com.sun.xml.bind.v2.model.runtime,
|
||||
com.sun.xml.bind.v2.model.util,
|
||||
com.sun.xml.bind.v2.runtime,
|
||||
com.sun.xml.bind.v2.runtime.output,
|
||||
com.sun.xml.bind.v2.runtime.property,
|
||||
com.sun.xml.bind.v2.runtime.reflect,
|
||||
com.sun.xml.bind.v2.runtime.reflect.opt,
|
||||
com.sun.xml.bind.v2.runtime.unmarshaller,
|
||||
com.sun.xml.bind.v2.schemagen,
|
||||
com.sun.xml.bind.v2.schemagen.episode,
|
||||
com.sun.xml.bind.v2.schemagen.xmlschema,
|
||||
com.sun.xml.bind.v2.util,
|
||||
javax.jws,
|
||||
lib/woodstox-core-6.2.6.jar,
|
||||
lib/wsdl4j-1.6.3.jar
|
||||
Export-Package: javax.jws,
|
||||
javax.ws.rs,
|
||||
javax.ws.rs.client,
|
||||
javax.ws.rs.container,
|
||||
@@ -76,6 +49,15 @@ Export-Package: com.sun.istack,
|
||||
javax.xml.bind.attachment,
|
||||
javax.xml.bind.helpers,
|
||||
javax.xml.bind.util,
|
||||
javax.xml.soap,
|
||||
javax.xml.ws,
|
||||
javax.xml.ws.handler,
|
||||
javax.xml.ws.handler.soap,
|
||||
javax.xml.ws.http,
|
||||
javax.xml.ws.soap,
|
||||
javax.xml.ws.spi,
|
||||
javax.xml.ws.spi.http,
|
||||
javax.xml.ws.wsaddressing,
|
||||
org.apache.cxf,
|
||||
org.apache.cxf.annotations,
|
||||
org.apache.cxf.attachment,
|
||||
@@ -192,7 +174,6 @@ Export-Package: com.sun.istack,
|
||||
org.apache.cxf.wsdl11,
|
||||
org.apache.neethi,
|
||||
org.apache.neethi.builders,
|
||||
javax.xml.ws,
|
||||
org.talend.libraries.apache.cxf
|
||||
Require-Bundle: javax.wsdl;bundle-version="1.6.2",
|
||||
org.apache.log4j,
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
<artifactId>org.talend.libraries.apache.cxf</artifactId>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
||||
<properties>
|
||||
<cxf.version>3.4.7</cxf.version>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>talend-update</id>
|
||||
@@ -21,83 +25,88 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-core</artifactId>
|
||||
<version>3.3.10</version>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-bindings-xml</artifactId>
|
||||
<version>3.3.10</version>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
|
||||
<version>3.3.10</version>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-rs-client</artifactId>
|
||||
<version>3.3.10</version>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-transports-http</artifactId>
|
||||
<version>3.3.10</version>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-wsdl</artifactId>
|
||||
<version>3.3.10</version>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-bindings-soap</artifactId>
|
||||
<version>3.3.10</version>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-databinding-jaxb</artifactId>
|
||||
<version>3.3.10</version>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-features-clustering</artifactId>
|
||||
<version>3.3.10</version>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-frontend-jaxws</artifactId>
|
||||
<version>3.3.10</version>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-frontend-simple</artifactId>
|
||||
<version>3.3.10</version>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-security</artifactId>
|
||||
<version>3.3.10</version>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-security-saml</artifactId>
|
||||
<version>3.3.10</version>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-ws-addr</artifactId>
|
||||
<version>3.3.10</version>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-ws-policy</artifactId>
|
||||
<version>3.3.10</version>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-ws-security</artifactId>
|
||||
<version>3.3.10</version>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.istack</groupId>
|
||||
<artifactId>istack-commons-runtime</artifactId>
|
||||
<version>3.0.12</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.activation</groupId>
|
||||
<artifactId>jakarta.activation</artifactId>
|
||||
@@ -108,15 +117,40 @@
|
||||
<artifactId>jakarta.activation-api</artifactId>
|
||||
<version>1.2.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.annotation</groupId>
|
||||
<artifactId>jakarta.annotation-api</artifactId>
|
||||
<version>1.3.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.jws</groupId>
|
||||
<artifactId>jakarta.jws-api</artifactId>
|
||||
<version>2.1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.ws.rs</groupId>
|
||||
<artifactId>jakarta.ws.rs-api</artifactId>
|
||||
<version>2.1.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.annotation</groupId>
|
||||
<artifactId>jakarta.annotation-api</artifactId>
|
||||
<version>1.3.5</version>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
<version>2.3.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.soap</groupId>
|
||||
<artifactId>jakarta.xml.soap-api</artifactId>
|
||||
<version>1.4.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.ws</groupId>
|
||||
<artifactId>jakarta.xml.ws-api</artifactId>
|
||||
<version>2.3.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<version>2.3.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.neethi</groupId>
|
||||
@@ -129,14 +163,14 @@
|
||||
<version>4.2.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.woodstox</groupId>
|
||||
<artifactId>woodstox-core</artifactId>
|
||||
<version>6.2.1</version>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>txw2</artifactId>
|
||||
<version>2.3.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.ws.rs</groupId>
|
||||
<artifactId>javax.ws.rs-api</artifactId>
|
||||
<version>2.0-m10</version>
|
||||
<groupId>com.fasterxml.woodstox</groupId>
|
||||
<artifactId>woodstox-core</artifactId>
|
||||
<version>6.2.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.ws.xmlschema</groupId>
|
||||
@@ -144,29 +178,9 @@
|
||||
<version>2.2.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.jws</groupId>
|
||||
<artifactId>jakarta.jws-api</artifactId>
|
||||
<version>2.1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
<version>2.3.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<version>2.3.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.istack</groupId>
|
||||
<artifactId>istack-commons-runtime</artifactId>
|
||||
<version>3.0.11</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.soap</groupId>
|
||||
<artifactId>jakarta.xml.soap-api</artifactId>
|
||||
<version>1.4.2</version>
|
||||
<groupId>wsdl4j</groupId>
|
||||
<artifactId>wsdl4j</artifactId>
|
||||
<version>1.6.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
@@ -194,6 +208,7 @@
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<includeScope>runtime</includeScope>
|
||||
<excludeTypes>pom</excludeTypes>
|
||||
<excludeTransitive>true</excludeTransitive>
|
||||
<outputDirectory>${project.basedir}/lib</outputDirectory>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry exported="true" kind="lib" path="lib/xmlbeans-2.3.0.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/xmlbeans-3.1.0.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
|
||||
@@ -22,9 +22,6 @@ Export-Package: org.apache.xmlbeans,
|
||||
org.apache.xmlbeans.impl.jam.provider,
|
||||
org.apache.xmlbeans.impl.jam.visitor,
|
||||
org.apache.xmlbeans.impl.jam.xml,
|
||||
org.apache.xmlbeans.impl.piccolo.io,
|
||||
org.apache.xmlbeans.impl.piccolo.util,
|
||||
org.apache.xmlbeans.impl.piccolo.xml,
|
||||
org.apache.xmlbeans.impl.regex,
|
||||
org.apache.xmlbeans.impl.richParser,
|
||||
org.apache.xmlbeans.impl.schema,
|
||||
@@ -51,8 +48,6 @@ Export-Package: org.apache.xmlbeans,
|
||||
org.apache.xmlbeans.xml.stream,
|
||||
org.apache.xmlbeans.xml.stream.events,
|
||||
org.apache.xmlbeans.xml.stream.utils,
|
||||
org.w3c.dom,
|
||||
repackage,
|
||||
schemaorg_apache_xmlbeans.system.sXMLCONFIG,
|
||||
schemaorg_apache_xmlbeans.system.sXMLLANG,
|
||||
schemaorg_apache_xmlbeans.system.sXMLSCHEMA,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
xmlschema-core-2.0.1.jar
|
||||
xmlbeans-2.3.0.jar
|
||||
xmlbeans-2.6.0.jar
|
||||
xmlbeans-3.1.0.jar
|
||||
xercesImpl-2.12.0.jar
|
||||
Binary file not shown.
@@ -26,16 +26,6 @@
|
||||
<configuration>
|
||||
<outputDirectory>${project.basedir}/lib</outputDirectory>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.apache.xmlbeans</groupId>
|
||||
<artifactId>xmlbeans</artifactId>
|
||||
<version>2.3.0</version>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.apache.xmlbeans</groupId>
|
||||
<artifactId>xmlbeans</artifactId>
|
||||
<version>2.6.0</version>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.apache.xmlbeans</groupId>
|
||||
<artifactId>xmlbeans</artifactId>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry exported="true" kind="lib" path="lib/xmlbeans-3.1.0.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/xml-apis.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
@@ -7,6 +8,5 @@
|
||||
<classpathentry exported="true" kind="lib" path="lib/apache-mime4j-0.6.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/castor-1.0.3.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/jakarta-oro-2.0.8.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/xmlbeans-2.3.0.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
||||
@@ -8,8 +8,8 @@ Bundle-ClassPath: .,
|
||||
lib/apache-mime4j-0.6.jar,
|
||||
lib/castor-1.0.3.jar,
|
||||
lib/jakarta-oro-2.0.8.jar,
|
||||
lib/xmlbeans-2.3.0.jar,
|
||||
lib/xml-apis.jar
|
||||
lib/xml-apis.jar,
|
||||
lib/xmlbeans-3.1.0.jar
|
||||
Bundle-Vendor: .Talend SA.
|
||||
Require-Bundle: org.apache.log4j;resolution:=optional,
|
||||
org.talend.libraries.apache.common;visibility:=reexport,
|
||||
@@ -63,9 +63,6 @@ Export-Package:
|
||||
org.apache.xmlbeans.impl.jam.provider,
|
||||
org.apache.xmlbeans.impl.jam.visitor,
|
||||
org.apache.xmlbeans.impl.jam.xml,
|
||||
org.apache.xmlbeans.impl.piccolo.io,
|
||||
org.apache.xmlbeans.impl.piccolo.util,
|
||||
org.apache.xmlbeans.impl.piccolo.xml,
|
||||
org.apache.xmlbeans.impl.regex,
|
||||
org.apache.xmlbeans.impl.richParser,
|
||||
org.apache.xmlbeans.impl.schema,
|
||||
|
||||
@@ -3,7 +3,8 @@ bin.includes = META-INF/,\
|
||||
.,\
|
||||
licences/,\
|
||||
lib/,\
|
||||
lib/xml-apis.jar
|
||||
lib/xml-apis.jar,\
|
||||
lib/xmlbeans-3.1.0.jar
|
||||
bin.excludes = libs_not_used/commons-betwixt-0.8.jar,\
|
||||
libs_not_used/commons-digester-1.7.jar,\
|
||||
libs_not_used/commons-discovery-0.2.jar,\
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -10,20 +10,26 @@
|
||||
<artifactId>org.talend.libraries.apache</artifactId>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
<properties>
|
||||
<log4j.version>1.2.17</log4j.version>
|
||||
<reload4j.version>1.2.19</reload4j.version>
|
||||
<slf4j.version>1.7.25</slf4j.version>
|
||||
<log4j2.version>2.12.1</log4j2.version>
|
||||
<log4j2.version>2.17.1</log4j2.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>${log4j.version}</version>
|
||||
<groupId>ch.qos.reload4j</groupId>
|
||||
<artifactId>reload4j</artifactId>
|
||||
<version>${reload4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
@@ -70,6 +76,11 @@
|
||||
<artifactId>log4j-1.2-api</artifactId>
|
||||
<version>${log4j2.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlbeans</groupId>
|
||||
<artifactId>xmlbeans</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
@@ -88,7 +99,7 @@
|
||||
<excludeTypes>pom</excludeTypes>
|
||||
<excludeTransitive>true</excludeTransitive>
|
||||
<outputDirectory>${project.basedir}/lib</outputDirectory>
|
||||
<includeGroupIds>log4j,org.slf4j,org.apache.logging.log4j</includeGroupIds>
|
||||
<includeGroupIds>ch.qos.reload4j,org.slf4j,org.apache.xmlbeans,org.apache.logging.log4j</includeGroupIds>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry exported="true" kind="lib" path="lib/h2-1.4.198.jar"/>
|
||||
<classpathentry kind="lib" kind="lib" path="lib/h2-2.1.210.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.4.198.jar
|
||||
lib/h2-2.1.210.jar
|
||||
Export-Package: org.h2,
|
||||
org.h2.api;uses:="org.h2.command.ddl,org.h2.table",
|
||||
org.h2.bnf;uses:="org.h2.server.web",
|
||||
@@ -35,7 +35,6 @@ Export-Package: org.h2,
|
||||
org.h2.value,
|
||||
org.h2.util",
|
||||
org.h2.compress,
|
||||
org.h2.constant,
|
||||
org.h2.constraint;
|
||||
uses:="org.h2.expression,
|
||||
org.h2.result,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
lib/h2-1.4.198.jar
|
||||
lib/h2-2.1.210.jar
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<artifactItem>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>1.4.198</version>
|
||||
<version>2.1.210</version>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
|
||||
@@ -69,7 +69,7 @@ Module.view.download.external.modules.action.text=Download external modules
|
||||
Module.view.download.external.modules.action.description=Download external modules
|
||||
download.external.dialog.title=The following modules are not yet installed. Please download and install all required modules.
|
||||
download.external.dialog.desciption=List of modules to be downloaded automatically or imported manually.
|
||||
download.external.dialog.help.url=https://help.talend.com/display/KB/How+to+install+external+modules+in+the+Talend+products
|
||||
download.external.dialog.help.url=https://document-link.us.cloud.talend.com/ts_ig_install-external-modules?version=73&lang=en&env=prd
|
||||
download.external.dialog.warning=Warning
|
||||
download.external.dialog.message=Select at least one module not installed.
|
||||
Module.view.sharelibsAction.title=Share libraries
|
||||
|
||||
@@ -49,7 +49,7 @@ public class ExportCustomSettingsAction extends Action {
|
||||
public void run() {
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
|
||||
FileDialog dialog = new FileDialog(shell, SWT.SAVE);
|
||||
dialog.setText(Messages.getString("ImportCustomSettingsAction.title"));
|
||||
dialog.setText(Messages.getString("ExportCustomSettingsAction.title"));
|
||||
String selectedFile = dialog.open();
|
||||
if (selectedFile != null) {
|
||||
CustomUriManager.getInstance().exportSettings(dialog.getFilterPath(), dialog.getFileName());
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
serviceId="ILibraryManagerService">
|
||||
</Service>
|
||||
</extension>
|
||||
|
||||
|
||||
<extension
|
||||
point="org.eclipse.emf.ecore.generated_package">
|
||||
<package
|
||||
@@ -42,16 +42,16 @@
|
||||
</libraryNeeded>
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.librariesmanager"
|
||||
id="crypto-utils-0.31.11.jar"
|
||||
mvn_uri="mvn:org.talend.daikon/crypto-utils/0.31.11"
|
||||
name="crypto-utils-0.31.11.jar"
|
||||
id="crypto-utils-0.31.12.jar"
|
||||
mvn_uri="mvn:org.talend.daikon/crypto-utils/0.31.12"
|
||||
name="crypto-utils-0.31.12.jar"
|
||||
required="true">
|
||||
</libraryNeeded>
|
||||
<libraryNeeded
|
||||
context="plugin:org.talend.librariesmanager"
|
||||
id="daikon-0.31.11.jar"
|
||||
mvn_uri="mvn:org.talend.daikon/daikon/0.31.11"
|
||||
name="daikon-0.31.11.jar"
|
||||
id="daikon-0.31.12.jar"
|
||||
mvn_uri="mvn:org.talend.daikon/daikon/0.31.12"
|
||||
name="daikon-0.31.12.jar"
|
||||
required="true">
|
||||
</libraryNeeded>
|
||||
</extension>
|
||||
@@ -66,7 +66,7 @@
|
||||
<systemRoutine
|
||||
name="PasswordEncryptUtil">
|
||||
<library
|
||||
name="crypto-utils-0.31.11.jar">
|
||||
name="crypto-utils-0.31.12.jar">
|
||||
</library>
|
||||
</systemRoutine>
|
||||
</extension>
|
||||
|
||||
@@ -57,12 +57,32 @@ public class JDBCUtil {
|
||||
throw new RuntimeException("Null value in non-Nullable column");
|
||||
}
|
||||
|
||||
/**
|
||||
* getDate can be called with the resultSet having either a java.sql.Timestamp or a java.sql.Date
|
||||
* the double try implementation is not something im proud of, but having two methods would require
|
||||
* a huge refactoring that in the end is the same as doing that
|
||||
* @param rs
|
||||
* @param index
|
||||
* @return java.util.Date converted from java.sql.Timestamp/Date
|
||||
* @throws java.sql.SQLException
|
||||
*/
|
||||
public static Date getDate(ResultSet rs, int index) throws java.sql.SQLException {
|
||||
if(rs.getTimestamp(index) != null) {
|
||||
return new Date(rs.getTimestamp(index).getTime());
|
||||
Date result = null;
|
||||
try {
|
||||
if(rs.getTimestamp(index) != null) {
|
||||
result = new Date(rs.getTimestamp(index).getTime());
|
||||
return result;
|
||||
}
|
||||
} catch (java.sql.SQLException e) {
|
||||
}
|
||||
|
||||
return null;
|
||||
try {
|
||||
if(rs.getDate(index) != null) {
|
||||
result = new Date(rs.getDate(index).getTime());
|
||||
return result;
|
||||
}
|
||||
} catch (java.sql.SQLException e) {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
//decrease the get method call number
|
||||
|
||||
@@ -313,10 +313,13 @@ public class ParserUtils {
|
||||
*/
|
||||
public static java.util.Date parseTo_Date(String dateString, String pattern) {
|
||||
// check the parameter for supporting " ","2007-09-13"," 2007-09-13 "
|
||||
if (dateString != null) {
|
||||
dateString = dateString.trim();
|
||||
}
|
||||
if (dateString == null || dateString.length() == 0) {
|
||||
return null;
|
||||
}
|
||||
dateString = dateString.trim();
|
||||
|
||||
if (pattern == null) {
|
||||
pattern = Constant.dateDefaultPattern;
|
||||
}
|
||||
|
||||
@@ -13,10 +13,13 @@
|
||||
package routines.system;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.Writer;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.channels.FileChannel;
|
||||
import java.nio.channels.FileLock;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -53,7 +56,7 @@ public class ResumeUtil {
|
||||
private static Object lock = new Object();
|
||||
|
||||
// step1: init the log file name
|
||||
public ResumeUtil(String logFileName, boolean createNewFile, String root_pid) {
|
||||
public ResumeUtil(String logFileName, boolean append, String root_pid) {
|
||||
if (logFileName == null || logFileName.equals("null")) {
|
||||
return;
|
||||
}
|
||||
@@ -70,7 +73,13 @@ public class ResumeUtil {
|
||||
File file = new File(logFileName);
|
||||
try {
|
||||
if (sharedWriter == null) {
|
||||
this.csvWriter = new SimpleCsvWriter(new FileWriter(logFileName, createNewFile));
|
||||
FileChannel fc = new RandomAccessFile(logFileName, "rw").getChannel();
|
||||
if(append){
|
||||
fc.position(fc.size());
|
||||
}else {
|
||||
fc.truncate(0);
|
||||
}
|
||||
this.csvWriter = new SimpleCsvWriter(fc);
|
||||
|
||||
// output the header part
|
||||
if (file.length() == 0) {
|
||||
@@ -97,9 +106,6 @@ public class ResumeUtil {
|
||||
csvWriter.write("dynamicData");// dynamicData
|
||||
csvWriter.endRecord();
|
||||
csvWriter.flush();
|
||||
csvWriter.close();
|
||||
// To avoid use File.delete() as it cannot make sure file being deleted.
|
||||
this.csvWriter = new SimpleCsvWriter(new FileWriter(logFileName, true));
|
||||
}
|
||||
// shared
|
||||
sharedWriterMap.put(this.root_pid, this.csvWriter);
|
||||
@@ -138,8 +144,10 @@ public class ResumeUtil {
|
||||
|
||||
JobLogItem item = new JobLogItem(eventDate, type, partName, parentPart, threadId, logPriority, errorCode, message,
|
||||
stackTrace, dynamicData);
|
||||
FileLock fileLock = null;
|
||||
try {
|
||||
synchronized (csvWriter) {
|
||||
fileLock = csvWriter.getlock();
|
||||
if (genDynamicPart) {
|
||||
csvWriter.write(item.eventDate);// eventDate--------------->???
|
||||
csvWriter.write(commonInfo.pid);// pid
|
||||
@@ -164,6 +172,7 @@ public class ResumeUtil {
|
||||
csvWriter.write(item.dynamicData);// dynamicData--->it is the 17th field. @see:feature:11296
|
||||
csvWriter.endRecord();
|
||||
csvWriter.flush();
|
||||
fileLock.release();
|
||||
}
|
||||
// for test the order
|
||||
// System.out.print(item.partName + ",");// partName
|
||||
@@ -173,6 +182,15 @@ public class ResumeUtil {
|
||||
// System.out.println();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}finally {
|
||||
if (fileLock != null) {
|
||||
try {
|
||||
fileLock.release();
|
||||
fileLock = null;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -457,7 +475,11 @@ public class ResumeUtil {
|
||||
*/
|
||||
public class SimpleCsvWriter {
|
||||
|
||||
private Writer writer = null;
|
||||
private FileChannel channel = null;
|
||||
|
||||
private ByteBuffer buf = null;
|
||||
|
||||
|
||||
|
||||
private boolean firstColumn = true;
|
||||
|
||||
@@ -467,11 +489,11 @@ public class ResumeUtil {
|
||||
|
||||
private static final int EscapeMode = ESCAPE_MODE_DOUBLED;
|
||||
|
||||
private static final char TextQualifier = '"';
|
||||
private static final String TextQualifier = "\"";
|
||||
|
||||
private static final char BACKSLASH = '\\';
|
||||
private static final String BACKSLASH = "\\";
|
||||
|
||||
private static final char Delimiter = ',';
|
||||
private static final String Delimiter = ",";
|
||||
|
||||
// JDK1.5 can't pass compile
|
||||
// private String lineSeparator = (String)
|
||||
@@ -480,9 +502,12 @@ public class ResumeUtil {
|
||||
// sun.security.action.GetPropertyAction("line.separator"));
|
||||
|
||||
private String lineSeparator = System.getProperty("line.separator");
|
||||
|
||||
private int capibility = 2<<14; //32k
|
||||
|
||||
public SimpleCsvWriter(Writer writer) {
|
||||
this.writer = writer;
|
||||
public SimpleCsvWriter(FileChannel channel) {
|
||||
this.channel = channel;
|
||||
buf = ByteBuffer.allocate(capibility);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -495,10 +520,10 @@ public class ResumeUtil {
|
||||
}
|
||||
|
||||
if (!firstColumn) {
|
||||
writer.write(Delimiter);
|
||||
buf.put(Delimiter.getBytes());
|
||||
}
|
||||
|
||||
writer.write(TextQualifier);
|
||||
buf.put(TextQualifier.getBytes());
|
||||
|
||||
// support backslash mode
|
||||
if (EscapeMode == ESCAPE_MODE_BACKSLASH) {
|
||||
@@ -507,19 +532,30 @@ public class ResumeUtil {
|
||||
} else {// support double mode
|
||||
content = replace(content, "" + TextQualifier, "" + TextQualifier + TextQualifier);
|
||||
}
|
||||
|
||||
byte[] contentByte = content.getBytes();
|
||||
if(contentByte.length > capibility - 1024) {
|
||||
flush();
|
||||
capibility = contentByte.length * 2;
|
||||
buf = ByteBuffer.allocate(capibility);
|
||||
}
|
||||
|
||||
writer.write(content);
|
||||
buf.put(contentByte);
|
||||
|
||||
writer.write(TextQualifier);
|
||||
buf.put(TextQualifier.getBytes());
|
||||
|
||||
firstColumn = false;
|
||||
}
|
||||
|
||||
public FileLock getlock() throws IOException {
|
||||
return channel.lock();
|
||||
}
|
||||
|
||||
/**
|
||||
* finish a record, prepare the next one
|
||||
*/
|
||||
public void endRecord() throws IOException {
|
||||
writer.write(lineSeparator);
|
||||
buf.put(lineSeparator.getBytes());
|
||||
firstColumn = true;
|
||||
}
|
||||
|
||||
@@ -528,7 +564,13 @@ public class ResumeUtil {
|
||||
*/
|
||||
public void flush() {
|
||||
try {
|
||||
writer.flush();
|
||||
((Buffer) buf).flip();
|
||||
channel.position(channel.size());
|
||||
while(buf.hasRemaining()) {
|
||||
channel.write(buf);
|
||||
}
|
||||
channel.force(true);
|
||||
((Buffer) buf).clear();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -539,7 +581,7 @@ public class ResumeUtil {
|
||||
*/
|
||||
public void close() {
|
||||
try {
|
||||
writer.close();
|
||||
channel.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
// ============================================================================
|
||||
package routines.system;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.util.Date;
|
||||
|
||||
import routines.TalendDate;
|
||||
@@ -31,6 +32,8 @@ public class RuntimeUtils {
|
||||
public static String getRuntimeType(Object o) {
|
||||
return o.getClass().getName();
|
||||
}
|
||||
|
||||
private static final String DEFAULT_DATE_PATTERN = "yyyy-MM-dd HH:mm:ss";
|
||||
|
||||
/**
|
||||
* This function is in order to check the Date type in tRunJob when transmit the context to child job.
|
||||
@@ -45,11 +48,40 @@ public class RuntimeUtils {
|
||||
|
||||
// when tRunJob transmit the date to child job, it should format with "yyyy-MM-dd HH:mm:ss"
|
||||
if (isDateType(o)) {
|
||||
return TalendDate.formatDate("yyyy-MM-dd HH:mm:ss", (Date) o); //$NON-NLS-1$
|
||||
return TalendDate.formatDate(DEFAULT_DATE_PATTERN, (Date) o); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
public static Date getDate(String pattern, String dateString) {
|
||||
if (dateString == null || dateString.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// when tRunJob transmit the date to child job:
|
||||
//case 1: pass date string with pattern : yyyy-MM-dd HH:mm:ss
|
||||
//case 2: pass date long value
|
||||
//so here process two cases both and avoid exception
|
||||
try {
|
||||
return new java.text.SimpleDateFormat(pattern).parse(dateString);
|
||||
} catch(ParseException e) {
|
||||
//ignore exception
|
||||
}
|
||||
|
||||
try {
|
||||
return new Date(Long.valueOf(dateString));
|
||||
} catch(NumberFormatException e) {
|
||||
//ignore exception
|
||||
//System.err.println(String.format("Null value will be used for context parameter as can't parse this to date: %s", dateString));
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Date getDate(String dateString) {
|
||||
return getDate(DEFAULT_DATE_PATTERN, dateString);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
int i = 10;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user