Skip to content

Commit

Permalink
Merge pull request #26 from bsinno/bugfix/flatten-plugin-for-java-cli…
Browse files Browse the repository at this point in the history
…ent-release

added flatten-maven-plugin and configured it to flatten the pom
  • Loading branch information
thjaeckle authored Nov 5, 2019
2 parents 16ed13e + 726af51 commit a9e7602
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.checkstyle
.classpath
.idea
.flattened-pom.xml
*.iml
.project
.settings
Expand Down
14 changes: 9 additions & 5 deletions java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,28 @@ AuthenticationProvider authenticationProvider =
or JWT authentication:

```java
// optionally define a proxy server to use
ProxyConfiguration proxyConfig = ProxyConfiguration.newBuilder()
.proxyHost("localhost")
.proxyPort(3128)
.build();

AuthenticationProvider authenticationProvider =
AuthenticationProviders.clientCredentials(ClientCredentialsAuthenticationConfiguration.newBuilder()
.clientId("my-oauth-client-id")
.clientSecret("my-oauth-client-secret")
.scopes("offline_access email")
.tokenEndpoint("https://my-oauth-provider/oauth/token")
.proxyConfiguration(proxyConfig) // optionally configure a proxy server
.build());
```

```java
MessagingProvider messagingProvider = MessagingProviders.webSocket(WebSocketMessagingConfiguration.newBuilder()
.endpoint("wss://ditto.eclipse.org")
.jsonSchemaVersion(JsonSchemaVersion.V_1)
// optionally configure a proxy server or a truststore containing the trusted CAs for SSL connection establishment
.proxyConfiguration(ProxyConfiguration.newBuilder()
.proxyHost("localhost")
.proxyPort(3128)
.build())
.proxyConfiguration(proxyConfig) // optionally configure a proxy server
// optionally configure a truststore containing the trusted CAs for SSL connection establishment
.trustStoreConfiguration(TrustStoreConfiguration.newBuilder()
.location(TRUSTSTORE_LOCATION)
.password(TRUSTSTORE_PASSWORD)
Expand Down
32 changes: 32 additions & 0 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,12 @@
<version>3.0.2</version>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.0.1</version>
</plugin>

<!-- Declaration for the 3 following plugins is explicitly needed by Maven 3 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -461,6 +467,32 @@
</pluginManagement>

<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<configuration>
<flattenMode>ossrh</flattenMode>
<updatePomFile>true</updatePomFile>
</configuration>
<executions>
<!-- enable flattening -->
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
<!-- ensure proper cleanup -->
<execution>
<id>flatten.clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down

0 comments on commit a9e7602

Please sign in to comment.