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

Allow faking of zip entry modification times. #36

Closed
wants to merge 3 commits into from

Conversation

GKFX
Copy link
Contributor

@GKFX GKFX commented Aug 28, 2017

Adds DateUtils.parseLenientDateTime. Discussed in mailing list thread "Reproducible JARs".

Adds DateUtils.parseLenientDateTime.
@bodewig
Copy link
Member

bodewig commented Sep 3, 2017

Many thanks @GKFX

I think we don't want to make DateUtils depend on Touch but rather have it the other way around. Could you please move the definition of DEFAULT_DF_FACTORY to DateUtils and have the field in Touch read it's value from DateUtils?

Tests would be nice ;-)

@GKFX
Copy link
Contributor Author

GKFX commented Sep 5, 2017

Will do, hopefully in a few days.

@GKFX
Copy link
Contributor Author

GKFX commented Sep 25, 2017

@bodewig I've done that, but ant test fails with the output

-antunit-warn-location:
     [echo] AntUnit tests must be run with /home/bateman/Geek/ant/bootstrap (or /home/bateman/Geek/ant/dist), not /usr/share/ant. Try './build.sh antunit-tests' for example.

antunit-tests:

BUILD FAILED
/home/bateman/Geek/ant/build.xml:1957: Problem: failed to create task or type antlib:org.apache.ant.antunit:antunit
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
No types or tasks have been defined in this namespace yet

This appears to be an antlib declaration. 
Action: Check that the implementing library exists in one of:
        -/usr/share/ant/lib
        -/home/bateman/.ant/lib
        -a directory added on the command line with the -lib argument

and I'm not quite sure how to fix that. Is the test I've written wrong?

@janmaterne
Copy link
Contributor

ant-unit-1.3 is in the repo (https://github.com/apache/ant/blob/master/lib/optional/ant-antunit-1.3.jar).
It seems that you use an Ant version for building this which does not contain this jar.

If you are building Ant itself I recommend cleaning the environment before (unset ANT_HOME) and bootstrap Ant by itself.

@bodewig
Copy link
Member

bodewig commented Sep 26, 2017

@GKFX really do as the error message says and run ./build.sh test or build.bat test depending on your platform from inside the Ant source tree. The wrapper script will ensure you have all the required libraries on your classpath.

@GKFX
Copy link
Contributor Author

GKFX commented Sep 26, 2017

Thank you, that all worked great. Hopefully that's ready to merge.

@bodewig
Copy link
Member

bodewig commented Sep 28, 2017

Looks great, many thanks! I'll merge it to both branches and add @since markers.

We'll need to update the manual (probably of zip, jar, war and ear). Also some additional unit tests for parseLenient would be good (good old JUnit tests). If you want to take a stab at either, please do so in a fresh PR. Otherwise I'll carve out some time to do it myself.

@asfgit asfgit closed this in 49fd601 Sep 28, 2017
asfgit pushed a commit that referenced this pull request Sep 28, 2017
@GKFX
Copy link
Contributor Author

GKFX commented Sep 28, 2017

@bodewig Great, I'll have a shot at the parseLenient tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants