public void copyProperties()

in src/main/java/org/apache/maven/plugins/antrun/AntRunMojo.java [466:485]


    public void copyProperties(Project antProject, MavenProject mavenProject) {
        if (!exportAntProperties) {
            return;
        }

        getLog().debug("Propagating Ant properties to Maven properties");
        Hashtable<String, Object> antProps = antProject.getProperties();
        Properties mavenProperties = mavenProject.getProperties();

        for (Map.Entry<String, Object> entry : antProps.entrySet()) {
            String key = entry.getKey();
            if (mavenProperties.getProperty(key) != null) {
                getLog().warn("Ant property '" + key + "=" + mavenProperties.getProperty(key)
                        + "' clashes with an existing Maven property, SKIPPING this Ant property propagation.");
                continue;
            }
            // it is safe to call toString directly since the value cannot be null in Hashtable
            mavenProperties.setProperty(key, entry.getValue().toString());
        }
    }