Skip to content
Merged
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
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
commons
=======
java-commons
============

This is a collection of Java components that have proven useful across
different code repositories, initially in the Telenor Digital (née
Comoyo) Communications group
Comoyo) Communications group.

The list of components currently reads as follows:

* [amazonaws-utils](amazonaws-utils) AWS utilities not covered in the offical SDK
* [logging-context](logging-context) Structured application state/context for logging
* [logging-context-gelf](logging-context-gelf) Context-aware GELF log handler
* [logging-context-json](logging-context-json) Context-aware JSON/logstash log formatter
* [logging-utilities](logging-utilities) Helpers for logging. Sensible default exception handler which logs to jul
* [pb-json](pb-json) Hassle-free conversion from Protobuf to JSON and back
* [protoc-bundled-plugin](protoc-bundled-plugin) Batteries included Protobuf compiler plugin for Maven
* [emjar](emjar) Class loader and supporting cast for using jar-in-jar embedded archives as part of classpath
Expand Down
62 changes: 0 additions & 62 deletions amazonaws-utils/pom.xml

This file was deleted.

This file was deleted.

24 changes: 12 additions & 12 deletions emjar-demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ some of the other fat jar alternatives in a Maven flow (which is not
to say that they all represent best practices).

Refer to the [pom](pom.xml) and [source
code](src/main/java/com/comoyo/commons/emjar/demo/Demo.java) for some
code](src/main/java/no/hassle/emjar/demo/Demo.java) for some
comments about the peculiarites of the different alternatives.

Run `mvn clean verify -Dmaven.profile
Expand Down Expand Up @@ -121,8 +121,8 @@ by the different tools under different circumstances:
java.security.NoSuchProviderException: JCE cannot authenticate the provider BC
at javax.crypto.JceSecurity.getInstance(JceSecurity.java:100)
at javax.crypto.KeyAgreement.getInstance(KeyAgreement.java:230)
at com.comoyo.commons.emjar.demo.Demo.main(Demo.java:36)
Caused by: java.util.jar.JarException: file:/home/argggh/telenor/src/commons/emjar-demo/target/emjar-demo-1.4-SNAPSHOT-shaded.jar has unsigned entries - jetty-logging.properties
at no.hassle.emjar.demo.Demo.main(Demo.java:36)
Caused by: java.util.jar.JarException: file:/home/argggh/src/java-commons/emjar-demo/target/emjar-demo-2.0-SNAPSHOT-shaded.jar has unsigned entries - jetty-logging.properties
at javax.crypto.JarVerifier.verifySingleJar(JarVerifier.java:500)
at javax.crypto.JarVerifier.verifyJars(JarVerifier.java:361)
at javax.crypto.JarVerifier.verify(JarVerifier.java:289)
Expand All @@ -146,8 +146,8 @@ Caused by: java.util.jar.JarException: file:/home/argggh/telenor/src/commons/emj
java.security.NoSuchProviderException: JCE cannot authenticate the provider BC
at javax.crypto.JceSecurity.getInstance(JceSecurity.java:100)
at javax.crypto.KeyAgreement.getInstance(KeyAgreement.java:230)
at com.comoyo.commons.emjar.demo.Demo.main(Demo.java:36)
Caused by: java.util.jar.JarException: file:/home/argggh/telenor/src/commons/emjar-demo/target/emjar-demo-1.4-SNAPSHOT-shaded.jar has unsigned entries - jetty-logging.properties
at no.hassle.emjar.demo.Demo.main(Demo.java:36)
Caused by: java.util.jar.JarException: file:/home/argggh/src/java-commons/emjar-demo/target/emjar-demo-2.0-SNAPSHOT-shaded.jar has unsigned entries - jetty-logging.properties
at javax.crypto.JarVerifier.verifySingleJar(JarVerifier.java:500)
at javax.crypto.JarVerifier.verifyJars(JarVerifier.java:361)
at javax.crypto.JarVerifier.verify(JarVerifier.java:289)
Expand Down Expand Up @@ -200,7 +200,7 @@ javax.ws.rs.NotFoundException: HTTP 404 Not Found
at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:697)
at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:420)
at org.glassfish.jersey.client.JerseyInvocation$Builder.get(JerseyInvocation.java:316)
at com.comoyo.commons.emjar.demo.Demo.main(Demo.java:51)
at no.hassle.emjar.demo.Demo.main(Demo.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Expand Down Expand Up @@ -235,7 +235,7 @@ Exception in thread "main" java.lang.reflect.InvocationTargetException
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
Caused by: org.glassfish.jersey.server.internal.scanning.ResourceFinderException: java.io.FileNotFoundException: /home/argggh/telenor/src/commons/emjar-demo/target/emjar-demo-1.4-SNAPSHOT-springboot.jar!/BOOT-INF/classes (No such file or directory)
Caused by: org.glassfish.jersey.server.internal.scanning.ResourceFinderException: java.io.FileNotFoundException: /home/argggh/src/java-commons/emjar-demo/target/emjar-demo-2.0-SNAPSHOT-springboot.jar!/BOOT-INF/classes (No such file or directory)
at org.glassfish.jersey.server.internal.scanning.JarZipSchemeResourceFinderFactory.create(JarZipSchemeResourceFinderFactory.java:89)
at org.glassfish.jersey.server.internal.scanning.JarZipSchemeResourceFinderFactory.create(JarZipSchemeResourceFinderFactory.java:65)
at org.glassfish.jersey.server.internal.scanning.PackageNamesScanner.addResourceFinder(PackageNamesScanner.java:282)
Expand All @@ -244,9 +244,9 @@ Caused by: org.glassfish.jersey.server.internal.scanning.ResourceFinderException
at org.glassfish.jersey.server.internal.scanning.PackageNamesScanner.<init>(PackageNamesScanner.java:110)
at org.glassfish.jersey.server.ResourceConfig.packages(ResourceConfig.java:680)
at org.glassfish.jersey.server.ResourceConfig.packages(ResourceConfig.java:660)
at com.comoyo.commons.emjar.demo.Demo.main(Demo.java:27)
at no.hassle.emjar.demo.Demo.main(Demo.java:27)
... 8 more
Caused by: java.io.FileNotFoundException: /home/argggh/telenor/src/commons/emjar-demo/target/emjar-demo-1.4-SNAPSHOT-springboot.jar!/BOOT-INF/classes (No such file or directory)
Caused by: java.io.FileNotFoundException: /home/argggh/src/java-commons/emjar-demo/target/emjar-demo-2.0-SNAPSHOT-springboot.jar!/BOOT-INF/classes (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
Expand Down Expand Up @@ -292,7 +292,7 @@ javax.ws.rs.NotFoundException: HTTP 404 Not Found
at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:697)
at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:420)
at org.glassfish.jersey.client.JerseyInvocation$Builder.get(JerseyInvocation.java:316)
at com.comoyo.commons.emjar.demo.Demo.main(Demo.java:51)
at no.hassle.emjar.demo.Demo.main(Demo.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Expand All @@ -303,7 +303,7 @@ javax.ws.rs.NotFoundException: HTTP 404 Not Found
[INFO]
[INFO] --- exec-maven-plugin:1.4.0:exec (fencepost) @ emjar-demo ---

com.comoyo.commons:emjar-demo:1.4-SNAPSHOT
no.hassle.commons:emjar-demo:2.0-SNAPSHOT

clean 89ms
org.apache.maven.plugins:maven-clean-plugin:2.5 (default-clean) 85ms
Expand Down Expand Up @@ -339,7 +339,7 @@ com.comoyo.commons:emjar-demo:1.4-SNAPSHOT
package 7s 48ms
org.apache.maven.plugins:maven-source-plugin:2.4 (attach-sources) 168ms
org.apache.maven.plugins:maven-javadoc-plugin:2.10.3 (attach-javadocs) 1s 897ms
com.comoyo.commons:emjar-maven-plugin:1.4-SNAPSHOT (package-emjar) 407ms
no.hassle.commons:emjar-maven-plugin:2.0-SNAPSHOT (package-emjar) 407ms
org.apache.maven.plugins:maven-shade-plugin:2.4.3 (package-shade) 1s 851ms
org.apache.maven.plugins:maven-assembly-plugin:2.4 (package-onejar) 1s 827ms
org.apache.maven.plugins:maven-assembly-plugin:2.4 (package-jarinjar) 599ms
Expand Down
18 changes: 11 additions & 7 deletions emjar-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@

<parent>
<artifactId>commons</artifactId>
<groupId>com.comoyo</groupId>
<version>1.4-SNAPSHOT</version>
<groupId>no.hassle</groupId>
<version>2.0-SNAPSHOT</version>
</parent>

<name>emjar-demo</name>
<groupId>com.comoyo.commons</groupId>
<groupId>no.hassle.commons</groupId>
<artifactId>emjar-demo</artifactId>

<url>https://github.com/comoyo/commons/tree/master/emjar-demo</url>
<url>https://github.com/no-hassle/java-commons/tree/master/emjar-demo</url>
<packaging>jar</packaging>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<main.class>com.comoyo.commons.emjar.demo.Demo</main.class>
<main.class>no.hassle.emjar.demo.Demo</main.class>
<jetty.version>9.3.15.v20161220</jetty.version>
<jersey.version>2.25</jersey.version>
<jackson.version>2.8.6</jackson.version>
Expand Down Expand Up @@ -110,7 +110,7 @@
</manifest>
<manifestEntries>
<Implementation-Title>${project.name}</Implementation-Title>
<Implementation-Vendor>com.telenordigital</Implementation-Vendor>
<Implementation-Vendor>no.hassle</Implementation-Vendor>
<Implementation-Version>${project.artifactId}-${project.version}</Implementation-Version>
</manifestEntries>
</archive>
Expand Down Expand Up @@ -216,7 +216,7 @@
<build>
<plugins>
<plugin>
<groupId>com.comoyo.commons</groupId>
<groupId>no.hassle.maven.plugins</groupId>
<artifactId>emjar-maven-plugin</artifactId>
<version>${project.version}</version>
<executions>
Expand Down Expand Up @@ -642,6 +642,10 @@
<argument>-jar</argument>
<argument>emjar-demo-${project.version}-jarinjar.jar</argument>
</arguments>
<successCodes>
<successCode>0</successCode>
<successCode>1</successCode>
</successCodes>
</configuration>
</execution>
</executions>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.comoyo.commons.emjar.demo;
package no.hassle.emjar.demo;

import com.comoyo.commons.emjar.demo.rs.Endpoint;
import no.hassle.emjar.demo.rs.Endpoint;
import java.net.URI;
import java.security.NoSuchProviderException;
import java.security.Security;
Expand All @@ -23,7 +23,7 @@ public static void main(final String[] args) throws Exception {
final ResourceConfig app = new ResourceConfig();
if (System.getProperty("emjar.demo.classpath-scanning") != null) {
log.info("Running test (classpath scanning)");
app.packages("com.comoyo.commons.emjar.demo.rs");
app.packages("no.hassle.emjar.demo.rs");
} else {
log.info("Running test (explicit registration)");
app.register(Endpoint.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.comoyo.commons.emjar.demo.rs;
package no.hassle.emjar.demo.rs;

import java.util.HashMap;
import java.util.Map;
Expand Down
8 changes: 4 additions & 4 deletions emjar-maven-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ Maven Plugin Mojo for building bundling jars that contain dependency artifact ja
<plugins>
...
<plugin>
<groupId>com.comoyo.commons</groupId>
<groupId>no.hassle.maven.plugins</groupId>
<artifactId>emjar-maven-plugin</artifactId>
<version>1.4.60</version>
<version>2.0.0</version>
<executions>
<execution>
<goals>
Expand All @@ -69,9 +69,9 @@ Maven Plugin Mojo for building bundling jars that contain dependency artifact ja
<plugins>
...
<plugin>
<groupId>com.comoyo.commons</groupId>
<groupId>no.hassle.maven.plugins</groupId>
<artifactId>emjar-maven-plugin</artifactId>
<version>1.4.60</version>
<version>2.0.0</version>
<executions>
<execution>
<goals>
Expand Down
Loading