Skip to content

Commit 6091a0e

Browse files
committed
initial commit to this repo #2 because wel... I found some flaws in my repo beforehand and now that i fixed them in another repo, i just copied all the files in here and made sure everything workes as is should...
1 parent 01b6dc1 commit 6091a0e

27 files changed

Lines changed: 1570 additions & 1128 deletions

Server/demo.jar

-22.1 MB
Binary file not shown.

Server/osm2map.sh

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Use case: Installs osmosis, mapsforge-mapfile-writer plugin
4+
# Author: Tom Morelly
5+
# Date: 2019.06.08
6+
#
7+
##########################################################################
8+
9+
set -e
10+
OSMOSIS_DOWNLOAD_URL="https://bretth.dev.openstreetmap.org/osmosis-build/osmosis-0.46.tgz"
11+
MAP_WRITER_DOWNLOAD_URL="https://search.maven.org/remotecontent?filepath=org/mapsforge/mapsforge-map-writer/0.9.0/mapsforge-map-writer-0.9.0-jar-with-dependencies.jar"
12+
OUTPUT_PATH="/opt"
13+
GREEN='\033[0;32m'
14+
NC='\033[0m'
15+
16+
function install_osmosis(){
17+
# download and build osmosis
18+
cd $OUTPUT_PATH
19+
wget $OSMOSIS_DOWNLOAD_URL
20+
mkdir -p osmosis
21+
mv osmosis-0.46.tgz osmosis
22+
cd osmosis
23+
tar xvfz osmosis-0.46.tgz
24+
rm osmosis-0.46.tgz
25+
chmod a+x bin/osmosis
26+
}
27+
28+
function install_mapwriter_plugin(){
29+
# download and imports mapwriter plugin
30+
cd /opt/osmosis/lib/default
31+
curl -L -O $MAP_WRITER_DOWNLOAD_URL
32+
}
33+
34+
function osmosis_usage(){
35+
echo -e "
36+
\nosmosis usage:
37+
/opt/osmosis/bin/osmosis --rx file=path-to-osm-file.osm --mw file=destination-path-map-file.map
38+
"
39+
}
40+
41+
function main(){
42+
if [[ $UID -ne 0 ]];then
43+
echo -ne "Error: needs to run with sudo.\nExiting.\n";
44+
exit 1;
45+
fi
46+
47+
echo -e "\n${GREEN}Downloading osmosis to $OUTPUT_PATH/osmosis.${NC}"
48+
install_osmosis;
49+
echo -e "\n${GREEN}Downloading mapwriter plugin $OUTPUT_PATH/osmosis.${NC}"
50+
install_mapwriter_plugin;
51+
echo -e "\n${GREEN}Download and build successful finished.${NC}"
52+
osmosis_usage
53+
exit 0;
54+
}
55+
56+
main

maps/map/berlin.map

-28.2 MB
Binary file not shown.

maps/map/testFile

Lines changed: 0 additions & 1 deletion
This file was deleted.

out/META-INF/spring.factories

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# Initializers
2+
org.springframework.context.ApplicationContextInitializer=\
3+
org.springframework.boot.autoconfigure.SharedMetadataReaderFactoryContextInitializer,\
4+
org.springframework.boot.autoconfigure.logging.AutoConfigurationReportLoggingInitializer
5+
6+
# Application Listeners
7+
org.springframework.context.ApplicationListener=\
8+
org.springframework.boot.autoconfigure.BackgroundPreinitializer
9+
10+
# Auto Configuration Import Listeners
11+
org.springframework.boot.autoconfigure.AutoConfigurationImportListener=\
12+
org.springframework.boot.autoconfigure.condition.ConditionEvaluationReportAutoConfigurationImportListener
13+
14+
# Auto Configuration Import Filters
15+
org.springframework.boot.autoconfigure.AutoConfigurationImportFilter=\
16+
org.springframework.boot.autoconfigure.condition.OnClassCondition
17+
18+
# Auto Configure
19+
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
20+
org.springframework.boot.autoconfigure.admin.SpringApplicationAdminJmxAutoConfiguration,\
21+
org.springframework.boot.autoconfigure.aop.AopAutoConfiguration,\
22+
org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration,\
23+
org.springframework.boot.autoconfigure.batch.BatchAutoConfiguration,\
24+
org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration,\
25+
org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration,\
26+
org.springframework.boot.autoconfigure.cloud.CloudAutoConfiguration,\
27+
org.springframework.boot.autoconfigure.context.ConfigurationPropertiesAutoConfiguration,\
28+
org.springframework.boot.autoconfigure.context.MessageSourceAutoConfiguration,\
29+
org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration,\
30+
org.springframework.boot.autoconfigure.couchbase.CouchbaseAutoConfiguration,\
31+
org.springframework.boot.autoconfigure.dao.PersistenceExceptionTranslationAutoConfiguration,\
32+
org.springframework.boot.autoconfigure.data.cassandra.CassandraDataAutoConfiguration,\
33+
org.springframework.boot.autoconfigure.data.cassandra.CassandraRepositoriesAutoConfiguration,\
34+
org.springframework.boot.autoconfigure.data.couchbase.CouchbaseDataAutoConfiguration,\
35+
org.springframework.boot.autoconfigure.data.couchbase.CouchbaseRepositoriesAutoConfiguration,\
36+
org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchAutoConfiguration,\
37+
org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchDataAutoConfiguration,\
38+
org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchRepositoriesAutoConfiguration,\
39+
org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration,\
40+
org.springframework.boot.autoconfigure.data.ldap.LdapDataAutoConfiguration,\
41+
org.springframework.boot.autoconfigure.data.ldap.LdapRepositoriesAutoConfiguration,\
42+
org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration,\
43+
org.springframework.boot.autoconfigure.data.mongo.MongoRepositoriesAutoConfiguration,\
44+
org.springframework.boot.autoconfigure.data.neo4j.Neo4jDataAutoConfiguration,\
45+
org.springframework.boot.autoconfigure.data.neo4j.Neo4jRepositoriesAutoConfiguration,\
46+
org.springframework.boot.autoconfigure.data.solr.SolrRepositoriesAutoConfiguration,\
47+
org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration,\
48+
org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration,\
49+
org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration,\
50+
org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration,\
51+
org.springframework.boot.autoconfigure.elasticsearch.jest.JestAutoConfiguration,\
52+
org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration,\
53+
org.springframework.boot.autoconfigure.gson.GsonAutoConfiguration,\
54+
org.springframework.boot.autoconfigure.h2.H2ConsoleAutoConfiguration,\
55+
org.springframework.boot.autoconfigure.hateoas.HypermediaAutoConfiguration,\
56+
org.springframework.boot.autoconfigure.hazelcast.HazelcastAutoConfiguration,\
57+
org.springframework.boot.autoconfigure.hazelcast.HazelcastJpaDependencyAutoConfiguration,\
58+
org.springframework.boot.autoconfigure.info.ProjectInfoAutoConfiguration,\
59+
org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration,\
60+
org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration,\
61+
org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,\
62+
org.springframework.boot.autoconfigure.jdbc.JdbcTemplateAutoConfiguration,\
63+
org.springframework.boot.autoconfigure.jdbc.JndiDataSourceAutoConfiguration,\
64+
org.springframework.boot.autoconfigure.jdbc.XADataSourceAutoConfiguration,\
65+
org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration,\
66+
org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration,\
67+
org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration,\
68+
org.springframework.boot.autoconfigure.jms.JndiConnectionFactoryAutoConfiguration,\
69+
org.springframework.boot.autoconfigure.jms.activemq.ActiveMQAutoConfiguration,\
70+
org.springframework.boot.autoconfigure.jms.artemis.ArtemisAutoConfiguration,\
71+
org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration,\
72+
org.springframework.boot.autoconfigure.groovy.template.GroovyTemplateAutoConfiguration,\
73+
org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration,\
74+
org.springframework.boot.autoconfigure.jooq.JooqAutoConfiguration,\
75+
org.springframework.boot.autoconfigure.kafka.KafkaAutoConfiguration,\
76+
org.springframework.boot.autoconfigure.ldap.embedded.EmbeddedLdapAutoConfiguration,\
77+
org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration,\
78+
org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration,\
79+
org.springframework.boot.autoconfigure.mail.MailSenderAutoConfiguration,\
80+
org.springframework.boot.autoconfigure.mail.MailSenderValidatorAutoConfiguration,\
81+
org.springframework.boot.autoconfigure.mobile.DeviceResolverAutoConfiguration,\
82+
org.springframework.boot.autoconfigure.mobile.DeviceDelegatingViewResolverAutoConfiguration,\
83+
org.springframework.boot.autoconfigure.mobile.SitePreferenceAutoConfiguration,\
84+
org.springframework.boot.autoconfigure.mongo.embedded.EmbeddedMongoAutoConfiguration,\
85+
org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration,\
86+
org.springframework.boot.autoconfigure.mustache.MustacheAutoConfiguration,\
87+
org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration,\
88+
org.springframework.boot.autoconfigure.reactor.ReactorAutoConfiguration,\
89+
org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration,\
90+
org.springframework.boot.autoconfigure.security.SecurityFilterAutoConfiguration,\
91+
org.springframework.boot.autoconfigure.security.FallbackWebSecurityAutoConfiguration,\
92+
org.springframework.boot.autoconfigure.security.oauth2.OAuth2AutoConfiguration,\
93+
org.springframework.boot.autoconfigure.sendgrid.SendGridAutoConfiguration,\
94+
org.springframework.boot.autoconfigure.session.SessionAutoConfiguration,\
95+
org.springframework.boot.autoconfigure.social.SocialWebAutoConfiguration,\
96+
org.springframework.boot.autoconfigure.social.FacebookAutoConfiguration,\
97+
org.springframework.boot.autoconfigure.social.LinkedInAutoConfiguration,\
98+
org.springframework.boot.autoconfigure.social.TwitterAutoConfiguration,\
99+
org.springframework.boot.autoconfigure.solr.SolrAutoConfiguration,\
100+
org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration,\
101+
org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration,\
102+
org.springframework.boot.autoconfigure.transaction.jta.JtaAutoConfiguration,\
103+
org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration,\
104+
org.springframework.boot.autoconfigure.web.DispatcherServletAutoConfiguration,\
105+
org.springframework.boot.autoconfigure.web.EmbeddedServletContainerAutoConfiguration,\
106+
org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration,\
107+
org.springframework.boot.autoconfigure.web.HttpEncodingAutoConfiguration,\
108+
org.springframework.boot.autoconfigure.web.HttpMessageConvertersAutoConfiguration,\
109+
org.springframework.boot.autoconfigure.web.MultipartAutoConfiguration,\
110+
org.springframework.boot.autoconfigure.web.ServerPropertiesAutoConfiguration,\
111+
org.springframework.boot.autoconfigure.web.WebClientAutoConfiguration,\
112+
org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration,\
113+
org.springframework.boot.autoconfigure.websocket.WebSocketAutoConfiguration,\
114+
org.springframework.boot.autoconfigure.websocket.WebSocketMessagingAutoConfiguration,\
115+
org.springframework.boot.autoconfigure.webservices.WebServicesAutoConfiguration
116+
117+
# Failure analyzers
118+
org.springframework.boot.diagnostics.FailureAnalyzer=\
119+
org.springframework.boot.autoconfigure.diagnostics.analyzer.NoSuchBeanDefinitionFailureAnalyzer,\
120+
org.springframework.boot.autoconfigure.jdbc.DataSourceBeanCreationFailureAnalyzer,\
121+
org.springframework.boot.autoconfigure.jdbc.HikariDriverConfigurationFailureAnalyzer
122+
123+
# Template availability providers
124+
org.springframework.boot.autoconfigure.template.TemplateAvailabilityProvider=\
125+
org.springframework.boot.autoconfigure.freemarker.FreeMarkerTemplateAvailabilityProvider,\
126+
org.springframework.boot.autoconfigure.mustache.MustacheTemplateAvailabilityProvider,\
127+
org.springframework.boot.autoconfigure.groovy.template.GroovyTemplateAvailabilityProvider,\
128+
org.springframework.boot.autoconfigure.thymeleaf.ThymeleafTemplateAvailabilityProvider,\
129+
org.springframework.boot.autoconfigure.web.JspTemplateAvailabilityProvider

pom.xml

Lines changed: 51 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,67 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4-
<modelVersion>4.0.0</modelVersion>
5-
<parent>
6-
<groupId>org.springframework.boot</groupId>
7-
<artifactId>spring-boot-starter-parent</artifactId>
8-
<version>2.2.6.RELEASE</version>
9-
<relativePath/> <!-- lookup parent from repository -->
10-
</parent>
11-
<groupId>DemoProject</groupId>
12-
<artifactId>demo</artifactId>
13-
<version>0.0.1-SNAPSHOT</version>
14-
<name>demo</name>
15-
<description>Demo project for Spring Boot</description>
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
6+
<groupId>org.springframework.boot</groupId>
7+
<artifactId>spring-boot-starter-parent</artifactId>
8+
<version>2.3.0.RELEASE</version>
9+
<relativePath/> <!-- lookup parent from repository -->
10+
</parent>
11+
<groupId>ohdm</groupId>
12+
<artifactId>mapDownloadService</artifactId>
13+
<version>0.5-SNAPSHOT</version>
14+
<name>mapDownloadService</name>
15+
<description>mapDownloadService for Android App</description>
1616

17-
<properties>
18-
<java.version>11</java.version>
19-
</properties>
17+
<properties>
18+
<java.version>11</java.version>
19+
</properties>
2020

21-
<dependencies>
22-
<dependency>
23-
<groupId>org.springframework.boot</groupId>
24-
<artifactId>spring-boot-starter-data-rest</artifactId>
25-
</dependency>
21+
<dependencies>
22+
<dependency>
23+
<groupId>org.springframework.boot</groupId>
24+
<artifactId>spring-boot-starter</artifactId>
25+
</dependency>
2626

27+
<dependency>
28+
<groupId>org.springframework.boot</groupId>
29+
<artifactId>spring-boot-starter-test</artifactId>
30+
<scope>test</scope>
31+
<exclusions>
32+
<exclusion>
33+
<groupId>org.junit.vintage</groupId>
34+
<artifactId>junit-vintage-engine</artifactId>
35+
</exclusion>
36+
</exclusions>
37+
</dependency>
2738
<dependency>
2839
<groupId>org.springframework.boot</groupId>
2940
<artifactId>spring-boot-starter-web</artifactId>
3041
</dependency>
3142

32-
<dependency>
33-
<groupId>org.springframework.boot</groupId>
34-
<artifactId>spring-boot-starter-web-services</artifactId>
35-
</dependency>
43+
<!-- added manually -->
3644

37-
<dependency>
38-
<groupId>org.apache.ftpserver</groupId>
39-
<artifactId>ftpserver-core</artifactId>
40-
<version>1.1.1</version>
41-
</dependency>
45+
<dependency>
46+
<groupId>commons-net</groupId>
47+
<artifactId>commons-net</artifactId>
48+
<version>3.6</version>
49+
</dependency>
4250

43-
<dependency>
44-
<groupId>org.springframework.boot</groupId>
45-
<artifactId>spring-boot-starter-test</artifactId>
46-
<scope>test</scope>
47-
<exclusions>
48-
<exclusion>
49-
<groupId>org.junit.vintage</groupId>
50-
<artifactId>junit-vintage-engine</artifactId>
51-
</exclusion>
52-
</exclusions>
53-
</dependency>
54-
55-
<dependency>
56-
<groupId>DemoProject</groupId>
57-
<artifactId>demo</artifactId>
58-
<version>0.0.1-SNAPSHOT</version>
59-
</dependency>
60-
61-
<dependency>
62-
<groupId>commons-net</groupId>
63-
<artifactId>commons-net</artifactId>
64-
<version>3.6</version>
65-
</dependency>
51+
<dependency>
52+
<groupId>org.apache.ftpserver</groupId>
53+
<artifactId>ftpserver-core</artifactId>
54+
<version>1.1.1</version>
55+
</dependency>
6656
</dependencies>
6757

68-
<build>
69-
<plugins>
70-
<plugin>
71-
<groupId>org.springframework.boot</groupId>
72-
<artifactId>spring-boot-maven-plugin</artifactId>
73-
</plugin>
74-
</plugins>
75-
</build>
58+
<build>
59+
<plugins>
60+
<plugin>
61+
<groupId>org.springframework.boot</groupId>
62+
<artifactId>spring-boot-maven-plugin</artifactId>
63+
</plugin>
64+
</plugins>
65+
</build>
7666

7767
</project>

src/java/Playground.java

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
package Server.CustomObjects;
2-
3-
public class CommandReturn {
4-
public int returnCode;
5-
public String output;
6-
public String errOutput;
7-
8-
private Process originalProcess;
9-
10-
public CommandReturn(int returnCode, String output, String errOutput, Process originalProcess) {
11-
this.returnCode = returnCode;
12-
this.output = output;
13-
this.errOutput = errOutput;
14-
this.originalProcess = originalProcess;
15-
}
16-
17-
public Process getOriginalProcess() {
18-
return originalProcess;
19-
}
20-
}
1+
package Server.CustomObjects;
2+
3+
public class CommandReturn {
4+
public int returnCode;
5+
public String output;
6+
public String errOutput;
7+
8+
private Process originalProcess;
9+
10+
public CommandReturn(int returnCode, String output, String errOutput, Process originalProcess) {
11+
this.returnCode = returnCode;
12+
this.output = output;
13+
this.errOutput = errOutput;
14+
this.originalProcess = originalProcess;
15+
}
16+
17+
public Process getOriginalProcess() {
18+
return originalProcess;
19+
}
20+
}

0 commit comments

Comments
 (0)