Skip to content

Commit

Permalink
revert version/id they cant be properties, add readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodolfo-picoreti committed Feb 22, 2019
1 parent c1a57ca commit 2cc4aec
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 23 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

### Project Structure

- customer-service-api: Java package defining only the interfaces and the models of the service.
This package can be consumed by clients in order to use this service (see CustomerClient for an example).
- customer-service-impl: Java package containing the service implementation.

### Maven

Build (and test project)
```bash
./mvnw clean install
# or
./mvnw clean install -DskipTests
```

Run spring application for development
```bash
./mvnw -pl customer-service-impl spring-boot:run
```

Build image and add it to your docker daemon
```bash
./mvnw -pl customer-service-impl compile jib:dockerBuild
```


10 changes: 5 additions & 5 deletions customer-service-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@

<parent>
<groupId>br.com.wine</groupId>
<artifactId>${service.name}</artifactId>
<version>${service.version}</version>
<artifactId>customer-service</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>

<groupId>br.com.wine.service</groupId>
<artifactId>${service.name}-api</artifactId>
<artifactId>customer-service-api</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>${service.name}-api</name>
<description>${service.name} API definitions</description>
<name>customer-service-api</name>
<description>customer-service API definitions</description>

<dependencies>
<dependency>
Expand Down
20 changes: 10 additions & 10 deletions customer-service-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@

<parent>
<groupId>br.com.wine</groupId>
<artifactId>${service.name}</artifactId>
<version>${service.version}</version>
<artifactId>customer-service</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>

<groupId>br.com.wine.service</groupId>
<artifactId>${service.name}-impl</artifactId>
<version>${service.version}</version>
<name>${service.name}-impl</name>
<description>${service.name} service implementation</description>
<artifactId>customer-service-impl</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>customer-service-impl</name>
<description>customer-service service implementation</description>

<dependencies>
<dependency>
<groupId>br.com.wine.service</groupId>
<artifactId>${service.name}-api</artifactId>
<version>${service.version}</version>
<artifactId>customer-service-api</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -77,10 +77,10 @@
<version>1.0.0</version>
<configuration>
<from>
<image>gcr.io/distroless/java:${java.version</image>
<image>gcr.io/distroless/java:${java.version}</image>
</from>
<to>
<image>winecombr/${service.name}:${service.version}</image>
<image>winecombr/customer-service:${project.version}</image>
</to>
</configuration>
</plugin>
Expand Down
14 changes: 6 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,21 @@
</parent>

<properties>
<service.name>customer-service</service.name>
<service.version>0.0.1-SNAPSHOT</service.version>
<java.version>11</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<spring-cloud.version>Greenwich.RELEASE</spring-cloud.version>
</properties>

<groupId>br.com.wine</groupId>
<artifactId>${service.name}</artifactId>
<version>${service.version}</version>
<name>${service.name}</name>
<description>${service.name} project</description>
<artifactId>customer-service</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>customer-service</name>
<description>customer-service project</description>
<packaging>pom</packaging>

<modules>
<module>${service.name}-api</module>
<module>${service.name}-impl</module>
<module>customer-service-api</module>
<module>customer-service-impl</module>
</modules>
</project>

0 comments on commit 2cc4aec

Please sign in to comment.