You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by jo...@mentics.com on 2008/09/12 23:58:37 UTC

Assembly question

I have a multi-module project. One of the modules inside of it has
multiple source directories using build-helper-maven-plugin. I need
the source in one of those directories to be included in a special
place in the assembly. I was able to get that to work. There are a
couple java  files in that dir and I need the compiled class files as
well. However, whenever I try to add the binaries element, I get all
the binaries in all the source folders instead of only the one source
folder that I want.

    <moduleSet>
      <includes>
        <include>com.c:Services</include>
      </includes>
      <sources>
        <includeModuleDirectory>false</includeModuleDirectory>
        <fileSets>
            <fileSet>
                <directory>src/main/user/</directory>
                <outputDirectory>user</outputDirectory>
            </fileSet>
        </fileSets>
      </sources>
      <binaries>
        <includeDependencies>false</includeDependencies>
        <includes><include>src/main/user</include></includes>
        <excludes>
            <exclude>com/**/*.*</exclude>
            <exclude>src/main/*/com/**/*.*</exclude>
            <exclude>src/main/java/**/*.*</exclude>
            <exclude>src/main/java</exclude>
            <exclude>src/</exclude>
            <exclude>src/main/**/*.*</exclude>
            <exclude>src/**/*.*</exclude>
        </excludes>
        <outputDirectory>user</outputDirectory>
      </binaries>
    </moduleSet>

The excludes clause is a mess because I was trying anything--even with
all that, all the binaries were included in the output user directory.

How can I get it to include only the binaries from a certain source
folder? Or, it is delineated by specific packages, so how could I do
it by including only certain packages?

Thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Assembly question

Posted by jo...@mentics.com.
Okay, I had thought exclude would let me exclude some of the class
files. I removed the thing in moduleSet then, and created a top level
fileSet like this:

  <fileSets>
		<fileSet>
		  <directory>../../Services/target/classes</directory>
		  <includes>
		      <include>c/**/*.*</include>
              <include>vi/**/*.*</include>
		  </includes>
		  <outputDirectory>user</outputDirectory>
		</fileSet>
  </fileSets>

This appears to work.

Thank you!


On Mon, Sep 15, 2008 at 4:51 AM, Brett Porter <br...@gmail.com> wrote:
> All the binaries are compiled to the same location so this is to be
> expected. You might find you have more control using a file set reading from
> target and just including the classes you want.
> - Brett

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Assembly question

Posted by Brett Porter <br...@gmail.com>.
All the binaries are compiled to the same location so this is to be
expected. You might find you have more control using a file set reading from
target and just including the classes you want.
- Brett

2008/9/13 <jo...@mentics.com>

> I have a multi-module project. One of the modules inside of it has
> multiple source directories using build-helper-maven-plugin. I need
> the source in one of those directories to be included in a special
> place in the assembly. I was able to get that to work. There are a
> couple java  files in that dir and I need the compiled class files as
> well. However, whenever I try to add the binaries element, I get all
> the binaries in all the source folders instead of only the one source
> folder that I want.
>
>    <moduleSet>
>      <includes>
>        <include>com.c:Services</include>
>      </includes>
>      <sources>
>        <includeModuleDirectory>false</includeModuleDirectory>
>        <fileSets>
>            <fileSet>
>                <directory>src/main/user/</directory>
>                <outputDirectory>user</outputDirectory>
>            </fileSet>
>        </fileSets>
>      </sources>
>      <binaries>
>        <includeDependencies>false</includeDependencies>
>        <includes><include>src/main/user</include></includes>
>        <excludes>
>            <exclude>com/**/*.*</exclude>
>            <exclude>src/main/*/com/**/*.*</exclude>
>            <exclude>src/main/java/**/*.*</exclude>
>            <exclude>src/main/java</exclude>
>            <exclude>src/</exclude>
>            <exclude>src/main/**/*.*</exclude>
>            <exclude>src/**/*.*</exclude>
>        </excludes>
>        <outputDirectory>user</outputDirectory>
>      </binaries>
>    </moduleSet>
>
> The excludes clause is a mess because I was trying anything--even with
> all that, all the binaries were included in the output user directory.
>
> How can I get it to include only the binaries from a certain source
> folder? Or, it is delineated by specific packages, so how could I do
> it by including only certain packages?
>
> Thanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Brett Porter
Blog: http://blogs.exist.com/bporter/