All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.maven.plugin.assembly.model.FileItem Maven / Gradle / Ivy

Go to download

A Maven plugin to create archives of your project's sources, classes, dependencies etc. from flexible assembly descriptors.

There is a newer version: 3.7.1
Show newest version
/*
 * $Id$
 */

package org.apache.maven.plugin.assembly.model;

  //---------------------------------/
 //- Imported classes and packages -/
//---------------------------------/

import java.util.Date;

/**
 * 
 *         A file allows individual file inclusion with the option
 * to change
 *         the destination filename not supported by fileSets.
 *       
 * 
 * @version $Revision$ $Date$
 */
public class FileItem implements java.io.Serializable {


      //--------------------------/
     //- Class/Member Variables -/
    //--------------------------/

    /**
     * 
     *             Sets the absolute or relative path from the
     * module's directory
     *             of the file to be included in the assembly.
     *           
     */
    private String source;

    /**
     * 
     *             Sets the output directory relative to the root
     *             of the root directory of the assembly. For
     * example,
     *             "log" will put the specified files in the log
     * directory.
     *           
     */
    private String outputDirectory;

    /**
     * 
     *             Sets the destination filename in the
     * outputDirectory.
     *             Default is the same name as the source's file.
     *           
     */
    private String destName;

    /**
     * 
     *             
     *             Similar to a UNIX permission, sets the file mode
     * of the files included.
     *             Format: (User)(Group)(Other) where each
     * component is a sum of Read = 4,
     *             Write = 2, and Execute = 1.  For example, the
     * value 0644
     *             translates to User read-write, Group and Other
     * read-only.
     *             (more
     * on unix-style permissions)
     *           	
     *           
     */
    private String fileMode;

    /**
     * 
     *             
     *             Sets the line-endings of the files in this file.
     *             Valid values are:
     *             
    *
  • "keep" - Preserve all line * endings
  • *
  • "unix" - Use Unix-style line * endings
  • *
  • "lf" - Use a single line-feed line * endings
  • *
  • "dos" - Use DOS-style line * endings
  • *
  • "crlf" - Use Carraige-return, * line-feed line endings
  • *
* * */ private String lineEnding; /** * * Sets whether to determine if the file is * filtered. * */ private boolean filtered = false; //-----------/ //- Methods -/ //-----------/ /** * Get * Sets the destination filename in the * outputDirectory. * Default is the same name as the source's file. * * * @return String */ public String getDestName() { return this.destName; } //-- String getDestName() /** * Get * * Similar to a UNIX permission, sets the file mode * of the files included. * Format: (User)(Group)(Other) where each * component is a sum of Read = 4, * Write = 2, and Execute = 1. For example, the * value 0644 * translates to User read-write, Group and Other * read-only. * (more * on unix-style permissions) * * * * @return String */ public String getFileMode() { return this.fileMode; } //-- String getFileMode() /** * Get * * Sets the line-endings of the files in this file. * Valid values are: *
    *
  • "keep" - Preserve all line * endings
  • *
  • "unix" - Use Unix-style line * endings
  • *
  • "lf" - Use a single line-feed line * endings
  • *
  • "dos" - Use DOS-style line * endings
  • *
  • "crlf" - Use Carraige-return, * line-feed line endings
  • *
* * * * @return String */ public String getLineEnding() { return this.lineEnding; } //-- String getLineEnding() /** * Get * Sets the output directory relative to the root * of the root directory of the assembly. For * example, * "log" will put the specified files in the log * directory. * * * @return String */ public String getOutputDirectory() { return this.outputDirectory; } //-- String getOutputDirectory() /** * Get * Sets the absolute or relative path from the * module's directory * of the file to be included in the assembly. * * * @return String */ public String getSource() { return this.source; } //-- String getSource() /** * Get * Sets whether to determine if the file is * filtered. * * * @return boolean */ public boolean isFiltered() { return this.filtered; } //-- boolean isFiltered() /** * Set * Sets the destination filename in the * outputDirectory. * Default is the same name as the source's file. * * * @param destName */ public void setDestName(String destName) { this.destName = destName; } //-- void setDestName(String) /** * Set * * Similar to a UNIX permission, sets the file mode * of the files included. * Format: (User)(Group)(Other) where each * component is a sum of Read = 4, * Write = 2, and Execute = 1. For example, the * value 0644 * translates to User read-write, Group and Other * read-only. * (more * on unix-style permissions) * * * * @param fileMode */ public void setFileMode(String fileMode) { this.fileMode = fileMode; } //-- void setFileMode(String) /** * Set * Sets whether to determine if the file is * filtered. * * * @param filtered */ public void setFiltered(boolean filtered) { this.filtered = filtered; } //-- void setFiltered(boolean) /** * Set * * Sets the line-endings of the files in this file. * Valid values are: *
    *
  • "keep" - Preserve all line * endings
  • *
  • "unix" - Use Unix-style line * endings
  • *
  • "lf" - Use a single line-feed line * endings
  • *
  • "dos" - Use DOS-style line * endings
  • *
  • "crlf" - Use Carraige-return, * line-feed line endings
  • *
* * * * @param lineEnding */ public void setLineEnding(String lineEnding) { this.lineEnding = lineEnding; } //-- void setLineEnding(String) /** * Set * Sets the output directory relative to the root * of the root directory of the assembly. For * example, * "log" will put the specified files in the log * directory. * * * @param outputDirectory */ public void setOutputDirectory(String outputDirectory) { this.outputDirectory = outputDirectory; } //-- void setOutputDirectory(String) /** * Set * Sets the absolute or relative path from the * module's directory * of the file to be included in the assembly. * * * @param source */ public void setSource(String source) { this.source = source; } //-- void setSource(String) private String modelEncoding = "UTF-8"; /** * Set an encoding used for reading/writing the model. * * @param modelEncoding the encoding used when reading/writing the model. */ public void setModelEncoding( String modelEncoding ) { this.modelEncoding = modelEncoding; } /** * @return the current encoding used when reading/writing this model. */ public String getModelEncoding() { return modelEncoding; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy