Compare commits
5 Commits
patch/TPS-
...
release/8.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
90f2bd86e6 | ||
|
|
0e5021cb70 | ||
|
|
938039f350 | ||
|
|
26b3f749f5 | ||
|
|
8a0b38d076 |
@@ -156,6 +156,8 @@ public interface ILibraryManagerService extends IService {
|
||||
public void clearCache();
|
||||
|
||||
public void clearCache(boolean cleanIndex);
|
||||
|
||||
public void deployLibsFromCustomComponents();
|
||||
|
||||
@Deprecated
|
||||
public Set<String> list(boolean withComponent, IProgressMonitor... monitorWrap);
|
||||
|
||||
@@ -25,6 +25,7 @@ import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.SortedSet;
|
||||
import java.util.TreeSet;
|
||||
@@ -515,14 +516,15 @@ public final class MetadataTalendType {
|
||||
try {
|
||||
Map<String, File> targetFileMap = Stream.of(arr).collect(Collectors.toMap(File::getName, Function.identity()));
|
||||
Map<String, File> workingFileMap = getWorkingMappingFiles().stream()
|
||||
.collect(Collectors.toMap(File::getName, Function.identity()));
|
||||
.collect(Collectors.toMap(f -> getTargetName(f, rename), Function.identity(), (f1, f2) -> f1));
|
||||
|
||||
targetFileMap.entrySet().stream().filter(entry -> !workingFileMap.containsKey(entry.getKey()))
|
||||
.forEach(entry -> entry.getValue().delete());
|
||||
|
||||
for (File workingMappingFile : workingFileMap.values()) {
|
||||
for (Entry<String, File> entry : workingFileMap.entrySet()) {
|
||||
String targetName = entry.getKey();
|
||||
File workingMappingFile = entry.getValue();
|
||||
boolean needUpdate = false;
|
||||
String targetName = getTargetName(workingMappingFile, rename);
|
||||
File targetMappingFile = targetFileMap.get(targetName);
|
||||
if (targetMappingFile == null) {
|
||||
targetMappingFile = new File(target, targetName);
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>2.12.0</version>
|
||||
<version>2.13.2.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>2.12.0</version>
|
||||
<version>2.13.2.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.thoughtworks.xstream</groupId>
|
||||
|
||||
@@ -24,195 +24,13 @@
|
||||
<exclusion>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>2.6.8</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.datastax.oss</groupId>
|
||||
<artifactId>java-driver-bom</artifactId>
|
||||
<version>4.13.0</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dropwizard.metrics</groupId>
|
||||
<artifactId>metrics-parent</artifactId>
|
||||
<version>4.2.9</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dropwizard.metrics</groupId>
|
||||
<artifactId>metrics-bom</artifactId>
|
||||
<version>4.2.9</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-bom</artifactId>
|
||||
<version>3.0.10</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jboss</groupId>
|
||||
<artifactId>jboss-parent</artifactId>
|
||||
<version>36</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.infinispan</groupId>
|
||||
<artifactId>infinispan-build-configuration-parent</artifactId>
|
||||
<version>12.1.11.Final</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.infinispan</groupId>
|
||||
<artifactId>infinispan-bom</artifactId>
|
||||
<version>12.1.11.Final</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson</groupId>
|
||||
<artifactId>jackson-bom</artifactId>
|
||||
<version>2.13.3</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jersey</groupId>
|
||||
<artifactId>jersey-bom</artifactId>
|
||||
<version>2.35</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-bom</artifactId>
|
||||
<version>9.4.46.v20220331</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit</groupId>
|
||||
<artifactId>junit-bom</artifactId>
|
||||
<version>5.8.2</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-bom</artifactId>
|
||||
<version>1.6.21</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlinx</groupId>
|
||||
<artifactId>kotlinx-coroutines-bom</artifactId>
|
||||
<version>1.5.2</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging</groupId>
|
||||
<artifactId>logging-parent</artifactId>
|
||||
<version>5</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-bom</artifactId>
|
||||
<version>2.17.2</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache</groupId>
|
||||
<artifactId>apache</artifactId>
|
||||
<version>24</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.micrometer</groupId>
|
||||
<artifactId>micrometer-bom</artifactId>
|
||||
<version>1.8.6</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-bom</artifactId>
|
||||
<version>4.1.77.Final</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.oracle.database.jdbc</groupId>
|
||||
<artifactId>ojdbc-bom</artifactId>
|
||||
<version>21.3.0.0</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.prometheus</groupId>
|
||||
<artifactId>parent</artifactId>
|
||||
<version>0.12.0</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.prometheus</groupId>
|
||||
<artifactId>simpleclient_bom</artifactId>
|
||||
<version>0.12.0</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.querydsl</groupId>
|
||||
<artifactId>querydsl-bom</artifactId>
|
||||
<version>5.0.0</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.r2dbc</groupId>
|
||||
<artifactId>r2dbc-bom</artifactId>
|
||||
<version>Arabba-SR13</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.projectreactor</groupId>
|
||||
<artifactId>reactor-bom</artifactId>
|
||||
<version>2020.0.19</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.rsocket</groupId>
|
||||
<artifactId>rsocket-bom</artifactId>
|
||||
<version>1.1.2</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-bom</artifactId>
|
||||
<version>2021.1.4</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-framework-bom</artifactId>
|
||||
<version>5.3.20</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-bom</artifactId>
|
||||
<version>5.5.12</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.security</groupId>
|
||||
<artifactId>spring-security-bom</artifactId>
|
||||
<version>5.6.5</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.session</groupId>
|
||||
<artifactId>spring-session-bom</artifactId>
|
||||
<version>2021.1.3</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson</groupId>
|
||||
<artifactId>jackson-bom</artifactId>
|
||||
|
||||
@@ -202,6 +202,9 @@ public class JavaLibrariesService extends AbstractLibrariesService {
|
||||
if (!repositoryBundleService.isInitialized()) {
|
||||
// 2. Components libraries and libraries from extension
|
||||
repositoryBundleService.createModulesIndexFromComponentAndExtension(monitorWrap);
|
||||
} else {
|
||||
//TUP-31721 & TUP-36231:Handle the custom components deployment when studio index is not re-generated.
|
||||
repositoryBundleService.deployLibsFromCustomComponents();
|
||||
}
|
||||
|
||||
repositoryBundleService.installModules(ModulesNeededProvider.getSystemRunningModules(), null);
|
||||
|
||||
@@ -1352,6 +1352,21 @@ public class LocalLibraryManager implements ILibraryManagerService, IChangedLibr
|
||||
}
|
||||
return mavenURIMap;
|
||||
}
|
||||
|
||||
public void deployLibsFromCustomComponents() {
|
||||
IComponentsService service = null;
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IComponentsService.class)) {
|
||||
service = GlobalServiceRegister.getDefault().getService(IComponentsService.class);
|
||||
}
|
||||
if (service != null) {
|
||||
Map<String, String> platformURLMap = new HashMap<>();
|
||||
platformURLMap = LibrariesIndexManager.getInstance().getAllStudioLibsFromIndex();
|
||||
// Need to read components first, otherwise FiltUtils.getFilesFromFolderByName() returns empty for custom
|
||||
// component folder.
|
||||
service.getComponentsFactory().readComponents();
|
||||
deployLibsFromCustomComponents(service, platformURLMap);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -13,6 +13,7 @@ import java.nio.file.Files;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IFolder;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
@@ -44,7 +45,7 @@ public class MetadataTalendTypeTest {
|
||||
public void testGetProjectForderURLOfMappingsFile() throws SystemException {
|
||||
URL url = MetadataTalendType.getProjectFolderURLOfMappingsFile();
|
||||
String projectLabel = ProjectManager.getInstance().getCurrentProject().getTechnicalLabel();
|
||||
assertTrue(url.getFile().endsWith(projectLabel + "/.settings/mappings/"));
|
||||
assertTrue(StringUtils.removeEnd(url.getFile(), "/").endsWith(projectLabel + "/.settings/mappings"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user