Skip to content

Commit

Permalink
Add support for Maven buildsystem.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastic committed Nov 12, 2023
1 parent 5cd4d72 commit a4feefd
Show file tree
Hide file tree
Showing 18 changed files with 1,057 additions and 0 deletions.
77 changes: 77 additions & 0 deletions osmosis-apidb/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?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">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.openstreetmap.osmosis</groupId>
<artifactId>osmosis</artifactId>
<version>0.49.1</version>
<relativePath>..</relativePath>
</parent>

<artifactId>osmosis-apidb</artifactId>
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>org.openstreetmap.osmosis</groupId>
<artifactId>osmosis-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openstreetmap.osmosis</groupId>
<artifactId>osmosis-replication</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openstreetmap.osmosis</groupId>
<artifactId>osmosis-xml</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>${commons-dbcp.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring.version}</version>
</dependency>

<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.version}</version>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>org.openstreetmap.osmosis</groupId>
<artifactId>osmosis-testutil</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<skipTests>${osmosis-apidb.skip-tests}</skipTests>
</configuration>
</plugin>
</plugins>
</build>
</project>
49 changes: 49 additions & 0 deletions osmosis-areafilter/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?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">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.openstreetmap.osmosis</groupId>
<artifactId>osmosis</artifactId>
<version>0.49.1</version>
<relativePath>..</relativePath>
</parent>

<artifactId>osmosis-areafilter</artifactId>
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>org.openstreetmap.osmosis</groupId>
<artifactId>osmosis-core</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.openstreetmap.osmosis</groupId>
<artifactId>osmosis-testutil</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.openstreetmap.osmosis</groupId>
<artifactId>osmosis-xml</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<skipTests>${osmosis-areafilter.skip-tests}</skipTests>
</configuration>
</plugin>
</plugins>
</build>
</project>
17 changes: 17 additions & 0 deletions osmosis-core/generateJavaSources.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

SOURCE_DIR="$(dirname "$0")"
SOURCE_FILE="${SOURCE_DIR}/src/main/java/org/openstreetmap/osmosis/core/OsmosisConstants.java"
TEMPLATE_FILE="${SOURCE_FILE}.template"

if [ -z "${VERSION}" ]; then
echo "Error: VERSION not set in environment"
exit 1
fi

if [ ! -r "${TEMPLATE_FILE}" ]; then
echo "Error: Cannot read file: ${TEMPLATE_FILE}"
exit 1
fi

sed "s/no-version-specified/${VERSION}/g" "${TEMPLATE_FILE}" > "${SOURCE_FILE}"
65 changes: 65 additions & 0 deletions osmosis-core/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?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">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.openstreetmap.osmosis</groupId>
<artifactId>osmosis</artifactId>
<version>0.49.1</version>
<relativePath>..</relativePath>
</parent>

<artifactId>osmosis-core</artifactId>
<packaging>jar</packaging>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>generateJavaSources</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>sh</executable>
<arguments>
<argument>generateJavaSources.sh</argument>
</arguments>
<environmentVariables>
<VERSION>${project.version}</VERSION>
</environmentVariables>
</configuration>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<filesets>
<fileset>
<directory>src/main/java/org/openstreetmap/osmosis/core</directory>
<includes>
<include>OsmosisConstants.java</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<skipTests>${osmosis-core.skip-tests}</skipTests>
</configuration>
</plugin>
</plugins>
</build>
</project>
49 changes: 49 additions & 0 deletions osmosis-dataset/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?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">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.openstreetmap.osmosis</groupId>
<artifactId>osmosis</artifactId>
<version>0.49.1</version>
<relativePath>..</relativePath>
</parent>

<artifactId>osmosis-dataset</artifactId>
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>org.openstreetmap.osmosis</groupId>
<artifactId>osmosis-core</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.openstreetmap.osmosis</groupId>
<artifactId>osmosis-testutil</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.openstreetmap.osmosis</groupId>
<artifactId>osmosis-xml</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<skipTests>${osmosis-dataset.skip-tests}</skipTests>
</configuration>
</plugin>
</plugins>
</build>
</project>
58 changes: 58 additions & 0 deletions osmosis-extract/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?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">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.openstreetmap.osmosis</groupId>
<artifactId>osmosis</artifactId>
<version>0.49.1</version>
<relativePath>..</relativePath>
</parent>

<artifactId>osmosis-extract</artifactId>
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>org.openstreetmap.osmosis</groupId>
<artifactId>osmosis-apidb</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openstreetmap.osmosis</groupId>
<artifactId>osmosis-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openstreetmap.osmosis</groupId>
<artifactId>osmosis-replication</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openstreetmap.osmosis</groupId>
<artifactId>osmosis-xml</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.openstreetmap.osmosis</groupId>
<artifactId>osmosis-testutil</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<skipTests>${osmosis-extract.skip-tests}</skipTests>
</configuration>
</plugin>
</plugins>
</build>
</project>
36 changes: 36 additions & 0 deletions osmosis-hstore-jdbc/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?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">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.openstreetmap.osmosis</groupId>
<artifactId>osmosis</artifactId>
<version>0.49.1</version>
<relativePath>..</relativePath>
</parent>

<artifactId>osmosis-hstore-jdbc</artifactId>
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<skipTests>${osmosis-hstore-jdbc.skip-tests}</skipTests>
</configuration>
</plugin>
</plugins>
</build>
</project>

0 comments on commit a4feefd

Please sign in to comment.