Skip to content

Commit fa5286d

Browse files
committed
Update to 7.3.1
2 parents 4cc4731 + 407e984 commit fa5286d

File tree

4 files changed

+28
-14
lines changed

4 files changed

+28
-14
lines changed

META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: BuildJob Plug-in
44
Bundle-SymbolicName: au.org.emii.talend.codegen;singleton:=true
5-
Bundle-Version: 7.1.1
5+
Bundle-Version: 7.3.1
66
Bundle-Activator: au.org.emii.talend.codegen.Activator
77
Require-Bundle: org.eclipse.platform,
88
org.eclipse.core.runtime,

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
talend-codegen
22
==============
33

4-
Command line code generation (job export) plugin for talend open studio 7.1.1
4+
Command line code generation (job export) plugin for Talend open studio 7.3.1
55

66
Building/Installation
77
---------------------
88

99
* mvn clean package
1010
* Copy generated .jar in target directory to plugins directory of Talend
11+
* Open the file config.info in the folder configuration/ of your Talend Studio 7.3.1
12+
* At the end of the very long line for osgi.bundles= add ,au.org.emii.talend.codegen (so something like osgi.bundles=blalbblabla,au.org.emii.talend.codegen )
1113

1214
Usage
1315
-----
@@ -45,8 +47,7 @@ This example is taken from our Jenkins build process - $WORKSPACE is the locatio
4547

4648
TOS_DI-linux-gtk-x86_64 -nosplash --launcher.suppressErrors -data $WORKSPACE/../.talend-workspace --clean_component_cache -application au.org.emii.talend.codegen.Generator -jobName ThreddsExample -projectDir $WORKSPACE -targetDir $WORKSPACE/.talend-build -componentDir /par2/git-repos/talend_components
4749

48-
4950
Credits
5051
-------
5152

52-
This project was originally developed for the [Australian Ocean Data Network](https://portal.aodn.org.au/).
53+
This project was originally developed for the [Australian Ocean Data Network](https://portal.aodn.org.au/). The project came with docker support, which you can still find in the [original branch](../original).

pom.xml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>au.org.emii.talend</groupId>
66
<artifactId>au.org.emii.talend.codegen</artifactId>
7-
<version>7.1.1</version>
7+
<version>7.3.1</version>
88
<packaging>eclipse-plugin</packaging>
99

1010
<properties>
@@ -17,9 +17,19 @@
1717
<repositories>
1818
<repository>
1919
<id>talend_eclipse_repository</id>
20+
<url>https://artifacts-oss.talend.com/nexus/content/unzip/TalendP2UnzipOpenSourceRelease/org/talend/studio/talend-tos-p2-repo/7.3.1/talend-tos-p2-repo-7.3.1.zip-unzip/</url>
21+
<layout>p2</layout>
22+
</repository>
23+
<repository>
24+
<id>talend_eclipse_rep_one_one</id>
2025
<url>https://artifacts-oss.talend.com/nexus/content/unzip/TalendP2UnzipOpenSourceRelease/org/talend/studio/talend-tos-p2-repo/7.1.1/talend-tos-p2-repo-7.1.1.zip-unzip/</url>
2126
<layout>p2</layout>
2227
</repository>
28+
<repository>
29+
<id>eclipse</id>
30+
<url>https://download.eclipse.org/releases/photon/</url>
31+
<layout>p2</layout>
32+
</repository>
2333
</repositories>
2434

2535
<build>

src/au/org/emii/talend/codegen/Generator.java

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ public Object start(IApplicationContext context) throws Exception {
6767
// user components directory
6868
String componentDir = Params.getStringOption("-componentDir", "");
6969

70+
// Context Name
71+
String contextName = Params.getStringOption("-contextName", "Default");
72+
7073
// job build options
7174

7275
Map<ExportChoice, Object> exportChoiceMap = getExportOptions();
@@ -95,7 +98,7 @@ public Object start(IApplicationContext context) throws Exception {
9598

9699
// Initialise connection to the local repository (the workspace)
97100
repository = connectToRepository();
98-
101+
99102
// Import project into workspace
100103
project = ProjectUtils.importProject(projectDir);
101104

@@ -140,7 +143,7 @@ public Object start(IApplicationContext context) throws Exception {
140143
}
141144

142145
// Export the job
143-
exportJob(project, jobName, targetDir, version, exportChoiceMap);
146+
exportJob(project, jobName, targetDir, version, contextName, exportChoiceMap);
144147

145148
// Log off the project
146149
log.info("Logging off " + project.getLabel() + "...");
@@ -156,7 +159,7 @@ public void stop() {
156159
}
157160

158161
// Build export file
159-
private void exportJob(Project project, String jobName, String targetDir, String version,
162+
private void exportJob(Project project, String jobName, String targetDir, String version, String contextName,
160163
Map<ExportChoice, Object> exportChoiceMap) throws Exception {
161164

162165
log.info("Building " + jobName + "...");
@@ -166,7 +169,7 @@ private void exportJob(Project project, String jobName, String targetDir, String
166169

167170
String destinationPath = targetDir + "/" + job.getProperty().getLabel() + "_" + version + ".zip";
168171

169-
BuildJobManager.getInstance().buildJob(destinationPath, job, version, "Default", exportChoiceMap, JobExportType.POJO, true, new NullProgressMonitor());
172+
BuildJobManager.getInstance().buildJob(destinationPath, job, version, contextName, exportChoiceMap, JobExportType.POJO, true, new NullProgressMonitor());
170173
}
171174

172175
// Find specified version of job
@@ -199,7 +202,7 @@ private ProxyRepositoryFactory connectToRepository()
199202

200203
Context ctx = CorePlugin.getContext();
201204
ctx.putProperty(Context.REPOSITORY_CONTEXT_KEY, repositoryContext);
202-
205+
203206
return repositoryFactory;
204207
}
205208

@@ -219,15 +222,15 @@ private Map<ExportChoice, Object> getExportOptions() {
219222
exportChoiceMap.put(ExportChoice.includeTestSource, Params.getBooleanOption("-includeTestSource", Boolean.FALSE));
220223
exportChoiceMap.put(ExportChoice.executeTests, Params.getBooleanOption("-executeTests", Boolean.FALSE));
221224
exportChoiceMap.put(ExportChoice.binaries, Params.getBooleanOption("-binaries", Boolean.TRUE));
222-
exportChoiceMap.put(ExportChoice.needContext, Params.getBooleanOption("-needContext", Boolean.FALSE));
223-
exportChoiceMap.put(ExportChoice.contextName, Params.getStringOption("-contextName", null));
225+
exportChoiceMap.put(ExportChoice.needContext, Params.getBooleanOption("-needContext", Boolean.TRUE));
226+
exportChoiceMap.put(ExportChoice.contextName, Params.getStringOption("-contextName", "Default"));
224227
exportChoiceMap.put(ExportChoice.applyToChildren, Params.getBooleanOption("-applyToChildren", Boolean.FALSE));
225228
exportChoiceMap.put(ExportChoice.needLog4jLevel, Params.getBooleanOption("-needLog4jLevel", Boolean.FALSE));
226229
exportChoiceMap.put(ExportChoice.log4jLevel, Params.getStringOption("-log4jLevel", null));
227230
exportChoiceMap.put(ExportChoice.addStatistics, Params.getBooleanOption("-addStatistics", Boolean.TRUE));
228231
exportChoiceMap.put(ExportChoice.needDependencies, Params.getBooleanOption("-needDependencies", Boolean.TRUE));
229232
exportChoiceMap.put(ExportChoice.needParameterValues, Params.getBooleanOption("-needParameterValues", Boolean.FALSE));
230-
233+
231234
return exportChoiceMap;
232235
}
233236

@@ -237,5 +240,5 @@ private User createUser() {
237240
user.setLogin("[email protected]"); //$NON-NLS-1$
238241
return user;
239242
}
240-
243+
241244
}

0 commit comments

Comments
 (0)