You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by karthi <ra...@snovabits.net> on 2012/12/14 07:13:33 UTC

How to build both .tml, .java page using ant build

Hi,

I have developed an application in tapestry & it normally runs in tomcat7. 
Also when export manually as war file & deployed it in tomcat7 application
runs without issues.

But when using ant build, compile, package as a war file - Faced error in
running the application.

Compile build:


<target name="compile" depends="init" description="Source compilation.">
		<javac source="1.6" target="1.6" srcdir="src/main/java"
destdir="${target.classes.dir}" classpathref="classpath.compile"
debug="${debug}" />
</target>

Using this app compiled, but when hit the following error throws:

java.lang.RuntimeException: Page ExceptionReport did not generate any markup
when rendered. This could be because its template file could not be located,
or because a render phase method in the page prevented rendering.


When I checked in the classes folder of the build war file in tomcat server,
it contains only .java files not .tml files.

Using ant how to compile both .tml & .java files?

Anyone help me here?




--
View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-build-both-tml-java-page-using-ant-build-tp5718711.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to build both .tml, .java page using ant build

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Fri, 14 Dec 2012 04:13:33 -0200, karthi <ra...@snovabits.net>  
wrote:

> Hi,

Hi!

> <target name="compile" depends="init" description="Source compilation.">
> 		<javac source="1.6" target="1.6" srcdir="src/main/java"
> destdir="${target.classes.dir}" classpathref="classpath.compile"
> debug="${debug}" />
> </target>

You also need to copy files in src/main/resources to your  
${target.classes.dir}.

> Using ant how to compile both .tml & .java files?

.tml files are not compiled. Your problem here is that you didn't copy  
them to ${target.classes.dir}.

-- 
Thiago H. de Paula Figueiredo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to build both .tml, .java page using ant build

Posted by Lance Java <la...@googlemail.com>.
Firstly, I would urge you not to use ant. It's easy to end up with spaghetti
code that does not conform to any standard. Even though I hate maven, it's
1000 times better than ant. I suggest you build with gradle.

If you *must* use ant. Then I suggest that you at least conform to the maven
standard for directory layout here:
http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html

If you are going to use ant, you will need to do everything yourself.

This includes:
Compiling src/main/java and zipping the results into your jar (or copying to
the classes dir in your webapp)
Zipping all files in src/main/resources into your jar (or copying to the
classes dir in your webapp)

I'm sure some helpful soul has written an ant script that conforms to the
very sensible maven/gradle conventions. I suggest you google it.



--
View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-build-both-tml-java-page-using-ant-build-tp5718711p5718717.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to build both .tml, .java page using ant build

Posted by karthi <ra...@snovabits.net>.
Thanks for your reply...

In my application .tml pages also in src/main/resources



--
View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-build-both-tml-java-page-using-ant-build-tp5718711p5718713.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to build both .tml, .java page using ant build

Posted by Rural Hunter <ru...@gmail.com>.
Not familiar with ant but in maven I have to put the tml files in 
src/main/resources instead of src/main/java. I guess ant behaves similarily.

于 2012/12/14 14:13, karthi 写道:
> Hi,
>
> I have developed an application in tapestry & it normally runs in tomcat7.
> Also when export manually as war file & deployed it in tomcat7 application
> runs without issues.
>
> But when using ant build, compile, package as a war file - Faced error in
> running the application.
>
> Compile build:
>
>
> <target name="compile" depends="init" description="Source compilation.">
> 		<javac source="1.6" target="1.6" srcdir="src/main/java"
> destdir="${target.classes.dir}" classpathref="classpath.compile"
> debug="${debug}" />
> </target>
>
> Using this app compiled, but when hit the following error throws:
>
> java.lang.RuntimeException: Page ExceptionReport did not generate any markup
> when rendered. This could be because its template file could not be located,
> or because a render phase method in the page prevented rendering.
>
>
> When I checked in the classes folder of the build war file in tomcat server,
> it contains only .java files not .tml files.
>
> Using ant how to compile both .tml & .java files?
>
> Anyone help me here?
>
>
>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-build-both-tml-java-page-using-ant-build-tp5718711.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org