views:

198

answers:

1

Hi there. I'm using maven-scm-plugin from within an own Maven Mojo via an injected ScmManager object and am trying to figure out how to add a file to the SCM ignore list.

The methods that ScmManager provides don't seem to support this.

An ideal solution would work in all SCM systems that maven-scm-plugin supports. I'm not sure though if every system has such a feature. That said, a solution which only works with Subversion repositories would help me as well.

The corresponding SVN command would be something like

svn propset svn:ignore -F theFile .

If ScmManager cannot directly set ignore lists, maybe it has an ability to set these kind of SCM properties?

Thanks for your help!

+1  A: 

The SCM Manager is an abstraction of more or less all version control tools so i think it would never offer such a functionality. But why do you need such a thing in Maven ? Maven is a build tool...Mabe you can create a separate stand-alone Maven Plugin to handle such things if you need for SVN only.

khmarbaise
Well, the SCM Manager offers methods to check out, check in, update, branch, tag, changelog files, so setting SCM properties is, imho, not a long way off.I need it for a POM preprocessor (I explained it a bit more in detail in the last comment to question [1]) to let the SCM system ignore the generated POM.I guess there's no other way than to either leave it be or implement it myself. Is it possbile to issue custom commands with the SvnExeScmProvider? [1]: http://stackoverflow.com/questions/2779003/maven-mojo-taking-complete-control-over-logging-forbid-other-plugins-to-log
Patrick Bergner
The intention of the SCM Manager is to support Maven in its process (like release etc.) but not the usual checkout/checkin etc. task (In my opinion). My question is open: Why do you need such a thing and not using commandline or other integrations (IDE, TortoiseSVN whatever?)
khmarbaise
Because my POM preprocessor is a Maven plugin and as such the use of the SCM Manager was very obvious and helpful so far. With it, I can check out or update files from SCM in a single line of code and get support for various SCM systems out of the box. I of course understand that it can only support the feature superset of all SCM systems. Nevertheless, I hoped it would be possible to do the ignore/propset stuff.
Patrick Bergner