Re: Building JAMES

Pablo Pita Leira <[email protected]>
Newsgroups gmane.comp.jakarta.james.user
Message-ID <[email protected]>
On 06.05.20 16:44, Raphaël Ouazana-Sustowski wrote:
> On my Linux box `mvn -DskipTests clean package` is working fine (I can 
> even add -T1C to make it faster). I skip tests because there are very 
> long (about 2h) and better reproducibe via Docker. 

On my Ubuntu Linux box, at the end I also have succeeded to compile the 
project. It required some actions. First, no JAVA_HOME is defined, so 
the build failed. For that, launch maven defining it:

JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 mvn -DskipTests clean package

The build then failed at:

mock-smtp-server: Building image tarball failed, perhaps you should make 
sure your credentials for 'registry-1.docker.io/library/openjdk' are set 
up correctly. See 
https://github.com/GoogleContainerTools/jib/blob/master/docs/faq.md#what-should-i-do-when-the-registry-responds-with-unauthorized 
for help:

 From the help, my installation has docker-credential-secretservice, so 
this is added to the .docker/config.json:

|{"credsStore":"||secretservice"}|

Trying again, it came another error related to reaching the maximum 
number of openfiles:

[ERROR] 
/home/pablo/dev/jp/james-project/server/container/guice/cassandra-rabbitmq-guice/src/main/java/org/apache/james/modules/DistributedTaskManagerModule.java:[43,8] 
error while writing 
org.apache.james.modules.DistributedTaskManagerModule: 
/home/pablo/dev/jp/james-project/server/container/guice/cassandra-rabbitmq-guice/target/classes/org/apache/james/modules/DistributedTaskManagerModule.class: 
Too many open files

For this one, I increased that number in /etc/sysctl.conf

fs.file-max = 2097152

And in the bash session,

ulimit -n 4096

Check it: ulimit -aHS

After that, the james-project finally compiled.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.