Return-Path: X-Original-To: apmail-maven-users-archive@www.apache.org Delivered-To: apmail-maven-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 D0D0D9A54 for ; Wed, 11 Jan 2012 19:41:56 +0000 (UTC) Received: (qmail 53040 invoked by uid 500); 11 Jan 2012 19:41:54 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 52917 invoked by uid 500); 11 Jan 2012 19:41:53 -0000 Mailing-List: contact users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Users List" Reply-To: "Maven Users List" Delivered-To: mailing list users@maven.apache.org Received: (qmail 52909 invoked by uid 99); 11 Jan 2012 19:41:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jan 2012 19:41:52 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [72.167.82.82] (HELO p3plsmtpa01-02.prod.phx3.secureserver.net) (72.167.82.82) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 11 Jan 2012 19:41:45 +0000 Received: (qmail 13869 invoked from network); 11 Jan 2012 19:41:22 -0000 Received: from unknown (24.12.187.230) by p3plsmtpa01-02.prod.phx3.secureserver.net (72.167.82.82) with ESMTP; 11 Jan 2012 19:41:22 -0000 Message-ID: <4F0DE5E0.2070507@javactivity.org> Date: Wed, 11 Jan 2012 13:41:20 -0600 From: Steve Cohen User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.24) Gecko/20111108 Thunderbird/3.1.16 MIME-Version: 1.0 To: users@maven.apache.org Subject: Re: Howto access project version programmatically within application References: <4F0DBC76.6060605@javactivity.org> <4F0DC6DD.4060001@javactivity.org> <8F850C918DCDBF4891A6C99A6B766833072C1873@cacgex01.calgary.chartwelltechnology.com> <4F0DD08A.20109@javactivity.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 01/11/2012 12:14 PM, Wayne Fay wrote: >> getResourceAsStream("META_INF/MANIFEST.MF") and >> getResourceAsStream("/META_INF/MANIFEST.MF") without success even though >> I've verified that the file exists in the jar, > > Uhh that should be META-INF, right? > > Wayne > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org > For additional commands, e-mail: users-help@maven.apache.org > > > Duh - that's it. However -- fixing that the code now sees the manifest. However, the manifest it sees is not the one that I see when looking at the file in the jar with WinZip. Here is META-INF/MANIFEST.MF in the jar: Manifest-Version: 1.0 Archiver-Version: Plexus Archiver Created-By: Apache Maven Build-Jdk: 1.6.0_23 Built-By: Steve Implementation-Title: MyApp Implementation-Version: 0.6.1-SNAPSHOT Implementation-Vendor-Id: com.whatever Main-Class: com.whatever.Main SplashScreen-Image: SplashScreen.jpg Yet when my app reads the manifest ( getResourceAsStream("META_INF/MANIFEST.MF" ) and then iterates through the manifest attributes, it sees this: Manifest-Version : 1.0 Created-By : 1.4.2 (IBM Corporation) If I specify instead getResourceAsStream("/META_INF/MANIFEST.MF") then the file is not found. I can't make any sense of these symptoms. Manifests are just too weird, it seems. Unless someone can explain this weirdness, I'll try the approach with maven.properties. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org For additional commands, e-mail: users-help@maven.apache.org