Hi Yuri,

Apologies for not picking up on your emails to jalview-discuss -- hopefully 
that will be fixed soon!

Anyway, looking at the logs you point at, the NullPointerExceptions you can see 
are happening with one  specific task in the build process and were introduced 
with gradle-6.6.  If you use gradle 6.5.1 (or earlier, I think down to 5.2) 
then these exceptions don't happen.

In fact these exceptions only break the linkCheck task (non-fatally) which is 
just a check and doesn't in itself add anything to the Jalview build.  This 
means your build process is indeed successful and the jars you end up with will 
be just the same as if linkCheck had worked.

You're right to point out the README file is out of date.  I think Jim has 
pointed you at the doc/building.md file which is current.

In response to these problems you've highlighted I've finally gotten round to 
fixing the NullPointerException and also updating the README file (at least to 
point at the right document!).  These fixes won't become apparent until the 
next release though.

Working with the current release source I can say that if you just ignore the 
NullPointerExceptions in linkCheck then that should be okay.


I don't know if it would be helpful to mention the approach of other packaging 
(e.g. for bioconda and debian) efforts, as the build system changed a lot at 
Jalview 2.11.0.
Bioconda takes a simple approach of building a "shadow" jar which is a jar file 
containing Jalview _and_ all of its dependency libraries (found in either j8lib 
or j11lib).  This can be done with

gradle shadowJar

and you can make a release version built for Java 8 with

gradle shadowJar -PCHANNEL=RELEASE -PJAVA_VERSION=1.8

You will then find the single jar file in
build/libs/jalview-all-2.11.1.4-j1.8.jar

Or you can build a Java 11 version with

gradle shadowJar -PCHANNEL=RELEASE -PJAVA_VERSION=11

to make
build/libs/jalview-all-2.11.1.4-j11.jar
If you want/have to choose one, I would recommend using the Java 11 build (and 
making a dependency on a Java 11 JRE being present).

Then you can run Jalview simply with

java -jar path/to/jalview-all-2.11.1.4-j11.jar

Bioconda uses a wrapper script for this which is found at
https://github.com/bioconda/bioconda-recipes/blob/master/recipes/jalview/jalview.sh
and Debian's simpler wrapper is at
https://salsa.debian.org/java-team/jalview/-/blob/master/debian/wrappers/jalview

Debian handles classpaths differently (i.e. it is put directly into the jar 
manifest) but their wrapper script would work equally well with a shadow jar 
file.

The part of these which we would really want to you to include is

# ARG1 saved to check whether we need "-open" later
ARG1=$1

# check to see if $1 is set and is not start of other cli set args
OPEN=""
if [ -n "$ARG1" -a "$ARG1" = "${ARG1#-}" ]; then
# first argument exists and does not start with a "-"
OPEN="-open"
fi
java -jar path/to/jalview-all-11.jar $OPEN ${@}

as it simplifies both command line usage and file manager calls when opening 
files.

Talking of file managers, we also have some MIME-info which I hope you can make 
use of.  In the master branch (which is the latest release 2.11.1.4) this can 
be found in
utils/debian/debian/jalview-mime.xml
and associated icons at different sizes in
utils/debian/debian/icons/


It's great that the packaging on FreeBSD is getting updated -- we really 
appreciate you putting some time into it and if you have any further questions 
please do ask!  Best to Cc me in too while I'm not getting the jalview-discuss 
emails!

I hope this makes sense, if not please just say if you would like me to 
elaborate on any aspect of this email (or anything else in the build process)!

Best wishes,

Ben

________________________________
From: Jim Procter <[email protected]>
Sent: 26 April 2021 15:34
To: Benedict Soares (Staff) <[email protected]>; Yuri <[email protected]>
Subject: Fwd: [Jalview-discuss] Build prints exception messages and then 
succeeds


Hi Ben - I realised I forgot to actually cc you on my reply to Yuri's email - 
could you follow up on list with them ?

Thanks !
Jim
---------- Forwarded message ---------
From: Jim Procter <[email protected]<mailto:[email protected]>>
Date: Mon, 26 Apr 2021 at 09:13
Subject: Re: [Jalview-discuss] Build prints exception messages and then succeeds
To: Yuri <[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]> 
<[email protected]<mailto:[email protected]>>


Hello Yuri.

It looks like you are porting jalview to BSD!  Is that correct?

The exception message is from a document crossreference validation test we use 
to make sure all the links in the jalview help documentation are correct. 
There's probably something wrong with the way the command-line was constructed. 
A gradle --debug shadowJar will be needed to find out exactly what the command 
was that was executed.

I've cced Ben Soares to comment on this.  Could you sign up and report this as 
a bug via our bugtracker at issues.jalview.org<http://issues.jalview.org>?

Thanks !

Jim

On Mon, 26 Apr 2021, 00:04 Yuri, <[email protected]<mailto:[email protected]>> wrote:
Please see the complete log here:
https://people.freebsd.org/~yuri/jalview-build-exceptions-2.11.1.4.log


Yuri


_______________________________________________
Jalview-discuss mailing list
[email protected]<mailto:[email protected]>
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-discuss

The University of Dundee is a registered Scottish Charity, No: SC015096
_______________________________________________
Jalview-discuss mailing list
[email protected]
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-discuss

Reply via email to