rakeshp / ant-web-tasks Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/ant-web-tasks
Automatically exported from code.google.com/p/ant-web-tasks
What steps will reproduce the problem?
1. Install the latest version of ant
2. Configure your powerwar task, for example as described in the guide (though
not totally recommendable because that /somePath/.*.css is a very dangerous
regex, you could actually be replacing more than you want e.g. you could be
replacing something like /somepah/myfile.css" cssStyle="", go with \S+ instead)
3. build your war file.
What is the expected output? What do you see instead?
Some times you nail it, sometimes nothing happens.
What version of the product are you using? On what operating system?
Latest.
Please provide any additional information below.
The reason for this bug is that, apparently, the CacheBust class has its
createFileSet and createRule methods wrong.
This class is simply returning new instances of these object types to ant
instead of storing as well the respective references, as the PowerWar seems to
be doing in its create methods.
Solution:
Comment out the two Create methods of the CacheBuster source file.
It is not a problem, because ant will use the Add Rule and the Add FileSet
instead. When Ant uses the ADD methods instead of the createOnes things work
out.
Original issue reported on code.google.com by [email protected]
on 2 Aug 2012 at 6:11
Original shouldCacheBust method:
public boolean shouldCacheBust(File file){
return this.filesToApplyCacheBustingRules.isEmpty() || this.filesToApplyCacheBustingRules.contains(file.getPath());
}
Do you really want to exercise cachebusting whenever the filesToApply cache
busting rule is open?
Even though i do not use the scenario for modifying the original files, i
modified this method to look like this:
public boolean shouldCacheBust(File file){
return (!this.filesToApplyCacheBustingRules.isEmpty() && this.filesToApplyCacheBustingRules.contains(file.getPath()));
}
Original issue reported on code.google.com by [email protected]
on 3 Aug 2012 at 7:00
Javadoc comments are needed all over the codebase.
Original issue reported on code.google.com by [email protected]
on 31 Aug 2009 at 6:43
Each Rule in the CacheBuster might optionally have a fileset. The scope of
cache buster in this case would narrow down to only these group of files.
Original issue reported on code.google.com by [email protected]
on 31 Aug 2009 at 2:28
Following are the Steps to reproduce the problem:
1. Write two nested rule tags for cacheBuster.
2. One is for an specific "from" with the "file" argument.
e.g
<rule from="/js/someFile.js"
to="/js/someFile.js?version=%{version-file-txt}"
file="web/js/someFile.js" />
note: rule like the above must be the first one to reproduce the problem.
Second rule can be any rule without <file> argument (With the file argument
it ll be hard to debug).
e.g
<rule from="/css/(.+)\.css"
to="/css/$1.css?version=%{version-file-txt}"/>
3. Now run the powerWar target which already nested the cacheBuster tag.
Now as expected when the first rule will be applied it should first check
if the file "someFile.js" has been modified. If yes then
%{version-file-txt} should be replaced with the new version-text else
should be remain same as the older one. The second rule when applied should
replace the value of %{version-file-txt} with the new version-text as there
is no "file" attribute specified to check the lastModifiedTime so it should
always be the new one.
Now when i tried with the above mentioned steps, for the first rule it
works fine and replace %{version-file-txt} with the previous value as the
file "someFile.js" has not been modified since last time, but for the
second rule it's not replacing the %{version-file-txt} with the new
version-text value as it suppose to do.
I am using version 1.0 on windows machine.
Take a look in the <code>init()</code> method of CacheBuster.java file.
I found a very small bug in this method. In this method you get the latest
version-text by calling <code>getVersionText()</code> and assign it to
<code>versionText</code> of type <code>String</code>. Now after that you
iterate through a <code>List</code> of type <code>CacheBusterRule</code>.
While iterating for each rule the value of the variable
<code>versionText</code> is getting changed if the "file" attribute defined
for any rule.
Original issue reported on code.google.com by manishkashyap09
on 1 Sep 2009 at 7:48
Unit test cases needs to be written for the CacheBuster and Injector
implementations.
Original issue reported on code.google.com by [email protected]
on 31 Aug 2009 at 2:27
What steps will reproduce the problem?
1. Download the latest netbeans
2. Use the PowerWar cachebuster task in project
3. Do not specify the cacheBusterPreferencesFile attribute in your task, but
let it run with he default location
What is the expected output? What do you see instead?
When cache busting finishes and cach buster tries to serialize the preferences
files, a Error serialiyzing ....preferes-file will be returned.
What version of the product are you using? On what operating system?
Latest version of ant and web tasks.
Please provide any additional information below.
It seems that the default location is trying to write in Profile Files/netbeast
installation folder.
Make the following local changes:
protected File cacheBusterPreferencesFile; //new File(".cache-buster.pref");
//problem with this pproach, from within netbeans we get: Error while
serializing CacheBusterPreference into: C:\Program Files (x86)\NetBeans
7.0.1\.cache-buster.pref
Added to the class constructor the following:
cacheBusterPreferencesFile = new File(this.project.getBaseDir(),
".cache-buster.pref"); //default location.
Original issue reported on code.google.com by [email protected]
on 3 Aug 2012 at 7:34
What steps will reproduce the problem?
1. Upgrade you ant version from 1.6.x to 1.7.1
2. Call target that has used the powerwar CacheBusting
What is the expected output? What do you see instead?
Same set of files should be updated with the as it was getting updated in 1.6.x
however it was not replacing any matching token of any existing rule.
What version of the product are you using? On what operating system?
Earlier I was using ant 1.6.5 but now I am using ant 1.7.1
Original issue reported on code.google.com by [email protected]
on 25 Nov 2011 at 11:56
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.