Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 1518C200D56 for ; Tue, 12 Dec 2017 13:54:37 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 134D4160C0F; Tue, 12 Dec 2017 12:54:37 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 59E55160BE7 for ; Tue, 12 Dec 2017 13:54:36 +0100 (CET) Received: (qmail 42220 invoked by uid 500); 12 Dec 2017 12:54:35 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 42208 invoked by uid 99); 12 Dec 2017 12:54:35 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Dec 2017 12:54:35 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id BED3D1A097E for ; Tue, 12 Dec 2017 12:54:34 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.121 X-Spam-Level: X-Spam-Status: No, score=-0.121 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 5cgzEW7kcfmk for ; Tue, 12 Dec 2017 12:54:30 +0000 (UTC) Received: from mail-it0-f44.google.com (mail-it0-f44.google.com [209.85.214.44]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id CDBBA5FB37 for ; Tue, 12 Dec 2017 12:54:29 +0000 (UTC) Received: by mail-it0-f44.google.com with SMTP id f143so24051003itb.0 for ; Tue, 12 Dec 2017 04:54:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=aEcARf340yJ9HnLozw8P55s++iHMGzqGy7g9zRXQA6k=; b=liiVDhkIlWCZ7+aNPVjZpmUkToRnhtLSuoEMvUxlN5sc+o2m8QsMre8q01PgZWhZDw hrQQAR67aBYg3bF27liUWiYdGosJBBbRWwPS0PIxiDQhOfP70hYUMlUB9//3ltn+ur3D tebgNmGJP8UxqQFAyWd5CkhEj08uL96i1Ufic+8epnXpYDCy+FQH7lnDKJ7PaOHmolbQ HgLQ8efg+ueg7mFSw9uAOptt7KB/a/WKxtu+4w/YDd9sRhdf5Loq3CfPU0LmD5PXdW+3 uUXtGQYvKzo5dA3AOt1bneJNzqCXPkQju4NRwue1T2D+vgZc9NjlvyDP6V53DpHy1Qxs MNjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=aEcARf340yJ9HnLozw8P55s++iHMGzqGy7g9zRXQA6k=; b=tEuO+bmcWhMMYZAsc6TocEPgNERtw1PhsFXBwnX53jelcuas06EzowK3Qx/QUbGXtU pKDkQvHexV/rM2u31GjPlRFG7qWV5LsXIvbbO7Xk70nSRiaPS61cYg214yl2J4I8dA0i 2Vh8yOnMUa7L4YauUVseoqlDFRFkOgJA+J6uD0bprxfbWeYAARBjpeVDCEuK8r3ogOgd cmMKxH8XRycvP9v+ZT4gxsNtCqVYy02K8zYyOc7VTd30pXAfl689SDbZL5VYhv0oK5y4 8u/VS/g4SluXXnfo9U0BbqMhChD0T5l5ngk/DIbF+Q4Z0X/bLF3zhWP4e8JdjTsmrVIX +6XA== X-Gm-Message-State: AKGB3mKzDj3xB72qK+MPPdpbeAGaYc8sbpzTqxIqcOU4KJtMtMkpIcum g7PxTOjgl+Q1VcD1LT66qjSQqOMFzvlNwj+xDw== X-Google-Smtp-Source: ACJfBosLozeorO6jbOO9qJXPnngdwOqvYqfEqUqXOvCzir08whHN3tsMRlY8bqv8X1HGvWZ0S7kjeaCCBdHN0MTFp1E= X-Received: by 10.36.66.209 with SMTP id i200mr2638195itb.102.1513083268294; Tue, 12 Dec 2017 04:54:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.2.105.18 with HTTP; Tue, 12 Dec 2017 04:54:07 -0800 (PST) From: Jochen Wiedmann Date: Tue, 12 Dec 2017 13:54:07 +0100 Message-ID: Subject: Build Script Templates To: dev@ant.apache.org Content-Type: text/plain; charset="UTF-8" archived-at: Tue, 12 Dec 2017 12:54:37 -0000 Hi, over the last months, I was working in a larger project in a Java environment, but not directly a Java project. Suffice it to say, that we have a number of Java subprojects, but generally aren't so much interested in Java builds, etc. There's no rule without exceptions, so I've been tasked with streamlining these subprojects into a form, which allows to maintain them in a simple, and uniform manner. Not surprising, I was thinking "Maven" initially, and started to rewrite some of these subprojects for Maven. However, it quickly turned out, that access to the Internet is a problem in my particular corporate environment, so I dropped Maven from the picture. What I came up with, instead, was a set of conventions, which closely resemble the Maven projects, and a "Maven Jar Template" (MJT). The MJT is an Ant build script, which is generic, and shared by all our subprojects. The actual build scripts typically specify a small set of properties (project.name, project.version, project.java.source.version, and the like), and import the MJT. As the project follows the MJT conventions, that's it in most cases, apart from things like a uber jar, etc., which aren't handled by the MJT. However, these are mostly resolved by "overwriting" one of the imported tasks. In general, our build scripts are unusually small, and concise (for Ant scripts, that is). The experiemce is so good, that I wonder, if we couldn't start distributing some of these templates with Ant Core, or as a separate ant-templates.jar? If so, a build script could look like below, Jochen -- The next time you hear: "Don't reinvent the wheel!" http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/evolution-of-the-wheel-300x85.jpg --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org