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

Timestamp skip: optional feature to skip unmodified source files to speed up builds #11

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

danigiri
Copy link

@danigiri danigiri commented May 1, 2012

When doing several maven runs, processing several JS files that haven't been modified is quite slow.
With this fork, setting the optional parameter checkFileModificationTimes=true means that maven will skip checking files that haven't been modified on the previous builds.
Features:

  • 'mvn clean' will ensure all of them are checked on the next run, handy for CI builds
  • skipped files are not present on the reports
  • added or removed files between builds should be taken into account automagically
  • all tests pass and new tests have been added to account for new functionality
  • no API changes are needed and class structure is pretty much as it was before
  • optionality means existing POM files are not broken and that this optimized behavior is an opt-in feature
  • report formats are unchanged

Caveats:

  • files with issues that haven't been modified will be skipped

Please let me know if you think this is useful and if there are any required tweaks, thanks.

@danigiri
Copy link
Author

danigiri commented May 1, 2012

First commit shows some old code on one of the files (tried a crappy scheme for the timestamps report) but it should be OK if you take all commits.

dani:jslint4java-maven-plugin/ (timestamp-skip) $ git status                                                                                                                                       [1:33:27]
# On branch timestamp-skip
nothing to commit (working directory clean)
dani:jslint4java-maven-plugin/ (timestamp-skip) $ mvn -Pdist clean verify install -q                                                                                                               [1:48:54]
[debug] execute contextualize
[debug] execute contextualize

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.googlecode.jslint4java.maven.FileListerTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.216 sec
Running com.googlecode.jslint4java.maven.FileTimestampExcludeListerTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.043 sec
Running com.googlecode.jslint4java.maven.JSLintMojoTest
Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.797 sec
Running com.googlecode.jslint4java.maven.MultiReportWriterTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec
Running com.googlecode.jslint4java.maven.ReportWriterImplTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.009 sec
Running com.googlecode.jslint4java.maven.TimestampFormatterTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec

Results :

Tests run: 32, Failures: 0, Errors: 0, Skipped: 0

[debug] execute contextualize
[debug] execute contextualize
dani:jslint4java-maven-plugin/ (timestamp-skip) $ 

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.

1 participant