>>>>> Steinar Bang <[EMAIL PROTECTED]>:

[snip! Things that didn't work]

I added a <delete> of the original jar file, before the zip task, and
then it worked.  Ie.
 <unzip>
 <replace>
 <delete>
 <zip>

So it was probably something about zip and overwriting of the existing
file that caused the flaky behaviour.  Why it sometimes worked, and why
a <sleep> worked for some projects, is still a mystery.

The entire <plugin> config for each project, looks like this now:
   <plugin>
    <artifactId>maven-antrun-plugin</artifactId>
    <executions>
     <execution>
      <id>fix-snapshot-bundle-version</id>
      <goals>
       <goal>run</goal>
      </goals>
      <phase>verify</phase>
      <configuration>
       <tasks>
        <unzip src="${project.build.directory}/${artifactId}_${version}.jar" 
dest="${project.build.directory}" />
        <replace file="${project.build.directory}/META-INF/MANIFEST.MF" 
token="-SNAPSHOT" value=".SNAPSHOT" />
        <delete file="${project.build.directory}/${artifactId}_${version}.jar" 
/>
        <zip destfile="${project.build.directory}/${artifactId}_${version}.jar">
         <fileset dir="${project.build.directory}" includes="META-INF/**" />
        </zip>
       </tasks>
      </configuration>
     </execution>
    </executions>
   </plugin>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to