Tagged: subversion

Deploying 3rd party artifacts into a subversion repository


references

svn-deploy.pom

<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.example</groupId>
  <artifactId>svn-deploy</artifactId>
  <packaging>pom</packaging>
  <version>1</version>
  <name>Subversion Deployment POM</name>
  <build>
    <extensions>
      <extension>
        <groupId>org.jvnet.wagon-svn</groupId>
        <artifactId>wagon-svn</artifactId>
        <version>1.12</version>
      </extension>
    </extensions>
  </build>
</project>

deploy:deploy-file

$ mvn deploy:deploy-file \
-f svn-deploy.pom \
-DrepositoryId=target-repository-id \
-Durl=svn:http://target.repository.url \
-Dfile=3rd.party.jar \
-DgroupId=target.group.id \
-DartifactId=target-artifact-id \
-Dpackaging=jar \
-Dversion=target.version

settings.xml

<settings ...>
  <servers>
    <server>
      <id>target-repository-id</id> <!-- -DrepositoryId=target-repository-id -->
      <username>username</username>
      <password>password</password>
    </server>
  </servers>
</settings>
Advertisements

svn repository migration


Smells Like Teen Spirit

Dump.

old@old:~$ \
> svnadmin dump --incremental --quiet {path/to/old/repository} > \
> {path/to/old/dump/file}

Copy.

old@old:~$ \
> scp {path/to/old/dump/file} new@new:{path/to/new/dump/file}

Load.

new@new:~$ \
> svnadmin load --quiet {path/to/new/repository} < \
> {path/to/new/dump/file}

With or Without You

Dump and Copy.

old@old:~$ \
> svnadmin dump --incremental --quiet {path/to/old/repository} | \
> ssh new@new "cat > {path/to/new/dump/file}"

Load.

new@new:~$ \
> svnadmin load --quiet {path/to/new/repository} < \
> {path/to/new/dump/file}

subversion [auto-props]


enable-auto-props = yes

[auto-props]

# Source files
*.c = svn:eol-style=native;svn:mime-type=text/plain
*.cpp = svn:eol-style=native;svn:mime-type=text/plain
*.h = svn:eol-style=native;svn:mime-type=text/plain
*.hpp = svn:eol-style=native;svn:mime-type=text/plain
*.hxx = svn:eol-style=native;svn:mime-type=text/plain
*.java = svn:eol-style=native;svn:mime-type=text/plain
*.py = svn:eol-style=native;svn:mime-type=text/plain

# Windows project files and makefiles
*.dsp = svn:eol-style=CRLF;svn:mime-type=text/plain
*.dsw = svn:eol-style=CRLF;svn:mime-type=text/plain
*.sln = svn:eol-style=CRLF;svn:mime-type=text/plain
*.vcproj = svn:eol-style=CRLF;svn:mime-type=text/plain

# Makefiles and GNU Autotools input files
Makefile = svn:eol-style=native;svn:mime-type=text/plain
*.am = svn:eol-style=native;svn:mime-type=text/plain
*.ac = svn:eol-style=native;svn:mime-type=text/plain
*.in = svn:eol-style=native;svn:mime-type=text/plain

# Linux scripts
*.sh = svn:eol-style=native;svn:executable;svn:mime-type=text/plain
*.m4 = svn:eol-style=native;svn:executable;svn:mime-type=text/plain
*.awk = svn:eol-style=native;svn:executable;svn:mime-type=text/plain

# Text files
*.txt = svn:eol-style=native;svn:mime-type=text/plain
INSTALL = svn:eol-style=native;svn:mime-type=text/plain
README = svn:eol-style=native;svn:mime-type=text/plain
LICENSE = svn:eol-style=native;svn:mime-type=text/plain

# HTML and XML files
*.htm = svn:eol-style=native;svn:mime-type=text/html
*.html = svn:eol-style=native;svn:mime-type=text/html
*.css = svn:eol-style=native;svn:mime-type=text/css
*.xml = svn:eol-style=native;svn:mime-type=text/html

# Images
*.png = svn:mime-type=image/png
*.jpg = svn:mime-type=image/jpeg
*.tif = svn:mime-type=image/tiff