bodtx
bodtx

Reputation: 609

How to include parent's sources in an assembly

I have an assembly executed in my top level project (the parent). I extract all the sources to allow the client to compile the project.

The problem is that all is extracted except the parent project it self (as described here). Of course this is not really a problem because it does not contains sources but it is needed to compile the project from the extracted sources.

So how can I include the parent in his own assembly?

Upvotes: 2

Views: 1358

Answers (1)

bodtx
bodtx

Reputation: 609

Finally, I've added a fileset only for the parent:

<fileSets>
    <fileSet>
        <excludes>
            <exclude></exclude>
        </excludes>
        <includes>
            <include>*pom.xml</include>
            <include>src/**</include>
        </includes>
        <outputDirectory></outputDirectory>
    </fileSet>
</fileSets>
<moduleSets>
    <moduleSet>
        <includes>
            <include>com.xxx</include>
            <include>com.xxx</include>
        </includes>
        <sources>
            <excludeSubModuleDirectories>false</excludeSubModuleDirectories>
            <fileSets>
                <fileSet>
                    <excludes>
                        <exclude>**/target/**</exclude>
                    </excludes>
                </fileSet>
            </fileSets>
        </sources>
    </moduleSet>
</moduleSets>

I've kept module for child's sources which works quite well. Thanks for all

Upvotes: 1

Related Questions