简体   繁体   中英

Error with Ant build when transferring NetBeans project from Windows to Linux VM

I have a large NetBeans project that requires a fair amount of time to complete computations, so I've been trying to transition it to a Linux box hosted on Azure, so that I can SSH in, run the commands I need, and not have to worry about it occupying my desktop resources at home.

I've deployed using git, so all of the files matchup, excluding a few .properties files that are specific to the directory structure on my desktop (which I've adjusted for the Linux box), but I'm hitting an error whenever I run the build using ant.

ant -f ~/My/Project/Structure/ -Dnb.internal.action.name=run run

is the command I run, but it's faced with a "nbproject/build-impl.xml:800: ... is not a valid directory" . The problem is, it's somehow concatenating the new, Linux directory structure with the previous Windows structure when I try to build it. It's doing something similar to:

/home/UserName/My/Project/Structure/D:/Development/GitHub/My/Project/Structure

But I can't find where in the ant build it is still referencing the previous directory structure. On line 800 of build-impl.xml is the following

<java classname="@{classname}" dir="${work.dir}" fork="true">

but it's not evident where the variable ${work.dir} is defined. What's also interesting is that this is the final reference to this variable in the .xml file. Every other reference is prior to this, so it's strange that none of the earlier references throw an error but this one does.

Any ideas?

Just for comparison in my projects:

work.dir is set on line 148 of build-impl.xml with

<property name="work.dir" value="${basedir}"/>

basedir is set near the top build-impl.xml in project open tag

<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="JavaApplication26-impl">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM