// Path: appassembler-maven-plugin/src/main/java/org/codehaus/mojo/appassembler/daemon/DaemonGeneratorException.java
// public class DaemonGeneratorException
//     extends Exception
// {
//     /**
//      *
//      */
//     private static final long serialVersionUID = 6989317744526360832L;
// 
//     /**
//      * Exception with message.
//      *
//      * @param message The message for the execption.
//      */
//     public DaemonGeneratorException( String message )
//     {
//         super( message );
//     }
// 
//     /**
//      * The exception with an appropriate message and the cause of the failure.
//      *
//      * @param message The message to show.
//      * @param cause The root cause.
//      */
//     public DaemonGeneratorException( String message, Throwable cause )
//     {
//         super( message, cause );
//     }
// }


import org.codehaus.mojo.appassembler.daemon.DaemonGeneratorException;
import org.codehaus.mojo.appassembler.model.Dependency;
import org.codehaus.plexus.interpolation.InterpolationException;
import org.codehaus.plexus.util.StringUtils;
import java.io.File;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
import org.apache.maven.project.MavenProject;
import org.apache.maven.shared.mapping.MappingUtils;
     * Used by AssembleMojo and JavaServiceWrapperDaemonGenerator.
     * @param artifact {@link Artifact}
     * @param layout {@link ArtifactRepositoryLayout}
     * @param useTimestampInSnapshotFileName timestamp or not.
     * @param outputFileNameMapping The name mapping.
     * @return the dependency.
     */
    public static Dependency create(Artifact artifact, ArtifactRepositoryLayout layout,
                                    boolean useTimestampInSnapshotFileName, String outputFileNameMapping)
    {
        Dependency dependency = create( artifact, layout, outputFileNameMapping );

        if ( artifact.isSnapshot() && !useTimestampInSnapshotFileName )
        {
            dependency.setRelativePath( ArtifactUtils.pathBaseVersionOf( layout, artifact ) );
        }

        return dependency;
    }

    /**
     * Used by AbstractBooterDaemonGenerator.
     * @param project {@link MavenProject}
     * @param id The id.
     * @param layout {@link ArtifactRepositoryLayout}
     * @param outputFileNameMapping The name mapping.
     * @return the dependency.
     */
    public static Dependency create( MavenProject project, String id, ArtifactRepositoryLayout layout,
                                     String outputFileNameMapping )
// Path: appassembler-maven-plugin/src/main/java/org/codehaus/mojo/appassembler/daemon/DaemonGeneratorException.java
// public class DaemonGeneratorException
//     extends Exception
// {
//     /**
//      *
//      */
//     private static final long serialVersionUID = 6989317744526360832L;
// 
//     /**
//      * Exception with message.
//      *
//      * @param message The message for the execption.
//      */
//     public DaemonGeneratorException( String message )
//     {
//         super( message );
//     }
// 
//     /**
//      * The exception with an appropriate message and the cause of the failure.
//      *
//      * @param message The message to show.
//      * @param cause The root cause.
//      */
//     public DaemonGeneratorException( String message, Throwable cause )
//     {
//         super( message, cause );
//     }
// }


// Path: appassembler-maven-plugin/src/main/java/org/codehaus/mojo/appassembler/util/DependencyFactory.java
import org.codehaus.mojo.appassembler.daemon.DaemonGeneratorException;
import org.codehaus.mojo.appassembler.model.Dependency;
import org.codehaus.plexus.interpolation.InterpolationException;
import org.codehaus.plexus.util.StringUtils;
import java.io.File;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
import org.apache.maven.project.MavenProject;
import org.apache.maven.shared.mapping.MappingUtils;

     * Used by AssembleMojo and JavaServiceWrapperDaemonGenerator.
     * @param artifact {@link Artifact}
     * @param layout {@link ArtifactRepositoryLayout}
     * @param useTimestampInSnapshotFileName timestamp or not.
     * @param outputFileNameMapping The name mapping.
     * @return the dependency.
     */
    public static Dependency create(Artifact artifact, ArtifactRepositoryLayout layout,
                                    boolean useTimestampInSnapshotFileName, String outputFileNameMapping)
    {
        Dependency dependency = create( artifact, layout, outputFileNameMapping );

        if ( artifact.isSnapshot() && !useTimestampInSnapshotFileName )
        {
            dependency.setRelativePath( ArtifactUtils.pathBaseVersionOf( layout, artifact ) );
        }

        return dependency;
    }

    /**
     * Used by AbstractBooterDaemonGenerator.
     * @param project {@link MavenProject}
     * @param id The id.
     * @param layout {@link ArtifactRepositoryLayout}
     * @param outputFileNameMapping The name mapping.
     * @return the dependency.
     */
    public static Dependency create( MavenProject project, String id, ArtifactRepositoryLayout layout,
                                     String outputFileNameMapping )
        throws DaemonGeneratorException