<commit_before>/*
 * Copyright 2006 <NAME>.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.jvnet.jax_ws_commons.jaxws;

import com.sun.tools.ws.Invoker;
import java.io.*;
import java.net.MalformedURLException;
import java.net.URL;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Formatter;
import java.util.List;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.settings.Proxy;
import org.apache.maven.settings.Settings;

/**
 * 
 * @author gnodet <<EMAIL>>
 * @author dantran <<EMAIL>>
 * @version $Id: WsImportMojo.java 3169 2007-01-22 02:51:29Z dantran $
 */
abstract class WsImportMojo extends AbstractJaxwsMojo
{

    private static final String STALE_FILE_PREFIX = ".";
    /**
     * The package in which the source files will be generated.
     * 
     * @parameter
     */
    private String packageName;

    /**
     * Catalog file to resolve external entity references support TR9401, 
     * XCatalog, and OASIS XML Catalog format.
     * 
     * @parameter
     */
    private File catalog;

    /**
     * Set HTTP/HTTPS proxy. Format is [user[:password]@]proxyHost[:proxyPort]
     * 
     * @parameter
     */
    private String httpproxy;

    /**
     * Directory containing wsdl files.
     *
     * @parameter default-value="${basedir}/src/wsdl"
     */
    private File wsdlDirectory;

    /**
     * List of files to use for wsdls. If not specified, all .wsdl files 
     * in the wsdlDirectory will be used.
     * 
     * @parameter
     */
    protected List wsdlFiles;

    /**
     * List of external wsdl urls to be compiled.
     * 
     * @parameter
     */
    private List wsdlUrls;

    /**
     * Directory containing binding files.
     * 
     * @parameter default-value="${basedir}/src/jaxws"
     */
    protected File bindingDirectory;

    /**
     * List of files to use for bindings.If not specified, all .xml files 
     * in the bindingDirectory will be used.
     * 
     * @parameter
     */
    protected List bindingFiles;

    /**
     * &#64;WebService.wsdlLocation and &#64;WebServiceClient.wsdlLocation value.
     * 
     * <p>
     * Can end with asterisk in which case relative path of the wsdl will
     * be appended to the given <code>wsdlLocation</code>.
     * </p>
     *
     * <p>Example:
     * <pre>
     *  ...
     *  &lt;configuration>
     *      &lt;wsdlDirectory>src/mywsdls&lt;/wsdlDirectory>
     *      &lt;wsdlFiles>
     *          &lt;wsdlFile>a.wsdl&lt;/wsdlFile>
     *          &lt;wsdlFile>b/b.wsdl&lt;/wsdlFile>
     *          &lt;wsdlFile>${basedir}/src/mywsdls/c.wsdl&lt;/wsdlFile>
     *      &lt;/wsdlFiles>
     *      &lt;wsdlLocation>http://example.com/mywebservices/*&lt;/wsdlLocation>
     *  &lt;/configuration>
     *  ...
     * </pre>
     * wsdlLocation for <code>a.wsdl</code> will be http://example.com/mywebservices/a.wsdl</br>
     * wsdlLocation for <code>b/b.wsdl</code> will be http://example.com/mywebservices/b/b.wsdl
     * wsdlLocation for <code>${basedir}/src/mywsdls/c.wsdl</code> will be file://absolute/path/to/c.wsdl
     * </p>
     *
     * <p>
     * Note: External binding files cannot be used if asterisk notation is in place.
     * </p>
     * 
     * @parameter<commit_msg>fix line break<commit_after>/*
 * Copyright 2006 <NAME>.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.jvnet.jax_ws_commons.jaxws;

import com.sun.tools.ws.Invoker;
import java.io.*;
import java.net.MalformedURLException;
import java.net.URL;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Formatter;
import java.util.List;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.settings.Proxy;
import org.apache.maven.settings.Settings;

/**
 * 
 * @author gnodet <<EMAIL>>
 * @author dantran <<EMAIL>>
 * @version $Id: WsImportMojo.java 3169 2007-01-22 02:51:29Z dantran $
 */
abstract class WsImportMojo extends AbstractJaxwsMojo
{

    private static final String STALE_FILE_PREFIX = ".";
    /**
     * The package in which the source files will be generated.
     * 
     * @parameter
     */
    private String packageName;

    /**
     * Catalog file to resolve external entity references support TR9401, 
     * XCatalog, and OASIS XML Catalog format.
     * 
     * @parameter
     */
    private File catalog;

    /**
     * Set HTTP/HTTPS proxy. Format is [user[:password]@]proxyHost[:proxyPort]
     * 
     * @parameter
     */
    private String httpproxy;

    /**
     * Directory containing wsdl files.
     *
     * @parameter default-value="${basedir}/src/wsdl"
     */
    private File wsdlDirectory;

    /**
     * List of files to use for wsdls. If not specified, all .wsdl files 
     * in the wsdlDirectory will be used.
     * 
     * @parameter
     */
    protected List wsdlFiles;

    /**
     * List of external wsdl urls to be compiled.
     * 
     * @parameter
     */
    private List wsdlUrls;

    /**
     * Directory containing binding files.
     * 
     * @parameter default-value="${basedir}/src/jaxws"
     */
    protected File bindingDirectory;

    /**
     * List of files to use for bindings.If not specified, all .xml files 
     * in the bindingDirectory will be used.
     * 
     * @parameter
     */
    protected List bindingFiles;

    /**
     * &#64;WebService.wsdlLocation and &#64;WebServiceClient.wsdlLocation value.
     * 
     * <p>
     * Can end with asterisk in which case relative path of the wsdl will
     * be appended to the given <code>wsdlLocation</code>.
     * </p>
     *
     * <p>Example:
     * <pre>
     *  ...
     *  &lt;configuration>
     *      &lt;wsdlDirectory>src/mywsdls&lt;/wsdlDirectory>
     *      &lt;wsdlFiles>
     *          &lt;wsdlFile>a.wsdl&lt;/wsdlFile>
     *          &lt;wsdlFile>b/b.wsdl&lt;/wsdlFile>
     *          &lt;wsdlFile>${basedir}/src/mywsdls/c.wsdl&lt;/wsdlFile>
     *      &lt;/wsdlFiles>
     *      &lt;wsdlLocation>http://example.com/mywebservices/*&lt;/wsdlLocation>
     *  &lt;/configuration>
     *  ...
     * </pre>
     * wsdlLocation for <code>a.wsdl</code> will be http://example.com/mywebservices/a.wsdl</br>
     * wsdlLocation for <code>b/b.wsdl</code> will be http://example.com/mywebservices/b/b.wsdl</br>
     * wsdlLocation for <code>${basedir}/src/mywsdls/c.wsdl</code> will be file://absolute/path/to/c.wsdl
     * </p>
     *
     * <p>
     * Note: External binding files cannot be used if asterisk notation is in place.
     * </p>
     * 
     * @parameter
{'fraction_non_alphanumeric': 0.11848279457768508, 'fraction_numerical': 0.008863399374348279, 'mean_word_length': 2.5457486136783736, 'pattern_counts': {'":': 0, '<': 48, '<?xml version=': 0, '>': 76, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3833862', 'n_tokens_mistral': 2558, 'n_tokens_neox': 2379, 'n_words': 645}