You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Morgovsky, Alexander (US - Glen Mills)" <am...@deloitte.com> on 2006/12/09 04:23:38 UTC

Properties file exclusion from a Jar in Maven2

I am trying to exclude abc.properties from being put into the /classes
directory when a jar is created.  I try to do it like this.  However,
the file still is in the /classes directory after I run mvn package.  I
include this file as a resource because I need it during the build, but
I don't want to bundle it.  Should I take it out of the <resources>
element?  Someone please help as I have no clue as to how to proceed as
I tried all that I know.  Thanks.

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
      	<artifactId>maven-compiler-plugin</artifactId>
          <configuration>
          	<excludes>
                   		<exclude>**/abc.properties</exclude>
                   </excludes>
          </configuration>
</plugin> 


This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law.  If you are not the intended recipient, you should delete this message. 


Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. [v.E.1]

Re: Properties file exclusion from a Jar in Maven2

Posted by Dan Tran <da...@gmail.com>.
http://maven.apache.org/plugins/maven-resources-plugin/examples/include-exclude.html



On 12/8/06, Morgovsky, Alexander (US - Glen Mills) <am...@deloitte.com>
wrote:
>
> I am trying to exclude abc.properties from being put into the /classes
> directory when a jar is created.  I try to do it like this.  However,
> the file still is in the /classes directory after I run mvn package.  I
> include this file as a resource because I need it during the build, but
> I don't want to bundle it.  Should I take it out of the <resources>
> element?  Someone please help as I have no clue as to how to proceed as
> I tried all that I know.  Thanks.
>
> <plugin>
>        <groupId>org.apache.maven.plugins</groupId>
>        <artifactId>maven-compiler-plugin</artifactId>
>          <configuration>
>                <excludes>
>                                <exclude>**/abc.properties</exclude>
>                   </excludes>
>          </configuration>
> </plugin>
>
>
> This message (including any attachments) contains confidential information
> intended for a specific individual and purpose, and is protected by law.  If
> you are not the intended recipient, you should delete this message.
>
>
> Any disclosure, copying, or distribution of this message, or the taking of
> any action based on it, is strictly prohibited. [v.E.1]
>
>