Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Maven buildsystem. #137

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.2</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.2</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}"
17 changes: 17 additions & 0 deletions osmosis-core/generateResources.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/resources/org/openstreetmap/osmosis/core/plugin/plugin.xml"
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}"
95 changes: 95 additions & 0 deletions osmosis-core/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?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.2</version>
<relativePath>..</relativePath>
</parent>

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

<dependencies>
<dependency>
<groupId>net.sf.jpf</groupId>
<artifactId>jpf</artifactId>
<version>${jpf.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${exec-maven-plugin.version}</version>
<executions>
<execution>
<id>generateJavaSources</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>sh</executable>
<arguments>
<argument>generateJavaSources.sh</argument>
</arguments>
<environmentVariables>
<VERSION>${project.version}</VERSION>
</environmentVariables>
</configuration>
</execution>
<execution>
<id>generateResources</id>
<phase>generate-resources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>sh</executable>
<arguments>
<argument>generateResources.sh</argument>
</arguments>
<environmentVariables>
<VERSION>${project.version}</VERSION>
</environmentVariables>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>${maven-clean-plugin.version}</version>
<configuration>
<filesets>
<fileset>
<directory>src/main/java/org/openstreetmap/osmosis/core</directory>
<includes>
<include>OsmosisConstants.java</include>
</includes>
</fileset>
<fileset>
<directory>src/main/resources/org/openstreetmap/osmosis/core/plugin</directory>
<includes>
<include>plugin.xml</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.2</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.2</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>
Loading
Loading