You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "deckrider (JIRA)" <ji...@codehaus.org> on 2010/03/12 05:46:55 UTC

[jira] Created: (MASSEMBLY-478) allow overwriting newer files with older files contained within fileset

allow overwriting newer files with older files contained within fileset
-----------------------------------------------------------------------

                 Key: MASSEMBLY-478
                 URL: http://jira.codehaus.org/browse/MASSEMBLY-478
             Project: Maven 2.x Assembly Plugin
          Issue Type: Bug
    Affects Versions: 2.2-beta-2
         Environment: mvn -version
Apache Maven 2.2.1 (r801777; 2009-08-06 13:16:01-0600)
Java version: 1.6.0_17
Java home: /usr/lib/jvm/java-6-sun-1.6.0.17/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.29-bpo.2-amd64" arch: "amd64" Family: "unix"

            Reporter: deckrider


I have a situation where I want to unwind a zip file, and then overlay a few files in it with my own.

I've been using the maven dependency plugin to unwind this zip file and then maven assembly plugin to overwrite a few of the extracted files with my own (generally text based configuration that I keep under source code control).

This seems to work until my files have an earlier modification time than the files that I want to overwrite, in which case my own files do NOT overwite the others (I want my files to ALWAYS replace those in the zip file).

Thank in advance.  Here are the configuration details

>From my pom.xml:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <appendAssemblyId>false</appendAssemblyId>
          <attach>false</attach>
          <outputDirectory>${project.build.directory}</outputDirectory>
          <finalName>solaris</finalName>
          <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
          <descriptors>
            <descriptor>src/main/assembly/bin.xml</descriptor>
          </descriptors>
        </configuration>
        <executions>
          <execution>
            <id>overwrite</id>
            <phase>process-sources</phase>
            <goals>
              <goal>directory-single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

>From my src/main/assembly/bin.xml:

<assembly>
  <formats>
    <format>dir</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>
  <fileSets>
    <fileSet>
      <directory>${basedir}/src/main/bin</directory>
      <outputDirectory>${prefix}/jboss/bin</outputDirectory>
    </fileSet>
    <fileSet>
      <directory>${basedir}/src/main/conf</directory>
      <outputDirectory>${prefix}/jboss/server/wsa/conf</outputDirectory>
    </fileSet>
    <fileSet>
      <directory>${basedir}/src/main/deploy</directory>
      <outputDirectory>${prefix}/jboss/server/wsa/deploy</outputDirectory>
    </fileSet>
  </fileSets>
</assembly>



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MASSEMBLY-478) allow overwriting newer files with older files contained within fileset

Posted by "deckrider (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MASSEMBLY-478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=213605#action_213605 ] 

deckrider commented on MASSEMBLY-478:
-------------------------------------

Also tried with maven-assembly-plugin 2.2-beta-5 but the same results as 2.2-beta-2.

> allow overwriting newer files with older files contained within fileset
> -----------------------------------------------------------------------
>
>                 Key: MASSEMBLY-478
>                 URL: http://jira.codehaus.org/browse/MASSEMBLY-478
>             Project: Maven 2.x Assembly Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2-beta-2
>         Environment: mvn -version
> Apache Maven 2.2.1 (r801777; 2009-08-06 13:16:01-0600)
> Java version: 1.6.0_17
> Java home: /usr/lib/jvm/java-6-sun-1.6.0.17/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux" version: "2.6.29-bpo.2-amd64" arch: "amd64" Family: "unix"
>            Reporter: deckrider
>
> I have a situation where I want to unwind a zip file, and then overlay a few files in it with my own.
> I've been using the maven dependency plugin to unwind this zip file and then maven assembly plugin to overwrite a few of the extracted files with my own (generally text based configuration that I keep under source code control).
> This seems to work until my files have an earlier modification time than the files that I want to overwrite, in which case my own files do NOT overwite the others (I want my files to ALWAYS replace those in the zip file).
> Thank in advance.  Here are the configuration details
> From my pom.xml:
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-assembly-plugin</artifactId>
>         <configuration>
>           <appendAssemblyId>false</appendAssemblyId>
>           <attach>false</attach>
>           <outputDirectory>${project.build.directory}</outputDirectory>
>           <finalName>solaris</finalName>
>           <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
>           <descriptors>
>             <descriptor>src/main/assembly/bin.xml</descriptor>
>           </descriptors>
>         </configuration>
>         <executions>
>           <execution>
>             <id>overwrite</id>
>             <phase>process-sources</phase>
>             <goals>
>               <goal>directory-single</goal>
>             </goals>
>           </execution>
>         </executions>
>       </plugin>
> From my src/main/assembly/bin.xml:
> <assembly>
>   <formats>
>     <format>dir</format>
>   </formats>
>   <includeBaseDirectory>false</includeBaseDirectory>
>   <fileSets>
>     <fileSet>
>       <directory>${basedir}/src/main/bin</directory>
>       <outputDirectory>${prefix}/jboss/bin</outputDirectory>
>     </fileSet>
>     <fileSet>
>       <directory>${basedir}/src/main/conf</directory>
>       <outputDirectory>${prefix}/jboss/server/wsa/conf</outputDirectory>
>     </fileSet>
>     <fileSet>
>       <directory>${basedir}/src/main/deploy</directory>
>       <outputDirectory>${prefix}/jboss/server/wsa/deploy</outputDirectory>
>     </fileSet>
>   </fileSets>
> </assembly>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MASSEMBLY-478) allow overwriting newer files with older files contained within fileset

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MASSEMBLY-478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Lundberg updated MASSEMBLY-478:
--------------------------------------

    Description: 
I have a situation where I want to unwind a zip file, and then overlay a few files in it with my own.

I've been using the maven dependency plugin to unwind this zip file and then maven assembly plugin to overwrite a few of the extracted files with my own (generally text based configuration that I keep under source code control).

This seems to work until my files have an earlier modification time than the files that I want to overwrite, in which case my own files do NOT overwite the others (I want my files to ALWAYS replace those in the zip file).

Thank in advance.  Here are the configuration details

>From my pom.xml:
{code:xml}
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <appendAssemblyId>false</appendAssemblyId>
          <attach>false</attach>
          <outputDirectory>${project.build.directory}</outputDirectory>
          <finalName>solaris</finalName>
          <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
          <descriptors>
            <descriptor>src/main/assembly/bin.xml</descriptor>
          </descriptors>
        </configuration>
        <executions>
          <execution>
            <id>overwrite</id>
            <phase>process-sources</phase>
            <goals>
              <goal>directory-single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
{code}

>From my src/main/assembly/bin.xml:

{code:xml}
<assembly>
  <formats>
    <format>dir</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>
  <fileSets>
    <fileSet>
      <directory>${basedir}/src/main/bin</directory>
      <outputDirectory>${prefix}/jboss/bin</outputDirectory>
    </fileSet>
    <fileSet>
      <directory>${basedir}/src/main/conf</directory>
      <outputDirectory>${prefix}/jboss/server/wsa/conf</outputDirectory>
    </fileSet>
    <fileSet>
      <directory>${basedir}/src/main/deploy</directory>
      <outputDirectory>${prefix}/jboss/server/wsa/deploy</outputDirectory>
    </fileSet>
  </fileSets>
</assembly>
{code}


  was:
I have a situation where I want to unwind a zip file, and then overlay a few files in it with my own.

I've been using the maven dependency plugin to unwind this zip file and then maven assembly plugin to overwrite a few of the extracted files with my own (generally text based configuration that I keep under source code control).

This seems to work until my files have an earlier modification time than the files that I want to overwrite, in which case my own files do NOT overwite the others (I want my files to ALWAYS replace those in the zip file).

Thank in advance.  Here are the configuration details

>From my pom.xml:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <appendAssemblyId>false</appendAssemblyId>
          <attach>false</attach>
          <outputDirectory>${project.build.directory}</outputDirectory>
          <finalName>solaris</finalName>
          <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
          <descriptors>
            <descriptor>src/main/assembly/bin.xml</descriptor>
          </descriptors>
        </configuration>
        <executions>
          <execution>
            <id>overwrite</id>
            <phase>process-sources</phase>
            <goals>
              <goal>directory-single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

>From my src/main/assembly/bin.xml:

<assembly>
  <formats>
    <format>dir</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>
  <fileSets>
    <fileSet>
      <directory>${basedir}/src/main/bin</directory>
      <outputDirectory>${prefix}/jboss/bin</outputDirectory>
    </fileSet>
    <fileSet>
      <directory>${basedir}/src/main/conf</directory>
      <outputDirectory>${prefix}/jboss/server/wsa/conf</outputDirectory>
    </fileSet>
    <fileSet>
      <directory>${basedir}/src/main/deploy</directory>
      <outputDirectory>${prefix}/jboss/server/wsa/deploy</outputDirectory>
    </fileSet>
  </fileSets>
</assembly>



    
> allow overwriting newer files with older files contained within fileset
> -----------------------------------------------------------------------
>
>                 Key: MASSEMBLY-478
>                 URL: https://jira.codehaus.org/browse/MASSEMBLY-478
>             Project: Maven 2.x Assembly Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2-beta-2
>         Environment: mvn -version
> Apache Maven 2.2.1 (r801777; 2009-08-06 13:16:01-0600)
> Java version: 1.6.0_17
> Java home: /usr/lib/jvm/java-6-sun-1.6.0.17/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux" version: "2.6.29-bpo.2-amd64" arch: "amd64" Family: "unix"
>            Reporter: deckrider
>
> I have a situation where I want to unwind a zip file, and then overlay a few files in it with my own.
> I've been using the maven dependency plugin to unwind this zip file and then maven assembly plugin to overwrite a few of the extracted files with my own (generally text based configuration that I keep under source code control).
> This seems to work until my files have an earlier modification time than the files that I want to overwrite, in which case my own files do NOT overwite the others (I want my files to ALWAYS replace those in the zip file).
> Thank in advance.  Here are the configuration details
> From my pom.xml:
> {code:xml}
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-assembly-plugin</artifactId>
>         <configuration>
>           <appendAssemblyId>false</appendAssemblyId>
>           <attach>false</attach>
>           <outputDirectory>${project.build.directory}</outputDirectory>
>           <finalName>solaris</finalName>
>           <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
>           <descriptors>
>             <descriptor>src/main/assembly/bin.xml</descriptor>
>           </descriptors>
>         </configuration>
>         <executions>
>           <execution>
>             <id>overwrite</id>
>             <phase>process-sources</phase>
>             <goals>
>               <goal>directory-single</goal>
>             </goals>
>           </execution>
>         </executions>
>       </plugin>
> {code}
> From my src/main/assembly/bin.xml:
> {code:xml}
> <assembly>
>   <formats>
>     <format>dir</format>
>   </formats>
>   <includeBaseDirectory>false</includeBaseDirectory>
>   <fileSets>
>     <fileSet>
>       <directory>${basedir}/src/main/bin</directory>
>       <outputDirectory>${prefix}/jboss/bin</outputDirectory>
>     </fileSet>
>     <fileSet>
>       <directory>${basedir}/src/main/conf</directory>
>       <outputDirectory>${prefix}/jboss/server/wsa/conf</outputDirectory>
>     </fileSet>
>     <fileSet>
>       <directory>${basedir}/src/main/deploy</directory>
>       <outputDirectory>${prefix}/jboss/server/wsa/deploy</outputDirectory>
>     </fileSet>
>   </fileSets>
> </assembly>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira