ability to specify manifest file as part of jarClasses in WOTask.java

From: Bob Schwarzmann (dijourn..mail.com)
Date: Fri Aug 18 2006 - 16:53:26 EDT

  • Next message: Bob Schwarzmann: "WOCompile classpath generation"

    Hi,

    It would be good to be able to specify a manifest file when jar'ing classes
    during woframework and woapplication tasks.

    So I filed a bug:
    http://objectstyle.org/jira/browse/WOL-252

    And I have a patch to implement the behavior. I'm looking to make
    contributions to the project (woproject mostly, not wolips). Here's the
    patch if someone could review and commit on my behalf until I've earned
    commit access.

    Thanks,
    -Bob.

    Index: woproject/src/java/org/objectstyle/woproject/ant/WOTask.java
    ===================================================================
    --- woproject/src/java/org/objectstyle/woproject/ant/WOTask.java
    (revision 2998)
    +++ woproject/src/java/org/objectstyle/woproject/ant/WOTask.java
    (working copy)
    ..-88,6 +88,8 @@

            protected String principalClass;

    + protected String manifest;
    +
            protected String jarName;

            protected String customInfoPListContent;
    ..-158,6 +160,15 @@
                    this.principalClass = principalClass;
            }

    + /**
    + * Method setManifest.
    + *
    + *..aram manifest
    + */
    + public void setManifest(String manifest) {
    + this.manifest = manifest;
    + }
    +
            public void setWsDestDir(String wsDestDir) {
                    this.wsDestDir = wsDestDir;
            }
    ..-171,6 +182,15 @@
                    return principalClass;
            }

    + /**
    + * Method getManifest.
    + *
    + *..eturn String
    + */
    + public String getManifest() {
    + return manifest;
    + }
    +
            /**
             *..eturn The CustomContent for the Info.plist
             */
    ..-376,6 +396,24 @@
                    return classes.size() > 0;
            }

    + /**
    + * Method hasManifest.
    + *
    + *..eturn boolean
    + */
    + public boolean hasManifest() {
    + return( manifest != null );
    + }
    +
    + /**
    + * Method getManifestFile.
    + *
    + *..eturn File
    + */
    + public File getManifestFile() {
    + return( new File( manifest ) );
    + }
    +
            /**
             * Method jarSources
             *
    ..-419,6 +457,10 @@
                            }
                    }

    + if( hasManifest() ){
    + jar.setManifest( getManifestFile() );
    + }
    +
                    jar.execute();
            }



    This archive was generated by hypermail 2.0.0 : Fri Aug 18 2006 - 16:53:27 EDT