maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From motes motes <mort.mo...@gmail.com>
Subject No source jar attached with maven-assembly-plugin
Date Thu, 29 Aug 2013 19:02:04 GMT
I have the following project maven (3.10) multi project:

    my-mvn
     -> my-mvn-a
     -> my-mvn-b
     -> my-mvn-assembly

`my-mvn-a` and `my-mvn-b` build source jars using:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>verify</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>

In `my-mvn-assembly` I would like to build a zip including jars and source
jars from `my-mvn-a` and `my-mvn-b`.

I am using the following descriptor:


    <assembly
    xmlns="
http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
http://maven.apache.org/xsd/assembly-1.1.2.xsd">
    <id>my-assembly</id>
    <formats>
    <format>zip</format>
    </formats>
    <includeBaseDirectory>false</includeBaseDirectory>
    <dependencySets>
    <dependencySet>
    <outputDirectory>/</outputDirectory>
    <useProjectArtifact>true</useProjectArtifact>
    <includes>
    <include>my.group:my-mvn-a</include>
                    <include>my.group:my-mvn-a:jar:sources</include>
    <!-- <include>*:sources</include> -->
    </includes>
    </dependencySet>
    </dependencySets>
    </assembly>

but only the jar with the compiled classes is included in the zip. Why does
it not include the sources jar build using the maven-sources-plugin?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message