Skip to content
This repository was archived by the owner on Oct 12, 2023. It is now read-only.
This repository was archived by the owner on Oct 12, 2023. It is now read-only.

Documentation - add example to compile translated jsps #190

Description

@freshcodemonger

The plugin defaults to translate jsps into java files but not compile those jsps for war file packaging. The tomcatJasper task is dependent on classes. Since classes runs first, your existing .java files will be turned into .class files, then your jsps will be turned into .java files. This is the correct ordering as your .class files may be required to translate or compile your jsp / jsp java files.

The problem is that you can't make tomcatJasper finalized by compileJava because it depends on classes which causes a circular dependency and won't work in gradle.

The solution I eventually came up with is:

task compileJspJava(type: JavaCompile)  {
	  source = 'build/jasper'
	  classpath = compileJava.classpath
	  destinationDir = compileJava.destinationDir
}

tomcatJasper.finalizedBy compileJspJava

I believe this is what most people are wanting

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions