Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Apr 2017 18:27:04 +0200
From:      Xavi Garcia <xavi.garcia@gmail.com>
To:        freebsd-ports@freebsd.org
Subject:   Writing a port that needs to download a large number of files
Message-ID:  <CAPonemzuMLP5CdBzkTp__1GGarm%2Bocda5TiCmjYp7tQ1Bk1KVg@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
--001a11c15496b5a7ce054d877e76
Content-Type: text/plain; charset=UTF-8

Hi all,

We are writing a port for a Java software that downloads a large number of
jar files (around 200) with Gradle (https://gradle.org/), that is similar
to other package managers like Pip or Ruby Gems but for Java projects.

What would be the best practice in this scenario? I am aware that we can
only download files in the fetch phase but I am not sure if my solution is
clean enough.

We will be deploying this port in our servers via Portshaker and Poudriere
but we would also like to commit it to the ports tree.


In short, I am using the 'pre-fetch' phase together with FETCH_DEPENDS  to
drop the Gradle wrapper in ${DISTDIR}/${PORTNAME} and then I use the
'dependencies' task to download all the dependencies.

The 'do-build' stage will run again the Gradle wrapper to build the
software, but using the offline mode.

You can find attached the Makefile.

Kind regards,

Xavier Garcia

--001a11c15496b5a7ce054d877e76
Content-Type: application/octet-stream; name=Makefile
Content-Disposition: attachment; filename=Makefile
Content-Transfer-Encoding: base64
X-Attachment-Id: f_j1p6ns7j0

IyAkRnJlZUJTRCQKClBPUlROQU1FPQlyZWFkb25seXJlc3QKUE9SVFZFUlNJT049CTEuMTQuMApD
QVRFR09SSUVTPQl0ZXh0cHJvYwpQS0dOQU1FUFJFRklYPQllbGFzdGljc2VhcmNoLXBsdWdpbi0K
Ck1BSU5UQUlORVI9CXhhdmkuZ2FyY2lhQGdtYWlsLmNvbQpDT01NRU5UPQlFbGFzdGljU2VhcmNo
IFJlYWRvbmx5UkVTVCBQbHVnaW4KClJVTl9ERVBFTkRTOj0gICBlbGFzdGljc2VhcmNoNT01LjAu
Mjp0ZXh0cHJvYy9lbGFzdGljc2VhcmNoNQpGRVRDSF9ERVBFTkRTPSAgamF2YTpqYXZhL29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9IEpBVkFfSE9NRT0vdXNy
L2xvY2FsL29wZW5qZGs4IC4vZ3JhZGxldyAtZyAgJHtUTVBfRElSfSAtLXByb2plY3QtY2FjaGUt
ZGlyICR7VE1QX0RJUn0gLS1uby1kYWVtb24gZGVwZW5kZW5jaWVzICkKCmRvLWJ1aWxkOgojCglA
Y3AgJHtGSUxFX0RJUn0vYnVpbGQuZ3JhZGxlICR7UFJPSkVDVF9ST09UfQoJQChjZCAke1BST0pF
Q1RfUk9PVH07ICAke1NFVEVOVn0gSkFWQV9IT01FPS91c3IvbG9jYWwvb3BlbmpkazggLi9ncmFk
bGV3IC1nICAke1RNUF9ESVJ9IC0tcHJvamVjdC1jYWNoZS1kaXIgJHtUTVBfRElSfSAtLW5vLWRh
ZW1vbiAtLW9mZmxpbmUgICBhc3NlbWJsZSAgLXggdGVzdCkKCmRvLWluc3RhbGw6CiMKCSR7TUtE
SVJ9ICR7SU5TVEFMTF9ESVJ9Cgl1bnppcCAtZCAke0lOU1RBTExfRElSfSAtbyAgLWogICR7UFJP
SkVDVF9ST09UfS9idWlsZC9kaXN0cmlidXRpb25zL3JlYWRvbmx5cmVzdC0xLjE0LjBfZXM1LjAu
Mi56aXAKCi5pbmNsdWRlIDxic2QucG9ydC5taz4K
--001a11c15496b5a7ce054d877e76--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPonemzuMLP5CdBzkTp__1GGarm%2Bocda5TiCmjYp7tQ1Bk1KVg>