Monday, October 15, 2018

backing up the Nexus configuration

Using the built-in procedure is risky - to say the least. I was unable to make it work (the restore part, I mean).

You can do this (see ):

java -jar /opt/sonatype/nexus/lib/support/nexus-orient-console.jar

CONNECT create database plocal:/home/centos/nexus310/sonatype-work/nexus3/db/component admin admin

#to export, use this:
export database component-export

#to import, use this:
drop database
create database plocal:/home/centos/nexus310/sonatype-work/nexus3/db/component
import database component-export.json.gz

I also do this:

gunzip component-export.json.gz
python -m json.tool component-export.json > component-exportPRETTY.json

and the JSON file is quite readable, probably you can even stick it into a Git repo and relax.

From an operational point of view, Nexus 3 is simply a joke.

Installing JIRA
Linux 64 bit

cd Downloads
sudo ./atlassian-jira-software-7.12.3-x64.bin
Unpacking JRE ...
Starting Installer ...

This will install JIRA Software 7.12.3 on your computer.
OK [o, Enter], Cancel [c]

Choose the appropriate installation or upgrade option.
Please choose one of the following:
Express Install (use default settings) [1], Custom Install (recommended for advanced users) [2, Enter], Upgrade an existing JIRA installation [3]
Details on where JIRA Software will be installed and the settings that will be used.
Installation Directory: /opt/atlassian/jira 
Home Directory: /var/atlassian/application-data/jira 
HTTP Port: 8080 
RMI Port: 8005 
Install as service: Yes 
Install [i, Enter], Exit [e]

Extracting files ...

Please wait a few moments while JIRA Software is configured.
Installation of JIRA Software 7.12.3 is complete
Start JIRA Software 7.12.3 now?
Yes [y, Enter], No [n]

Please wait a few moments while JIRA Software starts up.
Launching JIRA Software ...
Installation of JIRA Software 7.12.3 is complete
Your installation of JIRA Software 7.12.3 is now ready and can be accessed
via your browser.
JIRA Software 7.12.3 can be accessed at http://localhost:8080
Finishing installation ...


generating the evaluation license key is very simple (you should create an account with Atlassian)

the product is installed for user "jira":
sudo su - jira

logs are in /opt/atlassian/jira/logs/

To troubleshoot webhooks, you should enable DEBUG loggin as default in http://localhost:8080/secure/admin/ViewLogging.jspa
then you see the webhook body being traced in /opt/atlassian/jira/logs/catalina.out

Start and stop:
sudo /etc/init.d/jira start
sudo /etc/init.d/jira stop

More JIRA on Docker

See also

docker run -d -p 8080:8080 cptactionhank/atlassian-jira:7.7.0

I need to install netstat, but I have no root access (root pw is not given), so I do:

docker exec -ti --user root elastic_agnesi /bin/sh

and I get this strange error:

OCI runtime exec failed: exec failed: container_linux.go:348: starting container process caused "chdir to cwd (\"/var/atlassian/jira\") set in config.json failed: permission denied": unknown


docker exec -ti elastic_agnesi /bin/sh
chmod 777 .
chmod 777 ..

and try again connecting as root.... I have no idea why, but this time it works....

Then as root do

apt install net-tools

Then I discover that only tcp (not tcp6) ports are available, because the image doesn't support IPv6 : "cat /proc/net/if_inet6" returns nothing.

Now I start my webhook intercepting application with IPv4

java -jar bla.jar


[centos@localhost ~]$ netstat -an | grep 8090
tcp6 0 0 :::8090 :::* LISTEN


[centos@localhost ~]$ netstat -an | grep 8090
tcp 0 0* LISTEN

but still curl -X POST http://localhost:8090/greeting is not working... I am giving up and will install JIRA directly on host....

Wednesday, October 10, 2018

Nexus Groovy scripting

Huge issue in Nexus is that you can't export/import your Users/Groups/Privileges and Repository configuration. All you can do is to take a "backup", which ends of in a folder as a completely unreadable/unversionable format.

So I was looking for

when you run a Groovy script in Nexus, you have available a predefined variable "repository", which is of type

This in turn contains a reference to a blobStoreManager and to a repositoryManager , plus a series of convenience methods to create commonly used repository formats (you are not expected to create anything fancy, most properties are assigned by default) and groups.

Key element is a object, again very disappointing since the configuration is represented by a "attribute" map (String, Map(String, Object)) which is really a stupid idea, too generic interface.

RepositoryManager has a Iterable<Repository> browse(); which returns a collection of

Sample script:


repository.repositoryManager.browse().each { Repository repo ->"Repository: $repo")"Repository Configuration: $repo.configuration")

this dumps in nexus.log the following content:

Repository: RepositoryImpl$$EnhancerByGuice$$c5f0822b{type=proxy, format=nuget, name=''}
Repository Configuration: Configuration{repositoryName='', recipeName='nuget-proxy', attributes={proxy={strictContentTypeValidation=true, contentMaxAge=1440, remoteUrl=, metadataMaxAge=1440}, negativeCache={}, storage={blobStoreName=default}, nugetProxy={}, httpclient={connection={blocked=false, autoBlock=true}}}}

Repository: RepositoryImpl$$EnhancerByGuice$$c5f0822b{type=hosted, format=maven2, name='maven-releases'}
Repository Configuration: Configuration{repositoryName='maven-releases', recipeName='maven2-hosted', attributes={maven={versionPolicy=RELEASE, layoutPolicy=STRICT}, storage={writePolicy=ALLOW_ONCE, strictContentTypeValidation=false, blobStoreName=default}}}

Repository: RepositoryImpl$$EnhancerByGuice$$c5f0822b{type=hosted, format=maven2, name='maven-snapshots'}
Repository Configuration: Configuration{repositoryName='maven-snapshots', recipeName='maven2-hosted', attributes={maven={versionPolicy=SNAPSHOT, layoutPolicy=STRICT}, storage={writePolicy=ALLOW, strictContentTypeValidation=false, blobStoreName=default}}}

Repository: RepositoryImpl$$EnhancerByGuice$$c5f0822b{type=proxy, format=maven2, name='maven-central'}
Repository Configuration: Configuration{repositoryName='maven-central', recipeName='maven2-proxy', attributes={proxy={contentMaxAge=-1, remoteUrl=, metadataMaxAge=1440}, negativeCache={timeToLive=1440, enabled=true}, storage={strictContentTypeValidation=false, blobStoreName=default}, maven-indexer={}, httpclient={connection={blocked=false, autoBlock=true}}, maven={versionPolicy=RELEASE, layoutPolicy=PERMISSIVE}}}

Repository: RepositoryImpl$$EnhancerByGuice$$c5f0822b{type=group, format=nuget, name='nuget-group'}
Repository Configuration: Configuration{repositoryName='nuget-group', recipeName='nuget-group', attributes={storage={blobStoreName=default}, nugetProxy={}, httpclient={}, group={memberNames=[nuget-hosted,]}}}

Repository: RepositoryImpl$$EnhancerByGuice$$c5f0822b{type=hosted, format=nuget, name='nuget-hosted'}
Repository Configuration: Configuration{repositoryName='nuget-hosted', recipeName='nuget-hosted', attributes={storage={writePolicy=ALLOW, blobStoreName=default}}}

Repository: RepositoryImpl$$EnhancerByGuice$$c5f0822b{type=group, format=maven2, name='maven-public'}
Repository Configuration: Configuration{repositoryName='maven-public', recipeName='maven2-group', attributes={maven={versionPolicy=MIXED}, group={memberNames=[maven-releases, maven-snapshots, maven-central]}, storage={blobStoreName=default}}}

which is pretty good result, at least you can capture in one go all the configuration of all your repositories.

This task will delete all your repos:


repository.repositoryManager.browse().each { Repository repo ->"DELETE Repository: $repo")

All the predefined variables are

core which is a

repository which is a

blobStore which is a
createFileBlobStore(final String name, final String path) blobStoreManager 

security which is a
User addUser(final String id, final String firstName, final String lastName, final String email, final boolean active,
final String password, final List roleIds)
Role addRole(final String id, final String name, final String description, final List privileges,
final List roles)
User setUserRoles(final String userId, final List roleIds)

Good is that if you clone the github repo nexus-book-examples you can directly open the APIs in file:///home/centos/gitclones/nexus-book-examples/scripting/apidocs/index.html

List all users with their roles

import groovy.json.JsonOutput
users = security.getSecuritySystem().listUsers()
userjson = JsonOutput.toJson(users)"USERS $userjson")

Eclipse jee-2018-09 hangs upon restarting

Eclipse jee-2018-09 hangs upon restarting

I do a "ps -ef | grep -i eclipse" then a jstack on the process, to find out that:

ModalContext" #136 prio=6 os_prio=0 tid=0x00007fbe7885f000 nid=0x2744 waiting for monitor entry [0x00007fbdc980f000]
   java.lang.Thread.State: BLOCKED (on object monitor)
 at org.eclipse.swt.widgets.Display.asyncExec(
 - waiting to lock <0x00000000c030b110> (a java.lang.Class for
 at org.eclipse.jface.operation.AccumulatingProgressMonitor.beginTask(
 at org.eclipse.core.runtime.ProgressMonitorWrapper.beginTask(
 at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor$CancelableProgressMonitorWrapper.beginTask(
 at org.eclipse.core.runtime.ProgressMonitorWrapper.beginTask(
 at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor$
 at org.eclipse.jface.operation.ModalContext$

"Worker-33: Building workspace" #133 prio=5 os_prio=0 tid=0x00007fbe54f7b800 nid=0x2731 waiting for monitor entry [0x00007fbdf8133000]
   java.lang.Thread.State: BLOCKED (on object monitor)
 - waiting to lock <0x00000000c030b110> (a java.lang.Class for
 at org.eclipse.ui.internal.UILockListener.isUI(
 at org.eclipse.ui.internal.UILockListener.aboutToRelease(
 - locked <0x00000000c648be58> (a
 at org.eclipse.core.internal.resources.WorkManager.beginUnprotected(
 at org.eclipse.wst.jsdt.internal.core.JavaModelManager.initializeAllContainers(
 at org.eclipse.wst.jsdt.internal.core.JavaModelManager.getJsGlobalScopeContainer(
 at org.eclipse.wst.jsdt.core.JavaScriptCore.getJsGlobalScopeContainer(
 at org.eclipse.wst.jsdt.internal.core.JavaProject.resolveClasspath(
 at org.eclipse.wst.jsdt.internal.core.JavaProject.getResolvedClasspath(
 at org.eclipse.wst.jsdt.internal.core.DeltaProcessor.validateClasspaths(
 at org.eclipse.wst.jsdt.internal.core.DeltaProcessor.resourceChanged(
 at org.eclipse.wst.jsdt.internal.core.DeltaProcessingState.resourceChanged(
 at org.eclipse.core.internal.resources.Workspace.broadcastBuildEvent(

it seems related to this bug

Just kill the bastard and move on.

Eclipse is a total piece of shit - they should simply rewrite it from scratch using a better design. Time invested in maintaining this old elephant is totally wasted.

Nexus programmatically create Repositories

Nexus API sucks - big time.

This is a desperate attempt to automate stuff.

git clone
cd ./nexus-book-examples/scripting/complex-script

docker run -d -p 8081:8081 --name nexus sonatype/nexus3:3.10.0

check the logs by
docker exec -ti nexus /bin/bash
more /opt/sonatype/sonatype-work/nexus3/log/nexus.log

rm -rf /home/centos/.groovy/grapes/
rm -rf /home/centos/.m2/repository/

You can easily test your scripts from the Nexus UI (create execute script UI) , and also debut them remotely from Intellij :

Try running this script:


it can't be easier!

The RepositoryAPI is available here

Repository createMavenHosted(final String name,
final String blobStoreName,
final boolean strictContentTypeValidation,
final VersionPolicy versionPolicy,
final WritePolicy writePolicy,
final LayoutPolicy layoutPolicy);


repository.createMavenHosted('private-again', 'default', true,,,

To list repositories (unfortunately it returns only partial information about the Repository):

curl -X GET --header 'Accept: application/json' 'http://localhost:8081/service/rest/beta/repositories'

[ {
  "name" : "",
  "format" : "nuget",
  "type" : "proxy",
  "url" : "http://localhost:8081/repository/"
}, {
  "name" : "maven-releases",
  "format" : "maven2",
  "type" : "hosted",
  "url" : "http://localhost:8081/repository/maven-releases"
}, {
  "name" : "maven-snapshots",
  "format" : "maven2",
  "type" : "hosted",
  "url" : "http://localhost:8081/repository/maven-snapshots"
}, {
  "name" : "maven-central",
  "format" : "maven2",
  "type" : "proxy",
  "url" : "http://localhost:8081/repository/maven-central"
}, {
  "name" : "nuget-group",
  "format" : "nuget",
  "type" : "group",
  "url" : "http://localhost:8081/repository/nuget-group"
}, {
  "name" : "nuget-hosted",
  "format" : "nuget",
  "type" : "hosted",
  "url" : "http://localhost:8081/repository/nuget-hosted"
}, {
  "name" : "maven-public",
  "format" : "maven2",
  "type" : "group",
  "url" : "http://localhost:8081/repository/maven-public"
} ]

Ref: about Groovy Scripting in Nexus

Tuesday, October 9, 2018

centos filesystem ntfs not configured in kernel

trying to install an external HD (Windows formatted) on a Centos box...

centos@localhost ~]$ sudo fdisk -l /dev/sdc2

Disk /dev/sdc2: 4000.7 GB, 4000650887168 bytes, 7813771264 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 33553920 bytes
Disk label type: dos
Disk identifier: 0x6e697373

This doesn't look like a partition table
Probably you selected the wrong device.

     Device Boot      Start         End      Blocks   Id  System
/dev/sdc2p1   ?  1936269394  3772285809   918008208   4f  QNX4.x 3rd part
Partition 1 does not start on physical sector boundary.
/dev/sdc2p2   ?  1917848077  2462285169   272218546+  73  Unknown
Partition 2 does not start on physical sector boundary.
/dev/sdc2p3   ?  1818575915  2362751050   272087568   2b  Unknown
Partition 3 does not start on physical sector boundary.
/dev/sdc2p4   ?  2844524554  2844579527       27487   61  SpeedStor
Partition 4 does not start on physical sector boundary.

Partition table entries are not in disk order
[centos@localhost ~]$ 

sudo yum install epel-release

Package epel-release-7-11.noarch already installed and latest version
Nothing to do

find /lib/modules/ | grep ntfs

nothing is found!

sudo yum install ntfs-3g -y

and now it works! Great! New mountpoint is /run/media/centos/Seagate\ Expansion\ Drive/


Sunday, September 30, 2018

Nexus and Groovy for Setup Automation

Amazingly few people automate their Nexus administration. I guess the fault lies mostly in the company behind Nexus, who does very little to make their API usable and well documented.

This post made me discover this API:

Very good reading also here about using the Nexus book examples to automate the execution of these Groovy/Java scripts.

References on same topic of Automation (via REST api)

Wednesday, September 26, 2018

git delete all tags matching a regex

this will delete all remote tags containig the "iap-copy" string (more complex cases can be achieved with egrep)

git clone myrepourl
cd myproject
git tag --list | grep iap-copy | sort > allnaughtytags.txt
for mytag in `cat allnaughtytags.txt`; do git push --delete origin $mytag ; done 

The method is very slow.... there are much faster ways, but this is very simple and reliable

tested with git 1.9.4

Friday, September 21, 2018

Parsing command line arguments in Spring etc

lots of frameworks are reported here:

but eventually I just want to do it using Spring classes

The advantage in Spring is that you can directly bind the command line arguments to attributes, there is an example here

A very simple example:

package org.pierre.clidemo;

import org.springframework.boot.SpringApplication;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.core.env.PropertySource;
import org.springframework.core.env.SimpleCommandLinePropertySource;
import org.springframework.boot.CommandLineRunner;

public class DemoApplication implements CommandLineRunner {

 public static void main(String[] args) {, args);

 public void run(String... args) throws Exception {
  PropertySource ps = new SimpleCommandLinePropertySource(args);
  // --file=pippo.txt --language=EN_TO_DE --firstOriginal=true
  System.out.println("file=" + ps.getProperty("file"));
  System.out.println("language=" + ps.getProperty("language"));
  System.out.println("firstOriginal=" + ps.getProperty("firstOriginal"));

and of course the JOptCommandLinePropertySource version is more robust...

Interesting also the project, but only to write CLI applications

Wednesday, September 19, 2018

Eclipse Linux Tools (Docker Plugin) source code

git clone git://

jars are installed NOT under the Eclipse installation folder, BUT here


Here they explain how to submit a bug

Unfortunately there is a bug in org.eclipse.linuxtools.internal.docker.ui.wizards.ContainerCopyTo

    public boolean performFinish() {
        boolean finished = mainPage.finish();
        if (finished) {
            target = mainPage.getDestination().toOSString();
            sources = mainPage.getFilesToCopy();
        return finished;

If you run Eclipse on Windows, and the docker daemon runs on Linux, the toOSString() formats any path into the Windows format, which is not recognized by Linux. So you can't specify "/var" because it will be turned into "\\var" which obviously fails on Linux. bug submitted

Monday, September 17, 2018

Nexus Maven repository migration

I need to migrate a Nexus 2.14 Maven repository to Nexus 3.10.

Unfortunately the Nexus product doesn't care much about migrations... probably they believe that, once installed, their product is immovable, like a sick elephant.

With a Nexus 2.14 to Nexus 2.14 migration, the repository structure is so simple that you can do it with a rsync.
But Nexus 3.10 is a totally different beast.

Luckily there are people who wrote tools:

I have to migrate from http://localhost:8081/nexus/content/repositories/releases/ (Nexus 2.14) to http://localhost:8181/repository/releases/ (Nexus 3.10)

git clone
cd maven-repository-tools
mvn package
java -jar maven-repository-provisioner/target/maven-repository-provisioner-1.3.2-SNAPSHOT-jar-with-dependencies.jar

java -jar maven-repository-provisioner/target/maven-repository-provisioner-1.3.2-SNAPSHOT-jar-with-dependencies.jar -s http://localhost:8081/nexus/content/repositories/releases/ -t http://localhost:8181/repository/releases/ -u admin -p admin123 -a org.pierre:pvjoinfacestest:war:1.0

tragically, the tool doesn't allow wildcards.... so you must know in advance the gav of ALL the artifacts you have to migrate.... my impression is also that the .war is not really uploaded!

I am trying this one

copy to my /home/centos/nexus214/sonatype-work/nexus/storage/releases folder, then run

./ -r http://localhost:8181/repository/releases/ -u admin -p admin123

and it works!

Friday, September 14, 2018

NordVPN programmatic API

'address': '/user/address',
'config': '/files/zipv2',
'nameserver': '/dns/smart',
'server': '/server',
'stats': '/server/stats',
'user': '/user/databytoken'

list of all NordVPN servers:

id 98288
ip_address ""
search_keywords []
categories […]
name "Indonesia #2"
domain ""
price 0
flag "ID"
country "Indonesia"
lat -6.174444
long 106.829444
load 55
ikev2 true
openvpn_udp true
openvpn_tcp true
socks true
proxy true
pptp false
l2tp false
openvpn_xor_udp false
openvpn_xor_tcp false
proxy_cybersec true
proxy_ssl true
proxy_ssl_cybersec true

return my current IP downloads a file (some 20 MB) full of .ovpn files, for each server, with PKI key to connect to the server returns a list of IPs, probably of the NordVPN dns server here you find how to login into API :

Monday, September 3, 2018

Nexus HTTP/1.1 407 Proxy Authentication Required

While trying to connect to and over a corporate proxy with these 2 sites whitelisted, we keep getting: - Exception HTTP/1.1 407 Proxy Authentication Required checking remote for update, proxy repo ivyreleases_proxy failed to fetch com.typesafe.sbt/sbt-native-packager/scala_2.12/sbt_1.0/1.3.4/ivys/ivy.xml with status line HTTP/1.1 407 Proxy Authentication Required, content not in cache.

If you enable ROOT logging at DEBUG (menu Support/Logging in Nexus console) you will see that a redirect is taking place, but the LAZY Nexus developer only logs the message and not the additional ESSENTIAL parameters to understand what is going on, that is a redirection to

2018-09-03 13:11:48,044+0200 DEBUG [qtp46263989-6144]  *UNKNOWN - Fetching: GET HTTP/1.1
2018-09-03 13:11:48,046+0200 DEBUG [qtp46263989-6144]  *UNKNOWN - > GET /typesafe/ivy-releases/com.typesafe.sbt/sbt-native-packager/scala_2.12/sbt_1.0/1.3.4/ivys/ivy.xml HTTP/1.1
2018-09-03 13:11:48,046+0200 DEBUG [qtp46263989-6144]  *UNKNOWN - Connection request: [route: {tls}->http://ourproxyserver:8080->][total kept alive: 0; route allocated: 0 of 20; total allocated: 0 of 200]
2018-09-03 13:11:48,046+0200 DEBUG [qtp46263989-6144]  *UNKNOWN - Connection leased: [id: 478][route: {tls}->http://ourproxyserver:8080->][total kept alive: 0; route allocated: 1 of 20; total allocated: 1 of 200]
2018-09-03 13:11:48,448+0200 DEBUG [qtp46263989-6144]  *UNKNOWN - < HTTP/1.1 302 Moved Temporarily @ 402.5 ms
2018-09-03 13:11:48,448+0200 DEBUG [qtp46263989-6144]  *UNKNOWN - Connection [id: 478][route: {tls}->http://ourproxyserver:8080->] can be kept alive for 30.0 seconds
2018-09-03 13:11:48,449+0200 DEBUG [qtp46263989-6144]  *UNKNOWN - Connection released: [id: 478][route: {tls}->http://ourproxyserver:8080->][total kept alive: 1; route allocated: 1 of 20; total allocated: 1 of 200]
2018-09-03 13:11:48,449+0200 DEBUG [qtp46263989-6144]  *UNKNOWN - > GET /typesafe/ivy-releases/com.typesafe.sbt/sbt-native-packager/scala_2.12/sbt_1.0/1.3.4/ivys/ivy.xml HTTP/1.1
2018-09-03 13:11:48,449+0200 DEBUG [qtp46263989-6144]  *UNKNOWN - Connection request: [route: {tls}->http://ourproxyserver:8080->][total kept alive: 1; route allocated: 0 of 20; total allocated: 1 of 200]
2018-09-03 13:11:48,449+0200 DEBUG [qtp46263989-6144]  *UNKNOWN - Connection leased: [id: 479][route: {tls}->http://ourproxyserver:8080->][total kept alive: 1; route allocated: 1 of 20; total allocated: 2 of 200]
2018-09-03 13:11:48,466+0200 DEBUG [qtp46263989-6144]  *UNKNOWN - Connection released: [id: 479][route: {tls}->http://ourproxyserver:8080->][total kept alive: 1; route allocated: 0 of 20; total allocated: 1 of 200]
2018-09-03 13:11:48,466+0200 DEBUG [qtp46263989-6144]  *UNKNOWN - < HTTP/1.1 407 Proxy Authentication Required @ 17.12 ms
2018-09-03 13:11:48,466+0200 DEBUG [qtp46263989-6144]  *UNKNOWN - Response: HttpResponseProxy{HTTP/1.1 407 Proxy Authentication Required [Proxy-Authenticate: NTLM, Cache-Control: no-cache, Pragma: no-cache, Content-Type: text/html; charset=utf-8, Proxy-Connection: close, Connection: close, Content-Length: 850] org.apache.http.entity.BufferedHttpEntity@3326370a}
2018-09-03 13:11:48,466+0200 DEBUG [qtp46263989-6144]  *UNKNOWN - Status: HTTP/1.1 407 Proxy Authentication Required
2018-09-03 13:11:48,467+0200 WARN  [qtp46263989-6144]  *UNKNOWN - Exception HTTP/1.1 407 Proxy Authentication Required checking remote for update, proxy repo ivyreleases_proxy failed to fetch com.typesafe.sbt/sbt-native-packager/scala_2.12/sbt_1.0/1.3.4/ivys/ivy.xml with status line HTTP/1.1 407 Proxy Authentication Required, content not in cache. HTTP/1.1 407 Proxy Authentication Required
 at$$Lambda$269/ Source)
 at javax.servlet.http.HttpServlet.service(
 at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(
 at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(
 at org.apache.shiro.web.servlet.AdviceFilter.executeChain(
 at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(
 at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(
 at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(
 at org.apache.shiro.web.servlet.AdviceFilter.executeChain(
 at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(
 at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(
 at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(
 at org.apache.shiro.web.servlet.AdviceFilter.executeChain(
 at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(
 at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(
 at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(
 at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(
 at org.apache.shiro.web.servlet.AbstractShiroFilter$
 at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(
 at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(
 at com.codahale.metrics.servlet.AbstractInstrumentedFilter.doFilter(
 at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(
 at org.eclipse.jetty.servlet.ServletHandler.doHandle(
 at org.eclipse.jetty.server.handler.ScopedHandler.handle(
 at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
 at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(
 at org.eclipse.jetty.server.session.SessionHandler.doHandle(
 at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(
 at org.eclipse.jetty.server.handler.ContextHandler.doHandle(
 at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(
 at org.eclipse.jetty.servlet.ServletHandler.doScope(
 at org.eclipse.jetty.server.session.SessionHandler.doScope(
 at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(
 at org.eclipse.jetty.server.handler.ContextHandler.doScope(
 at org.eclipse.jetty.server.handler.ScopedHandler.handle(
 at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
 at com.codahale.metrics.jetty9.InstrumentedHandler.handle(
 at org.eclipse.jetty.server.handler.HandlerCollection.handle(
 at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
 at org.eclipse.jetty.server.Server.handle(
 at org.eclipse.jetty.server.HttpChannel.handle(
 at org.eclipse.jetty.server.HttpConnection.onFillable(
 at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(
 at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(
 at org.eclipse.jetty.util.thread.ReservedThreadExecutor$
 at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
 at org.eclipse.jetty.util.thread.QueuedThreadPool$

For , you might need to whitelist also

Friday, August 31, 2018

building .net applications on a docker image

The pain is that you can't run a Windows docker image on Linux. And Microsoft images with the .net libraries are all Windows.
Like this one

BUT you can build a ubuntu-based docker builder image:

it's available on docker hub as vernetto/ubuntudotnet:1.0

Ref: how to push to docker hub

how to submit a container to an image and save it as tar

Monday, August 27, 2018

docker latest update fails miserably

sudo journalctl -xe

mkdir /run/containerd/io.containerd.runtime.v2.task/docker/dockerd: file exists: unknown

it seems a bug of the latest (nightly) release.... which was installed automatically by the Centos updates process.

I uninstall everything:

sudo yum remove docker docker-common docker-selinux docker-engine

Then I install

sudo yum-config-manager --disable docker-ce-edge

sudo yum install docker-ce
sudo systemctl enable docker
systemctl start docker

systemctl status docker.service

Error starting daemon: error initializing graphdriver: /var/lib/docker contains several valid graphdrivers: devicemapper, overlay2; Please cleanup or explicit

sudo vi /usr/lib/systemd/system/docker.service

ExecStart=/usr/bin/dockerd -s=devicemapper -H tcp:// -H unix:///var/run/docker.sock

sudo systemctl daemon-reload
sudo systemctl start docker

Friday, August 24, 2018

Nexus 3.10 as Python pypi proxy

sudo yum -y update
sudo yum -y install python-pip
pip --help
pip -V
mkdir ~/.pip
cd .pip/
vi pip.conf

enter this:

index = http://localhost:8181/repository/pypi/
index-url = http://localhost:8181/repository/pypi/simple

Create a nexus Pypi proxy repo "pypi" pointing to . Leave all the defaults as they are.

pip install lino-amici

this should populate your nexus:

Looking in indexes: http://localhost:8181/repository/pypi/simple
Collecting lino-amici
  Downloading http://localhost:8181/repository/pypi/packages/eb/c3/7bdd189fd446effe7ea61d2136dfaec478ec7c5b84f694c6b6e43656f319/lino-amici-18.8.0.tar.gz
Collecting lino-xl (from lino-amici)
  Downloading http://localhost:8181/repository/pypi/packages/02/34/6ab429aac3f80aa64fd00c8f3dd76a9ca9ecf25d7e03f1e48981c7031542/lino-xl-18.4.0.tar.gz (2.3MB)
    100% |████████████████████████████████| 2.3MB 92.2MB/s 
Collecting vobject (from lino-amici)
  Downloading http://localhost:8181/repository/pypi/packages/da/ce/27c48c0e39cc69ffe7f6e3751734f6073539bf18a0cfe564e973a3709a52/vobject- (58kB)
    100% |████████████████████████████████| 61kB 19.8MB/s 
Collecting lino (from lino-xl->lino-amici)
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPConnectionPool(host='localhost', port=8181): Read timed out. (read timeout=15)",)': /repository/pypi/packages/68/9e/39e5e96b9b8273f0f29943cddd51873ec670657ccf9918727d97ca6628e2/lino-18.8.0.tar.gz
  Downloading http://localhost:8181/repository/pypi/packages/68/9e/39e5e96b9b8273f0f29943cddd51873ec670657ccf9918727d97ca6628e2/lino-18.8.0.tar.gz (10.6MB)
    100% |████████████████████████████████| 10.6MB 89.8MB/s 
Collecting odfpy (from lino-xl->lino-amici)
  Downloading http://localhost:8181/repository/pypi/packages/01/0f/c9971c99d0d06024a1652f467427ff3f1a1136237e5740da715c5b208a48/odfpy-1.3.6.tar.gz (691kB)
    100% |████████████████████████████████| 696kB 42.6MB/s 
Collecting bleach (from lino-xl->lino-amici)
  Downloading http://localhost:8181/repository/pypi/packages/94/aa/0f7ce53f8688bb9f80c0cffacc3964ddfe08321c509c0bfe5062848951f9/bleach-2.1.4-py2.py3-none-any.whl
Collecting weasyprint (from lino-xl->lino-amici)
  Downloading http://localhost:8181/repository/pypi/packages/7e/4c/cf2ec7abf7f84a2d1325d01dcac1d4bcb77f41117101fe564eb76952c65f/WeasyPrint-0.42.3.tar.gz (399kB)
    100% |████████████████████████████████| 409kB 37.7MB/s 
    Complete output from command python egg_info:
    error in WeasyPrint setup command: Invalid environment marker: python_version < "3.0"
Command "python egg_info" failed with error code 1 in /tmp/pip-install-sPdLGr/weasyprint/

No worries about the message about the python version.... I have 2.7.... not willing to upgrade for now...

Wednesday, August 22, 2018

shell input validation

shell scripting STINKS, and to make it better we should at least make it more robust.

For instance by validating input parameters

Arrays are a great and simple way to achieve this.

array=(pippo pluto topolino)
printf '%s ' "${array[@]}"
printf  '\n'
if [[ ! " ${array[@]} " =~ " ${value} " ]]; then
  echo "array doesnt contain value $value"

Tuesday, August 14, 2018

Oracle DB Invalid Objects

Some usefuls commands to troubleshoot:

select count(*) from USER_OBJECTS where OBJECT_TYPE = 'TABLE';
select count(*) from user_objects where object_type='TYPE';
select count(*) from user_tables;

select * from USER_OBJECTS where STATUS = 'INVALID';

exec dbms_utility.compile_schema( 'MYUSER' );

alter package MYPACKAGE COMPILE;


show errors;

select * from user_errors ;


Thursday, August 2, 2018

CDI and WELD suck

A @Stateless bean could not be injected because not found by WELD

org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type PersistenceService with qualifiers @Default
  at injection point [BackedAnnotatedField] @Inject private

 at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(
 at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(
 at org.jboss.weld.bootstrap.Validator.validateGeneralBean(
 at org.jboss.weld.bootstrap.Validator.validateRIBean(
 at org.jboss.weld.bootstrap.Validator.validateBean(
 at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(
 at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(
 at org.jboss.weld.executor.IterativeWorkerTaskFactory$
 at org.jboss.weld.executor.IterativeWorkerTaskFactory$
 at java.util.concurrent.ThreadPoolExecutor.runWorker(
 at java.util.concurrent.ThreadPoolExecutor$

Even if the bean is a session bean, the archive (.jar) is not an “explicit bean archives (basically any archive containing the beans.xml file)“ because it doesn’t contain a beans.xml file (only the war file has a beans.xml file).

Since CDI 1.1 an archive can be implicit : “An implicit bean archive is any archive that contains one or more classes annotated with a bean defining annotation (scope annotation) or one or more session beans.”. Implicit archives don’t need a beans.xml.

But by default “implicit” is disabled! To enable it, you can either do the jboss-all.xml trick or do the “subsystem=weld:write-attribute(name=require-bean-descriptor,value=true)” trick. See again for more details. Or, you can simply add a beans.xml to the JAR.

If all this sounds to you like complete chaos and needless complication, it’s because it is!

Sunday, July 22, 2018

Spring Boot Security 5 and Oauth2

Ultimate guide and examples:

Here a very rich presentation on Oauth2:

Spring boot Oauth2

A simple application:
Code is here or also

Here the OAuth2 specs

Nice simplified and compact presentation

Baeldung example for Oauth2 here with explanation here

Thursday, July 12, 2018

Spring Boot and Netflix: Eureka Server

let's start with an empty Eureka Server:

run it, and hit:


We have some basic working examples here at

first we run the Eureka Server:

git clone
cd sample-eureka
gradle build
java -jar ./build/libs/sample-eureka.jar

then a sample service

git clone
cd sample-recommendations
gradle build
java -jar build/libs/sample-recommendations.jar

download latest gradle from, unzip it to E:/apps and make sure /e/apps/gradle-4.8/bin/gradle can be executed (I use gitBash shell)

in build.gradle, change apply plugin: 'spring-boot' into apply plugin: 'org.springframework.boot'

to build, simply run "gradle build"

all the dowloaded jars are in %HOME%\.gradle\caches\modules-2\files-2.1 (the equivalent of %HOME%/.m2/repository )

Recommendations runs at

curl http://localhost:8001/api/recommendations/jschneider

and Eureka Server at http://localhost:9000/

Wednesday, July 11, 2018

ELK docker

you have to adjust permanently the max_map_count parameter:

sysctl -w vm.max_map_count=262144

(sysctl - configure kernel parameters at runtime)

ls /proc/sys/vm to get list of available parameters

sudo vi /etc/sysctl.conf

try starting the container like this:

sudo docker run -p 5601:5601 -p 9200:9200 -p 5044:5044 -it --name elk sebp/elk

if it fails with this error:

waiting for Elasticsearch to be up (30/30)
Couln't start Elasticsearch. Exiting.

try allowing more time:

sudo docker run -e ES_CONNECT_RETRY=300 -p 5601:5601 -p 9200:9200 -p 5044:5044 -it --name elk sebp/elk

(see )

then KIBANA (you have to wait 1 minute for Kibana to come up) Elasticsearch JSON

to create dummy entry:

docker exec -it elk /bin/bash
/opt/logstash/bin/logstash /tmp/logstash/data -e 'input { stdin { } } output { elasticsearch { hosts => ["localhost"] } }'
this is a dummy entry
this is a dummy entry2

Kibana logs : less /var/log/kibana/kibana5.log
Elasticsearch logs : less /var/log/elasticsearch/elasticsearch.log
Logstash logs: less /var/log/logstash/logstash-plain.log

tail -f /var/log/elasticsearch/elasticsearch.log /var/log/logstash/logstash-plain.log /var/log/kibana/kibana5.log

docker network create -d bridge elknet

good practical presentation of ELK:

Sunday, July 8, 2018

rsync in action

To play in full safety, let's run tests in a docker container!

docker run -dit --privileged --name centos centos
docker attach centos
yum install rsync
yum install openssh openssh-server openssh-clients openssl-libs
groupadd centos
useradd -g centos centos
su - centos
cd ~
mkdir dir1
mkdir dir2
touch dir1/file{1..100}

#the "n" flag is "try-run" only, "v" is verbose, "a" is copy also links and preserve times ownership etc
rsync -anv dir1/ dir2

see also to configure sshd

if you get "Failed to get D-Bus connection: Operation not permitted" when starting sshd, probably you are not running the container in privileged mode


rsync -a dir1/ centos@localhost:/home/centos/dir2

to syncronize 2 folders upon deletion:

rm dir1/file99
#this will delete file99 also on dir2
rsync -anv --delete dir1/ centos@localhost:/home/centos/dir2

more flags: -z adds compression, -P adds progress report,

Tuesday, June 26, 2018

tired of curl weird syntax? try httpie

much more intuitive IMHO

Learning Spring Boot second edition

Excellent book by Greg L. Turnquist - no blabla, just stuff. Much better than the incredibly verbose and blablaistic Spring in Action.

Sample code here

You need MongoDB installed (IMHO better than using the embedded, I had issues)

download and install MongoDB community to D:\Program Files\MongoDB\Server\3.0\bin.... data by default is in D:\data\db

cd D:\Program Files\MongoDB\Server\3.0\bin
./mongod (it uses port 27017 by default)
show dbs
show collections

and possibly RabbitMQ:

How to use the initializer:

Thursday, June 21, 2018

Gradle and Nexus

download Gradle binaries

mkdir /home/centos/gradle
unzip -d /home/centos/gradle/
export PATH=$PATH:/home/centos/gradle/gradle-4.8/bin/
gradle -version
cd gitclones/
git clone

cd allure-junit5-course/

vi build.gradle


repositories {


repositories {
maven {
url "http://localhost:8181/repository/maven-public/"

if your "group" maven-public repository points only to Maven Central, the build will fail

rm -rf .gradle/
gradle build --refresh-dependencies --debug

> Could not resolve all artifacts for configuration ':classpath'.
> Could not find io.qameta.allure:allure-gradle:2.4.
Searched in the following locations:
- http://localhost:8181/repository/maven-public/io/qameta/allure/allure-gradle/2.4/allure-gradle-2.4.pom
- http://localhost:8181/repository/maven-public/io/qameta/allure/allure-gradle/2.4/allure-gradle-2.4.jar
Required by:
project :

If you add to the group also a Proxy Repo "jcenter" pointing to, everything works

Wednesday, June 20, 2018

Zipkin and Sleuth distributed tracing

Sleuth concise presentation with example:

and code is here

This is a very nice real demo (not "helloworld") of Sleuth and ELK with Kibana

Sunday, June 10, 2018

Eclipse and Gradle

Importing an old Gradle project in Eclipse can be problematic. I get this error message when "import existing gradle build"

Spring Boot plugin requires Gradle 4.0 or later. The current version is Gradle 2.5

I the project's "gradle/wrapper/" I replace




I download and install latest gradle 4.8 in E:\apps\gradle-4.8

In Eclipse, configure the Preferences/Gradle setting the Gradle User Home to E:\apps\gradle-4.8

I have installed "Buildship Eclipse plug-ins for Gradle" version 2.2.1

It's a real pity that the plugin doesn't offer an automatic resolution of the issue (upgrading to latest Gradle, and updating the project's settings", but in case of Eclipse we are just thankful it doesn't crash as it usually does. What a pathetic piece of crap Eclipse is, it's a shame for the whole IT community, I use it only because it's the official IDE at work.

Thursday, June 7, 2018

Browsermob as a whitelisting/blacklisting Proxy

It's based on our friend Littleproxy.

Its latest release it 2.1.6. It seems not much going on recently... no commits in last 8 months...

In our case, 2 APIs are interesting:

Sets a list of URL patterns to whitelist PUT /proxy/[port]/whitelist

Request Parameters:

regex - A comma separated list of regular expressions.

status - The HTTP status code to return for URLs that do not match the whitelist.

Set a URL to blacklist
PUT /proxy/[port]/blacklist

Request Parameters:

regex - The blacklist regular expression.

status - The HTTP status code to return for URLs that are blacklisted.

method - The regular expression for matching HTTP method (GET, POST, PUT, etc). Optional, by default processing all HTTP method.

Saturday, June 2, 2018

Spring Boot and H2

Example code is here:

you must add spring.h2.console.path=/h2 in the file

in a nutshell:

in pom.xml




# Datasource

# H2
# Enabling H2 Console
#Turn Statistics on
# Show all queries


To implement a repository:


public interface QuarantineRepository extends CrudRepository<Quarantine, Long> {
List findBygav(String gav);


To use the repository in a @javax.inject.Named bean:

import javax.inject.Inject;

QuarantineRepository quarantineRepository ;

where Quarantine is like this:

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

public class Quarantine {
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private String gav;

etc etc


Spring Boot 2 actuator ... priceless!

in, add this


and restart. hit this:


You can see the definition of all the Spring beans

Tutorial here





http://localhost:8080/actuator/flyway (fail)


http://localhost:8080/actuator/heapdump , this will save a file heapdump, rename it to heapdump.hprof, then open it with Eclipse Memory Analyzer Tool (MemoryAnalyzer.exe on Windows)


http://localhost:8080/actuator/liquibase (fail)









http://localhost:8080/actuator/prometheus (fail)

http://localhost:8080/actuator/sessions (fail)

http://localhost:8080/actuator/shutdown (fail)

http://localhost:8080/actuator/jolokia (fail)

Friday, June 1, 2018

Nexus proxy to npm registry

Install node.js

cd ~
sudo tar --strip-components 1 -xzvf node-v* -C /usr/local
node --version

In nexus 3, create a Proxy NPM repo pointing to and called npm-all

npm config set registry http://localhost:8081/repository/npm-all/
npm install --save-dev babel-loader babel-core babel-preset-env webpack

it works! I only get this error

engine p-try@1.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.30","npm":"1.4.21"})
npm ERR! Error: Package 'webassemblyjs-ast' not found : repository/npm-all/webassemblyjs/ast
npm ERR!     at RegClient. (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:300:14)
npm ERR!     at Request._callback (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:238:65)
npm ERR!     at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:123:22)
npm ERR!     at Request.emit (events.js:98:17)
npm ERR!     at Request. (/usr/local/lib/node_modules/npm/node_modules/request/request.js:893:14)
npm ERR!     at Request.emit (events.js:117:20)
npm ERR!     at IncomingMessage. (/usr/local/lib/node_modules/npm/node_modules/request/request.js:844:12)
npm ERR!     at IncomingMessage.emit (events.js:117:20)
npm ERR!     at _stream_readable.js:938:16
npm ERR!     at process._tickCallback (node.js:419:13)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     

to clean npm local repository, use "npm cache clean"

Wednesday, May 30, 2018

Eclipse for Docker

To install: Help/Eclipse Marketplace, search for Docker Tools, install.
Otherwise, install "JBoss Tools" and you get also Docker Tools.

Show View / Docker Explorer

you get by default this one:


but you can also work with remote docker via TCP with authentication

this view shows ALL your containers (docker ps -a) and images (docker images), with a list of ports and volumes

To enable managing a Docker environment running in your VirtualBox centos image, in VirtualBox enable port forwarding 2376 or 2375, see

Eclipse for Docker is a really nice tool! It makes it much easier to work with Docker. However I still believe one should be familiar with the Docker CLI.

Tuesday, May 29, 2018

Sanity check on a Nexus 2 Maven Proxy repo

The task is: verify that all the JARs in a Nexus 2 repo are still in Maven Central.

I did a
find /path/to/nexusdata/central -name "*.jar" > alljarsfiltered.txt

and then run this Java application:

package mavenchecker;

import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;

public class MavenChecker {
 public static ArrayList<String> errors = new ArrayList<String>();
 public static ArrayList<String> nonexisting = new ArrayList<String>();
 static int count  = 0;

 public static void main(String[] args) {

  String fileName = "/home/centos/Downloads/alljarsfiltered.txt";
  // read file into stream, try-with-resources
  try (Stream<String> stream = Files.lines(Paths.get(fileName)).parallel()) {

   stream.forEach((line) -> checkLine(line));

  } catch (IOException e) {

  for (String error : errors) {
   System.out.println("ERROR : " + error);

  for (String nonexistingItem : nonexisting) {
   System.out.println("nonexisting : " + nonexistingItem);


 private static void checkLine(String line) {
  if (count % 100 == 0) {
   System.out.println("COUNT " + count);
  if (!line.endsWith(".jar"))

  String gavstring = line.replace("/path/to/nexusdata/central/", "");
  String[] parts = gavstring.split("/");
  int len = parts.length;
  if (len < 4) {
   System.err.println("invalid length for gavstring " + gavstring + " len = " + len + " should be at least 4");
  } else {
   String filename = parts[len - 1];
   String version = parts[len - 2];
   String artifactid = parts[len - 3];
   String group = String.join(".", Arrays.copyOfRange(parts, 0, len - 3));
   String message = "filename=" + filename + " group=" + group + " artifactid=" + artifactid + " version=" + version;
   boolean exists = exists("" + gavstring);
   if (!exists) nonexisting.add(gavstring);

 public static boolean exists(String URLName){
     try {
       // note : you may also need
       //        HttpURLConnection.setInstanceFollowRedirects(false)
       HttpURLConnection con =
          (HttpURLConnection) new URL(URLName).openConnection();
       return (con.getResponseCode() == HttpURLConnection.HTTP_OK);
     catch (Exception e) {
        return false;


Monday, May 28, 2018

Nexus Firewall

As usual, Sonatype scatters his product documentation across the 5 Oceans, in the most disparate formats (blogs, videos, poorly formatted wiki pages etc)

Good video here
quick start

The Firewall product is really simple: given a GAV, it checks a DB (NIST Vulnerabilities) for all its vulnerabilities, and applies a bunch of rules to determine if the component is risky. If it's risky, it quarantines it, but provides a function to "unlock it" to the end user (Maven).

systemctl start service on boot with specific user


sudo vi /etc/systemd/system/ms.service


ExecStart=/bin/bash /path/to/script/ start
ExecStop=/bin/bash /path/to/script/ stop


sudo chmod 744 /etc/systemd/system/ms.service

sudo systemctl enable ms.service

(this should give you "Created symlink from /etc/systemd/system/ to /etc/systemd/system/ms.service." )

How to troubleshoot?

systemctl start ms
systemctl status ms
journalctl -u ms

Saturday, May 26, 2018

Eclipse says server workload limit exceeded, please try later

I always enable error reporting in Eclipse, although I am pretty confident that in the House of Chaos that Eclipse must be, nobody is seriously looking at them - they are too many, there is no sign of any intelligence behind the product, etc.

Lately I am curiously getting ALWAYS this message "Eclipse says server workload limit exceeded, please try later"

Personally I consider it a good sign, it might mean that Eclipse is finally reaching a point of collapse, and that we shall be soon freed from his ominous presence, in favor of more decent product like IntelliJ or Netbeans.

Curiously, Eclipse rhymes with Collapse

Spring Boot 2 and Primefaces 6..... JoinFaces and

Their started app is admin is persapiens/123)

git clone
cd joinfaces-maven-jar-example
mvn clean install
(there are some test errors.... ignore them)

java -jar target/joinfaces-example-3.2.1-SNAPSHOT.jar


Unfortunately they use a parent Maven you can use only 1 parent pom (another reason to HATE MAVEN who is BROKEN BY DESIGN).... so if your application is already based on a parent pom, you are royally screwed.

Problem is, when I generate a project from Spring Boot Starters, the parent pom is:

 <relativePath/> <!-- lookup parent from repository -->

while using joinfaces it's

        <relativePath/> <!-- lookup parent from repository -->

you can clearly see from that joinfaces includes all these dependencies which entail also a parent:

 <!-- lookup parent from repository -->

No doubt, they have sorted out for you a massive dependency tree, saving a lot of time.

When I see such massive dependency tree, the question arises, why the Java world in 2018 is so ridiculously complicated and only getting worse. Please stop proliferation, focus on consolidation.

Friday, May 25, 2018

Nginx with LUA and Java handlers

sudo yum install epel-release
sudo yum install nginx
sudo systemctl start nginx

nginx should now be running, enter http://localhost to test

documents in /usr/share/nginx/html

configuration in /etc/nginx/nginx.conf

logs in /var/log/nginx/access.log

sudo ausearch -c 'nginx' --raw | audit2allow -M my-nginx
sudo semodule -i my-nginx.pp
#disable selinux
setenforce 0

nginx with Docker
docker pull nginx
docker run --name nginx -d -p 10080:80 nginx

Setup a reverse proxy:
sudo vi /etc/nginx/conf.d/mynexus.conf

    listen 18081;
    location / {
        proxy_pass "http://localhost:8081";

systemctl stop nginx
systemctl start nginx

you can now point your maven mirror in settings.xml to point to 18081 and intercept all requests to Nexus

How to embed a Java handler in the loop ?

Handlers in Java implement this interface NginxJavaRingHandler

Ref: quick quide to configure

nginx as reverse proxy

Thursday, May 24, 2018

Testcontainers, using Docker containers in JUnit tests

Junit sucks, use at least 5.0 or better switch to TestNG (see for comparison)

To keep it really minimalistic, I have created a Maven Java project:

<project xmlns=""


and copied this example

package org.pierre.testcontainer;

import org.junit.Rule;
import org.junit.Test;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.testcontainers.containers.BrowserWebDriverContainer;


import static org.rnorth.visibleassertions.VisibleAssertions.assertTrue;
import static org.testcontainers.containers.BrowserWebDriverContainer.VncRecordingMode.RECORD_ALL;

public class SeleniumContainerTest {

    public BrowserWebDriverContainer chrome = new BrowserWebDriverContainer()
                                                    .withRecordingMode(RECORD_ALL, new File("target"));

    public void simplePlainSeleniumTest() {
        RemoteWebDriver driver = chrome.getWebDriver();

        WebElement searchInput = driver.findElementByName("search");

        searchInput.sendKeys("Rick Astley");

        WebElement otherPage = driver.findElementByLinkText("Rickrolling");;

        boolean expectedTextFound = driver.findElementsByCssSelector("p")
                .anyMatch(element -> element.getText().contains("meme"));

        assertTrue("The word 'meme' is found on a page about rickrolling", expectedTextFound);


The first time it failed with a SocketTimeoutException.... the second time it succeeded... I guess simply the Docker container was taking too much time to start.

If I do "docker images" I see richnorth/vnc-recorder and selenium/standalone-chrome-debug. If I do "docker ps -a" I see no trace of containers, probably they are removed at the end of test.

It looks really interesting! Convenient way to prepare a test environment in a fully automated way.

Wednesday, May 23, 2018

sudo systemctl hibernate

on Centos, I was trying to hibernate my machine:

sudo systemctl hibernate

A dependency job for failed. See 'journalctl -xe' for details.

journalctl -xe

Failed to write mode to /sys/power/disk: Operation not permitted

I removed "safe boot" option in the BIOS settings, and now I am able to hibernate! Amazing!

See also this, maybe "suspend" is cheaper safer and faster than hibernate...

Scala, sbt and Nexus Repositories

first, install sbt:

curl > bintray-sbt-rpm.repo
sudo mv bintray-sbt-rpm.repo /etc/yum.repos.d/
sudo yum install sbt
sbt --version

Then in Nexus create a Maven Proxy repository "ivy-releases" proxying, plus a repository "sbt-plugin-releases" proxying . Plus a group ivy with URL http://localhost:8181/repository/ivy/ and grouping ivy-releases + sbt-plugin-releases.


vi ~/.sbt/repositories

my-ivy-proxy-releases: http://localhost:8181/repository/ivy/ , [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
my-maven-proxy-releases: http://localhost:8181/repository/maven-public/

git clone
cd scalania
sbt compile

rm -rf target
rm -rf /home/centos/.ivy2/cache

you should see that lot of stuff is pulled in your maven-central proxy repo and in your

Without Nexus you get this:

[centos@localhost scalania]$ sbt compile
[info] Loading project definition from /home/centos/gitclones/scalania/project
[info] Updating {file:/home/centos/gitclones/scalania/project/}scalania-build...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] downloading http://localhost:8181/repository/maven-public/org/scala-lang/scala-compiler/2.10.4/scala-compiler-2.10.4.jar ...
[info]  [SUCCESSFUL ] org.scala-lang#scala-compiler;2.10.4!scala-compiler.jar (195ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scoverage#sbt-coveralls;1.0.0.BETA1!sbt-coveralls.jar (1957ms)
[info] downloading ...
[info]  [SUCCESSFUL ] de.johoop#jacoco4sbt;2.1.6!jacoco4sbt.jar (1811ms)
[info] downloading ...
[info]  [SUCCESSFUL ] com.typesafe.sbteclipse#sbteclipse-plugin;2.5.0!sbteclipse-plugin.jar (1791ms)
[info] downloading ...
[info]  [SUCCESSFUL ] com.typesafe.sbt#sbt-scalariform;1.3.0!sbt-scalariform.jar (2161ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scalastyle/scalastyle-sbt-plugin_2.10_0.13/0.6.0/scalastyle-sbt-plugin-0.6.0.jar ...
[info]  [SUCCESSFUL ] org.scalastyle#scalastyle-sbt-plugin;0.6.0!scalastyle-sbt-plugin.jar (140ms)
[info] downloading ...
[info]  [SUCCESSFUL ] com.sksamuel.scapegoat#sbt-scapegoat;0.94.6!sbt-scapegoat.jar (3186ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scoverage#sbt-scoverage;1.0.4!sbt-scoverage.jar (2122ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scala-lang/scala-library/2.10.4/scala-library-2.10.4.jar ...
[info]  [SUCCESSFUL ] org.scala-lang#scala-library;2.10.4!scala-library.jar (201ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scala-lang/scala-reflect/2.10.4/scala-reflect-2.10.4.jar ...
[info]  [SUCCESSFUL ] org.scala-lang#scala-reflect;2.10.4!scala-reflect.jar (141ms)
[info] downloading http://localhost:8181/repository/maven-public/com/fasterxml/jackson/core/jackson-core/2.4.2/jackson-core-2.4.2.jar ...
[info]  [SUCCESSFUL ] com.fasterxml.jackson.core#jackson-core;2.4.2!jackson-core.jar(bundle) (88ms)
[info] downloading http://localhost:8181/repository/maven-public/com/fasterxml/jackson/module/jackson-module-scala_2.10/2.4.2/jackson-module-scala_2.10-2.4.2.jar ...
[info]  [SUCCESSFUL ] com.fasterxml.jackson.module#jackson-module-scala_2.10;2.4.2!jackson-module-scala_2.10.jar(bundle) (235ms)
[info] downloading http://localhost:8181/repository/maven-public/org/eclipse/jgit/org.eclipse.jgit/ ...
[info]  [SUCCESSFUL ] org.eclipse.jgit#org.eclipse.jgit;!org.eclipse.jgit.jar (112ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scalaj/scalaj-http_2.10/0.3.16/scalaj-http_2.10-0.3.16.jar ...
[info]  [SUCCESSFUL ] org.scalaj#scalaj-http_2.10;0.3.16!scalaj-http_2.10.jar (126ms)
[info] downloading http://localhost:8181/repository/maven-public/com/fasterxml/jackson/core/jackson-annotations/2.4.2/jackson-annotations-2.4.2.jar ...
[info]  [SUCCESSFUL ] com.fasterxml.jackson.core#jackson-annotations;2.4.2!jackson-annotations.jar(bundle) (97ms)
[info] downloading http://localhost:8181/repository/maven-public/com/fasterxml/jackson/core/jackson-databind/2.4.2/jackson-databind-2.4.2.jar ...
[info]  [SUCCESSFUL ] com.fasterxml.jackson.core#jackson-databind;2.4.2!jackson-databind.jar(bundle) (92ms)
[info] downloading http://localhost:8181/repository/maven-public/com/thoughtworks/paranamer/paranamer/2.6/paranamer-2.6.jar ...
[info]  [SUCCESSFUL ] com.thoughtworks.paranamer#paranamer;2.6!paranamer.jar (110ms)
[info] downloading http://localhost:8181/repository/maven-public/com/google/code/findbugs/jsr305/2.0.1/jsr305-2.0.1.jar ...
[info]  [SUCCESSFUL ];2.0.1!jsr305.jar (99ms)
[info] downloading http://localhost:8181/repository/maven-public/com/google/guava/guava/15.0/guava-15.0.jar ...
[info]  [SUCCESSFUL ];15.0!guava.jar(bundle) (100ms)
[info] downloading http://localhost:8181/repository/maven-public/com/jcraft/jsch/0.1.50/jsch-0.1.50.jar ...
[info]  [SUCCESSFUL ] com.jcraft#jsch;0.1.50!jsch.jar (111ms)
[info] downloading http://localhost:8181/repository/maven-public/com/googlecode/javaewah/JavaEWAH/0.7.9/JavaEWAH-0.7.9.jar ...
[info]  [SUCCESSFUL ] com.googlecode.javaewah#JavaEWAH;0.7.9!JavaEWAH.jar(bundle) (76ms)
[info] downloading http://localhost:8181/repository/maven-public/org/apache/httpcomponents/httpclient/4.1.3/httpclient-4.1.3.jar ...
[info]  [SUCCESSFUL ] org.apache.httpcomponents#httpclient;4.1.3!httpclient.jar (144ms)
[info] downloading http://localhost:8181/repository/maven-public/org/apache/httpcomponents/httpcore/4.1.4/httpcore-4.1.4.jar ...
[info]  [SUCCESSFUL ] org.apache.httpcomponents#httpcore;4.1.4!httpcore.jar (55ms)
[info] downloading http://localhost:8181/repository/maven-public/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar ...
[info]  [SUCCESSFUL ] commons-logging#commons-logging;1.1.1!commons-logging.jar (97ms)
[info] downloading http://localhost:8181/repository/maven-public/commons-codec/commons-codec/1.4/commons-codec-1.4.jar ...
[info]  [SUCCESSFUL ] commons-codec#commons-codec;1.4!commons-codec.jar (121ms)
[info] downloading http://localhost:8181/repository/maven-public/org/jacoco/org.jacoco.core/ ...
[info]  [SUCCESSFUL ] org.jacoco#org.jacoco.core;!org.jacoco.core.jar (89ms)
[info] downloading http://localhost:8181/repository/maven-public/org/jacoco/ ...
[info]  [SUCCESSFUL ];! (148ms)
[info] downloading http://localhost:8181/repository/maven-public/org/ow2/asm/asm-debug-all/5.0.1/asm-debug-all-5.0.1.jar ...
[info]  [SUCCESSFUL ] org.ow2.asm#asm-debug-all;5.0.1!asm-debug-all.jar (120ms)
[info] downloading ...
[info]  [SUCCESSFUL ] com.typesafe.sbteclipse#sbteclipse-core;2.5.0!sbteclipse-core.jar (3240ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scalaz/scalaz-core_2.10/7.0.2/scalaz-core_2.10-7.0.2.jar ...
[info]  [SUCCESSFUL ] org.scalaz#scalaz-core_2.10;7.0.2!scalaz-core_2.10.jar(bundle) (167ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scalaz/scalaz-effect_2.10/7.0.2/scalaz-effect_2.10-7.0.2.jar ...
[info]  [SUCCESSFUL ] org.scalaz#scalaz-effect_2.10;7.0.2!scalaz-effect_2.10.jar(bundle) (81ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scalariform/scalariform_2.10/0.1.4/scalariform_2.10-0.1.4.jar ...
[info]  [SUCCESSFUL ] org.scalariform#scalariform_2.10;0.1.4!scalariform_2.10.jar (135ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scalastyle/scalastyle_2.10/0.6.0/scalastyle_2.10-0.6.0.jar ...
[info]  [SUCCESSFUL ] org.scalastyle#scalastyle_2.10;0.6.0!scalastyle_2.10.jar (108ms)
[info] downloading http://localhost:8181/repository/maven-public/com/danieltrinh/scalariform_2.10/0.1.5/scalariform_2.10-0.1.5.jar ...
[info]  [SUCCESSFUL ] com.danieltrinh#scalariform_2.10;0.1.5!scalariform_2.10.jar (100ms)
[info] downloading http://localhost:8181/repository/maven-public/com/typesafe/config/1.2.0/config-1.2.0.jar ...
[info]  [SUCCESSFUL ] com.typesafe#config;1.2.0!config.jar(bundle) (144ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scoverage/scalac-scoverage-plugin_2.10/1.0.4/scalac-scoverage-plugin_2.10-1.0.4.jar ...
[info]  [SUCCESSFUL ] org.scoverage#scalac-scoverage-plugin_2.10;1.0.4!scalac-scoverage-plugin_2.10.jar (110ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#sbt;0.13.8!sbt.jar (1693ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#main;0.13.8!main.jar (2573ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#compiler-interface;0.13.8!compiler-interface-bin.jar (1803ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#compiler-interface;0.13.8!compiler-interface-src.jar (2961ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#precompiled-2_8_2;0.13.8!compiler-interface-bin.jar (2133ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#precompiled-2_9_2;0.13.8!compiler-interface-bin.jar (1859ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#precompiled-2_9_3;0.13.8!compiler-interface-bin.jar (1849ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#actions;0.13.8!actions.jar (2064ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#main-settings;0.13.8!main-settings.jar (1987ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#interface;0.13.8!interface.jar (1858ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#io;0.13.8!io.jar (1987ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#ivy;0.13.8!ivy.jar (2481ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#launcher-interface;0.13.8!launcher-interface.jar (1701ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#logging;0.13.8!logging.jar (1799ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#logic;0.13.8!logic.jar (1736ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#process;0.13.8!process.jar (1919ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#run;0.13.8!run.jar (1817ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#command;0.13.8!command.jar (1886ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#classpath;0.13.8!classpath.jar (12828ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#completion;0.13.8!completion.jar (1870ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#api;0.13.8!api.jar (1822ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#compiler-integration;0.13.8!compiler-integration.jar (1900ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#compiler-ivy-integration;0.13.8!compiler-ivy-integration.jar (1688ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#relation;0.13.8!relation.jar (1826ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#task-system;0.13.8!task-system.jar (1798ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#tasks;0.13.8!tasks.jar (1844ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#tracking;0.13.8!tracking.jar (1718ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#testing;0.13.8!testing.jar (1865ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#control;0.13.8!control.jar (1842ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#collections;0.13.8!collections.jar (2043ms)
[info] downloading http://localhost:8181/repository/maven-public/jline/jline/2.11/jline-2.11.jar ...
[info]  [SUCCESSFUL ] jline#jline;2.11!jline.jar (133ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#incremental-compiler;0.13.8!incremental-compiler.jar (1877ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#compile;0.13.8!compile.jar (1773ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#persist;0.13.8!persist.jar (1813ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#classfile;0.13.8!classfile.jar (1755ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-tools.sbinary#sbinary_2.10;0.4.2!sbinary_2.10.jar (2288ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#cross;0.13.8!cross.jar (2532ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt.ivy#ivy;2.3.0-sbt-fccfbd44c9f64523b61398a0155784dcbaeae28f!ivy.jar (2079ms)
[info] downloading http://localhost:8181/repository/maven-public/com/jcraft/jsch/0.1.46/jsch-0.1.46.jar ...
[info]  [SUCCESSFUL ] com.jcraft#jsch;0.1.46!jsch.jar (134ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#serialization_2.10;0.1.1!serialization_2.10.jar (1903ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scala-lang/modules/scala-pickling_2.10/0.10.0/scala-pickling_2.10-0.10.0.jar ...
[info]  [SUCCESSFUL ] org.scala-lang.modules#scala-pickling_2.10;0.10.0!scala-pickling_2.10.jar (102ms)
[info] downloading http://localhost:8181/repository/maven-public/org/json4s/json4s-core_2.10/3.2.10/json4s-core_2.10-3.2.10.jar ...
[info]  [SUCCESSFUL ] org.json4s#json4s-core_2.10;3.2.10!json4s-core_2.10.jar (106ms)
[info] downloading http://localhost:8181/repository/maven-public/org/spire-math/jawn-parser_2.10/0.6.0/jawn-parser_2.10-0.6.0.jar ...
[info]  [SUCCESSFUL ] org.spire-math#jawn-parser_2.10;0.6.0!jawn-parser_2.10.jar (119ms)
[info] downloading http://localhost:8181/repository/maven-public/org/spire-math/json4s-support_2.10/0.6.0/json4s-support_2.10-0.6.0.jar ...
[info]  [SUCCESSFUL ] org.spire-math#json4s-support_2.10;0.6.0!json4s-support_2.10.jar (139ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scalamacros/quasiquotes_2.10/2.0.1/quasiquotes_2.10-2.0.1.jar ...
[info]  [SUCCESSFUL ] org.scalamacros#quasiquotes_2.10;2.0.1!quasiquotes_2.10.jar (131ms)
[info] downloading http://localhost:8181/repository/maven-public/org/json4s/json4s-ast_2.10/3.2.10/json4s-ast_2.10-3.2.10.jar ...
[info]  [SUCCESSFUL ] org.json4s#json4s-ast_2.10;3.2.10!json4s-ast_2.10.jar (85ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#cache;0.13.8!cache.jar (1939ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#test-agent;0.13.8!test-agent.jar (1748ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scala-sbt/test-interface/1.0/test-interface-1.0.jar ...
[info]  [SUCCESSFUL ] org.scala-sbt#test-interface;1.0!test-interface.jar (153ms)
[info] downloading ...
[info]  [SUCCESSFUL ] org.scala-sbt#apply-macro;0.13.8!apply-macro.jar (1845ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scala-lang/jline/2.10.4/jline-2.10.4.jar ...
[info]  [SUCCESSFUL ] org.scala-lang#jline;2.10.4!jline.jar (100ms)
[info] downloading http://localhost:8181/repository/maven-public/org/fusesource/jansi/jansi/1.4/jansi-1.4.jar ...
[info]  [SUCCESSFUL ] org.fusesource.jansi#jansi;1.4!jansi.jar (125ms)
[info] Done updating.
[info] Compiling 2 Scala sources to /home/centos/gitclones/scalania/project/target/scala-2.10/sbt-0.13/classes...
[info] Set current project to scalania (in build file:/home/centos/gitclones/scalania/)
[info] Updating {file:/home/centos/gitclones/scalania/}scalania...
[info] Updating {file:/home/centos/gitclones/scalania/}exercises...
[info] Resolving org.scala-lang#scala-library;2.11.6 ...
[info] Formatting 45 Scala sources {file:/home/centos/gitclones/scalania/}exercises(compile) ...
[info] Resolving org.sonatype.oss#oss-parent;7 ...
[info] downloading http://localhost:8181/repository/maven-public/org/scala-lang/scala-library/2.11.6/scala-library-2.11.6.jar ...
[info]  [SUCCESSFUL ] org.scala-lang#scala-library;2.11.6!scala-library.jar (146ms)
[info] downloading http://localhost:8181/repository/maven-public/com/sksamuel/scapegoat/scalac-scapegoat-plugin_2.11/0.94.6/scalac-scapegoat-plugin_2.11-0.94.6.jar ...
[info]  [SUCCESSFUL ] com.sksamuel.scapegoat#scalac-scapegoat-plugin_2.11;0.94.6!scalac-scapegoat-plugin_2.11.jar (217ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scala-lang/scala-library/2.11.4/scala-library-2.11.4.jar ...
[info]  [SUCCESSFUL ] org.scala-lang#scala-library;2.11.4!scala-library.jar (151ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scala-lang/scala-reflect/2.11.4/scala-reflect-2.11.4.jar ...
[info]  [SUCCESSFUL ] org.scala-lang#scala-reflect;2.11.4!scala-reflect.jar (116ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scala-lang/modules/scala-xml_2.11/1.0.2/scala-xml_2.11-1.0.2.jar ...
[info]  [SUCCESSFUL ] org.scala-lang.modules#scala-xml_2.11;1.0.2!scala-xml_2.11.jar(bundle) (127ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scaldi/scaldi_2.11/0.4/scaldi_2.11-0.4.jar ...
[info]  [SUCCESSFUL ] org.scaldi#scaldi_2.11;0.4!scaldi_2.11.jar (103ms)
[info] downloading http://localhost:8181/repository/maven-public/org/specs2/specs2-core_2.11/2.4.5/specs2-core_2.11-2.4.5.jar ...
[info]  [SUCCESSFUL ] org.specs2#specs2-core_2.11;2.4.5!specs2-core_2.11.jar (239ms)
[info] downloading http://localhost:8181/repository/maven-public/org/specs2/specs2-junit_2.11/2.4.5/specs2-junit_2.11-2.4.5.jar ...
[info]  [SUCCESSFUL ] org.specs2#specs2-junit_2.11;2.4.5!specs2-junit_2.11.jar (129ms)
[info] downloading http://localhost:8181/repository/maven-public/org/specs2/specs2-scalacheck_2.11/2.4.5/specs2-scalacheck_2.11-2.4.5.jar ...
[info]  [SUCCESSFUL ] org.specs2#specs2-scalacheck_2.11;2.4.5!specs2-scalacheck_2.11.jar (214ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scalatest/scalatest_2.11/2.2.4/scalatest_2.11-2.2.4.jar ...
[info]  [SUCCESSFUL ] org.scalatest#scalatest_2.11;2.2.4!scalatest_2.11.jar(bundle) (203ms)
[info] downloading http://localhost:8181/repository/maven-public/org/specs2/specs2-matcher_2.11/2.4.5/specs2-matcher_2.11-2.4.5.jar ...
[info]  [SUCCESSFUL ] org.specs2#specs2-matcher_2.11;2.4.5!specs2-matcher_2.11.jar (225ms)
[info] downloading http://localhost:8181/repository/maven-public/org/specs2/specs2-common_2.11/2.4.5/specs2-common_2.11-2.4.5.jar ...
[info]  [SUCCESSFUL ] org.specs2#specs2-common_2.11;2.4.5!specs2-common_2.11.jar (131ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scalaz/scalaz-core_2.11/7.1.0/scalaz-core_2.11-7.1.0.jar ...
[info]  [SUCCESSFUL ] org.scalaz#scalaz-core_2.11;7.1.0!scalaz-core_2.11.jar(bundle) (133ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scalaz/scalaz-concurrent_2.11/7.1.0/scalaz-concurrent_2.11-7.1.0.jar ...
[info]  [SUCCESSFUL ] org.scalaz#scalaz-concurrent_2.11;7.1.0!scalaz-concurrent_2.11.jar(bundle) (68ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scala-lang/modules/scala-parser-combinators_2.11/1.0.2/scala-parser-combinators_2.11-1.0.2.jar ...
[info]  [SUCCESSFUL ] org.scala-lang.modules#scala-parser-combinators_2.11;1.0.2!scala-parser-combinators_2.11.jar(bundle) (101ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scalaz/scalaz-effect_2.11/7.1.0/scalaz-effect_2.11-7.1.0.jar ...
[info]  [SUCCESSFUL ] org.scalaz#scalaz-effect_2.11;7.1.0!scalaz-effect_2.11.jar(bundle) (371ms)
[info] downloading http://localhost:8181/repository/maven-public/junit/junit/4.11/junit-4.11.jar ...
[info]  [SUCCESSFUL ] junit#junit;4.11!junit.jar (100ms)
[info] downloading http://localhost:8181/repository/maven-public/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar ...
[info]  [SUCCESSFUL ] org.hamcrest#hamcrest-core;1.3!hamcrest-core.jar (136ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scalacheck/scalacheck_2.11/1.11.3/scalacheck_2.11-1.11.3.jar ...
[info]  [SUCCESSFUL ] org.scalacheck#scalacheck_2.11;1.11.3!scalacheck_2.11.jar (100ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scoverage/scalac-scoverage-runtime_2.11/1.0.4/scalac-scoverage-runtime_2.11-1.0.4.jar ...
[info]  [SUCCESSFUL ] org.scoverage#scalac-scoverage-runtime_2.11;1.0.4!scalac-scoverage-runtime_2.11.jar (98ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scoverage/scalac-scoverage-plugin_2.11/1.0.4/scalac-scoverage-plugin_2.11-1.0.4.jar ...
[info]  [SUCCESSFUL ] org.scoverage#scalac-scoverage-plugin_2.11;1.0.4!scalac-scoverage-plugin_2.11.jar (132ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scala-lang/modules/scala-xml_2.11/1.0.1/scala-xml_2.11-1.0.1.jar ...
[info]  [SUCCESSFUL ] org.scala-lang.modules#scala-xml_2.11;1.0.1!scala-xml_2.11.jar(bundle) (102ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scala-lang/scala-compiler/2.11.6/scala-compiler-2.11.6.jar ...
[info]  [SUCCESSFUL ] org.scala-lang#scala-compiler;2.11.6!scala-compiler.jar (206ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scala-lang/scala-reflect/2.11.6/scala-reflect-2.11.6.jar ...
[info]  [SUCCESSFUL ] org.scala-lang#scala-reflect;2.11.6!scala-reflect.jar (72ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scala-lang/modules/scala-xml_2.11/1.0.3/scala-xml_2.11-1.0.3.jar ...
[info]  [SUCCESSFUL ] org.scala-lang.modules#scala-xml_2.11;1.0.3!scala-xml_2.11.jar(bundle) (102ms)
[info] downloading http://localhost:8181/repository/maven-public/org/scala-lang/modules/scala-parser-combinators_2.11/1.0.3/scala-parser-combinators_2.11-1.0.3.jar ...
[info]  [SUCCESSFUL ] org.scala-lang.modules#scala-parser-combinators_2.11;1.0.3!scala-parser-combinators_2.11.jar(bundle) (115ms)
[info] downloading http://localhost:8181/repository/maven-public/jline/jline/2.12.1/jline-2.12.1.jar ...
[info]  [SUCCESSFUL ] jline#jline;2.12.1!jline.jar (81ms)
[info] Done updating.
[info] Resolving org.scala-lang#scala-reflect;2.11.4 ...
[info] [scapegoat] setting output dir to [/home/centos/gitclones/scalania/target/scala-2.11/scapegoat-report]
[info] Resolving; ...
[info] downloading http://localhost:8181/repository/maven-public/org/jacoco/org.jacoco.agent/ ...
[info]  [SUCCESSFUL ] org.jacoco#org.jacoco.agent;!org.jacoco.agent.jar (64ms)
[info] Done updating.
[info] [scapegoat] setting output dir to [/home/centos/gitclones/scalania/exercises/target/scala-2.11/scapegoat-report]
[info] [scapegoat] disabled inspections: X
[info] [scapegoat] enabled inspections: ArraysToString
[info] [scapegoat] ignored file patterns: X
[info] Compiling 45 Scala sources to /home/centos/gitclones/scalania/exercises/target/scala-2.11/classes...
[info] 'compiler-interface' not yet compiled for Scala 2.11.6. Compiling...
[info]   Compilation completed in 9.394 s

but with Nexus proxy I still get some unresolved dependencies

[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.scoverage#sbt-coveralls;1.0.0.BETA1: not found
[warn]  :: de.johoop#jacoco4sbt;2.1.6: not found
[warn]  :: com.typesafe.sbteclipse#sbteclipse-plugin;2.5.0: not found
[warn]  :: com.typesafe.sbt#sbt-scalariform;1.3.0: not found
[warn]  :: com.sksamuel.scapegoat#sbt-scapegoat;0.94.6: not found
[warn]  :: org.scoverage#sbt-scoverage;1.0.4: not found
[warn]  :: org.scala-sbt#sbt;0.13.8: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::

no clue what is wrong....

On the other hand, if I follow this foo-build example

mkdir foo-build
cd foo-build
touch build.sbt
sbt compile

all works fine!