From users-return-3683-apmail-buildr-users-archive=buildr.apache.org@buildr.apache.org Sat Apr 13 14:20:01 2013 Return-Path: X-Original-To: apmail-buildr-users-archive@www.apache.org Delivered-To: apmail-buildr-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3CBF6FA69 for ; Sat, 13 Apr 2013 14:20:01 +0000 (UTC) Received: (qmail 78510 invoked by uid 500); 13 Apr 2013 14:20:01 -0000 Delivered-To: apmail-buildr-users-archive@buildr.apache.org Received: (qmail 78473 invoked by uid 500); 13 Apr 2013 14:20:01 -0000 Mailing-List: contact users-help@buildr.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@buildr.apache.org Delivered-To: mailing list users@buildr.apache.org Received: (qmail 78459 invoked by uid 99); 13 Apr 2013 14:20:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Apr 2013 14:20:00 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of hoogland@gmail.com designates 209.85.219.48 as permitted sender) Received: from [209.85.219.48] (HELO mail-oa0-f48.google.com) (209.85.219.48) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Apr 2013 14:19:55 +0000 Received: by mail-oa0-f48.google.com with SMTP id j1so3323575oag.21 for ; Sat, 13 Apr 2013 07:19:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=BUNU/A2gxfn50u7nCzF8lNGQqwEl8wekHzoJAkbIeUA=; b=NRMYDrOQ44hPoxLvubyoJaCYzd4xsoqC6O09OBoBdD2WAPHc3rvPD0JPl07F50lMO+ P050lQ7welGM72wZvijekZSGqbJJ+TmGKCNKUEbQPyjZTqlHJl0T2Bey+EbuRfWSejPU SSb+B5z3JUP2Jr/qA6JCXOJZRy8x2TCKkgOTQdH3j1LkWfgYdQ2j7rTDUIcqRHtWSHfn 1U81dLgq3ekPspQm6fxYVVFpPSDrqeYv5D8fUkyaecrbJ3DN8UXYFDNJh+Tr1nH7rGDQ 9532llm9ciJXUw4Yiz9yHRodcLL6FNJgxiYEf2mLVUEF2kwrKUK3fl8sjRqlGRk4bHAp tGiw== MIME-Version: 1.0 X-Received: by 10.182.27.40 with SMTP id q8mr5377121obg.100.1365862774156; Sat, 13 Apr 2013 07:19:34 -0700 (PDT) Received: by 10.182.104.106 with HTTP; Sat, 13 Apr 2013 07:19:34 -0700 (PDT) Date: Sat, 13 Apr 2013 22:19:34 +0800 Message-ID: Subject: stand-alone jar From: Jason Hoogland To: users@buildr.apache.org Content-Type: multipart/alternative; boundary=089e012297627735e504da3eb567 X-Virus-Checked: Checked by ClamAV on apache.org --089e012297627735e504da3eb567 Content-Type: text/plain; charset=ISO-8859-1 I;ve seen http://stackoverflow.com/questions/1279419/buildr-package-dependencies-into-a-single-jar/1285293#1285293but I'd prefer a buildr-only solution and it I can't find any good info regarding inserting the Class-Path in the MANIFEST.MF I have DEPS = [ ARGS4J, JASYPT, WEB, ORIENTDB, '/path/to/local.jar' ] repositories.remote << 'http://repo1.maven.org/maven2' define 'My Project' do project.version = VERSION_NUMBER project.group = 'myGroup' compile.options.target = '1.7' desc 'Bountius Server' define 'deps' do package(:jar).merge(DEPS) end manifest['Main-Class'] = 'com.myProject.control.Start' desc 'iMyProject Server' define 'server' do compile.with DEPS package(:jar).merge(DEPS) end end The server jar created just throws the kitchen sink in, apparently overwriting the META-ING/MANIFEST.MF with the final artifact MANIFEST.MF rather than using my manifest settings. I'm trying to do what my old ant build.xml does, namely: 1. compile my src code into classes 2. packages them into a jar 3. adds the dependency jars to this jar 4. includes "Main-Class" and "Class-Path" attributes to META-INF/MANIFEST.MF, the latter properly formatted, e.g.: Class-Path: args4j-2.0.18.jar gson-2.2.2.jar jasypt-1.9.0.jar orient-c ommons-1.3.0.jar orientdb-client-1.3.0.jar orientdb-core-1.3.0.jar or ientdb-enterprise-1.3.0.jar orientdb-server-1.3.0.jar prodigitum.util .jar commons-exec-1.1.jar commons-logging-1.1.1.jar guava-14.0.jar ht tpclient-4.2.1.jar httpcore-4.2.1.jar json-20080701.jar selenium-java -2.31.0.jar The resulting jar can be run stand-alone. I'm open to a better or equivalent way in buildr if someone could possibly help Cheers hoogs --089e012297627735e504da3eb567--