Netbeans reloads no class when "Apply Code Changes" in a maven project with remote jpda debugging -
so have maven project produces jar package containing ant tasks.
when run ant build script somewhere else jpda open, , debug tasks, mytask netbeans, apple code changes button doesn't work. here output of netbeans console:
cd /trunks/tasks; java_home=/opt/jdk /opt/netbeans-7.0/java/maven/bin/mvn -djpda.stopclass=com.abc.ant.mytask compile scanning projects... ------------------------------------------------------------------------ building tasks 1.0-snapshot ------------------------------------------------------------------------ [resources:resources] using 'utf-8' encoding copy filtered resources. copying 1 resource com/abc/ant [compiler:compile] compiling 1 source file /trunks/tasks/build/classes ------------------------------------------------------------------------ build success ------------------------------------------------------------------------ total time: 1.548s finished at: fri mar 09 17:45:24 cst 2012 final memory: 11m/149m ------------------------------------------------------------------------ netbeans: classes reload: [] netbeans: no class reload
so netbeans tell maven class needs compiled. however, netbeans won't reload compiled class. because ant process using jar package produced maven project, or because of other reasons?
note: have custom configurations, output compiled classes, , put jar package. reason?
update 2:
ok found reason myself.
it's because added following line under <build>
in pom.xml:
<directory>${my.custom.work.dir}/build</directory>
so maven output compiled class files directory, rather default ${basedir}/target
. however, netbeans seems stupid recognize -- tries default directory.
now question easier: is there way make ide recognize adding configuration in pom?
in [your_home_path]/.netbeans/7.0/maven/conf
find setting.xml
file. here can set ${my.custom.work.dir}
in <profiles>
tag can find examples here (in section properties)
edit :
it works me kind of pom (in netbeans 7.0.1) :
<build> <plugins> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-compiler-plugin</artifactid> <version>2.3.2</version> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> </plugins> <directory>${my.custom.work.dir}/build</directory> </build> <properties> <my.custom.work.dir>/home/alain/bureau</my.custom.work.dir> <project.build.sourceencoding>utf-8</project.build.sourceencoding>
Comments
Post a Comment