[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: How to ignore Maven target folder, but not Java packages containing the name 'target'

From: Ryan Schmidt <subversion-2009b_at_ryandesign.com>
Date: Fri, 19 Jun 2009 12:46:10 -0500

On Jun 19, 2009, at 09:59, stug23 wrote:

> I use Subversion (and Subversive Eclipse plugin) for source code
> management
> of Maven projects.
>
> I have a Subversion global ignore configured for the pattern
> 'target', which
> is the directory where Maven writes all of its build products. However
> occasionally a developer wants to include a Java package which
> contains a
> 'target' directory. For example 'com/foo/bar/target/
> SomeJavaCode.java. This
> of course will cause this portion of Java source code to not be
> stored in
> Subversion.
>
> Making this problem somewhat more complex is the fact that Maven
> projects
> can be multi-module which is the case where there are a set of nested
> modules in a hierarchical structure, wherein each module has its own
> 'target' directory for writing build products. This hierarchical
> project
> directory structure is managed as a single Subversion source code
> tree.
>
> Is there a general way to ignore the Maven target directory while
> allowing a
> Java package with 'target' in its directory hierarchy? So far I
> have just
> been avoiding this problem by not using 'target' as part of a Java
> package
> name. However when a developer stumbles on this problem by
> inadvertently
> using 'target' in one of their Java package names, the source code
> for that
> path "mysteriously" fails to show up in Subversion. Then I have to
> track the
> problem down and tell the developer to please not use the name
> 'target' in
> their Java packaging.
>
> Is there a better way to handle this that can be managed using the
> Eclipse
> Subversive plugin?

Can you set the svn:ignore property to "target" on only those
directories where you want a "target" directory ignored, instead of
using global-ignores?

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2363592

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-06-19 19:47:24 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.