Codebase list osmosis / f887cc9
Add patch to not require shadow library, not available in buster. Bas Couwenberg 3 years ago
3 changed file(s) with 227 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
22 * New upstream release.
33 * Add libcommons-{csv,io}-java to (build) dependencies.
44 * Refresh patches.
5 * Add patch to not require shadow library, not available in buster.
56
67 -- Bas Couwenberg <sebastic@debian.org> Tue, 05 May 2020 18:52:01 +0200
78
0 Description: Don't require shadow.
1 Reverts https://github.com/openstreetmap/osmosis/commit/2bee9fc04310bfdcc0ccf1c5a3123bec1ad78c10
2 Author: Bas Couwenberg <sebastic@debian.org>
3 Forwarded: not-needed
4
5 --- a/build.gradle
6 +++ b/build.gradle
7 @@ -1,12 +1,3 @@
8 -buildscript {
9 - repositories {
10 - jcenter()
11 - }
12 - dependencies {
13 - classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.1'
14 - }
15 -}
16 -
17 apply plugin: 'idea'
18
19 /* Build collections containing each type of project. These collections will
20 @@ -44,7 +35,6 @@ configure(javaProjects) {
21 apply plugin: 'jdepend'
22 apply plugin: 'maven'
23 apply plugin: 'signing'
24 - apply plugin: 'com.github.johnrengelman.shadow'
25
26 sourceCompatibility = 1.8
27
28 @@ -87,15 +77,6 @@ configure(javaProjects) {
29 archives sourcesJar
30 }
31
32 - shadowJar {
33 - baseName = project.name
34 - mergeServiceFiles()
35 - transform(com.github.jengelman.gradle.plugins.shadow.transformers.AppendingTransformer) {
36 - resource = 'reference.conf'
37 - }
38 - zip64 = true
39 - }
40 -
41 // Sign all published artifacts if signing is enabled.
42 signing {
43 sign configurations.archives
44 --- a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/TaskRegistrar.java
45 +++ b/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/TaskRegistrar.java
46 @@ -88,20 +88,6 @@ public class TaskRegistrar {
47 loadJPFPlugins();
48 }
49
50 - /**
51 - * Loads a plugin manually.
52 - *
53 - * @param pluginLoader The pluginLoader that you wish to load.
54 - */
55 - public void loadPlugin(final PluginLoader pluginLoader) {
56 - final Map<String, TaskManagerFactory> pluginTasks = pluginLoader.loadTaskFactories();
57 - // register the plugin tasks
58 - pluginTasks.entrySet().forEach(task -> {
59 - if (!this.factoryRegister.containsTaskType(task.getKey())) {
60 - this.factoryRegister.register(task.getKey(), task.getValue());
61 - }
62 - });
63 - }
64
65 private void loadBuiltInPlugins() {
66 final String pluginResourceName = "osmosis-plugins.conf";
67 --- a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/pipeline/common/TaskManagerFactoryRegister.java
68 +++ b/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/pipeline/common/TaskManagerFactoryRegister.java
69 @@ -47,15 +47,6 @@ public class TaskManagerFactoryRegister
70 factoryMap.put(taskType, factory);
71 }
72
73 - /**
74 - * Basic check to see if the factory map contains a task type of not.
75 - *
76 - * @param taskType The taskType to check for.
77 - * @return True if already contains the taskType.
78 - */
79 - public boolean containsTaskType(final String taskType) {
80 - return this.factoryMap.containsKey(taskType);
81 - }
82
83 /**
84 * Get a task manager factory from the register.
85 --- a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/runner/OsmosisRunner.java
86 +++ /dev/null
87 @@ -1,63 +0,0 @@
88 -// This software is released into the Public Domain. See copying.txt for details.
89 -package org.openstreetmap.osmosis.core.runner;
90 -
91 -import java.util.ArrayList;
92 -import java.util.List;
93 -import java.util.logging.Logger;
94 -
95 -import org.openstreetmap.osmosis.core.Osmosis;
96 -import org.openstreetmap.osmosis.core.OsmosisConstants;
97 -import org.openstreetmap.osmosis.core.TaskRegistrar;
98 -import org.openstreetmap.osmosis.core.pipeline.common.Pipeline;
99 -import org.openstreetmap.osmosis.core.pipeline.common.TaskConfiguration;
100 -
101 -/**
102 - * Class to run a specific type of Osmosis within Java.
103 - *
104 - * @author mcuthbert
105 - */
106 -public class OsmosisRunner implements Runnable {
107 - private static final Logger LOG = Logger.getLogger(Osmosis.class.getName());
108 - private final OsmosisTask inTask;
109 - private final OsmosisTask outTask;
110 -
111 - /**
112 - * Standard Constructor.
113 - * Todo: This can easily be extended to take a list of tasks and add them all to the pipeline
114 - *
115 - * @param inTask The in Task
116 - * @param outTask The out Task
117 - */
118 - public OsmosisRunner(final OsmosisTask inTask, final OsmosisTask outTask) {
119 - this.inTask = inTask;
120 - this.outTask = outTask;
121 - }
122 -
123 - @Override
124 - public void run() {
125 - final long startTime = System.currentTimeMillis();
126 - LOG.info("Osmosis Version " + OsmosisConstants.VERSION);
127 - final TaskRegistrar taskRegistrar = new TaskRegistrar();
128 - taskRegistrar.loadPlugin(this.inTask.getLoader());
129 - taskRegistrar.loadPlugin(this.outTask.getLoader());
130 - final Pipeline pipeline = new Pipeline(taskRegistrar.getFactoryRegister());
131 -
132 - LOG.info("Preparing pipeline.");
133 - final List<TaskConfiguration> taskConfigurations = new ArrayList<>();
134 - taskConfigurations.add(this.inTask.getTaskConfiguration(1));
135 - taskConfigurations.add(this.outTask.getTaskConfiguration(2));
136 -
137 - pipeline.prepare(taskConfigurations);
138 -
139 - LOG.info("Launching pipeline execution.");
140 - pipeline.execute();
141 -
142 - LOG.info("Pipeline executing, waiting for completion.");
143 - pipeline.waitForCompletion();
144 -
145 - LOG.info("Pipeline complete.");
146 -
147 - LOG.info("Total execution time: " + (System.currentTimeMillis() - startTime)
148 - + " milliseconds.");
149 - }
150 -}
151 --- a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/runner/OsmosisTask.java
152 +++ /dev/null
153 @@ -1,71 +0,0 @@
154 -// This software is released into the Public Domain. See copying.txt for details.
155 -package org.openstreetmap.osmosis.core.runner;
156 -
157 -import java.util.Collections;
158 -import java.util.Map;
159 -
160 -import org.openstreetmap.osmosis.core.pipeline.common.TaskConfiguration;
161 -import org.openstreetmap.osmosis.core.plugin.PluginLoader;
162 -
163 -/**
164 - * A task for Osmosis to execute.
165 - *
166 - * @author mcuthbert
167 - */
168 -public class OsmosisTask {
169 - private final PluginLoader loader;
170 - private final String name;
171 - private final Map<String, String> arguments;
172 -
173 - /**
174 - * Standard Constructor.
175 - *
176 - * @param loader The plugin loader containing the task
177 - * @param name The name of the task
178 - * @param arguments arguments supplied for the task
179 - */
180 - public OsmosisTask(final PluginLoader loader, final String name,
181 - final Map<String, String> arguments) {
182 - this.loader = loader;
183 - this.name = name;
184 - this.arguments = arguments;
185 - }
186 -
187 - /**
188 - * Getter for the loader for the task.
189 - *
190 - * @return {@link PluginLoader}
191 - */
192 - public PluginLoader getLoader() {
193 - return loader;
194 - }
195 -
196 - /**
197 - * Getter for the name, or taskType.
198 - *
199 - * @return The name of the TaskType
200 - */
201 - public String getName() {
202 - return name;
203 - }
204 -
205 - /**
206 - * Getter for the map of arguments for the task.
207 - *
208 - * @return Map containing key for argument with the matching value
209 - */
210 - public Map<String, String> getArguments() {
211 - return arguments;
212 - }
213 -
214 - /**
215 - * Builds a {@link TaskConfiguration} based on the task.
216 - *
217 - * @param taskId A unique id for the task
218 - * @return {@link TaskConfiguration}
219 - */
220 - public TaskConfiguration getTaskConfiguration(final int taskId) {
221 - return new TaskConfiguration(taskId + "-" + this.name, this.name, Collections.emptyMap(),
222 - this.arguments, null);
223 - }
224 -}
22 04-osmosis-version.patch
33 disable-netty3.patch
44 mariadb.patch
5 no-shadow.patch