Skip to content

Commit

Permalink
Merge pull request #2 from Sematre/feature_maven
Browse files Browse the repository at this point in the history
Feature: Maven implementation
  • Loading branch information
Sematre authored Mar 17, 2019
2 parents e8722ef + 903fbf4 commit ebb7e2b
Show file tree
Hide file tree
Showing 5 changed files with 483 additions and 277 deletions.
16 changes: 12 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Created by https://www.gitignore.io/api/java,eclipse
# Edit at https://www.gitignore.io/?templates=java,eclipse

# Created with https://www.gitignore.io
### Eclipse ###

.metadata
Expand Down Expand Up @@ -96,4 +94,14 @@ local.properties
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# End of https://www.gitignore.io/api/java,eclipse
### Maven ###
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
language: java
jdk:
- openjdk7
- openjdk8
- openjdk11
- oraclejdk8
- oraclejdk11
31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# DSBmobile-API
[![Release Version][release-image]][release-url]
[![Maven Version][maven-image]][maven-url]
[![Build Status][travis-image]][travis-url]
[![License][license-image]][license-url]
> Unofficial DSBmobile API for Java.
Expand All @@ -16,7 +18,7 @@ try {
ArrayList<TimeTable> timeTables = dsbMobile.getTimeTables();
for (TimeTable timeTable : timeTables) {

Boolean isHtml = timeTable.IsHtml();
Boolean isHtml = timeTable.isHtml();

String date = timeTable.getDate();
String groupName = timeTable.getGroupName();
Expand Down Expand Up @@ -52,15 +54,34 @@ try {
```
Note: The try-catch block is not necessary.

## Implementation
Gradle:
```gradle
dependencies {
implementation 'de.sematre.dsbmobile:DSBmobile-API:1.2'
}
```

Maven:
```xml
<dependency>
<groupId>de.sematre.dsbmobile</groupId>
<artifactId>DSBmobile-API</artifactId>
<version>1.2</version>
</dependency>
```

## Release History
* 1.2
* Maven implementation
* 1.1
* Code cleanup
* Readme update
* 1.0
* Initial version

## Dependencies
- [Google Gson](https://github.com/google/gson) ([Apache 2 license](https://github.com/google/gson/blob/master/LICENSE)).
- [Google Gson](https://github.com/google/gson) ([Apache 2 license](https://github.com/google/gson/blob/master/LICENSE))

## Info
© Sematre 2018
Expand All @@ -70,5 +91,11 @@ Distributed under the **MIT License**. See ``LICENSE`` for more information.
[release-image]: https://img.shields.io/github/release/Sematre/DSBmobile-API.svg?style=flat-square
[release-url]: https://github.com/Sematre/DSBmobile-API/releases

[maven-image]: https://img.shields.io/maven-central/v/de.sematre.dsbmobile/DSBmobile-API.svg?style=flat-square
[maven-url]: https://search.maven.org/artifact/de.sematre.dsbmobile/DSBmobile-API/

[travis-image]: https://img.shields.io/travis/com/Sematre/DSBmobile-API.svg?style=flat-square
[travis-url]: https://travis-ci.com/Sematre/DSBmobile-API

[license-image]: https://img.shields.io/github/license/Sematre/DSBmobile-API.svg?style=flat-square
[license-url]: https://github.com/Sematre/DSBmobile-API/blob/master/LICENSE
149 changes: 149 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
<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>de.sematre.dsbmobile</groupId>
<artifactId>DSBmobile-API</artifactId>
<version>1.2</version>

<name>DSBmobile-API</name>
<description>Unofficial DSBmobile API for Java.</description>
<url>https://github.com/Sematre/DSBmobile-API</url>

<licenses>
<license>
<name>MIT License</name>
<url>https://opensource.org/licenses/MIT</url>
</license>
</licenses>

<scm>
<connection>scm:git:git://github.com/sematre/dsbmobile-api.git</connection>
<developerConnection>scm:git:ssh://github.com:sematre/dsbmobile-api.git</developerConnection>
<url>https://github.com/sematre/dsbmobile-api</url>
<tag>HEAD</tag>
</scm>

<issueManagement>
<system>GitHub</system>
<url>https://github.com/Sematre/DSBmobile-API/issues</url>
</issueManagement>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<keyname>${gpg.keyname}</keyname>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<dependencies>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.5</version>
</dependency>
</dependencies>

<developers>
<developer>
<name>Sematre</name>
<email>Sematre@gmx.de</email>
<organization>Sematre</organization>
<organizationUrl>https://sematre.de</organizationUrl>
</developer>
</developers>

<organization>
<name>Sematre</name>
<url>https://sematre.de</url>
</organization>
</project>
Loading

0 comments on commit ebb7e2b

Please sign in to comment.