Compare commits
8 Commits
zwxue/7.3/
...
release/7.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
862dac4a94 | ||
|
|
bf855a7bb1 | ||
|
|
f3b2637867 | ||
|
|
e405558bd4 | ||
|
|
915701e64b | ||
|
|
4038574557 | ||
|
|
69a2741416 | ||
|
|
e43cc1f85b |
@@ -142,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;
|
||||
@@ -2467,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;
|
||||
|
||||
@@ -71,9 +71,10 @@ 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$
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.services;
|
||||
package org.talend.core.service;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.ParseException;
|
||||
@@ -76,7 +76,17 @@ public interface IDetectCVEService extends IService {
|
||||
*/
|
||||
ImpactedItem detect(Item item, Set<CVEData> datas, boolean includeNotFixed);
|
||||
|
||||
/**
|
||||
* Persist final cve report
|
||||
* @param impactedItems impacted items
|
||||
* @param reportFile - report file path
|
||||
*/
|
||||
void writeReport(List<ImpactedItem> impactedItems, File reportFile);
|
||||
|
||||
/**
|
||||
* Clear CVE cache
|
||||
*/
|
||||
void clearCache();
|
||||
|
||||
public static String mavenUri2GAV(String uri) {
|
||||
if (MavenUrlHelper.isMvnUrl(uri)) {
|
||||
@@ -101,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;
|
||||
@@ -2521,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);
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<tcomp.version>1.38.5</tcomp.version>
|
||||
<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>
|
||||
|
||||
@@ -105,12 +105,11 @@ public class ProcessorDependenciesManager {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ public class ModulesNeededProvider {
|
||||
|
||||
private static volatile boolean installModuleForRountine = false;
|
||||
|
||||
private static Set<ModuleNeeded> modulesForRountine = new HashSet<>();
|
||||
private static Set<ModuleNeeded> missingModulesForRountine = new HashSet<>();
|
||||
|
||||
private static List<ModuleNeeded> systemModules = null;
|
||||
|
||||
@@ -513,6 +513,7 @@ public class ModulesNeededProvider {
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public static List<ModuleNeeded> getModulesNeededForJobs() {
|
||||
IProxyRepositoryFactory repositoryFactory = repositoryService.getProxyRepositoryFactory();
|
||||
List<ModuleNeeded> importNeedsList = new ArrayList<ModuleNeeded>();
|
||||
@@ -1202,30 +1203,37 @@ public class ModulesNeededProvider {
|
||||
return mvnPath;
|
||||
}
|
||||
|
||||
private static void checkInstallStatus(Collection<ModuleNeeded> importNeedsList) {
|
||||
static void checkInstallStatus(Collection<ModuleNeeded> importNeedsList) {
|
||||
if (!importNeedsList.isEmpty()) {
|
||||
for (ModuleNeeded mod : importNeedsList) {
|
||||
if (ELibraryInstallStatus.INSTALLED != mod.getStatus()) {
|
||||
installModuleForRountine = true;
|
||||
if (ELibraryInstallStatus.NOT_INSTALLED == mod.getStatus()) {
|
||||
missingModulesForRountine.add(mod);
|
||||
}
|
||||
}
|
||||
modulesForRountine.addAll(importNeedsList);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean installModuleForRoutineOrBeans() {
|
||||
if (!installModuleForRountine) {
|
||||
for (ModuleNeeded mod : missingModulesForRountine) {
|
||||
if (ELibraryInstallStatus.NOT_INSTALLED != mod.getStatus()) {
|
||||
installModuleForRountine = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return installModuleForRountine;
|
||||
}
|
||||
|
||||
public static void setInstallModuleForRoutineOrBeans() {
|
||||
boolean allSet = true;
|
||||
for (ModuleNeeded mod : modulesForRountine) {
|
||||
if (ELibraryInstallStatus.INSTALLED != mod.getStatus()) {
|
||||
allSet = false;
|
||||
installModuleForRountine = false;
|
||||
Iterator<ModuleNeeded> iterator = missingModulesForRountine.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
ModuleNeeded mod = iterator.next();
|
||||
if (ELibraryInstallStatus.NOT_INSTALLED != mod.getStatus()) {
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
if (allSet) {
|
||||
installModuleForRountine = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1035,6 +1035,9 @@ public class LocalLibraryManager implements ILibraryManagerService, IChangedLibr
|
||||
if (localMavenUri == null) {
|
||||
localMavenUri = mvnUriStatusKey.replace("mvn:", "mvn:" + MavenConstants.LOCAL_RESOLUTION_URL + "!"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
if (!isResolveAllowed(localMavenUri)) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
File resolvedJar = TalendMavenResolver.resolve(localMavenUri);
|
||||
if (resolvedJar != null) {
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
// ============================================================================
|
||||
package org.talend.librariesmanager.model;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@@ -19,6 +20,8 @@ import java.util.Set;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.talend.core.model.general.ModuleNeeded;
|
||||
import org.talend.core.model.general.ModuleNeeded.ELibraryInstallStatus;
|
||||
import org.talend.core.model.general.ModuleStatusProvider;
|
||||
import org.talend.core.model.properties.PropertiesFactory;
|
||||
import org.talend.core.model.properties.RoutineItem;
|
||||
import org.talend.core.model.repository.ERepositoryObjectType;
|
||||
@@ -93,4 +96,26 @@ public class ModulesNeededProviderTest {
|
||||
Assert.assertEquals(module1.get(0).getContext(), "Global Routines " + routineItem.getProperty().getLabel());
|
||||
Assert.assertEquals(module2.get(0).getContext(), "Global Routines " + routineItem.getProperty().getLabel());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInstallModuleForRoutineOrBeans() throws Exception {
|
||||
ModuleNeeded module1 = new ModuleNeeded("", "ModulesNeededProviderTest", "description", false, null, null,
|
||||
"mvn:org.talend.librariesmanager.model/ModulesNeededProviderTest/8.0.1");
|
||||
try {
|
||||
ModuleStatusProvider.putStatus(module1.getMavenUri(), ELibraryInstallStatus.NOT_INSTALLED);
|
||||
ModulesNeededProvider.getModulesNeeded().add(module1);
|
||||
ModulesNeededProvider.checkInstallStatus(Arrays.asList(module1));
|
||||
Assert.assertTrue("Don't need to rebuild the codes project here",
|
||||
ModulesNeededProvider.installModuleForRoutineOrBeans() == false);
|
||||
ModuleStatusProvider.putStatus(module1.getMavenUri(), ELibraryInstallStatus.INSTALLED);
|
||||
Assert.assertTrue("Need to rebuild the codes project here",
|
||||
ModulesNeededProvider.installModuleForRoutineOrBeans() == true);
|
||||
ModulesNeededProvider.setInstallModuleForRoutineOrBeans();
|
||||
Assert.assertTrue("Don't need to rebuild the codes project here",
|
||||
ModulesNeededProvider.installModuleForRoutineOrBeans() == false);
|
||||
} finally {
|
||||
ModulesNeededProvider.getModulesNeeded().remove(module1);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -60,6 +60,7 @@ import org.talend.core.language.ECodeLanguage;
|
||||
import org.talend.core.model.components.IComponentsService;
|
||||
import org.talend.core.model.general.ModuleNeeded;
|
||||
import org.talend.core.model.general.ModuleNeeded.ELibraryInstallStatus;
|
||||
import org.talend.core.model.general.ModuleStatusProvider;
|
||||
import org.talend.core.model.general.Project;
|
||||
import org.talend.core.nexus.ArtifactRepositoryBean;
|
||||
import org.talend.core.nexus.NexusServerUtils;
|
||||
@@ -532,6 +533,22 @@ public class LocalLibraryManagerTest {
|
||||
assertFalse(lm.isResolveAllowed("a")); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testResolveLocallySnapshotNoUpdate() {
|
||||
IEclipsePreferences node = InstanceScope.INSTANCE.getNode(NexusServerUtils.ORG_TALEND_DESIGNER_CORE);
|
||||
int bak = node.getInt(ITalendCorePrefConstants.NEXUS_REFRESH_FREQUENCY, 0);
|
||||
String mvnUrl = "mvn:a.b.c/d/1.0/jar";
|
||||
try {
|
||||
ModuleStatusProvider.putDeployStatus(mvnUrl, ELibraryInstallStatus.DEPLOYED);
|
||||
node.putInt(ITalendCorePrefConstants.NEXUS_REFRESH_FREQUENCY, -1);
|
||||
LocalLibraryManager lm = new LocalLibraryManager();
|
||||
assertNull(lm.resolveStatusLocally(mvnUrl));
|
||||
} finally {
|
||||
node.putInt(ITalendCorePrefConstants.NEXUS_REFRESH_FREQUENCY, bak);
|
||||
ModuleStatusProvider.putDeployStatus(mvnUrl, ELibraryInstallStatus.NOT_INSTALLED);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void testNexusUpdateJar() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user