Ok here are the steps I took:

Copied 
https://svn.apache.org/repos/asf/maven/resources/trunk/apache-source-release-assembly-descriptor/src/main/resources/assemblies/source-release.xml
to src/assemble/

Modified pom to include
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>single</goal>
            </goals>
            <phase>package</phase>
            <configuration>
              <descriptors>
                <descriptor>src/assemble/source-release.xml</descriptor>
              </descriptors>
            </configuration>
          </execution>
        </executions>
      </plugin>

After checking the source-release archive I found that it was building
the archives with an internal path that was my local path e.g.
D:\ide\maven

Why? After running with -X here is the output

--------------console output - Start
[DEBUG] Before assembly is interpolated:

<?xml version="1.0" encoding="UTF-8"?><assembly>
  <id>source-release</id>
  <formats>
    <format>tar.gz</format>
    <format>zip</format>
  </formats>
  <fileSets>
    <fileSet>
      <directory>${project.basedir}</directory>
      <outputDirectory></outputDirectory>
      <excludes>
        <exclude>**/${project.build.directory}/**</exclude>
      </excludes>
    </fileSet>
  </fileSets>
</assembly>


[DEBUG] After assembly is interpolated:

<?xml version="1.0" encoding="UTF-8"?><assembly>
  <id>source-release</id>
  <formats>
    <format>tar.gz</format>
    <format>zip</format>
  </formats>
  <fileSets>
    <fileSet>
      <directory>D:\ide\maven\maven-eclipse-plugin</directory>
      <outputDirectory></outputDirectory>
      <excludes>
        <exclude>**/D:\ide\maven\maven-eclipse-plugin\target/**</exclude>
      </excludes>
    </fileSet>
  </fileSets>
</assembly>
--------------console output - Stop

It looks like the interpolation doesn't work for windows paths (nor
does it make those paths relative)

Also the descriptor is not ignoring IDE files so they were added as well.

I changed src/assemble/source-release.xml to

<assembly>
  <id>source-release</id>
  <formats>
    <format>tar.gz</format>
    <format>zip</format>
  </formats>
  <fileSets>
    <fileSet>
      <directory>.</directory>
      <outputDirectory></outputDirectory>
      <useDefaultExcludes>true</useDefaultExcludes>
      <excludes>
        <exclude>target/**</exclude>
        <exclude>.classpath</exclude>
        <exclude>.project</exclude>
        <exclude>.settings/**</exclude>
      </excludes>
    </fileSet>
  </fileSets>
</assembly>

All up it took 30-60 minutes to fiddle, re-run and check files.

It's going to sound like griping but links to threads and reasonable
instructions would be preferred.
I am happy to do the work but I am at an information disadvantage
compared to people requesting the work being done.
Instead of being able to do this investigation at my leisure where it
wouldn't matter so much I've had to find the time over the weekend to
do this so I can push the release forward.
And a bit more hand holding would have saved me time :)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to