Skip to content
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
41 changes: 41 additions & 0 deletions .circleci/config.yml.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Java Maven CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-java/ for more details
#
version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: circleci/openjdk:8-jdk

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/postgres:9.4

working_directory: ~/repo

environment:
# Customize the JVM maximum heap limit
MAVEN_OPTS: -Xmx3200m

steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "pom.xml" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run: mvn dependency:go-offline

- save_cache:
paths:
- ~/.m2
key: v1-dependencies-{{ checksum "pom.xml" }}

# run tests!
- run: mvn integration-test
57 changes: 39 additions & 18 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,39 @@
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>edu.isaacVazquez.advancedjava</groupId>
<artifactId>isaacVazquez-app</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>isaacVazquez-app</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>uml.edu.isaacVazquez</groupId>
<artifactId>java_class</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<name>1</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin><groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<compilerArgument>-Xlint</compilerArgument>
<encoding>${project.build.sourceEncoding}</encoding>
<source>1.9</source>
<target>1.9</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
13 changes: 0 additions & 13 deletions src/main/java/edu/isaacVazquez/advancedjava/App.java

This file was deleted.

25 changes: 25 additions & 0 deletions src/main/java/edu/isaacVazquez/advancedjava/Subscription.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.company;

public class Subscription {
private int price ; // subscription total price in euro
private int length ; // length of subscription in months
// constructor :
public Subscription(int price, int length) {
this.price = price ;
this.length = length ;
}
/**
* Calculate the monthly subscription price in euro,
* rounded up to the nearest cent.
*/
public double pricePerMonth() {
return (double) price / (double) length;
}
/**
* Call this to cancel/nulify this subscription.
*/
public void cancel() { length = 0 ; }
public static void main(String[] args) {

}
}
1 change: 1 addition & 0 deletions src/main/java/edu/isaacVazquez/advancedjava/WK2
Submodule WK2 added at 3de562

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading