Skip to content

Commit

Permalink
Merge pull request #19 from Nexapp/refactoring/remove-a-dependency
Browse files Browse the repository at this point in the history
Refactoring/remove a dependency
  • Loading branch information
ALWAL12 authored Jul 23, 2019
2 parents ce145c9 + ba1302b commit 21a6b8d
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 122 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Then, you simply add the dependency as follows:
<dependency>
<groupId>ca.nexapp</groupId>
<artifactId>core</artifactId>
<version>0.1.0</version>
<version>0.1.1</version>
</dependency>
```

Expand Down
230 changes: 112 additions & 118 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,136 +1,130 @@
<?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>
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>ca.nexapp</groupId>
<artifactId>core</artifactId>
<version>0.1.0</version>
<packaging>jar</packaging>
<groupId>ca.nexapp</groupId>
<artifactId>core</artifactId>
<version>0.1.1</version>
<packaging>jar</packaging>

<name>Nexapp Core</name>
<name>Nexapp Core</name>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<github.global.server>github</github.global.server>
</properties>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<github.global.server>github</github.global.server>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>

<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.1</version>
<configuration>
<altDeploymentRepository>internal.repo::default::file://${project.build.directory}/mvn-repo</altDeploymentRepository>
</configuration>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.1</version>
<configuration>
<altDeploymentRepository>internal.repo::default::file://${project.build.directory}/mvn-repo</altDeploymentRepository>
</configuration>
</plugin>

<plugin>
<groupId>com.github.github</groupId>
<artifactId>site-maven-plugin</artifactId>
<version>0.12</version>
<configuration>
<message>Maven artifacts for ${project.version}</message>
<noJekyll>true</noJekyll>
<outputDirectory>${project.build.directory}/mvn-repo</outputDirectory>
<branch>refs/heads/mvn-repo</branch>
<includes>
<include>**/*</include>
</includes>
<merge>true</merge>
<repositoryName>NexappCore</repositoryName>
<repositoryOwner>Nexapp</repositoryOwner>
</configuration>
<executions>
<!-- run site-maven-plugin's 'site' target as part of the build's normal 'deploy' phase -->
<execution>
<goals>
<goal>site</goal>
</goals>
<phase>deploy</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
<plugin>
<groupId>com.github.github</groupId>
<artifactId>site-maven-plugin</artifactId>
<version>0.12</version>
<configuration>
<message>Maven artifacts for ${project.version}</message>
<noJekyll>true</noJekyll>
<outputDirectory>${project.build.directory}/mvn-repo</outputDirectory>
<branch>refs/heads/mvn-repo</branch>
<includes>
<include>**/*</include>
</includes>
<merge>true</merge>
<repositoryName>NexappCore</repositoryName>
<repositoryOwner>Nexapp</repositoryOwner>
</configuration>
<executions>
<!-- run site-maven-plugin's 'site' target as part of the build's normal 'deploy' phase -->
<execution>
<goals>
<goal>site</goal>
</goals>
<phase>deploy</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>

<distributionManagement>
<repository>
<id>internal.repo</id>
<name>Temporary Staging Repository</name>
<url>file://${project.build.directory}/mvn-repo</url>
</repository>
</distributionManagement>
<distributionManagement>
<repository>
<id>internal.repo</id>
<name>Temporary Staging Repository</name>
<url>file://${project.build.directory}/mvn-repo</url>
</repository>
</distributionManagement>

<repositories>
<repository>
<id>nexapp-math-mvn-repo</id>
<url>https://raw.github.com/nexapp/nexappmath/mvn-repo/</url>
</repository>
</repositories>
<repositories>
<repository>
<id>nexapp-math-mvn-repo</id>
<url>https://raw.github.com/nexapp/nexappmath/mvn-repo/</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.pholser</groupId>
<artifactId>junit-quickcheck-core</artifactId>
<version>0.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.pholser</groupId>
<artifactId>junit-quickcheck-core</artifactId>
<version>0.7</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.10.19</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.10.19</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
<version>0.39</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
<version>0.39</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>ca.nexapp</groupId>
<artifactId>math</artifactId>
<version>0.0.7</version>
</dependency>
<dependency>
<groupId>ca.nexapp</groupId>
<artifactId>math</artifactId>
<version>0.0.7</version>
</dependency>

<dependency>
<groupId>com.google.maps</groupId>
<artifactId>google-maps-services</artifactId>
<version>0.2.7</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
<version>1.7.25</version>
</dependency>
<dependency>
<groupId>com.google.maps</groupId>
<artifactId>google-maps-services</artifactId>
<version>0.2.7</version>
</dependency>

<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.11</version>
</dependency>
</dependencies>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.11</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void canFindAPublicPlace() {

@Test
public void canFindAPostalCode() {
String stGeorgesPostalCode = "G5Y";
String stGeorgesPostalCode = "G5Y 0A8";

Optional<Coordinates> location = geocoder.lookup(stGeorgesPostalCode);

Expand All @@ -39,7 +39,7 @@ public void canFindAPostalCode() {

@Test
public void cannotFindAnInvalidAddress() {
String unexistingAddress = "as-qw-bc-zob-120200";
String unexistingAddress = "blpasdadqwdqkdjnak";

Optional<Coordinates> location = geocoder.lookup(unexistingAddress);

Expand All @@ -56,5 +56,4 @@ private void assertThatLocationIsNearOf(Optional<Coordinates> location, double e
assertThat(latitude).isWithin(threshold).of(expectedLatitude);
assertThat(longitude).isWithin(threshold).of(expectedLongitude);
}

}

0 comments on commit 21a6b8d

Please sign in to comment.