You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2012/03/31 17:01:46 UTC

DO NOT REPLY [Bug 53011] New: Ant Jasper task fails after one error

https://issues.apache.org/bugzilla/show_bug.cgi?id=53011

             Bug #: 53011
           Summary: Ant Jasper task fails after one error
           Product: Tomcat 6
           Version: 6.0.35
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Jasper
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: nicholas@nicholaswilliams.net
    Classification: Unclassified


The Ant task for Jasper JSP compiling (JspC) will fail (if failOnError = true)
after a single error, without looking for other errors.

This can be very challenging for large projects. For example, we have 2,487
JSPs that need compiling. If some part of the Java code is changed that breaks
hundreds of JSPs (which, admittedly, means a developer didn't do his job
correctly, but still), the continuous integration build for our project fails
(as it should), but the log only shows one of the errors.

The Ant task should have a new property, "failAfterAllErrors," that makes it
log all compile failures as errors but continue compiling until every JSP
compilation has been attempted.

This is similar to how the javac Ant task works. It logs ALL of the compile
errors, and only after having tried to compile everything, it fails the build.

Thoughts?

I am interested in possibly contributing code for this feature. I will email
the developers' list later about it.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 53011] Ant Jasper task fails after one error

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53011

--- Comment #1 from Christopher Schultz <ch...@christopherschultz.net> 2012-04-02 21:20:00 UTC ---
+1 to the idea, but I'd like to see an implementation that is more in line with
similar tasks like <javac> and <junit>: they use "failOnError" (defaults to
'true' to get current behavior) and "errorProperty". If you set
failOnError=false and errorProperty=jasperFailed, then you can test for
jasperFailed and emit any kind of warning/error you'd like from your ant
target.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 53011] Ant Jasper task fails after one error

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53011

--- Comment #2 from Nick Williams <ni...@nicholaswilliams.net> 2012-04-03 22:06:04 UTC ---
Note: While I don't disagree with your suggestion, Chris, and we can certainly
discuss it further, that's not how Ant's javac works. Javac failonerror
defaults to true, and when it's set to true, the behavior is to try compiling
everything and wait until all compile errors have happened before failing. In
fact, as far as I can tell, there is actually no way to make it behave like
JspC (fail after the first error).

Relevant to 53011, 53012, 53031 and 53032: Per discussions with Chris Schultz
in the users list, we agree that it would probably make more sense to separate
the Ant task from the JspC class and place a new Ant task in the
o.a.catalina.ant package (possibly o.a.catalina.ant.jasper?). Research about
the state of the task needs to be completed. Further discussions about this
will take place in the developer's list, and then these issues will be updated
when a consensus is reached.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53011] Ant Jasper task fails after one error

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53011

Marc Pompl <ma...@lynorics.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marc.pompl@lynorics.de

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53011] Ant Jasper task fails after one error

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53011

--- Comment #5 from Marc Pompl <ma...@lynorics.de> ---
(In reply to Marc Pompl from comment #4)
> Patch to add an option "failFast"

See corresponding issue for the maven-jspc-plugin
https://github.com/Jasig/jspc-maven-plugin/issues/17

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53011] Ant Jasper task fails after one error

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53011

--- Comment #4 from Marc Pompl <ma...@lynorics.de> ---
Created attachment 31555
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31555&action=edit
Patch to add an option "failFast"

Appended is a patch that adds an option "failFast". Default is "false", so the
build does not fail at the first compile error, but after the last JSP has been
parsed using the following message:
"Failed to compile JSPS: org.apache.jasper.JasperException: Aborted due to
compilation failures!"

Additionally, a tiny statistic will be printed.
"JSP-compilations: 465, Errors: 20, Time elapsed: 60,777 sec"

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 53011] Ant Jasper task fails after one error

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53011

--- Comment #3 from Christopher Schultz <ch...@christopherschultz.net> 2012-04-03 22:11:01 UTC ---
(In reply to comment #2)
> Javac failonerror defaults to true, and when it's set to true, the behavior
> is to try compiling everything and wait until all compile errors have
> happened before failing. In fact, as far as I can tell, there is actually
> no way to make it behave like JspC (fail after the first error).

Fair enough. Perhaps a third setting to make it fail-fast (to emulate current
behavior).

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org