Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Manifest Information #17

Closed
wants to merge 5 commits into from
Closed

Improve Manifest Information #17

wants to merge 5 commits into from

Conversation

ryantxu
Copy link
Contributor

@ryantxu ryantxu commented Aug 8, 2012

spinning out from:
https://github.com/ryantxu/waffle/commit/2a287b17f3de259f175944fda973b72233462f09#-P0

This adds a bunch of information to the .jar manifest info

ant failed for missing files folders.
this avoids warning when running with jdk 7
This lets you get the version information with
getPackage().getImplemenationXXX()
An XML document that shows waffle system setup
this beefs up the manifet and puts the same info in both src and bin
@dblock
Copy link
Collaborator

dblock commented Aug 10, 2012

This looks great to me. The git-based info is very helpful. Any reason I shouldn't merge it? @ryantxu ? @hazendaz ?

@dblock
Copy link
Collaborator

dblock commented Aug 10, 2012

I would like an entry in CHANGELOG though, please, about the new info classes.

@hazendaz
Copy link
Member

I don't see any downside to implementing manifest changes and java source changes as noted here.

@dblock
Copy link
Collaborator

dblock commented Aug 11, 2012

I'll be back to my office next week and will cherry pick the changes to the JARs. I'd love a separate PR for just that if you have time, but am happy to extract it otherwise.

The WaffleInfo I think needs a bit more work. It needs docs (how can someone use it?) and changelog edits. There's a suspicious update to Source/ThirdParty/tomcat7/lib/tomcat-juli.jar.

@ryantxu
Copy link
Contributor Author

ryantxu commented Aug 11, 2012

Sorry -- I tried to make these trivial issues, but it looks like all the changes I made get added to the same pull request. I thought it would be just the things I did on that branch.

The change to tomcat jar was just to get things compiling (also the bits that add empty folders). Currently with a clean checkout of the 1.5 branch there are a bunch of little things that need fixed to make build.cmd all work. I assume this is something that is just mid-development so you can ignore anything like that.

Also, my seem to get changed to full file replacements! I made #16 to deal with this individually. Again, you can probably ignore anything in the pull request and just follow the directions at:
http://lydiapchung.wordpress.com/2012/06/01/github-for-windows-line-endings/

For this issue, my real request is only to change the build ant task to be

  <target name="getgitdetails" >
    <exec executable="git" outputproperty="git.revision">
      <arg value="rev-parse"/>
      <arg value="HEAD"/>
    </exec>
  </target>

    <!-- package -->
    <target name="jar" depends="getgitdetails">
        <delete dir="${waffle.build}" />
        <mkdir dir="${waffle.build}" />
        <jar jarfile="${common.build}/${project.jar}.jar">
            <fileset dir="${waffle.lib}">
                <include name="waffle/**/*.class" />
            </fileset>
            <manifest>
                <attribute name="Specification-Title" value="WAFFLE - ${project.jar}" />
                <attribute name="Specification-Version" value="${waffle.version}" />
                <attribute name="Specification-Vendor" value="${company.name}" />
                <attribute name="Implementation-Title" value="WAFFLE - ${project.jar}" />
                <attribute name="Implementation-Version" value="${waffle.version} - ${user.name} - ${DSTAMP} ${TSTAMP} - ${git.revision}" />
                <attribute name="Implementation-Vendor" value="${company.name}" />
                <attribute name="Git-Revision" value="${git.revision}" />
                <attribute name="Created-By" value="${waffle.copyright}" />
            </manifest>     
        </jar>
        <jar jarfile="${common.build}/${project.jar}-src.zip">
            <fileset dir="${waffle.src}">
                <include name="waffle/**/*.java" />
            </fileset>
            <manifest>
                <attribute name="Specification-Title" value="WAFFLE - ${project.jar}" />
                <attribute name="Specification-Version" value="${waffle.version}" />
                <attribute name="Specification-Vendor" value="${company.name}" />
                <attribute name="Implementation-Title" value="WAFFLE - ${project.jar}" />
                <attribute name="Implementation-Version" value="${waffle.version} - ${user.name} - ${DSTAMP} ${TSTAMP} - ${git.revision}" />
                <attribute name="Implementation-Vendor" value="${company.name}" />
                <attribute name="Git-Revision" value="${git.revision}" />
                <attribute name="Created-By" value="${waffle.copyright}" />
            </manifest>
        </jar>
    </target>

The other build related change request is to set the java source level explicitly so it avoids compiler warnings source="${waffle.java.version}"

<javac 
                source="${waffle.java.version}" 
                target="${waffle.java.version}" 
                srcdir="${waffle.src}"
                destdir="${waffle.lib}" 
  ...

Can you try picking out changes for #16 and #17? I'll learn some more about git and clean up #14 with better javadocs etc if you guys like the basic idea

dblock added a commit that referenced this pull request Aug 13, 2012
…tails, such as GIT revision, cherry picked out of #17.
@dblock
Copy link
Collaborator

dblock commented Aug 13, 2012

I committed the manifest changes in dbf68c1, thank you.

@dblock dblock closed this Aug 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants