Maven SVN checkout

Can someone tell me how to do validation and further updates from SVN using Maven? I read the documentation on maven.apache.org, but it seems that I am too dumb for this, because I cannot figure out how to use scm: checkout and scm: update without passing parameters to them on the command line. I mean when I run only:

mvn scm:checkout (or scm:update) clean install 

maven checks the sources for / target / checkout, then deletes it, and, of course, it has nothing to compile, so it creates an empty jar. So I have to write something like this:

mvn scm:checkout -DconnectionUrl=scm:svn:http://svn.my.dev/scm/repo/trunk/myProject -DcheckoutDirectory=src clean install

But I do not want! How to set these parameters inside pom.xml? And how can I set the current directory as checkoutDirectory? (probably this should not be a problem if you install it in pom.xml, because I can install it as $ {project.basedir}, but who knows) My pom.xml includes the following lines:

...
  <scm>
    <connection>scm:svn:http://svn.my.dev/scm/repo/trunk/myProject</connection>
    <developerConnection>scm:svn:http://svn.my.dev/scm/repo/trunk/myProject</developerConnection>
  </scm>
...
  <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-scm-plugin</artifactId>
        <version>1.7</version>
        <configuration>
      <username>username</username>
          <password>password</password>
        </configuration>
      </plugin>
...

Btw, what is the difference between a connection and a DeveloperConnection. The Maven documentation only says that DeveloperConnection is ... "Developer SCM Connection URL". This is very surprising for me, because I thought it was some connection for squirrels or maybe rabbits.

+5
source share
1 answer

checkoutDirectory maven-scm-plugin. , , scm:update workingDirectory ( )

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-scm-plugin</artifactId>
  <version>1.7</version>
  <configuration>
    <username>username</username>
    <password>password</password>
    <checkoutDirectory>${project.basedir}/src</checkoutDirectory>
    <workingDirectory>${project.basedir}/src</workingDirectory>
  </configuration>
</plugin>
+4

All Articles