public void run() throws IOException {
ProjectManager.mutex().writeAccess(new Mutex.Action<Void>() {
@Override
public Void run() {
EditableProperties ep = updateHelper.getProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH);
File buildProperties = new File(System.getProperty("netbeans.user"), "build.properties"); // NOI18N
ep.setProperty("user.properties.file", buildProperties.getAbsolutePath()); //NOI18N
// set jaxws.endorsed.dir property (for endorsed mechanism to be used with wsimport, wsgen)
setJaxWsEndorsedDirProperty(ep);
// move web-service-clients one level up from in project.xml
// WS should be part of auxiliary configuration
Element data = helper.getPrimaryConfigurationData(true);
NodeList nodes = data.getElementsByTagName(JAX_RPC_CLIENTS);
if (nodes.getLength() > 0) {
Element oldJaxRpcClients = (Element) nodes.item(0);
Document doc = createNewDocument();
Element newJaxRpcClients = doc.createElementNS(JAX_RPC_NAMESPACE, JAX_RPC_CLIENTS);
NodeList childNodes = oldJaxRpcClients.getElementsByTagName(JAX_RPC_CLIENT);
for (int i = 0; i < childNodes.getLength(); i++) {
Element oldJaxRpcClient = (Element) childNodes.item(i);
Element newJaxRpcClient = doc.createElementNS(JAX_RPC_NAMESPACE, JAX_RPC_CLIENT);
NodeList nodeProps = oldJaxRpcClient.getChildNodes();
for (int j = 0; j < nodeProps.getLength(); j++) {
Node n = nodeProps.item(j);
if (n instanceof Element) {
Element oldProp = (Element) n;
Element newProp = doc.createElementNS(JAX_RPC_NAMESPACE, oldProp.getLocalName());
String text = oldProp.getTextContent();
newProp.setTextContent(text);
newJaxRpcClient.appendChild(newProp);
}
}
newJaxRpcClients.appendChild(newJaxRpcClient);
}
aux.putConfigurationFragment(newJaxRpcClients, true);
data.removeChild(oldJaxRpcClients);
helper.putPrimaryConfigurationData(data, true);
}
updateHelper.putProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH, ep);
ep = helper.getProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH);
if (!ep.containsKey(ProjectProperties.INCLUDES)) {
ep.setProperty(ProjectProperties.INCLUDES, "**"); // NOI18N
}
if (!ep.containsKey(ProjectProperties.EXCLUDES)) {
ep.setProperty(ProjectProperties.EXCLUDES, ""); // NOI18N
}
helper.putProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH, ep);
try {
ProjectManager.getDefault().saveProject(J2SEProject.this);
} catch (IOException e) {