Using ANT to compile ejb will cause invalid break point

Hi all,

Good day!

I have tested the following, when using Intellij to compile an ejb and then deploy to weblogic server. The breakpoint set is valid.

However, when I use Ant tool to compile the ejb inside Intellij 'Ant Build' wizard, and then deploy, the breakpoint become invalid. I have even checked the Build File Properties - Execution - 'Run Under Custom JDK' option to make sure that the JDK used for IntelliJ and 'Ant Build' tool is the same.

Besides that I also set the IntelliJ compiler output path to be the same as 'Ant Build' script. My thought is
that if I set the 'Ant Build' class output path to be the same as IntelliJ compilation class output path, the IntelliJ should actually find the class while doing debugging. In this case, I 'could' assume that the source code and class file is sync. However, this would not be the case.

Is there anywhere I could use 'Ant Build' tool inside IntelliJ to compile the ejb instead of compile it with IntelliJ compiler without getting the invalid breakpoint?

Thanks in advance.

Regards,
cs.



Attachment(s):
test.zip
0
1 comment

Hi,

I think your problem is caused by missing debug information in the compiled
.class files. When compiling with Ant, you have to set the attribute
debug="yes"
and maybe optimize="no" of the task(s) in your build script to be able to debug the classes. Hope this helps, Sascha "chin song" ]]> wrote:

Hi all,

>

Good day!

>

I have tested the following, when using Intellij to compile an ejb and then deploy to weblogic

server. The breakpoint set is valid.
>

However, when I use Ant tool to compile the ejb inside Intellij 'Ant Build' wizard, and then

deploy, the breakpoint become invalid. I have even checked the Build File Properties - Execution -
'Run Under Custom JDK' option to make sure that the JDK used for IntelliJ and 'Ant Build' tool is
the same.
>

Besides that I also set the IntelliJ compiler output path to be the same as 'Ant Build' script.

My thought is

that if I set the 'Ant Build' class output path to be the same as IntelliJ compilation class

output path, the IntelliJ should actually find the class while doing debugging. In this case, I
'could' assume that the source code and class file is sync. However, this would not be the case.
>

Is there anywhere I could use 'Ant Build' tool inside IntelliJ to compile the ejb instead of

compile it with IntelliJ compiler without getting the invalid breakpoint?
>

Thanks in advance.

>

Regards,
cs.




0

Please sign in to leave a comment.