GayaBalan / ivybeans

Automatically exported from code.google.com/p/ivybeans
0 stars 0 forks source link

When debugging, my ivy libraries are not included. #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Environment : ivybeans 1.1 M1, netbeans 6.5 RC2 , Windows XP , jdk 1.5

Description :  If I have Netbeans' compile on save feature turned off, I
can run my project with my ivy libraries just fine from within Netbeans. If
I try to debug, however, all my ivy included files are not included.

I see this in my output. When running, 

Execute:Java13CommandLauncher: Executing 'C:\Program
Files\Java\jdk1.5.0_10\bin\java' with arguments:
'-classpath'
'D:\Data\NetBeansProjects\JobViewer\build\classes; ---- all my ivy
libraries here ---'
'com.xxx.di.jobviewer.BaseFrame'

When debugging,

Execute:Java13CommandLauncher: Executing 'C:\Program
Files\Java\jdk1.5.0_10\bin\java' with arguments:
'-Xdebug'
'-Xrunjdwp:transport=dt_shmem,address=javadebug'
'-classpath'
'D:\Data\NetBeansProjects\JobViewer\build\classes'
'com.xxx.di.jobviewer.BaseFrame'

My libraries retrieved with ivy are not included on the classpath here.

Original issue reported on code.google.com by droozenr...@gmail.com on 5 Dec 2008 at 10:00

GoogleCodeExporter commented 9 years ago
I ended up solving this error, but I had to modify the ivy-impl.xml to do it. 
At the
end of the -ivy-retrieve target, I added:

        <property name="old.debug.classpath" value="${debug.classpath}"/>
        <var name="debug.classpath" unset="true"/>
        <if>
            <equals arg1="${old.debug.classpath}" arg2="$${debug.classpath}"/>
            <then>
                <property name="debug.classpath" value="${ivy.classpath.computed}"/>
            </then>
            <else>
                <property name="debug.classpath"
value="${old.debug.classpath}${path.separator}${ivy.classpath.computed}"/>
            </else>
        </if>
        <echo message="$${debug.classpath} : ${debug.classpath}"/>

I just copied the section that was changing the run.classpath variable to 
include the
ivy libraries and replaced the word run in my new section to debug. This is 
because
Netbeans uses debug.classpath when debugging its applications.

Original comment by droozenr...@gmail.com on 5 Dec 2008 at 10:22

GoogleCodeExporter commented 9 years ago
Already resolved in 13 :

Sending       
D:\scm\svn\code.google\ivybeans\trunk\ivybeans\ivy-
module\src\com\googlecode\ivybeans\module\resources\ivy-impl_.xml
Transmitting file data .
Committed revision 221.

It will be in the next release.

Original comment by laurent....@gmail.com on 5 Dec 2008 at 10:51

GoogleCodeExporter commented 9 years ago
From what I could tell from what is documented in issue 13, the ivy libraries 
not
being included was fixed for running junit tests, but the ivy-impl.xml given in 
that
issue would not fix it for debugging using NetBeans. The ivy-impl.xml that I
downloaded from issue 13 (and the source I checked out) fixed the 
run.test.classpath.

ivy-impl.xml should also fix the debug.classpath, as I noted in this issue.

Original comment by droozenr...@gmail.com on 9 Dec 2008 at 7:54

GoogleCodeExporter commented 9 years ago
Yes indeed, I have read too fast :(. I have to also add this lines for debug 
classpath. 

Original comment by laurent....@gmail.com on 10 Dec 2008 at 10:36

GoogleCodeExporter commented 9 years ago
I add issue22 that is relevant for this issue.

Original comment by laurent....@gmail.com on 10 Dec 2008 at 6:33

GoogleCodeExporter commented 9 years ago
Sending       
D:\scm\svn\code.google\ivybeans\trunk\ivybeans\ivy-module\src\com\googlecode\ivy
beans\module\resources\ivy-impl_.xml
Transmitting file data .
Committed revision 231.

Original comment by laurent....@gmail.com on 18 Jan 2009 at 2:54