Compare commits
53 Commits
APPINT-336
...
patch/6.4.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b5575d1fed | ||
|
|
726fbe2d30 | ||
|
|
ee2ee036c6 | ||
|
|
42beba0ff5 | ||
|
|
c0c1bbbb64 | ||
|
|
a72615f146 | ||
|
|
fb925e4a96 | ||
|
|
d62bb79277 | ||
|
|
f87d99c023 | ||
|
|
cdcf4584f9 | ||
|
|
63d9c3b0eb | ||
|
|
583876313b | ||
|
|
06efca826e | ||
|
|
78e7821f70 | ||
|
|
553d2dacdd | ||
|
|
b43718c880 | ||
|
|
0e417500a6 | ||
|
|
3e8ee895ca | ||
|
|
fd0722a2bd | ||
|
|
4ff7d5a484 | ||
|
|
7d56a29adf | ||
|
|
39737a2c6d | ||
|
|
72494aca06 | ||
|
|
34357a3ae3 | ||
|
|
618d931f4f | ||
|
|
d564d4d0cb | ||
|
|
31c01110d7 | ||
|
|
f19d7a549c | ||
|
|
8097a7d446 | ||
|
|
bdd0ea2b4c | ||
|
|
86bae9927e | ||
|
|
90bbb6e919 | ||
|
|
52bac3d907 | ||
|
|
760ea1eb52 | ||
|
|
48011f5650 | ||
|
|
211a1f1bdc | ||
|
|
9e9c840834 | ||
|
|
2f26291ee9 | ||
|
|
6c56827d40 | ||
|
|
a94126fd6d | ||
|
|
8474957e66 | ||
|
|
e46126d756 | ||
|
|
cfff1eeb38 | ||
|
|
262a00381d | ||
|
|
2175b217a7 | ||
|
|
887e1949e9 | ||
|
|
28cecec265 | ||
|
|
1d8554a40c | ||
|
|
b307a745d6 | ||
|
|
d9b3a17640 | ||
|
|
27f8252ffd | ||
|
|
8e68fe2dde | ||
|
|
fdf7892052 |
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.common.ui.runtime.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.commons.runtime.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.commons.ui.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.repository.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.runtime.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.ui.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.cwm.mip.edit.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.cwm.mip.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.maven.ui.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.help.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.helpers.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.librariesmanager.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.librariesmanager.ui.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.metadata.managment.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.metadata.managment.ui.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.migrationTool.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.model.edit.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.model.migration.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.model.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.presentation.onboarding.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.rcp.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.registration.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.items.importexport.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.items.importexport.ui.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.localprovider.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.mdm.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.metadata.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.repository.view.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.resources.nl</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.commons.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.fragment.jars.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.help.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.jdt.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.libraries.jdbc.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.m2e.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.model.migration.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.rcp.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.update.p2.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.updates.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.utils.feature</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.common.ui.runtime</artifactId>
|
||||
|
||||
@@ -141,7 +141,6 @@
|
||||
<KEYWORD3>sf</KEYWORD3>
|
||||
<KEYWORD3>routines</KEYWORD3>
|
||||
<KEYWORD3>javax</KEYWORD3>
|
||||
<KEYWORD3>oracle</KEYWORD3>
|
||||
|
||||
|
||||
<LITERAL2>false</LITERAL2>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.commons.runtime</artifactId>
|
||||
|
||||
@@ -1,135 +1,135 @@
|
||||
<?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">
|
||||
<?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">
|
||||
<!--
|
||||
Copyright (C) 2010 Talend Inc. - www.talend.com
|
||||
-->
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.talend</groupId>
|
||||
<artifactId>org.talend.commons.runtime</artifactId>
|
||||
<packaging>bundle</packaging>
|
||||
<parent>
|
||||
<groupId>org.talend</groupId>
|
||||
<artifactId>org.talend.tos</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<relativePath>../pom_server.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
<version>2.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-httpclient</groupId>
|
||||
<artifactId>commons-httpclient</artifactId>
|
||||
<version>3.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-beanutils</groupId>
|
||||
<artifactId>commons-beanutils</artifactId>
|
||||
<version>1.9.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-collections</groupId>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.ant</groupId>
|
||||
<artifactId>ant-apache-oro</artifactId>
|
||||
<version>1.7.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.talend</groupId>
|
||||
<artifactId>fakejdbc</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/fakejdbc_driver.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.birt.runtime</groupId>
|
||||
<artifactId>org.eclipse.osgi</artifactId>
|
||||
<version>3.10.2.v20150203-1939</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.birt.runtime</groupId>
|
||||
<artifactId>org.eclipse.core.runtime</artifactId>
|
||||
<version>3.10.0.v20140318-2214</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.birt.runtime</groupId>
|
||||
<artifactId>org.eclipse.emf.common</artifactId>
|
||||
<version>2.10.1.v20140901-1043</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.birt.runtime</groupId>
|
||||
<artifactId>org.eclipse.emf.ecore</artifactId>
|
||||
<version>2.10.1.v20140901-1043</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.birt.runtime</groupId>
|
||||
<artifactId>org.eclipse.emf.ecore.xmi</artifactId>
|
||||
<version>2.10.1.v20140901-1043</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.birt.runtime</groupId>
|
||||
<artifactId>org.eclipse.equinox.common</artifactId>
|
||||
<version>3.6.200.v20130402-1505</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.birt.runtime</groupId>
|
||||
<artifactId>org.eclipse.equinox.registry</artifactId>
|
||||
<version>3.5.400.v20140428-1507</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.birt.runtime</groupId>
|
||||
<artifactId>org.eclipse.equinox.app</artifactId>
|
||||
<version>1.3.200.v20130910-1609</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>xerces</groupId>
|
||||
<artifactId>xercesImpl</artifactId>
|
||||
<version>2.11.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.16</version>
|
||||
<type>bundle</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<sourceDirectory>src</sourceDirectory>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<configuration>
|
||||
<source>1.7</source>
|
||||
<target>1.7</target>
|
||||
<includes>
|
||||
<include>org/talend/commons/utils/threading/lockerbykey/*.java</include>
|
||||
</includes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
<version>2.3.5</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<instructions>
|
||||
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
|
||||
</instructions>
|
||||
<classifier>minimal</classifier>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
-->
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.talend</groupId>
|
||||
<artifactId>org.talend.commons.runtime</artifactId>
|
||||
<packaging>bundle</packaging>
|
||||
<parent>
|
||||
<groupId>org.talend</groupId>
|
||||
<artifactId>org.talend.tos</artifactId>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../pom_server.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
<version>2.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-httpclient</groupId>
|
||||
<artifactId>commons-httpclient</artifactId>
|
||||
<version>3.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-beanutils</groupId>
|
||||
<artifactId>commons-beanutils</artifactId>
|
||||
<version>1.9.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-collections</groupId>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.ant</groupId>
|
||||
<artifactId>ant-apache-oro</artifactId>
|
||||
<version>1.7.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.talend</groupId>
|
||||
<artifactId>fakejdbc</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/fakejdbc_driver.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.birt.runtime</groupId>
|
||||
<artifactId>org.eclipse.osgi</artifactId>
|
||||
<version>3.10.2.v20150203-1939</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.birt.runtime</groupId>
|
||||
<artifactId>org.eclipse.core.runtime</artifactId>
|
||||
<version>3.10.0.v20140318-2214</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.birt.runtime</groupId>
|
||||
<artifactId>org.eclipse.emf.common</artifactId>
|
||||
<version>2.10.1.v20140901-1043</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.birt.runtime</groupId>
|
||||
<artifactId>org.eclipse.emf.ecore</artifactId>
|
||||
<version>2.10.1.v20140901-1043</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.birt.runtime</groupId>
|
||||
<artifactId>org.eclipse.emf.ecore.xmi</artifactId>
|
||||
<version>2.10.1.v20140901-1043</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.birt.runtime</groupId>
|
||||
<artifactId>org.eclipse.equinox.common</artifactId>
|
||||
<version>3.6.200.v20130402-1505</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.birt.runtime</groupId>
|
||||
<artifactId>org.eclipse.equinox.registry</artifactId>
|
||||
<version>3.5.400.v20140428-1507</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.birt.runtime</groupId>
|
||||
<artifactId>org.eclipse.equinox.app</artifactId>
|
||||
<version>1.3.200.v20130910-1609</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>xerces</groupId>
|
||||
<artifactId>xercesImpl</artifactId>
|
||||
<version>2.11.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.16</version>
|
||||
<type>bundle</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<sourceDirectory>src</sourceDirectory>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<configuration>
|
||||
<source>1.7</source>
|
||||
<target>1.7</target>
|
||||
<includes>
|
||||
<include>org/talend/commons/utils/threading/lockerbykey/*.java</include>
|
||||
</includes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
<version>2.3.5</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<instructions>
|
||||
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
|
||||
</instructions>
|
||||
<classifier>minimal</classifier>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -22,8 +22,6 @@ public interface ComponentsInstallComponent extends P2InstallComponent {
|
||||
|
||||
String FOLDER_COMPS = "components"; //$NON-NLS-1$
|
||||
|
||||
String FOLDER_INSTALLED = "installed"; //$NON-NLS-1$
|
||||
|
||||
String FOLDER_M2_REPOSITORY = "m2/repository"; //$NON-NLS-1$
|
||||
|
||||
void setLogin(boolean login);
|
||||
|
||||
@@ -12,19 +12,22 @@
|
||||
// ============================================================================
|
||||
package org.talend.commons.utils.network;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.lang.reflect.Field;
|
||||
import java.net.Authenticator;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.InetAddress;
|
||||
import java.net.NetworkInterface;
|
||||
import java.net.PasswordAuthentication;
|
||||
import java.net.SocketException;
|
||||
import java.net.URI;
|
||||
import java.net.URL;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Matcher;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.Enumeration;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.talend.commons.runtime.utils.io.FileCopyUtils;
|
||||
|
||||
/**
|
||||
* ggu class global comment. Detailled comment
|
||||
*/
|
||||
@@ -79,4 +82,104 @@ public class NetworkUtil {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void loadAuthenticator() {
|
||||
// get parameter from System.properties.
|
||||
if (Boolean.getBoolean("http.proxySet")) {//$NON-NLS-1$
|
||||
// authentification for the url by using username and password
|
||||
Authenticator.setDefault(new Authenticator() {
|
||||
|
||||
@Override
|
||||
protected PasswordAuthentication getPasswordAuthentication() {
|
||||
String httpProxyUser = System.getProperty("http.proxyUser"); //$NON-NLS-1$
|
||||
String httpProxyPassword = System.getProperty("http.proxyPassword"); //$NON-NLS-1$
|
||||
String httpsProxyUser = System.getProperty("https.proxyUser"); //$NON-NLS-1$
|
||||
String httpsProxyPassword = System.getProperty("https.proxyPassword"); //$NON-NLS-1$
|
||||
String proxyUser = null;
|
||||
char[] proxyPassword = new char[0];
|
||||
if (StringUtils.isNotEmpty(httpProxyUser)) {
|
||||
proxyUser = httpProxyUser;
|
||||
if (StringUtils.isNotEmpty(httpProxyPassword)) {
|
||||
proxyPassword = httpProxyPassword.toCharArray();
|
||||
}
|
||||
} else if (StringUtils.isNotEmpty(httpsProxyUser)) {
|
||||
proxyUser = httpsProxyUser;
|
||||
if (StringUtils.isNotEmpty(httpsProxyPassword)) {
|
||||
proxyPassword = httpsProxyPassword.toCharArray();
|
||||
}
|
||||
}
|
||||
return new PasswordAuthentication(proxyUser, proxyPassword);
|
||||
}
|
||||
|
||||
});
|
||||
} else {
|
||||
Authenticator.setDefault(null);
|
||||
}
|
||||
}
|
||||
|
||||
public static void updateSvnkitConfigureFile(String srcFilePath, String destFilePath) {
|
||||
// SVNFileUtil getSystemApplicationDataPath C:\ProgramData\\Application Data
|
||||
// Note:ProgramData:Starting with Windows 10,this setting can no longer be used in provisioning packages.
|
||||
String osName = System.getProperty("os.name");//$NON-NLS-1$
|
||||
String osNameLC = osName == null ? null : osName.toLowerCase();
|
||||
boolean windows = osName != null && osNameLC.indexOf("windows") >= 0;//$NON-NLS-1$
|
||||
if (windows && Boolean.getBoolean("http.proxySet")) {//$NON-NLS-1$
|
||||
FileCopyUtils.copy(srcFilePath + "\\servers", destFilePath + "\\servers");//$NON-NLS-1$//$NON-NLS-2$
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* encode url
|
||||
*
|
||||
* @param urlStr url not encoded yet!
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static URL encodeUrl(String urlStr) throws Exception {
|
||||
try {
|
||||
// String decodedURL = URLDecoder.decode(urlStr, "UTF-8"); //$NON-NLS-1$
|
||||
URL url = new URL(urlStr);
|
||||
URI uri = new URI(url.getProtocol(), url.getUserInfo(), url.getHost(), url.getPort(), url.getPath(), url.getQuery(),
|
||||
url.getRef());
|
||||
return uri.toURL();
|
||||
} catch (Exception e) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isSelfAddress(String addr) {
|
||||
if (addr == null || addr.isEmpty()) {
|
||||
return false; // ?
|
||||
}
|
||||
|
||||
try {
|
||||
final InetAddress sourceAddress = InetAddress.getByName(addr);
|
||||
if (sourceAddress.isLoopbackAddress()) {
|
||||
// final String hostAddress = sourceAddress.getHostAddress();
|
||||
// // if addr is localhost, will be 127.0.0.1 also
|
||||
// if (hostAddress.equals("127.0.0.1") || hostAddress.equals("localhost") ) {
|
||||
return true;
|
||||
// }
|
||||
} else {
|
||||
// check all ip configs
|
||||
InetAddress curAddr = null;
|
||||
Enumeration<NetworkInterface> netInterfaces = NetworkInterface.getNetworkInterfaces();
|
||||
while (netInterfaces.hasMoreElements()) {
|
||||
NetworkInterface ni = netInterfaces.nextElement();
|
||||
Enumeration<InetAddress> address = ni.getInetAddresses();
|
||||
while (address.hasMoreElements()) {
|
||||
curAddr = address.nextElement();
|
||||
if (addr.equals(curAddr.getHostAddress())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} catch (SocketException e) {
|
||||
e.printStackTrace();
|
||||
} catch (UnknownHostException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.commons.ui</artifactId>
|
||||
|
||||
@@ -27,6 +27,7 @@ import org.eclipse.swt.graphics.Rectangle;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.talend.commons.ui.runtime.image.ImageUtils;
|
||||
import org.talend.commons.utils.system.EnvironmentUtils;
|
||||
|
||||
/**
|
||||
* <code>ImageCapture</code> provides utilities to capture images.
|
||||
@@ -53,11 +54,7 @@ public class ImageCapture {
|
||||
*
|
||||
* @param control
|
||||
*/
|
||||
public static Image capture(Control control) {
|
||||
|
||||
// First try not conclusive...
|
||||
// So I should use org.eclipse.ve.internal.swt.targetvm.win32.ImageCapture class which work perfectly
|
||||
|
||||
public static Image capture(Control control) {
|
||||
Shell shell = control.getShell();
|
||||
Rectangle boundsShell = shell.getBounds();
|
||||
|
||||
@@ -71,7 +68,13 @@ public class ImageCapture {
|
||||
GC gc = new GC(control);
|
||||
Image image = new Image(control.getDisplay(), control.getSize().x, control.getSize().y);
|
||||
|
||||
gc.copyArea(image, 0, 0);
|
||||
boolean skipCopyArea = false;
|
||||
if (EnvironmentUtils.isMacOsSytem()) {
|
||||
skipCopyArea = true;
|
||||
}
|
||||
if (!skipCopyArea) {
|
||||
gc.copyArea(image, 0, 0);
|
||||
}
|
||||
gc.dispose();
|
||||
return image;
|
||||
// return getImage(control, control.getSize().x, control.getSize().y, true);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.repository</artifactId>
|
||||
|
||||
@@ -1031,6 +1031,8 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
return this.repositoryFactoryFromProvider.getAllVersion(project, id, avoidSaveProject);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<IRepositoryViewObject> getAllVersion(Project project, String id, String folderPath, ERepositoryObjectType type)
|
||||
throws PersistenceException {
|
||||
return this.repositoryFactoryFromProvider.getAllVersion(project, id, folderPath, type);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<dbType type="Binary" ignoreLen="true" ignorePre="true" />
|
||||
<dbType type="Collection" ignorePre="true" />
|
||||
<dbType type="DateTimeOffset" ignorePre="true" ignoreLen="true"/>
|
||||
<dbType type="Date" ignorePre="true" ignoreLen="true"/>
|
||||
<dbType type="Decimal" defaultLength="20" defaultPrecision="10" preBeforelen="false" />
|
||||
<dbType type="Double" defaultLength="20" defaultPrecision="10" />
|
||||
<dbType type="Guid" ignorePre="true" default="true" defaultLength="100" />
|
||||
@@ -28,6 +29,7 @@
|
||||
<talendType type="id_Character" />
|
||||
<talendType type="id_Date">
|
||||
<dbType type="DateTimeOffset" default="true" />
|
||||
<dbType type="Date" />
|
||||
</talendType>
|
||||
<talendType type="id_BigDecimal">
|
||||
<dbType type="Decimal" default="true" />
|
||||
@@ -62,6 +64,9 @@
|
||||
<dbType type="DateTimeOffset">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="Date">
|
||||
<talendType type="id_Date" default="true" />
|
||||
</dbType>
|
||||
<dbType type="Decimal">
|
||||
<talendType type="id_BigDecimal" default="true" />
|
||||
</dbType>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.runtime</artifactId>
|
||||
|
||||
@@ -99,6 +99,8 @@ public interface ILibraryManagerService extends IService {
|
||||
IProgressMonitor... monitorWrap);
|
||||
|
||||
public boolean retrieve(ModuleNeeded module, String pathToStore, boolean showDialog, IProgressMonitor... monitorWrap);
|
||||
|
||||
public boolean retrieve(ModuleNeeded module, String pathToStore, boolean showDialog, NexusServerBean bean, IProgressMonitor... monitorWrap);
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -39,7 +39,7 @@ public class RepositoryContext {
|
||||
private boolean forceReadOnly = false;
|
||||
|
||||
private boolean editableAsReadOnly = false;
|
||||
|
||||
|
||||
private boolean noUpdateWhenLogon = false;
|
||||
|
||||
private Map<String, String> fields;
|
||||
@@ -71,12 +71,18 @@ public class RepositoryContext {
|
||||
// if the new user have no svn authentification, but old instance of user have svn authentification
|
||||
// we force the new instance to set the svn infos.
|
||||
String oldAuthentification = null;
|
||||
if (this.user != null && user != null && StringUtils.equals(this.user.getLogin(), user.getLogin())
|
||||
if (this.user != null && user != null
|
||||
&& (StringUtils.equals(this.user.getLogin(), user.getLogin())
|
||||
|| StringUtils.equals(this.user.getLogin(), user.getLdapLogin())
|
||||
|| StringUtils.equals(this.user.getLdapLogin(), user.getLogin()))
|
||||
&& user.getAuthenticationInfo() == null) {
|
||||
oldAuthentification = this.user.getAuthenticationInfo();
|
||||
}
|
||||
String oldGitAuthentification = null;
|
||||
if (this.user != null && user != null && StringUtils.equals(this.user.getLogin(), user.getLogin())
|
||||
if (this.user != null && user != null
|
||||
&& (StringUtils.equals(this.user.getLogin(), user.getLogin())
|
||||
|| StringUtils.equals(this.user.getLogin(), user.getLdapLogin())
|
||||
|| StringUtils.equals(this.user.getLdapLogin(), user.getLogin()))
|
||||
&& user.getGitAuthenticationInfo() == null) {
|
||||
oldGitAuthentification = this.user.getGitAuthenticationInfo();
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
// ============================================================================
|
||||
package org.talend.core.model.general;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -185,6 +186,34 @@ public class ModuleNeeded {
|
||||
setMavenUri(mavenUrl);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModuleNeeded clone() {
|
||||
ModuleNeeded cloned = new ModuleNeeded(context, moduleName, informationMsg, mrRequired, installURL, requiredIf, mavenUri);
|
||||
cloned.bundleName = bundleName;
|
||||
cloned.bundleVersion = bundleVersion;
|
||||
cloned.context = context;
|
||||
cloned.dynamic = dynamic;
|
||||
if (extraAttributes != null && !extraAttributes.isEmpty()) {
|
||||
cloned.extraAttributes = new HashMap<>(extraAttributes);
|
||||
}
|
||||
cloned.id = id;
|
||||
cloned.informationMsg = informationMsg;
|
||||
cloned.installStatus = installStatus;
|
||||
if (installURL != null && !installURL.isEmpty()) {
|
||||
cloned.installURL = new ArrayList<>(installURL);
|
||||
}
|
||||
cloned.isShow = isShow;
|
||||
cloned.mavenUri = mavenUri;
|
||||
cloned.moduleLocaion = moduleLocaion;
|
||||
cloned.moduleName = moduleName;
|
||||
cloned.mrRequired = mrRequired;
|
||||
cloned.required = required;
|
||||
cloned.requiredIf = requiredIf;
|
||||
cloned.status = status;
|
||||
|
||||
return cloned;
|
||||
}
|
||||
|
||||
public String getRequiredIf() {
|
||||
return requiredIf;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ public class JobInfo {
|
||||
|
||||
private IContext context;
|
||||
|
||||
boolean applyContextToChildren = false;
|
||||
boolean applyContextToChildren = Boolean.getBoolean("force_context_applychildren");
|
||||
|
||||
private ProcessItem processItem;
|
||||
|
||||
|
||||
@@ -706,14 +706,25 @@ public class RelationshipItemBuilder {
|
||||
|
||||
if (item instanceof ProcessItem) {
|
||||
type = JOB_RELATION;
|
||||
}
|
||||
if (item instanceof JobletProcessItem) {
|
||||
} else if (item instanceof JobletProcessItem) {
|
||||
type = JOBLET_RELATION;
|
||||
} else {
|
||||
throw new RuntimeException(Messages.getString("RelationshipItemBuilder.unexpect.item", item.getClass().getName())); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
public List<ERepositoryObjectType> getSupportRepObjTypes(String relationType) {
|
||||
if (JOB_RELATION.equals(relationType)) {
|
||||
return ERepositoryObjectType.getAllTypesOfProcess();
|
||||
} else if (JOBLET_RELATION.equals(relationType)) {
|
||||
return ERepositoryObjectType.getAllTypesOfJoblet();
|
||||
} else {
|
||||
throw new RuntimeException(Messages.getString("RelationshipItemBuilder.unexpect.relation", relationType)); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
private void clearItemsRelations(Item baseItem) {
|
||||
Relation relation = new Relation();
|
||||
relation.setId(baseItem.getProperty().getId());
|
||||
@@ -898,19 +909,32 @@ public class RelationshipItemBuilder {
|
||||
|
||||
public boolean supportRelation(Item item) {
|
||||
ERepositoryObjectType itemType = ERepositoryObjectType.getItemType(item);
|
||||
if (ERepositoryObjectType.getAllTypesOfProcess().contains(itemType)) {
|
||||
return true;
|
||||
} else if (ERepositoryObjectType.JOBLET != null && itemType == ERepositoryObjectType.JOBLET) {
|
||||
return true;
|
||||
} else if (ERepositoryObjectType.SPARK_JOBLET != null && itemType == ERepositoryObjectType.SPARK_JOBLET) {
|
||||
return true;
|
||||
} else if (ERepositoryObjectType.SPARK_STREAMING_JOBLET != null
|
||||
&& itemType == ERepositoryObjectType.SPARK_STREAMING_JOBLET) {
|
||||
|
||||
List<ERepositoryObjectType> supportTypes = getSupportTypes();
|
||||
|
||||
if (supportTypes != null && supportTypes.contains(itemType)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public List<ERepositoryObjectType> getSupportTypes() {
|
||||
List<ERepositoryObjectType> supportTypes = new ArrayList<ERepositoryObjectType>();
|
||||
|
||||
List<ERepositoryObjectType> processTypes = getSupportRepObjTypes(JOB_RELATION);
|
||||
if (processTypes != null && !processTypes.isEmpty()) {
|
||||
supportTypes.addAll(processTypes);
|
||||
}
|
||||
|
||||
List<ERepositoryObjectType> jobletTypes = getSupportRepObjTypes(JOBLET_RELATION);
|
||||
if (jobletTypes != null && !jobletTypes.isEmpty()) {
|
||||
supportTypes.addAll(jobletTypes);
|
||||
}
|
||||
|
||||
return supportTypes;
|
||||
}
|
||||
|
||||
public void addOrUpdateItem(Item item) {
|
||||
addOrUpdateItem(item, false);
|
||||
}
|
||||
@@ -1003,6 +1027,17 @@ public class RelationshipItemBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
public void removeItemRelations(Relation relation, boolean save) {
|
||||
Map<Relation, Set<Relation>> itemRelations = getCurrentProjectItemsRelations();
|
||||
if (itemRelations != null && itemRelations.containsKey(relation)) {
|
||||
itemRelations.get(relation).clear();
|
||||
itemRelations.remove(relation);
|
||||
if (save) {
|
||||
saveRelations();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Map<Relation, Set<Relation>> getCurrentProjectItemsRelations() {
|
||||
return this.currentProjectItemsRelations;
|
||||
}
|
||||
|
||||
@@ -950,10 +950,10 @@ public class NodeUtil {
|
||||
String result = "";
|
||||
int leftQuotes = original.indexOf("\"");
|
||||
int rightQuotes = original.indexOf("\"", leftQuotes + 1);
|
||||
int fakeRightQuotes = original.indexOf("\\\"", leftQuotes + 1);
|
||||
int fakeRightQuotes = getFakeRightQuotes( original,leftQuotes);
|
||||
while (rightQuotes == fakeRightQuotes + 1) {
|
||||
rightQuotes = original.indexOf("\"", rightQuotes + 1);
|
||||
fakeRightQuotes = original.indexOf("\\\"", fakeRightQuotes + 1);
|
||||
fakeRightQuotes = getFakeRightQuotes( original,fakeRightQuotes);
|
||||
}
|
||||
int leftPrev = 0;
|
||||
while (leftQuotes >= 0 && rightQuotes > leftQuotes) {
|
||||
@@ -968,15 +968,43 @@ public class NodeUtil {
|
||||
leftQuotes = original.indexOf("\"", rightQuotes + 1);
|
||||
leftPrev = rightQuotes + 1;
|
||||
rightQuotes = original.indexOf("\"", leftQuotes + 1);
|
||||
fakeRightQuotes = original.indexOf("\\\"", leftQuotes + 1);
|
||||
fakeRightQuotes = getFakeRightQuotes( original,leftQuotes);
|
||||
while (rightQuotes == fakeRightQuotes + 1) {
|
||||
rightQuotes = original.indexOf("\"", rightQuotes + 1);
|
||||
fakeRightQuotes = original.indexOf("\\\"", fakeRightQuotes + 1);
|
||||
fakeRightQuotes = getFakeRightQuotes( original,fakeRightQuotes);
|
||||
}
|
||||
}
|
||||
result += original.substring(leftPrev);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method would avoid get wrong fakeRithQuotes index, like:
|
||||
* "\"\\\\\"" the right quote is not fake one.
|
||||
*/
|
||||
private static int getFakeRightQuotes(String original, int fromIdex) {
|
||||
int fakeRightQuotes = original.indexOf("\\\"", fromIdex + 1);
|
||||
String quoteStr = "\\\"";
|
||||
int count = 0;
|
||||
while (fakeRightQuotes > 0) {
|
||||
count++;
|
||||
quoteStr = "\\" + quoteStr;
|
||||
int tmpIndex = original.indexOf(quoteStr, fromIdex + 1);
|
||||
if (tmpIndex > fakeRightQuotes || tmpIndex < 0) {
|
||||
// If add even times "\\", then the index is -1 or bigger than we get fakeRightQuotes
|
||||
// This means that this is really fake quote
|
||||
if (count % 2 == 1) {
|
||||
break;
|
||||
} else {// Else it is really a right quote, then need get and check next fakeRightQuotes
|
||||
fakeRightQuotes = original.indexOf("\\\"", fakeRightQuotes + 1);
|
||||
quoteStr = "\\\"";
|
||||
count = 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return fakeRightQuotes;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -287,7 +287,7 @@ public final class ParameterValueUtil {
|
||||
// get the const string
|
||||
subString = value.substring(start, end);
|
||||
if (!commentStringSet.contains(start + ":" + (end - 1)) && start < methodMaxIndex) { //$NON-NLS-1$
|
||||
subString = subString.replaceAll(oldName, newName);
|
||||
subString = doSubStringReplace(oldName, newName, subString);
|
||||
}
|
||||
} else {
|
||||
// get the varible string, do replace, then append it
|
||||
@@ -309,7 +309,7 @@ public final class ParameterValueUtil {
|
||||
Point funcNameArea = function.getNameArea();
|
||||
String functionName = value.substring(funcNameArea.x, funcNameArea.y);
|
||||
if (functionName.matches("^globalMap\\..+")) { //$NON-NLS-1$
|
||||
subString = subString.replaceAll(oldName, newName);
|
||||
subString = doSubStringReplace(oldName, newName, subString);
|
||||
} else {
|
||||
if (subString.equals("\"" + oldName + "\"")) { //$NON-NLS-1$ //$NON-NLS-2$
|
||||
subString = "\"" + newName + "\""; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
@@ -334,6 +334,28 @@ public final class ParameterValueUtil {
|
||||
return strBuffer.toString();
|
||||
}
|
||||
|
||||
public static String doSubStringReplace(String oldName, String newName, String subString) {
|
||||
String newStr = subString.replaceAll("\\b" + oldName + "\\b", newName);//$NON-NLS-1$ //$NON-NLS-2$
|
||||
if (!oldName.contains(".") && newStr.equals(subString)) { // not connection and replace failure //$NON-NLS-1$
|
||||
boolean haveQuotes = subString.startsWith("\""); //$NON-NLS-1$
|
||||
boolean replaced = false;
|
||||
if (haveQuotes) {
|
||||
subString = subString.substring(1);
|
||||
}
|
||||
if (subString.startsWith(oldName + '_')) { // start with unique name
|
||||
newStr = newName + subString.substring(oldName.length());
|
||||
replaced = true;
|
||||
} else if (subString.startsWith(oldName + '.')) { // only connection name
|
||||
newStr = newName + subString.substring(oldName.length());
|
||||
replaced = true;
|
||||
}
|
||||
if (haveQuotes && replaced) {
|
||||
newStr = "\"" + newStr; //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
return newStr;
|
||||
}
|
||||
|
||||
/**
|
||||
* <b>NOTE</b>: This variable only used to debug, should not use it in product
|
||||
*/
|
||||
@@ -489,8 +511,8 @@ public final class ParameterValueUtil {
|
||||
* @param vStart
|
||||
* @param vEnd
|
||||
*/
|
||||
private static String doVaribleReplace(String oldName, String newName, String value, List<FunctionInfo> functions,
|
||||
int vStart, int vEnd) {
|
||||
private static String doVaribleReplace(String oldName, String newName, String value, List<FunctionInfo> functions, int vStart,
|
||||
int vEnd) {
|
||||
if (value.trim().isEmpty()) {
|
||||
return value;
|
||||
}
|
||||
@@ -616,7 +638,7 @@ public final class ParameterValueUtil {
|
||||
|
||||
private static int calcMethodArea(String varibleString, String wholeString, int beginIndex, List<FunctionInfo> functions) {
|
||||
// globalMap.get(...)
|
||||
// String regex = "\\b\\S*\\s*\\.\\s*\\S*\\s*\\(\\z"; //$NON-NLS-1$
|
||||
// String regex = "\\b\\S*\\s*\\.\\s*\\S*\\s*\\(\\z"; //$NON-NLS-1$
|
||||
// maybe get(...) also is target
|
||||
String regex = "\\b[\\w\\.]*?\\s*\\("; //$NON-NLS-1$
|
||||
|
||||
@@ -822,7 +844,7 @@ public final class ParameterValueUtil {
|
||||
Object docValue = param.getValue();
|
||||
if (docValue != null) {
|
||||
if ((param.getRepositoryValue() != null && param.getRepositoryValue().toUpperCase().contains("PASSWORD") //$NON-NLS-1$
|
||||
|| EParameterFieldType.PASSWORD.equals(param.getFieldType()))//
|
||||
|| EParameterFieldType.PASSWORD.equals(param.getFieldType()))//
|
||||
&& !ContextParameterUtils.containContextVariables((String) docValue)) {
|
||||
|
||||
if (isHidePassword()) { // if hide will display the *
|
||||
|
||||
@@ -206,6 +206,11 @@ public class TalendLibsServerManager {
|
||||
return mavenResolver;
|
||||
|
||||
}
|
||||
|
||||
public void checkAndUpdateNexusServer() {
|
||||
lastConnectionValid = null;
|
||||
getCustomNexusServer();
|
||||
}
|
||||
|
||||
public NexusServerBean getCustomNexusServer() {
|
||||
if (!org.talend.core.PluginChecker.isCoreTISPluginLoaded()) {
|
||||
@@ -225,28 +230,35 @@ public class TalendLibsServerManager {
|
||||
|| Boolean.FALSE == lastConnectionValid) {
|
||||
return null;
|
||||
}
|
||||
if (repositoryContext != null && repositoryContext.getFields() != null && !factory.isLocalConnectionProvider()
|
||||
&& !repositoryContext.isOffline()) {
|
||||
String adminUrl = repositoryContext.getFields().get(RepositoryConstants.REPOSITORY_URL);
|
||||
String userName = "";
|
||||
String password = "";
|
||||
User user = repositoryContext.getUser();
|
||||
if (user != null) {
|
||||
userName = user.getLogin();
|
||||
password = repositoryContext.getClearPassword();
|
||||
}
|
||||
if (lastConnectionValid != Boolean.TRUE) {
|
||||
if (repositoryContext != null && repositoryContext.getFields() != null && !factory.isLocalConnectionProvider()
|
||||
&& !repositoryContext.isOffline()) {
|
||||
String adminUrl = repositoryContext.getFields().get(RepositoryConstants.REPOSITORY_URL);
|
||||
String userName = "";
|
||||
String password = "";
|
||||
User user = repositoryContext.getUser();
|
||||
if (user != null) {
|
||||
userName = user.getLogin();
|
||||
password = repositoryContext.getClearPassword();
|
||||
}
|
||||
|
||||
if (adminUrl != null && !"".equals(adminUrl)
|
||||
&& GlobalServiceRegister.getDefault().isServiceRegistered(IRemoteService.class)) {
|
||||
IRemoteService remoteService = (IRemoteService) GlobalServiceRegister.getDefault()
|
||||
.getService(IRemoteService.class);
|
||||
NexusServerBean bean = remoteService.getLibNexusServer(userName, password, adminUrl);
|
||||
if (bean != null) {
|
||||
nexus_url = bean.getServer();
|
||||
nexus_user = bean.getUserName();
|
||||
nexus_pass = bean.getPassword();
|
||||
repositoryId = bean.getRepositoryId();
|
||||
snapshotRepId = bean.getSnapshotRepId();
|
||||
if (adminUrl != null && !"".equals(adminUrl)
|
||||
&& GlobalServiceRegister.getDefault().isServiceRegistered(IRemoteService.class)) {
|
||||
IRemoteService remoteService = (IRemoteService) GlobalServiceRegister.getDefault()
|
||||
.getService(IRemoteService.class);
|
||||
NexusServerBean bean = remoteService.getLibNexusServer(userName, password, adminUrl);
|
||||
if (bean != null) {
|
||||
nexus_url = bean.getServer();
|
||||
nexus_user = bean.getUserName();
|
||||
nexus_pass = bean.getPassword();
|
||||
repositoryId = bean.getRepositoryId();
|
||||
snapshotRepId = bean.getSnapshotRepId();
|
||||
System.setProperty(NEXUS_URL, nexus_url);
|
||||
System.setProperty(NEXUS_USER, nexus_user);
|
||||
System.setProperty(NEXUS_PASSWORD, nexus_pass);
|
||||
System.setProperty(NEXUS_LIB_REPO, repositoryId);
|
||||
System.setProperty(NEXUS_LIB_SNAPSHOT_REPO, snapshotRepId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -14,6 +14,7 @@ package org.talend.core.runtime.process;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.talend.core.model.general.ModuleNeeded;
|
||||
@@ -31,6 +32,8 @@ public class LastGenerationInfo {
|
||||
private HashMap<String, Set<String>> pigudfNeededPerJob;
|
||||
|
||||
private HashMap<String, Set<ModuleNeeded>> modulesNeededWithSubjobPerJob;
|
||||
|
||||
private Set<ModuleNeeded> highPriorityModuleNeeded;
|
||||
|
||||
private HashMap<String, Set<String>> routinesNeededWithSubjobPerJob;
|
||||
|
||||
@@ -50,6 +53,7 @@ public class LastGenerationInfo {
|
||||
modulesNeededPerJob = new HashMap<String, Set<ModuleNeeded>>();
|
||||
contextPerJob = new HashMap<String, Set<String>>();
|
||||
modulesNeededWithSubjobPerJob = new HashMap<String, Set<ModuleNeeded>>();
|
||||
highPriorityModuleNeeded = new LinkedHashSet<ModuleNeeded>();
|
||||
lastGeneratedjobs = new HashSet<JobInfo>();
|
||||
routinesNeededPerJob = new HashMap<String, Set<String>>();
|
||||
pigudfNeededPerJob = new HashMap<String, Set<String>>();
|
||||
@@ -236,6 +240,14 @@ public class LastGenerationInfo {
|
||||
}
|
||||
return routinesNeededPerJob.get(key);
|
||||
}
|
||||
|
||||
public Set<ModuleNeeded> getHighPriorityModuleNeeded() {
|
||||
return highPriorityModuleNeeded;
|
||||
}
|
||||
|
||||
public void setHighPriorityModuleNeeded(ModuleNeeded moduleNeeded) {
|
||||
highPriorityModuleNeeded.add(moduleNeeded);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for pigudfNeededPerJob.
|
||||
@@ -322,6 +334,7 @@ public class LastGenerationInfo {
|
||||
routinesNeededPerJob.clear();
|
||||
pigudfNeededPerJob.clear();
|
||||
modulesNeededWithSubjobPerJob.clear();
|
||||
highPriorityModuleNeeded.clear();
|
||||
routinesNeededWithSubjobPerJob.clear();
|
||||
pigudfNeededWithSubjobPerJob.clear();
|
||||
contextPerJob.clear();
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2017 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.runprocess;
|
||||
|
||||
/**
|
||||
* DOC ggu class global comment. Detailled comment
|
||||
*/
|
||||
public interface IMavenProcessor {
|
||||
|
||||
String[] getChildrenJobDependencies();
|
||||
|
||||
void setChildrenJobDependencies(String[] dependencies);
|
||||
}
|
||||
@@ -72,6 +72,8 @@ public final class ProjectManager {
|
||||
public static final String BRANCHES_PREFIX = "branches/";
|
||||
|
||||
public static final String ORIGIN_PREFIX = "origin/";
|
||||
|
||||
public static final String TAGS_PREFIX = "tags/";
|
||||
|
||||
private static ProjectManager singleton;
|
||||
|
||||
@@ -917,6 +919,16 @@ public final class ProjectManager {
|
||||
}
|
||||
return branchName;
|
||||
}
|
||||
|
||||
public static String getCleanTagName(String tagName) {
|
||||
if (tagName == null) {
|
||||
return null;
|
||||
}
|
||||
if (tagName.startsWith(TAGS_PREFIX)) {
|
||||
return tagName.substring(TAGS_PREFIX.length());
|
||||
}
|
||||
return tagName;
|
||||
}
|
||||
|
||||
public Set<String> getBeforeLogonRecords() {
|
||||
return this.beforeLogonRecords;
|
||||
@@ -950,5 +962,11 @@ public final class ProjectManager {
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
public void addProjectReferenceToCache(Project mainProject, List<ProjectReference> projectReferenceList) {
|
||||
List<ProjectReference> allProjectReferenceList = allTACProjectProjectReferenceSetting
|
||||
.get(mainProject.getTechnicalLabel());
|
||||
allProjectReferenceList.addAll(projectReferenceList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -261,6 +261,9 @@ public interface IProxyRepositoryFactory {
|
||||
public abstract List<IRepositoryViewObject> getAllVersion(Project project, String id, boolean avoidSaveProject)
|
||||
throws PersistenceException;
|
||||
|
||||
public abstract List<IRepositoryViewObject> getAllVersion(Project project, String id, String folderPath,
|
||||
ERepositoryObjectType type) throws PersistenceException;
|
||||
|
||||
public abstract List<IRepositoryViewObject> getAllVersion(String id) throws PersistenceException;
|
||||
|
||||
public abstract IRepositoryViewObject getLastVersion(Project project, String id, String relativeFolder,
|
||||
|
||||
@@ -29,6 +29,8 @@ public class RepositoryConstants {
|
||||
|
||||
public static final String SETTING_DIRECTORY = ".settings"; //$NON-NLS-1$
|
||||
|
||||
public static final String PROJECT_BRANCH_ID = "repository.project.branch"; //$NON-NLS-1$
|
||||
|
||||
public static final String IMG_DIRECTORY = "images"; //$NON-NLS-1$
|
||||
|
||||
public static final String IMG_DIRECTORY_OF_JOB_OUTLINE = "images/job_outlines"; //$NON-NLS-1$
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core.ui</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.core</artifactId>
|
||||
|
||||
@@ -205,10 +205,18 @@ public class DocumentationHelper {
|
||||
return;
|
||||
}
|
||||
for (Object node2 : nodes) {
|
||||
|
||||
String label = ((RepositoryNode) node2).getProperties(EProperties.LABEL).toString();
|
||||
String version = ""; //$NON-NLS-1$
|
||||
String label = null;
|
||||
Object properties = ((RepositoryNode) node2).getProperties(EProperties.LABEL);
|
||||
IRepositoryViewObject object = ((RepositoryNode) node2).getObject();
|
||||
if (properties != null) {
|
||||
label = properties.toString();
|
||||
} else if (object != null) {
|
||||
label = object.getLabel();
|
||||
}
|
||||
if (label == null) {
|
||||
label = ((RepositoryNode) node2).getLabel();
|
||||
}
|
||||
String version = ""; //$NON-NLS-1$
|
||||
if (((RepositoryNode) node2).getType() != ENodeType.SIMPLE_FOLDER && object != null) {
|
||||
version = object.getProperty().getVersion();
|
||||
}
|
||||
|
||||
@@ -15,11 +15,13 @@ package org.talend.designer.runprocess;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -36,6 +38,7 @@ import org.eclipse.core.resources.ResourcesPlugin;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
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.ui.IEditorPart;
|
||||
import org.talend.commons.CommonsPlugin;
|
||||
@@ -47,6 +50,7 @@ import org.talend.commons.utils.generation.JavaUtils;
|
||||
import org.talend.commons.utils.time.TimeMeasure;
|
||||
import org.talend.core.CorePlugin;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.ITDQItemService;
|
||||
import org.talend.core.PluginChecker;
|
||||
import org.talend.core.context.Context;
|
||||
import org.talend.core.context.RepositoryContext;
|
||||
@@ -74,10 +78,12 @@ import org.talend.core.model.repository.RepositoryManager;
|
||||
import org.talend.core.model.repository.job.JobResource;
|
||||
import org.talend.core.model.repository.job.JobResourceManager;
|
||||
import org.talend.core.model.utils.JavaResourcesHelper;
|
||||
import org.talend.core.nexus.TalendLibsServerManager;
|
||||
import org.talend.core.runtime.process.ITalendProcessJavaProject;
|
||||
import org.talend.core.runtime.process.LastGenerationInfo;
|
||||
import org.talend.core.runtime.process.TalendProcessArgumentConstant;
|
||||
import org.talend.core.runtime.process.TalendProcessOptionConstants;
|
||||
import org.talend.core.runtime.repository.build.BuildExportManager;
|
||||
import org.talend.core.services.ISVNProviderService;
|
||||
import org.talend.core.ui.IJobletProviderService;
|
||||
import org.talend.core.ui.ITestContainerProviderService;
|
||||
@@ -87,8 +93,10 @@ import org.talend.designer.core.model.utils.emf.talendfile.ContextType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ElementParameterType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.NodeType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ProcessType;
|
||||
import org.talend.repository.documentation.ExportFileResource;
|
||||
import org.talend.repository.model.IProxyRepositoryFactory;
|
||||
import org.talend.repository.model.IRepositoryService;
|
||||
import org.talend.utils.io.FilesUtils;
|
||||
|
||||
/**
|
||||
* DOC nrousseau class global comment. Detailled comment <br/>
|
||||
@@ -391,9 +399,11 @@ public class ProcessorUtilities {
|
||||
|
||||
isMainJob = true;
|
||||
codeModified = false;
|
||||
TalendLibsServerManager.getInstance().checkAndUpdateNexusServer();
|
||||
|
||||
// this cache only keep the last main job's generation, so clear it since we regenerate a new job.
|
||||
LastGenerationInfo.getInstance().getLastGeneratedjobs().clear();
|
||||
LastGenerationInfo.getInstance().getHighPriorityModuleNeeded().clear();
|
||||
retrievedJarsForCurrentBuild.clear();
|
||||
|
||||
// if it's the father, reset the processMap to ensure to have a good
|
||||
@@ -505,6 +515,8 @@ public class ProcessorUtilities {
|
||||
setNeededResources(argumentsMap, jobInfo);
|
||||
|
||||
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.
|
||||
@@ -753,7 +765,11 @@ public class ProcessorUtilities {
|
||||
|
||||
// this cache only keep the last main job's generation, so clear it since we regenerate a new job.
|
||||
LastGenerationInfo.getInstance().getLastGeneratedjobs().clear();
|
||||
LastGenerationInfo.getInstance().getHighPriorityModuleNeeded().clear();
|
||||
retrievedJarsForCurrentBuild.clear();
|
||||
|
||||
TalendLibsServerManager.getInstance().checkAndUpdateNexusServer();
|
||||
|
||||
// if it's the father, reset the processMap to ensure to have a good
|
||||
// code generation
|
||||
ItemCacheManager.clearCache();
|
||||
@@ -887,6 +903,8 @@ public class ProcessorUtilities {
|
||||
|
||||
processor.setArguments(argumentsMap);
|
||||
|
||||
copyDQDroolsToSrc(selectedProcessItem);
|
||||
|
||||
generateContextInfo(jobInfo, selectedContextName, statistics, trace, needContext, progressMonitor, currentProcess,
|
||||
currentJobName, processor, isMainJob, codeGenerationNeeded);
|
||||
|
||||
@@ -939,6 +957,59 @@ public class ProcessorUtilities {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* copy the current item's drools file from 'workspace/metadata/survivorship' to '.Java/src/resources'
|
||||
*
|
||||
* @param processItem
|
||||
*/
|
||||
private static void copyDQDroolsToSrc(ProcessItem processItem) {
|
||||
// 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.
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITDQItemService.class)) {
|
||||
ITDQItemService tdqItemService = (ITDQItemService) GlobalServiceRegister.getDefault().getService(
|
||||
ITDQItemService.class);
|
||||
if (tdqItemService == null) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
ExportFileResource resouece = new ExportFileResource();
|
||||
BuildExportManager.getInstance().exportDependencies(resouece, processItem);
|
||||
if (resouece.getAllResources().isEmpty()) {
|
||||
return;
|
||||
}
|
||||
final Iterator<String> relativepath = resouece.getRelativePathList().iterator();
|
||||
String pathStr = "metadata/survivorship"; //$NON-NLS-1$
|
||||
IRunProcessService runProcessService = CorePlugin.getDefault().getRunProcessService();
|
||||
ITalendProcessJavaProject talendProcessJavaProject = runProcessService.getTalendProcessJavaProject();
|
||||
IFolder targetFolder = talendProcessJavaProject.getResourcesFolder();
|
||||
if (targetFolder.exists()) {
|
||||
IFolder survFolder = targetFolder.getFolder(new Path(pathStr));
|
||||
// only copy self job rules, clear the 'survivorship' folder before copy.
|
||||
if (survFolder.exists()) {
|
||||
survFolder.delete(true, null);
|
||||
}
|
||||
while (relativepath.hasNext()) {
|
||||
String relativePath = relativepath.next();
|
||||
Set<URL> sources = resouece.getResourcesByRelativePath(relativePath);
|
||||
for (URL sourceUrl : sources) {
|
||||
File currentResource = new File(org.talend.commons.utils.io.FilesUtils.getFileRealPath(sourceUrl
|
||||
.getPath()));
|
||||
if (currentResource.exists()) {
|
||||
FilesUtils.copyDirectory(currentResource, new File(targetFolder.getLocation().toPortableString()
|
||||
+ File.separator + pathStr));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception exc) {
|
||||
log.error(exc);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* DOC nrousseau Comment method "cloneJobInfo".
|
||||
*
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.cwm.mip.edit</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.cwm.mip.editor</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.cwm.mip</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.datatools.xml</artifactId>
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
package org.talend.datatools.xml.utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@@ -57,7 +59,7 @@ public class ATreeNode {
|
||||
private long precisionValue;
|
||||
|
||||
private static HashMap xmlTypeToDataType = new HashMap();
|
||||
|
||||
|
||||
private Object foxTreeNode;
|
||||
|
||||
static {
|
||||
@@ -103,6 +105,24 @@ public class ATreeNode {
|
||||
}
|
||||
}
|
||||
|
||||
public ATreeNode copy() {
|
||||
ATreeNode copyNode = new ATreeNode();
|
||||
// don't copy parents and foxTreeNode, need to reset.
|
||||
copyNode.setChoice(isChoice);
|
||||
copyNode.setCurrentNamespace(currentNamespace);
|
||||
copyNode.setDataMaxLength(dataMaxLength);
|
||||
copyNode.dataType = dataType;
|
||||
copyNode.originalDataType = originalDataType;
|
||||
copyNode.setLabel(label);
|
||||
copyNode.setOptional(isOptional);
|
||||
copyNode.setPrecisionValue(precisionValue);
|
||||
copyNode.setSubstitution(isSubstitution);
|
||||
copyNode.setType(type);
|
||||
copyNode.setValue(value);
|
||||
|
||||
return copyNode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the value of tree node.
|
||||
*
|
||||
@@ -118,6 +138,25 @@ public class ATreeNode {
|
||||
* @return
|
||||
*/
|
||||
public Object[] getChildren() {
|
||||
// sort children with order namespace/attribute/element
|
||||
Collections.sort(children, new Comparator() {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public int compare(Object o1, Object o2) {
|
||||
if (o1 instanceof ATreeNode && o2 instanceof ATreeNode) {
|
||||
ATreeNode node1 = (ATreeNode) o1;
|
||||
ATreeNode node2 = (ATreeNode) o2;
|
||||
return node2.getType() - node1.getType();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
});
|
||||
|
||||
return children.toArray();
|
||||
}
|
||||
|
||||
@@ -273,10 +312,10 @@ public class ATreeNode {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj){
|
||||
public boolean equals(Object obj) {
|
||||
return equals(obj, 0);
|
||||
}
|
||||
|
||||
|
||||
public boolean equals(Object obj, int depth) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
@@ -385,7 +424,7 @@ public class ATreeNode {
|
||||
public void setPrecisionValue(long precisionValue) {
|
||||
this.precisionValue = precisionValue;
|
||||
}
|
||||
|
||||
|
||||
public Object getFoxTreeNode() {
|
||||
return foxTreeNode;
|
||||
}
|
||||
@@ -393,5 +432,5 @@ public class ATreeNode {
|
||||
public void setFoxTreeNode(Object foxTreeNode) {
|
||||
this.foxTreeNode = foxTreeNode;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.maven.tos</artifactId>
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>studio-maven-repository-tos</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../</relativePath>
|
||||
</parent>
|
||||
<artifactId>studio-components-dependencies</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<properties>
|
||||
<components.version>0.19.0</components.version>
|
||||
<components.version>0.19.2</components.version>
|
||||
</properties>
|
||||
<repositories>
|
||||
<repository>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>studio-maven-repository-tos</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>studio-maven-repository-tos</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../</relativePath>
|
||||
</parent>
|
||||
<artifactId>studio-surefire-dependencies</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>studio-maven-repository-tos</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../</relativePath>
|
||||
</parent>
|
||||
<artifactId>studio-maven-repository-unzip</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>studio-maven-repository-tos</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../</relativePath>
|
||||
</parent>
|
||||
<artifactId>studio-maven-repository-zip</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.maven.ui</artifactId>
|
||||
|
||||
@@ -12,5 +12,11 @@
|
||||
class="org.talend.designer.maven.setting.DefaultMavenTemplateManager">
|
||||
</TemplateManager>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.talend.designer.maven.mavenPomJob">
|
||||
<pomJobExtension
|
||||
class="org.talend.designer.maven.tools.creator.UpdatePomAndAssemblyForChildrenJobs">
|
||||
</pomJobExtension>
|
||||
</extension>
|
||||
|
||||
</plugin>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.designer.maven</artifactId>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<url>http://www.talend.org/</url>
|
||||
|
||||
<properties>
|
||||
<maven.deploy.skip>true</maven.deploy.skip>
|
||||
<encoding>UTF-8</encoding>
|
||||
</properties>
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ public enum ETalendMavenVariables {
|
||||
|
||||
ProjectName,
|
||||
ProjectId,
|
||||
ProjectBranch,
|
||||
|
||||
CodesGroupId,
|
||||
CodesArtifactId,
|
||||
|
||||
@@ -271,7 +271,7 @@ public class MavenTemplateManager {
|
||||
private static Model getDefaultCodeProjectTemplateModel(String projectTechName) {
|
||||
Model templateCodeProjectMOdel = new Model();
|
||||
|
||||
templateCodeProjectMOdel.setGroupId(PomIdsHelper.getProjectGroupId(projectTechName));
|
||||
templateCodeProjectMOdel.setGroupId(PomIdsHelper.getProjectGroupId());
|
||||
templateCodeProjectMOdel.setArtifactId(PomIdsHelper.getProjectArtifactId());
|
||||
templateCodeProjectMOdel.setVersion(PomIdsHelper.getProjectVersion());
|
||||
templateCodeProjectMOdel.setPackaging(TalendMavenConstants.PACKAGING_POM);
|
||||
|
||||
@@ -21,6 +21,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.maven.model.Model;
|
||||
import org.eclipse.core.resources.IContainer;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
@@ -32,24 +33,23 @@ import org.eclipse.m2e.core.embedder.MavenModelManager;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.model.general.ILibrariesService;
|
||||
import org.talend.core.model.general.Project;
|
||||
import org.talend.core.model.process.IProcess;
|
||||
import org.talend.core.model.process.ProcessUtils;
|
||||
import org.talend.core.model.properties.Item;
|
||||
import org.talend.core.model.properties.Project;
|
||||
import org.talend.core.model.properties.Property;
|
||||
import org.talend.core.runtime.process.ITalendProcessJavaProject;
|
||||
import org.talend.core.runtime.process.TalendProcessArgumentConstant;
|
||||
import org.talend.core.runtime.projectsetting.IProjectSettingPreferenceConstants;
|
||||
import org.talend.core.runtime.projectsetting.IProjectSettingTemplateConstants;
|
||||
import org.talend.core.runtime.projectsetting.ProjectPreferenceManager;
|
||||
import org.talend.designer.maven.model.TalendMavenConstants;
|
||||
import org.talend.designer.maven.template.MavenTemplateManager;
|
||||
import org.talend.designer.maven.tools.creator.CreateMavenBeanPom;
|
||||
import org.talend.designer.maven.tools.creator.CreateMavenBundleTemplatePom;
|
||||
import org.talend.designer.maven.tools.creator.CreateMavenPigUDFPom;
|
||||
import org.talend.designer.maven.tools.creator.CreateMavenRoutinePom;
|
||||
import org.talend.designer.maven.utils.PomUtil;
|
||||
import org.talend.designer.runprocess.IProcessor;
|
||||
import org.talend.repository.ProjectManager;
|
||||
import org.talend.repository.model.RepositoryConstants;
|
||||
import org.talend.utils.io.FilesUtils;
|
||||
|
||||
/**
|
||||
@@ -135,7 +135,21 @@ public class MavenPomSynchronizer {
|
||||
templateParameters);
|
||||
String jobInfoContent = MavenTemplateManager.getProjectSettingValue(IProjectSettingPreferenceConstants.TEMPLATE_JOB_INFO,
|
||||
templateParameters);
|
||||
|
||||
String projectTechName = ProjectManager.getInstance().getProject(processor.getProperty()).getTechnicalLabel();
|
||||
Project project = ProjectManager.getInstance()
|
||||
.getProjectFromProjectTechLabel(projectTechName);
|
||||
if (project == null) {
|
||||
project = ProjectManager.getInstance().getCurrentProject();
|
||||
}
|
||||
String mainProjectBranch = ProjectManager.getInstance().getMainProjectBranch(project);
|
||||
if (mainProjectBranch == null) {
|
||||
ProjectPreferenceManager preferenceManager = new ProjectPreferenceManager(project, "org.talend.repository");
|
||||
mainProjectBranch = preferenceManager.getValue(RepositoryConstants.PROJECT_BRANCH_ID);
|
||||
if (mainProjectBranch == null) {
|
||||
mainProjectBranch = "";
|
||||
}
|
||||
}
|
||||
jobInfoContent = StringUtils.replace(jobInfoContent, "${talend.project.branch}", mainProjectBranch);
|
||||
MavenTemplateManager.saveContent(shFile, shContent, overwrite);
|
||||
MavenTemplateManager.saveContent(batFile, batContent, overwrite);
|
||||
MavenTemplateManager.saveContent(infoFile, jobInfoContent, overwrite);
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
package org.talend.designer.maven.tools;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
@@ -34,6 +35,7 @@ import org.talend.designer.maven.model.TalendMavenConstants;
|
||||
import org.talend.designer.maven.template.MavenTemplateManager;
|
||||
import org.talend.designer.maven.utils.PomIdsHelper;
|
||||
import org.talend.designer.maven.utils.PomUtil;
|
||||
import org.talend.designer.runprocess.IMavenProcessor;
|
||||
import org.talend.designer.runprocess.IProcessor;
|
||||
import org.talend.repository.ProjectManager;
|
||||
|
||||
@@ -214,10 +216,21 @@ public class ProjectPomManager {
|
||||
final String jobGroupPrefix = PomIdsHelper.getJobGroupId((String) null);
|
||||
// org.talend.test
|
||||
final String testGroupPrefix = PomIdsHelper.getTestGroupId((String) null);
|
||||
|
||||
// TUP-18769
|
||||
List<String> childrenJobDependencies = new ArrayList<String>();
|
||||
if (processor instanceof IMavenProcessor) {
|
||||
String[] childrenJobDependencies2 = ((IMavenProcessor) processor).getChildrenJobDependencies();
|
||||
if (childrenJobDependencies2 != null) {
|
||||
childrenJobDependencies.addAll(Arrays.asList(childrenJobDependencies2));
|
||||
}
|
||||
}
|
||||
|
||||
Iterator<Dependency> iterator = withoutChildrenJobDependencies.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
Dependency d = iterator.next();
|
||||
if (d.getGroupId().startsWith(jobGroupPrefix) || d.getGroupId().startsWith(testGroupPrefix)) {
|
||||
if (d.getGroupId().startsWith(jobGroupPrefix) || d.getGroupId().startsWith(testGroupPrefix)
|
||||
|| childrenJobDependencies.contains(PomUtil.generateMvnUrl(d))) {
|
||||
// remove the children job's dependencies
|
||||
iterator.remove();
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
package org.talend.designer.maven.tools.creator;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -44,6 +45,7 @@ import org.talend.designer.maven.template.ETalendMavenVariables;
|
||||
import org.talend.designer.maven.tools.ProcessorDependenciesManager;
|
||||
import org.talend.designer.maven.utils.PomIdsHelper;
|
||||
import org.talend.designer.maven.utils.PomUtil;
|
||||
import org.talend.designer.runprocess.IMavenProcessor;
|
||||
import org.talend.designer.runprocess.IProcessor;
|
||||
import org.talend.designer.runprocess.ProcessorException;
|
||||
import org.talend.repository.ProjectManager;
|
||||
@@ -169,10 +171,13 @@ public abstract class AbstractMavenProcessorPom extends CreateMavenBundleTemplat
|
||||
try {
|
||||
getProcessorDependenciesManager().updateDependencies(null, model);
|
||||
|
||||
IProcessor processor = getJobProcessor();
|
||||
Set<String> childrenJobDependencies = new LinkedHashSet<String>();
|
||||
// add children jobs in dependencies
|
||||
final List<Dependency> dependencies = model.getDependencies();
|
||||
String parentId = getJobProcessor().getProperty().getId();
|
||||
final Set<JobInfo> clonedChildrenJobInfors = getJobProcessor().getBuildChildrenJobs();
|
||||
String parentId = processor.getProperty().getId();
|
||||
final Set<JobInfo> clonedChildrenJobInfors = processor.getBuildChildrenJobs();
|
||||
|
||||
for (JobInfo jobInfo : clonedChildrenJobInfors) {
|
||||
if (jobInfo.getFatherJobInfo() != null && jobInfo.getFatherJobInfo().getJobId().equals(parentId)) {
|
||||
if (!validChildrenJob(jobInfo)) {
|
||||
@@ -187,7 +192,7 @@ public abstract class AbstractMavenProcessorPom extends CreateMavenBundleTemplat
|
||||
|
||||
// try to get the pom version of children job and load from the pom file.
|
||||
String childPomFileName = PomUtil.getPomFileName(jobInfo.getJobName(), jobInfo.getJobVersion());
|
||||
IProject codeProject = getJobProcessor().getCodeProject();
|
||||
IProject codeProject = processor.getCodeProject();
|
||||
try {
|
||||
codeProject.refreshLocal(IResource.DEPTH_ONE, null); // is it ok or needed here ???
|
||||
} catch (CoreException e) {
|
||||
@@ -208,10 +213,15 @@ public abstract class AbstractMavenProcessorPom extends CreateMavenBundleTemplat
|
||||
}
|
||||
|
||||
Dependency d = PomUtil.createDependency(groupId, artifactId, version, null);
|
||||
childrenJobDependencies.add(PomUtil.generateMvnUrl(d));
|
||||
dependencies.add(d);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (processor instanceof IMavenProcessor) {
|
||||
((IMavenProcessor) processor).setChildrenJobDependencies(childrenJobDependencies
|
||||
.toArray(new String[childrenJobDependencies.size()]));
|
||||
}
|
||||
} catch (ProcessorException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
|
||||
@@ -14,26 +14,18 @@ package org.talend.designer.maven.tools.creator;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.transform.OutputKeys;
|
||||
import javax.xml.transform.Transformer;
|
||||
import javax.xml.transform.TransformerFactory;
|
||||
import javax.xml.transform.dom.DOMSource;
|
||||
import javax.xml.transform.stream.StreamResult;
|
||||
|
||||
import org.apache.commons.lang.StringEscapeUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.maven.model.Activation;
|
||||
@@ -58,7 +50,6 @@ import org.talend.core.model.properties.ProcessItem;
|
||||
import org.talend.core.model.properties.Project;
|
||||
import org.talend.core.model.properties.Property;
|
||||
import org.talend.core.model.repository.IRepositoryViewObject;
|
||||
import org.talend.core.model.repository.SVNConstant;
|
||||
import org.talend.core.model.utils.JavaResourcesHelper;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.core.runtime.process.JobInfoProperties;
|
||||
@@ -72,6 +63,7 @@ import org.talend.designer.maven.model.TalendMavenConstants;
|
||||
import org.talend.designer.maven.template.ETalendMavenVariables;
|
||||
import org.talend.designer.maven.template.MavenTemplateManager;
|
||||
import org.talend.designer.maven.tools.MavenPomSynchronizer;
|
||||
import org.talend.designer.maven.utils.PomIdsHelper;
|
||||
import org.talend.designer.maven.utils.PomUtil;
|
||||
import org.talend.designer.runprocess.IProcessor;
|
||||
import org.talend.repository.ProjectManager;
|
||||
@@ -191,10 +183,6 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
|
||||
if (project == null) { // current project
|
||||
project = ProjectManager.getInstance().getCurrentProject().getEmfProject();
|
||||
}
|
||||
String mainProjectBranch = ProjectManager.getInstance().getMainProjectBranch(project);
|
||||
if (mainProjectBranch == null) {
|
||||
mainProjectBranch = SVNConstant.NAME_TRUNK;
|
||||
}
|
||||
|
||||
checkPomProperty(properties, "talend.job.path", ETalendMavenVariables.JobPath, jobClassPackageFolder);
|
||||
checkPomProperty(properties, "talend.job.package", ETalendMavenVariables.JobPackage, jobClassPackage);
|
||||
@@ -214,13 +202,11 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
|
||||
isOptionChecked(TalendProcessArgumentConstant.ARG_ENABLE_STATS));
|
||||
|
||||
checkPomProperty(properties, "talend.project.name", ETalendMavenVariables.ProjectName,
|
||||
jobInfoProp.getProperty(JobInfoProperties.PROJECT_NAME, project.getTechnicalLabel()));
|
||||
project.getTechnicalLabel());
|
||||
checkPomProperty(properties, "talend.project.name.lowercase", ETalendMavenVariables.ProjectName,
|
||||
jobInfoProp.getProperty(JobInfoProperties.PROJECT_NAME, project.getTechnicalLabel()).toLowerCase());
|
||||
project.getTechnicalLabel().toLowerCase());
|
||||
checkPomProperty(properties, "talend.project.id", ETalendMavenVariables.ProjectId,
|
||||
jobInfoProp.getProperty(JobInfoProperties.PROJECT_ID, String.valueOf(project.getId())));
|
||||
checkPomProperty(properties, "talend.project.branch", ETalendMavenVariables.ProjectBranch,
|
||||
jobInfoProp.getProperty(JobInfoProperties.BRANCH, mainProjectBranch));
|
||||
|
||||
checkPomProperty(properties, "talend.job.name", ETalendMavenVariables.JobName,
|
||||
jobInfoProp.getProperty(JobInfoProperties.JOB_NAME, property.getLabel()));
|
||||
@@ -447,14 +433,50 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
|
||||
protected void afterCreate(IProgressMonitor monitor) throws Exception {
|
||||
setPomForHDInsight(monitor);
|
||||
|
||||
// check for children jobs
|
||||
Set<String> childrenGroupIds = new HashSet<>();
|
||||
final Set<JobInfo> clonedChildrenJobInfors = getJobProcessor().getBuildChildrenJobs();
|
||||
// main job built, should never be in the children list, even if recursive
|
||||
clonedChildrenJobInfors.remove(LastGenerationInfo.getInstance().getLastMainJob());
|
||||
|
||||
for (JobInfo child : clonedChildrenJobInfors) {
|
||||
if (child.getFatherJobInfo() != null) {
|
||||
Property childProperty = null;
|
||||
ProcessItem childItem = child.getProcessItem();
|
||||
if (childItem != null) {
|
||||
childProperty = childItem.getProperty();
|
||||
} else {
|
||||
String jobId = child.getJobId();
|
||||
if (jobId != null) {
|
||||
IProxyRepositoryFactory proxyRepositoryFactory = CoreRuntimePlugin.getInstance()
|
||||
.getProxyRepositoryFactory();
|
||||
IRepositoryViewObject specificVersion = proxyRepositoryFactory.getSpecificVersion(jobId,
|
||||
child.getJobVersion(), true);
|
||||
if (specificVersion != null) {
|
||||
childProperty = specificVersion.getProperty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (childProperty != null) {
|
||||
final String childGroupId = PomIdsHelper.getJobGroupId(childProperty);
|
||||
if (childGroupId != null) {
|
||||
childrenGroupIds.add(childGroupId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
generateAssemblyFile(monitor, clonedChildrenJobInfors);
|
||||
|
||||
final IProcess process = getJobProcessor().getProcess();
|
||||
Map<String, Object> args = new HashMap<String, Object>();
|
||||
args.put(IPomJobExtension.KEY_PROCESS, process);
|
||||
args.put(IPomJobExtension.KEY_ASSEMBLY_FILE, getAssemblyFile());
|
||||
args.put(IPomJobExtension.KEY_CHILDREN_GROUPS, childrenGroupIds);
|
||||
|
||||
PomJobExtensionRegistry.getInstance().updatePom(monitor, getPomFile(), args);
|
||||
|
||||
generateAssemblyFile(monitor);
|
||||
|
||||
// generate routines
|
||||
MavenPomSynchronizer pomSync = new MavenPomSynchronizer(this.getJobProcessor());
|
||||
pomSync.setArgumentsMap(getArgumentsMap());
|
||||
@@ -499,7 +521,7 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
|
||||
}
|
||||
}
|
||||
|
||||
protected void generateAssemblyFile(IProgressMonitor monitor) throws Exception {
|
||||
protected void generateAssemblyFile(IProgressMonitor monitor, final Set<JobInfo> clonedChildrenJobInfors) throws Exception {
|
||||
IFile assemblyFile = this.getAssemblyFile();
|
||||
if (assemblyFile != null) {
|
||||
|
||||
@@ -539,23 +561,20 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
|
||||
|
||||
if (set) {
|
||||
// add children resources in assembly.
|
||||
addChildrenJobsInAssembly(monitor, assemblyFile);
|
||||
addChildrenJobsInAssembly(monitor, assemblyFile, clonedChildrenJobInfors);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("nls")
|
||||
protected void addChildrenJobsInAssembly(IProgressMonitor monitor, IFile assemblyFile) throws Exception {
|
||||
protected void addChildrenJobsInAssembly(IProgressMonitor monitor, IFile assemblyFile,
|
||||
final Set<JobInfo> clonedChildrenJobInfors) throws Exception {
|
||||
if (!assemblyFile.exists()) {
|
||||
return;
|
||||
}
|
||||
final File file = assemblyFile.getLocation().toFile();
|
||||
// assemblyFile
|
||||
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
|
||||
DocumentBuilder db = dbf.newDocumentBuilder();
|
||||
Document document = db.parse(file);
|
||||
Document document = PomUtil.loadAssemblyFile(monitor, assemblyFile);
|
||||
if (document == null) {
|
||||
throw new IOException("Can't parse the file: " + file);
|
||||
throw new IOException("Can't parse the file: " + assemblyFile.getLocation());
|
||||
}
|
||||
|
||||
// files
|
||||
@@ -571,10 +590,6 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
|
||||
List<String> childrenPomsIncludes = new ArrayList<String>();
|
||||
List<String> childrenFolderResourcesIncludes = new ArrayList<String>();
|
||||
|
||||
final Set<JobInfo> clonedChildrenJobInfors = getJobProcessor().getBuildChildrenJobs();
|
||||
// main job built, should never be in the children list, even if recursive
|
||||
clonedChildrenJobInfors.remove(LastGenerationInfo.getInstance().getLastMainJob());
|
||||
|
||||
for (JobInfo child : clonedChildrenJobInfors) {
|
||||
if (child.getFatherJobInfo() != null) {
|
||||
|
||||
@@ -632,18 +647,9 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
|
||||
addAssemblyFileSets(fileSetsElem, "${contexts.running.dir}", "${talend.job.name}", false,
|
||||
childrenFolderResourcesIncludes, null, null, null, null, false, "add children context files for running.");
|
||||
}
|
||||
TransformerFactory transFactory = TransformerFactory.newInstance();
|
||||
Transformer transFormer = transFactory.newTransformer();
|
||||
transFormer.setOutputProperty(OutputKeys.INDENT, "yes");
|
||||
FileOutputStream output = null;
|
||||
try {
|
||||
output = new FileOutputStream(file);
|
||||
transFormer.transform(new DOMSource(document), new StreamResult(output));
|
||||
} finally {
|
||||
if (output != null) {
|
||||
output.close();
|
||||
}
|
||||
}
|
||||
|
||||
PomUtil.saveAssemblyFile(monitor, assemblyFile, document);
|
||||
|
||||
// clean for children poms
|
||||
cleanChildrenPomSettings(monitor, childrenPomsIncludes);
|
||||
}
|
||||
@@ -655,6 +661,7 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
|
||||
IFile childPom = assemblyFile.getProject().getFile(childPomFile);
|
||||
if (childPom.exists()) {
|
||||
Model childModel = MODEL_MANAGER.readMavenModel(childPom);
|
||||
childModel.getProperties().setProperty("maven.deploy.skip", Boolean.TRUE.toString()); //$NON-NLS-1$
|
||||
List<Plugin> childPlugins = new ArrayList<Plugin>(childModel.getBuild().getPlugins());
|
||||
Iterator<Plugin> childIterator = childPlugins.iterator();
|
||||
while (childIterator.hasNext()) {
|
||||
@@ -665,6 +672,9 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
|
||||
} else if (p.getArtifactId().equals("maven-antrun-plugin")) { //$NON-NLS-1$
|
||||
// because no assembly, so no need copy the scripts and rename it.
|
||||
childIterator.remove();
|
||||
} else if (p.getArtifactId().equals("maven-deploy-plugin")) { //$NON-NLS-1$
|
||||
// no assembly so no need to do deploy for zip.
|
||||
childIterator.remove();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,7 +14,11 @@ import org.eclipse.core.runtime.IProgressMonitor;
|
||||
*/
|
||||
public interface IPomJobExtension {
|
||||
|
||||
static final String KEY_PROCESS = "PROCESS"; //$NON-NLS-1$
|
||||
String KEY_PROCESS = "PROCESS"; //$NON-NLS-1$
|
||||
|
||||
String KEY_ASSEMBLY_FILE = "ASSEMBLY_FILE"; //$NON-NLS-1$
|
||||
|
||||
String KEY_CHILDREN_GROUPS = "CHILDREN_GROUPS"; //$NON-NLS-1$
|
||||
|
||||
void updatePom(IProgressMonitor monitor, IFile pomFile, Map<String, Object> args);
|
||||
|
||||
|
||||
@@ -0,0 +1,224 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2016 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.maven.tools.creator;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.maven.model.Model;
|
||||
import org.apache.maven.model.Profile;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.m2e.core.MavenPlugin;
|
||||
import org.talend.commons.exception.ExceptionHandler;
|
||||
import org.talend.designer.maven.utils.PomUtil;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
/**
|
||||
* DOC ggu class global comment. Detailled comment
|
||||
*/
|
||||
public class UpdatePomAndAssemblyForChildrenJobs implements IPomJobExtension {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.talend.designer.maven.tools.creator.IPomJobExtension#updatePom(org.eclipse.core.runtime.IProgressMonitor,
|
||||
* org.eclipse.core.resources.IFile, java.util.Map)
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void updatePom(IProgressMonitor monitor, IFile pomFile, Map<String, Object> args) {
|
||||
if (pomFile == null || args == null || args.isEmpty() || !pomFile.exists()) {
|
||||
return;
|
||||
}
|
||||
Set<String> childrenGroupIds = new HashSet<>();
|
||||
if (args.containsKey(KEY_CHILDREN_GROUPS)) {
|
||||
childrenGroupIds = (Set<String>) args.get(KEY_CHILDREN_GROUPS);
|
||||
}
|
||||
if (childrenGroupIds == null || childrenGroupIds.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
// set group map for libs and binaries
|
||||
Map<String, String> childrenGroupsLibExcludesMap = new HashMap<>();
|
||||
Map<String, String> childrenGroupsBinariesIncludesMap = new HashMap<>();
|
||||
final String[] array = childrenGroupIds.toArray(new String[0]);
|
||||
for (int i = 0; i < array.length; i++) {
|
||||
String groupId = array[i];
|
||||
final String childSet = groupId + ":*";
|
||||
childrenGroupsLibExcludesMap.put("talend.jobs.excludes.set.child" + i, childSet);
|
||||
childrenGroupsBinariesIncludesMap.put("jobs.binaries.includes.set.child" + i, childSet);
|
||||
}
|
||||
|
||||
try {
|
||||
updatePomProfiles(monitor, pomFile, childrenGroupsLibExcludesMap, childrenGroupsBinariesIncludesMap);
|
||||
|
||||
if (args.containsKey(KEY_ASSEMBLY_FILE)) {
|
||||
IFile assemblyFile = (IFile) args.get(KEY_ASSEMBLY_FILE);
|
||||
updateAssemblyDependencySets(monitor, assemblyFile, childrenGroupsLibExcludesMap,
|
||||
childrenGroupsBinariesIncludesMap);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
|
||||
private void updatePomProfiles(IProgressMonitor monitor, IFile pomFile,
|
||||
final Map<String, String> childrenGroupsLibExcludesMap, final Map<String, String> childrenGroupsBinariesIncludesMap)
|
||||
throws Exception {
|
||||
Model pomModel = MavenPlugin.getMavenModelManager().readMavenModel(pomFile);
|
||||
boolean modified = false;
|
||||
for (Profile p : pomModel.getProfiles()) {
|
||||
if (p.getId().equals("include-libs")) {
|
||||
addProfileProperties(p, childrenGroupsLibExcludesMap);
|
||||
modified = true;
|
||||
} else if (p.getId().equals("include-binaries")) {
|
||||
addProfileProperties(p, childrenGroupsBinariesIncludesMap);
|
||||
modified = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (modified) {
|
||||
PomUtil.savePom(monitor, pomModel, pomFile);
|
||||
}
|
||||
}
|
||||
|
||||
private void addProfileProperties(Profile p, final Map<String, String> props) {
|
||||
final Properties properties = p.getProperties();
|
||||
final Iterator<Entry<String, String>> entryIt = props.entrySet().iterator();
|
||||
while (entryIt.hasNext()) {
|
||||
final Entry<String, String> entry = entryIt.next();
|
||||
properties.put(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
private void updateAssemblyDependencySets(IProgressMonitor monitor, IFile assemblyFile,
|
||||
final Map<String, String> childrenGroupsLibExcludesMap, final Map<String, String> childrenGroupsBinariesIncludesMap)
|
||||
throws Exception {
|
||||
if (assemblyFile == null || !assemblyFile.exists() || childrenGroupsLibExcludesMap.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Document document = PomUtil.loadAssemblyFile(monitor, assemblyFile);
|
||||
if (document == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Node dependencySetsElem = getElement(document.getDocumentElement(), "dependencySets", 1);
|
||||
if (dependencySetsElem == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
boolean modified = false;
|
||||
|
||||
final NodeList dependencySetNodes = dependencySetsElem.getChildNodes();
|
||||
for (int i = 0; i < dependencySetNodes.getLength(); i++) {
|
||||
Node dependencySetNode = dependencySetNodes.item(i);
|
||||
if (dependencySetNode.getNodeType() == Node.ELEMENT_NODE && dependencySetNode.getNodeName().equals("dependencySet")) {
|
||||
final Node outputDirectoryNode = getElement(dependencySetNode, "outputDirectory", 1);
|
||||
if (outputDirectoryNode == null) {
|
||||
continue;
|
||||
}
|
||||
// exclude for libs
|
||||
if ("lib".equals(outputDirectoryNode.getTextContent())) {
|
||||
final Node excludesNode = getElement(dependencySetNode, "excludes", 1);
|
||||
if (excludesNode != null) {
|
||||
boolean valid = false;
|
||||
final NodeList childNodes = excludesNode.getChildNodes();
|
||||
for (int index = 0; index < childNodes.getLength(); index++) {
|
||||
Node exclude = childNodes.item(index);
|
||||
if (exclude.getNodeType() == Node.ELEMENT_NODE && exclude.getNodeName().equals("exclude")) {
|
||||
if ("${talend.jobs.excludes.set}".equals(exclude.getTextContent())) {
|
||||
valid = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
if (valid) {
|
||||
final Iterator<Entry<String, String>> libExcludesIt = childrenGroupsLibExcludesMap.entrySet()
|
||||
.iterator();
|
||||
while (libExcludesIt.hasNext()) {
|
||||
final Entry<String, String> libExcludeEntry = libExcludesIt.next();
|
||||
final Element excludeElement = document.createElement("exclude");
|
||||
excludesNode.appendChild(excludeElement);
|
||||
excludeElement.setTextContent("${" + libExcludeEntry.getKey() + "}");
|
||||
}
|
||||
modified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// include for children jobs
|
||||
if ("${talend.job.name}".equals(outputDirectoryNode.getTextContent())) {
|
||||
final Node includesNode = getElement(dependencySetNode, "includes", 1);
|
||||
if (includesNode != null) {
|
||||
boolean valid = false;
|
||||
final NodeList childNodes = includesNode.getChildNodes();
|
||||
for (int index = 0; index < childNodes.getLength(); index++) {
|
||||
Node include = childNodes.item(index);
|
||||
if (include.getNodeType() == Node.ELEMENT_NODE && include.getNodeName().equals("include")) {
|
||||
if ("${jobs.binaries.includes.set}".equals(include.getTextContent())) {
|
||||
valid = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (valid) {
|
||||
final Iterator<Entry<String, String>> binariesIncludesIt = childrenGroupsBinariesIncludesMap
|
||||
.entrySet().iterator();
|
||||
while (binariesIncludesIt.hasNext()) {
|
||||
final Entry<String, String> binariesIncludeEntry = binariesIncludesIt.next();
|
||||
final Element includeElement = document.createElement("include");
|
||||
includesNode.appendChild(includeElement);
|
||||
includeElement.setTextContent("${" + binariesIncludeEntry.getKey() + "}");
|
||||
}
|
||||
modified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (modified) {
|
||||
PomUtil.saveAssemblyFile(monitor, assemblyFile, document);
|
||||
}
|
||||
}
|
||||
|
||||
private Node getElement(Node parent, String elemName, int level) {
|
||||
NodeList childrenNodeList = parent.getChildNodes();
|
||||
for (int i = 0; i < childrenNodeList.getLength(); i++) {
|
||||
Node child = childrenNodeList.item(i);
|
||||
if (child != null && child.getNodeType() == Node.ELEMENT_NODE) {
|
||||
if (child.getNodeName().equals(elemName)) {
|
||||
return child;
|
||||
}
|
||||
}
|
||||
if (level > 1) {
|
||||
Node element = getElement(child, elemName, --level);
|
||||
if (element != null) {
|
||||
return element;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -36,10 +36,11 @@ public class PomIdsHelper {
|
||||
*
|
||||
* always depend on current project.
|
||||
*/
|
||||
public static String getProjectGroupId(String projectTechName) {
|
||||
if (projectTechName != null && !projectTechName.trim().isEmpty()) {
|
||||
return JavaResourcesHelper.getGroupName(TalendMavenConstants.DEFAULT_MASTER + '.'
|
||||
+ projectTechName.trim().toLowerCase());
|
||||
public static String getProjectGroupId() {
|
||||
final Project currentProject = ProjectManager.getInstance().getCurrentProject();
|
||||
if (currentProject != null) {
|
||||
String technicalLabel = currentProject.getTechnicalLabel();
|
||||
return JavaResourcesHelper.getGroupName(TalendMavenConstants.DEFAULT_MASTER + '.' + technicalLabel);
|
||||
}
|
||||
return JavaResourcesHelper.getGroupName(TalendMavenConstants.DEFAULT_MASTER);
|
||||
}
|
||||
@@ -121,16 +122,9 @@ public class PomIdsHelper {
|
||||
|
||||
public static String getTestGroupId(Property property) {
|
||||
if (property != null) {
|
||||
final org.talend.core.model.properties.Project project = ProjectManager.getInstance().getProject(property);
|
||||
if (project != null) {
|
||||
if (project != null) {
|
||||
final Project currentProject = ProjectManager.getInstance().getCurrentProject();
|
||||
if (currentProject.getTechnicalLabel().equals(project.getTechnicalLabel())) {
|
||||
return getTestGroupId(project.getTechnicalLabel());
|
||||
} else { // reference project
|
||||
return getTestGroupId(currentProject.getTechnicalLabel() + '.' + project.getTechnicalLabel());
|
||||
}
|
||||
}
|
||||
Project currentProject = ProjectManager.getInstance().getCurrentProject();
|
||||
if (currentProject != null) {
|
||||
return getTestGroupId(currentProject.getTechnicalLabel());
|
||||
}
|
||||
}
|
||||
return getTestGroupId((String) null);
|
||||
@@ -147,14 +141,9 @@ public class PomIdsHelper {
|
||||
return groupId;
|
||||
}
|
||||
}
|
||||
final org.talend.core.model.properties.Project project = ProjectManager.getInstance().getProject(property);
|
||||
if (project != null) {
|
||||
final Project currentProject = ProjectManager.getInstance().getCurrentProject();
|
||||
if (currentProject.getTechnicalLabel().equals(project.getTechnicalLabel())) {
|
||||
return getJobGroupId(project.getTechnicalLabel());
|
||||
} else { // reference project
|
||||
return getJobGroupId(currentProject.getTechnicalLabel() + '.' + project.getTechnicalLabel());
|
||||
}
|
||||
Project currentProject = ProjectManager.getInstance().getCurrentProject();
|
||||
if (currentProject != null) {
|
||||
return getJobGroupId(currentProject.getTechnicalLabel());
|
||||
}
|
||||
}
|
||||
return getJobGroupId((String) null);
|
||||
|
||||
@@ -15,6 +15,7 @@ package org.talend.designer.maven.utils;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.security.SecureRandom;
|
||||
import java.util.ArrayList;
|
||||
@@ -31,7 +32,6 @@ import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import javax.xml.transform.OutputKeys;
|
||||
import javax.xml.transform.Transformer;
|
||||
import javax.xml.transform.TransformerConfigurationException;
|
||||
import javax.xml.transform.TransformerException;
|
||||
import javax.xml.transform.TransformerFactory;
|
||||
import javax.xml.transform.dom.DOMSource;
|
||||
@@ -460,6 +460,55 @@ public class PomUtil {
|
||||
return pomModel;
|
||||
}
|
||||
|
||||
public static String generatePomInFolder(File baseFolder, MavenArtifact artifact) throws Exception {
|
||||
if (baseFolder == null || artifact == null) {
|
||||
return null;
|
||||
}
|
||||
if (!baseFolder.exists()) {
|
||||
baseFolder.mkdirs();
|
||||
}
|
||||
File pomFile = new File(baseFolder, TalendMavenConstants.POM_FILE_NAME);
|
||||
|
||||
ByteArrayOutputStream buf = new ByteArrayOutputStream();
|
||||
MavenPlugin.getMaven().writeModel(createModel(artifact), buf);
|
||||
|
||||
DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
|
||||
documentBuilderFactory.setNamespaceAware(false);
|
||||
DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
|
||||
TransformerFactory tfactory = TransformerFactory.newInstance();
|
||||
|
||||
Document document = documentBuilder.parse(new ByteArrayInputStream(buf.toByteArray()));
|
||||
Element documentElement = document.getDocumentElement();
|
||||
|
||||
NamedNodeMap attributes = documentElement.getAttributes();
|
||||
|
||||
if (attributes == null || attributes.getNamedItem("xmlns") == null) { //$NON-NLS-1$
|
||||
Attr attr = document.createAttribute("xmlns"); //$NON-NLS-1$
|
||||
attr.setTextContent("http://maven.apache.org/POM/4.0.0"); //$NON-NLS-1$
|
||||
documentElement.setAttributeNode(attr);
|
||||
}
|
||||
|
||||
if (attributes == null || attributes.getNamedItem("xmlns:xsi") == null) { //$NON-NLS-1$
|
||||
Attr attr = document.createAttribute("xmlns:xsi"); //$NON-NLS-1$
|
||||
attr.setTextContent("http://www.w3.org/2001/XMLSchema-instance"); //$NON-NLS-1$
|
||||
documentElement.setAttributeNode(attr);
|
||||
}
|
||||
|
||||
if (attributes == null || attributes.getNamedItem("xsi:schemaLocation") == null) { //$NON-NLS-1$
|
||||
Attr attr = document.createAttributeNS("http://www.w3.org/2001/XMLSchema-instance", "xsi:schemaLocation"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
attr.setTextContent("http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"); //$NON-NLS-1$
|
||||
documentElement.setAttributeNode(attr);
|
||||
}
|
||||
Transformer transformer = tfactory.newTransformer();
|
||||
DOMSource source = new DOMSource(document);
|
||||
StreamResult result = new StreamResult(pomFile);
|
||||
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); //$NON-NLS-1$
|
||||
transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
|
||||
transformer.transform(source, result);
|
||||
|
||||
return pomFile.getAbsolutePath();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Create pom without refresh eclipse resources
|
||||
@@ -475,59 +524,8 @@ public class PomUtil {
|
||||
IPath tempPath = fsProject.getLocation().append("temp").append("pom" + Math.abs(random.nextLong()));
|
||||
File tmpFolder = new File(tempPath.toPortableString());
|
||||
tmpFolder.mkdirs();
|
||||
String pomFile = tempPath.append(TalendMavenConstants.POM_FILE_NAME).toPortableString();
|
||||
|
||||
ByteArrayOutputStream buf = new ByteArrayOutputStream();
|
||||
MavenPlugin.getMaven().writeModel(createModel(artifact), buf);
|
||||
|
||||
DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
|
||||
documentBuilderFactory.setNamespaceAware(false);
|
||||
DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
|
||||
TransformerFactory tfactory = TransformerFactory.newInstance();
|
||||
|
||||
Document document = documentBuilder.parse(new ByteArrayInputStream(buf.toByteArray()));
|
||||
Element documentElement = document.getDocumentElement();
|
||||
|
||||
NamedNodeMap attributes = documentElement.getAttributes();
|
||||
|
||||
if (attributes == null || attributes.getNamedItem("xmlns") == null) { //$NON-NLS-1$
|
||||
Attr attr = document.createAttribute("xmlns"); //$NON-NLS-1$
|
||||
attr.setTextContent("http://maven.apache.org/POM/4.0.0"); //$NON-NLS-1$
|
||||
documentElement.setAttributeNode(attr);
|
||||
}
|
||||
|
||||
if (attributes == null || attributes.getNamedItem("xmlns:xsi") == null) { //$NON-NLS-1$
|
||||
Attr attr = document.createAttribute("xmlns:xsi"); //$NON-NLS-1$
|
||||
attr.setTextContent("http://www.w3.org/2001/XMLSchema-instance"); //$NON-NLS-1$
|
||||
documentElement.setAttributeNode(attr);
|
||||
}
|
||||
|
||||
if (attributes == null || attributes.getNamedItem("xsi:schemaLocation") == null) { //$NON-NLS-1$
|
||||
Attr attr = document.createAttributeNS("http://www.w3.org/2001/XMLSchema-instance", "xsi:schemaLocation"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
attr.setTextContent("http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"); //$NON-NLS-1$
|
||||
documentElement.setAttributeNode(attr);
|
||||
}
|
||||
Transformer transformer = tfactory.newTransformer();
|
||||
DOMSource source = new DOMSource(document);
|
||||
StreamResult result = new StreamResult(new File(pomFile));
|
||||
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); //$NON-NLS-1$
|
||||
transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
|
||||
transformer.transform(source, result);
|
||||
|
||||
return pomFile;
|
||||
} catch (PersistenceException e) {
|
||||
ExceptionHandler.process(e);
|
||||
} catch (CoreException e) {
|
||||
ExceptionHandler.process(e);
|
||||
} catch (ParserConfigurationException e) {
|
||||
ExceptionHandler.process(e);
|
||||
} catch (SAXException e) {
|
||||
ExceptionHandler.process(e);
|
||||
} catch (IOException e) {
|
||||
ExceptionHandler.process(e);
|
||||
} catch (TransformerConfigurationException e) {
|
||||
ExceptionHandler.process(e);
|
||||
} catch (TransformerException e) {
|
||||
return generatePomInFolder(tmpFolder, artifact);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
return null;
|
||||
@@ -675,4 +673,34 @@ public class PomUtil {
|
||||
}
|
||||
return jobVersion;
|
||||
}
|
||||
|
||||
public static Document loadAssemblyFile(IProgressMonitor monitor, IFile assemblyFile) throws ParserConfigurationException,
|
||||
SAXException, IOException {
|
||||
final File file = assemblyFile.getLocation().toFile();
|
||||
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
|
||||
DocumentBuilder db = dbf.newDocumentBuilder();
|
||||
Document document = db.parse(file);
|
||||
return document;
|
||||
}
|
||||
|
||||
public static void saveAssemblyFile(IProgressMonitor monitor, IFile assemblyFile, Document document)
|
||||
throws TransformerException, IOException {
|
||||
final File file = assemblyFile.getLocation().toFile();
|
||||
TransformerFactory transFactory = TransformerFactory.newInstance();
|
||||
Transformer transFormer = transFactory.newTransformer();
|
||||
transFormer.setOutputProperty(OutputKeys.INDENT, "yes");
|
||||
FileOutputStream output = null;
|
||||
try {
|
||||
output = new FileOutputStream(file);
|
||||
transFormer.transform(new DOMSource(document), new StreamResult(output));
|
||||
} finally {
|
||||
if (output != null) {
|
||||
try {
|
||||
output.close();
|
||||
} catch (IOException e) {
|
||||
ExceptionHandler.process(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.talend.studio</groupId>
|
||||
<artifactId>tcommon-studio-se</artifactId>
|
||||
<version>6.4.1-SNAPSHOT</version>
|
||||
<version>6.4.1</version>
|
||||
<relativePath>../../../</relativePath>
|
||||
</parent>
|
||||
<artifactId>org.talend.developpement</artifactId>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user