<commit_before>package org.apache.maven.plugin.ear;

/*
 * Copyright 2001-2005 The Apache Software Foundation.
 *
 * 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.
 */

import org.apache.maven.artifact.Artifact;

/**
 * Builds an {@link EarModule} based on an <tt>Artifact</tt>.
 *
 * @author <a href="<EMAIL>"><NAME></a>
 * @version $Id$
 */
public final class EarModuleFactory
{

    /**
     * Creates a new {@link EarModule} based on the
     * specified {@link Artifact}.
     *
     * @param artifact the artifact
     * @return an ear module for this artifact
     */
    public static final EarModule newEarModule( Artifact artifact )
    {
        if ( "jar".equals( artifact.getType() ) )
        {
            return new JavaModule( artifact );
        }
        else if ( "ejb".equals( artifact.getType() ) )
        {
            return new EjbModule( artifact );
        }
        else if ( "ejb-client".equals( artifact.getType() ) )
        {
            return new EjbClientModule( artifact );<commit_msg>PR: MNG-1264 Submitted by: <NAME> Reviewed by:  <NAME> Support of PAR and EJB3 artifact's type in EAR plugin<commit_after>package org.apache.maven.plugin.ear;

/*
 * Copyright 2001-2005 The Apache Software Foundation.
 *
 * 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.
 */

import org.apache.maven.artifact.Artifact;

/**
 * Builds an {@link EarModule} based on an <tt>Artifact</tt>.
 *
 * @author <a href="<EMAIL>"><NAME></a>
 * @version $Id$
 */
public final class EarModuleFactory
{

    /**
     * Creates a new {@link EarModule} based on the
     * specified {@link Artifact}.
     *
     * @param artifact the artifact
     * @return an ear module for this artifact
     */
    public static final EarModule newEarModule( Artifact artifact )
    {
        if ( "jar".equals( artifact.getType() ) )
        {
            return new JavaModule( artifact );
        }
        else if ( "ejb".equals( artifact.getType() ) )
        {
            return new EjbModule( artifact );
        }
        else if ( "ejb3".equals( artifact.getType() ) )
        {
            return new EjbModule( artifact );
        }
        else if ( "par".equals( artifact.getType() ) )
        {
            return new EjbModule( artifact );
        }
        else if ( "ejb-client".equals( artifact.getType() ) )
        {
            return new EjbClientModule( artifact );
{'fraction_non_alphanumeric': 0.10459634649381261, 'fraction_numerical': 0.00883912787271656, 'mean_word_length': 2.5736842105263156, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, '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': '1798559', 'n_tokens_mistral': 983, 'n_tokens_neox': 922, 'n_words': 347}