bw-maven-plugin/src/main/java/fr/fastconnect/factory/tibco/bw/maven/packaging/ApplicationManagement.java
public void removeDefaultBindingIfNotExists(Properties properties) {
		List<Bw> bwServices = this.getBWServices();
		
		for (Bw bw : bwServices) {
			String path = "bw[" + bw.getName() + "]/bindings/binding[]/machine";
			
			List<Binding> bindings = bw.getBindings().getBinding();
			for (Iterator<Binding> iterator = bindings.iterator(); iterator.hasNext();) {
				Binding binding = (Binding) iterator.next();
//				if (binding.getName().equals("") && properties.getString(path) == null) {
				if (binding.getName().equals("") && !properties.containsKey(path)) {
					iterator.remove();
				}
			}
		}

		List<Adapter> adapterServices = this.getAdapterServices();

		for (Adapter adapter : adapterServices) {
			String path = "adapter[" + adapter.getName() + "]/bindings/binding[]/machine";

			List<Binding> bindings = adapter.getBindings().getBinding();
			for (Iterator<Binding> iterator = bindings.iterator(); iterator.hasNext();) {
				Binding binding = (Binding) iterator.next();
//				if (binding.getName().equals("") && properties.getString(path) == null) {
				if (binding.getName().equals("") && !properties.containsKey(path)) {
					iterator.remove();
				}
			}
		}
	}
public void removeDefaultBindingIfNotExists(Properties properties) {
		List<Bw> bwServices = this.getBWServices();
		
		for (Bw bw : bwServices) {
			String path = "bw[" + bw.getName() + "]/bindings/binding[]/machine";
			
			List<Binding> bindings = bw.getBindings().getBinding();
			for (Iterator<Binding> iterator = bindings.iterator(); iterator.hasNext();) {
				Binding binding = (Binding) iterator.next();
//				if (binding.getName().equals("") && properties.getString(path) == null) {
				if (binding.getName().equals("") && !properties.containsKey(path)) {
					iterator.remove();
				}
			}
		}

		List<Adapter> adapterServices = this.getAdapterServices();

		for (Adapter adapter : adapterServices) {
			String path = "adapter[" + adapter.getName() + "]/bindings/binding[]/machine";

			List<Binding> bindings = adapter.getBindings().getBinding();
			for (Iterator<Binding> iterator = bindings.iterator(); iterator.hasNext();) {
				Binding binding = (Binding) iterator.next();
//				if (binding.getName().equals("") && properties.getString(path) == null) {
				if (binding.getName().equals("") && !properties.containsKey(path)) {
					iterator.remove();
				}
			}
		}
	}
<p>
This will remove from the XML the default binding (with empty name
attribute) if it is not found in the properties.
</p>