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

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

From: stug23 <pat.podenski_at_gmail.com>
Date: Fri, 19 Jun 2009 07:59:57 -0700 (PDT)

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?

TIA!

-- 
View this message in context: http://www.nabble.com/How-to-ignore-Maven-target-folder%2C-but-not-Java-packages-containing-the-name-%27target%27-tp24113148p24113148.html
Sent from the Subversion Users mailing list archive at Nabble.com.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2363537
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-06-19 17:01:54 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.