Skip to content

Commit

Permalink
Updated theme
Browse files Browse the repository at this point in the history
  • Loading branch information
Aklakan committed Feb 14, 2024
1 parent e3d6717 commit 716d4a2
Show file tree
Hide file tree
Showing 21 changed files with 1,857 additions and 4 deletions.
3 changes: 2 additions & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
title: "Maven-Based Data Management"
remote_theme: pmarsceill/just-the-docs
#remote_theme: pmarsceill/just-the-docs
theme: just-the-docs
search_enabled: true
logo: "assets/images/sansa-logo-blue.png"
markdown: kramdown
Expand Down
50 changes: 50 additions & 0 deletions docs/archive-code.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
## Archiving Resources (Scripts and Non-Java Code)

Maven can be used bundle any folder up as a JAR archive by declaring that folder as a resource.

For example, assume your project has the following structure:

```
|- README.md
|- src
| |- requirements.txt
| |- run.sh
| |- LICENSE.txt
|
|- LICENSE.txt # symlink to /src/LICENSE.txt
```

The following `pom.xml` can be used to package the content of the `src` folder up as a versioned JAR file:

```xml
<?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>
<groupId>org.aksw.myproject.mydataset.code</groupId>
<artifactId>data-generation-script</artifactId>
<version>0.0.2</version>

<!-- Inherit settings from this parent -->
<parent>
<groupId>org.aksw.data.config</groupId>
<artifactId>aksw-data-deployment</artifactId>
<version>0.0.8</version>
<relativePath></relativePath>
</parent>

<!-- JAR files are ZIP files, so we are actually just creating a ZIP file here -->
<packaging>jar</packaging>

<!-- Include the src folder as a resource. Its contents will be added to the root of the JAR bundle. -->
<build>
<resources>
<resource>
<directory>src</directory>
</resource>
</resources>
</build>
</project>
```

6 changes: 3 additions & 3 deletions docs/build-anything-with-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ In order to package data generation as a self-contained maven build, the two maj

### Example

The setup at [examples/disasters-rdfizer](examples/disasters-rdfizer) contains the 2 folders
The setup at [examples/disasters-rdfizer](https://github.com/AKSW/aksw-data-deployment/tree/develop/examples/disasters-rdfizer) contains the 2 folders:

1. `code`
2. `generator`
1. `code`: This folder contains the actual data generation script and a `pom.xml` file in order to package and version it.
2. `generator`: This is a `pom.xml` file that builds and runs a docker container from the `code`.

#### Code

Expand Down
4 changes: 4 additions & 0 deletions examples/archive-downloads-generated/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

### Files
* `climatetrace.sources.v2.list`: The list of source URLs

Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>

<parent><groupId>org.aksw.data.config</groupId><artifactId>aksw-data-deployment</artifactId><version>0.0.3</version><relativePath></relativePath></parent>

<groupId>org.coypu.data.climatetrace</groupId>
<artifactId>climatetrace-agriculture</artifactId>
<version>0.2.0</version>
<packaging>pom</packaging>
<name>Climate TRACE - Agriculture</name>
<description>Climate TRACE archive for the sector "Agriculture".</description>
<url>https://climatetrace.org</url>

<licenses>

<license>
<name>Creative Commons Attribution 4.0</name>
<url>https://creativecommons.org/licenses/by/4.0/</url>
</license>

</licenses>

<properties>
<!-- Machine readable original download link (may eventually break) -->
<input.url>https://downloads.climatetrace.org/v02/sector_packages/agriculture.zip</input.url>
<output.filename>agriculture.zip</output.filename>
<output.filetype>zip</output.filetype>
</properties>

<build>
<plugins>
<!-- Read settings from a json file -->
<!--
<plugin>
<groupId>com.github.iarellano</groupId>
<artifactId>iad-json-properties-maven-plugin</artifactId>
<executions>
<execution>
<id>parse-json-files</id>
<phase>initialize</phase>
<goals>
<goal>load-json-properties</goal>
</goals>
<configuration>
<skip>false</skip>
<files>
<file>
<prefix>module.</prefix>
<failIfFileNotFound>true</failIfFileNotFound>
<filePath>module.json</filePath>
</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
-->
<!-- Read settings from a properties file -->
<!--
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>this.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
-->

<!-- Downloading from url to file -->
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<executions>
<execution>
<id>download-dataset</id>
<phase>process-resources</phase>
<goals>
<goal>wget</goal>
</goals>
</execution>
</executions>
<configuration>
<url>${input.url}</url>
<unpack>false</unpack>
<outputDirectory>${project.build.directory}</outputDirectory>
<outputFileName>${output.filename}</outputFileName>
<skipCache>true</skipCache>
</configuration>
</plugin>

<!-- Deployment of file -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${project.build.directory}/${output.filename}</file>
<type>${output.filetype}</type>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>

<parent><groupId>org.aksw.data.config</groupId><artifactId>aksw-data-deployment</artifactId><version>0.0.3</version><relativePath></relativePath></parent>

<groupId>org.coypu.data.climatetrace</groupId>
<artifactId>climatetrace-buildings</artifactId>
<version>0.2.0</version>
<packaging>pom</packaging>
<name>Climate TRACE - Buildings</name>
<description>Climate TRACE archive for the sector "Buildings".</description>
<url>https://climatetrace.org</url>

<licenses>

<license>
<name>Creative Commons Attribution 4.0</name>
<url>https://creativecommons.org/licenses/by/4.0/</url>
</license>

</licenses>

<properties>
<!-- Machine readable original download link (may eventually break) -->
<input.url>https://downloads.climatetrace.org/v02/sector_packages/buildings.zip</input.url>
<output.filename>buildings.zip</output.filename>
<output.filetype>zip</output.filetype>
</properties>

<build>
<plugins>
<!-- Read settings from a json file -->
<!--
<plugin>
<groupId>com.github.iarellano</groupId>
<artifactId>iad-json-properties-maven-plugin</artifactId>
<executions>
<execution>
<id>parse-json-files</id>
<phase>initialize</phase>
<goals>
<goal>load-json-properties</goal>
</goals>
<configuration>
<skip>false</skip>
<files>
<file>
<prefix>module.</prefix>
<failIfFileNotFound>true</failIfFileNotFound>
<filePath>module.json</filePath>
</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
-->
<!-- Read settings from a properties file -->
<!--
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>this.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
-->

<!-- Downloading from url to file -->
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<executions>
<execution>
<id>download-dataset</id>
<phase>process-resources</phase>
<goals>
<goal>wget</goal>
</goals>
</execution>
</executions>
<configuration>
<url>${input.url}</url>
<unpack>false</unpack>
<outputDirectory>${project.build.directory}</outputDirectory>
<outputFileName>${output.filename}</outputFileName>
<skipCache>true</skipCache>
</configuration>
</plugin>

<!-- Deployment of file -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${project.build.directory}/${output.filename}</file>
<type>${output.filetype}</type>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading

0 comments on commit 716d4a2

Please sign in to comment.