13

Using a google code svn as a basic maven repository is easy.

However, using mvn site:deploy efficiently on google code seems hard.

So far, I found only these solutions:

I am looking for a solution that allows new developers in my projects to check out the current source and just use it, without requiring to install PERL or learn weird steps to perform or wait hours.

Dr. Max Völkel
  • 1,780
  • 2
  • 17
  • 24

5 Answers5

1

How to deploy maven artifact to Google code svn?

I. Create m2 folder with releases and snaphots subfolders

II. Add dependency to maven-svn-wagon

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>2.5</version>
        <dependencies>
            <dependency>
                <groupId>com.google.code.maven-svn-wagon</groupId>
                <artifactId>maven-svn-wagon</artifactId>
                <version>1.4</version>
            </dependency>
        </dependencies>
    </plugin>

III. Add the path to the release and the snapshot repository

    <distributionManagement>
        <repository>
            <id>project-name.googlecode.com</id>
            <url>svn:https://project-name.googlecode.com/svn/m2/releases</url>
        </repository>
        <snapshotRepository>
            <id>project-name.googlecode.com</id>
            <url>svn:https://project-name.googlecode.com/svn/m2/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

IV. Don't forget to add to settings.xml your auth. code

    <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                          http://maven.apache.org/xsd/settings-1.0.0.xsd">
        <servers>
            <server>
                <id>project-name.googlecode.com</id>
                <username>yourlogin</username>
                <password>yoursvpassword</password>
            </server>
        </servers>
    </settings>

V. Do what you usually do for generating a site (you may consider having a look at maven-svn-wagon pom file with settings for maven-site-plugin)

VI. mvn clean deploy

Example of such pom

Also, might be helpful: maven-repository-for-google-code-project, maven svn wagon, MavenRepositoryInsideGoogleCode

Community
  • 1
  • 1
Alexey Grigorev
  • 2,415
  • 28
  • 47
1

Here is the simplest configuration that works for me in my Google code projects that have a maven repository on Google code svn:

<build>
...
<extensions>
    <extension>
        <groupId>org.jvnet.wagon-svn</groupId>
        <artifactId>wagon-svn</artifactId>
        <version>1.9</version>
    </extension>
</extensions>
</build>

<distributionManagement>
<repository>
    <uniqueVersion>false</uniqueVersion>
    <id>googlecode</id>
    <url>svn:https://myproject.googlecode.com/svn/trunk/repo/</url>
</repository>
</distributionManagement>

Note the url:
Replace 'myproject' with your real project name and also make sure that your create a folder named 'repo' (or whatever you want) in that location using your svn client.
You can make sure by browsing the sources via your google code site.
After your pom is configured as above, just run 'mvn deploy'.
Make sure you have your google code password at hand ...
Good luck ...

daniel_or_else
  • 658
  • 6
  • 11
0

Would a solution like rsync be easier? You essentially want to mirror a locally-generated tree of HTML etc., to a remote server.

Otherwise, you could get Maven to generate and publish the site as part of a continuous integration build using, say, Hudson. Not suitable if you need the site to be globally available - unless you want to open your Hudson server.

Matt Gumbley
  • 307
  • 2
  • 8
  • Sure that would help --- if teh Google SVN would run an rsync server which AFAIK it does not. AFAIK no svn server does. The problem really is the speed. Maven seems to open a new connection for every single file, or does at least a single webdav-put. Right now, I use a server from my university where I have ssh access and can run unzip on the server. Maven then does scp, log sin and runs unzip. Very nice, quicky and convenient. For Google SVN, I believe a smart put via SVN protocol instead of WebDAV protocol should work somehow, but I never got that to run. – Dr. Max Völkel Nov 03 '10 at 15:46
0

I've found good instruction to do what do you want with good responses:

http://babyloncandle.blogspot.com/2009/04/deploying-maven-artifacts-to-googlecode.html

But I suggest to use normal simple http hosting, because it is much more faster than Google Code SVN. Your project is not the one, which needs site, while locates in Google Code.

Eir Nym
  • 1,515
  • 19
  • 30
-2

I'd suggest you to use https://maven2-repository.dev.java.net/ to deploy your open source artifacts. Quite simple to configure and use.

The main "issue" is that you'll need to create an account but you can use it only to deploy the artifacts and still have your source code hosted on Google Code

JoséMi
  • 11,642
  • 2
  • 21
  • 25
  • VOTE DOWN. Hi, i am looking for a way to deploy a Maven *site*, that is tons and tons of generated html files that should be exposed on a public web server. Running a maven repository on top of a svn repository on google code is fine. – Dr. Max Völkel Oct 13 '10 at 15:54
  • I guess you've already tried the following configuration tips, right? http://code.google.com/p/maven-googlecode-plugin/wiki/MavenSiteDeployOnSVN – JoséMi Oct 14 '10 at 11:21
  • Ah, I will try this out. Thanks. However, it seems also to suggest the horribly slow wagon-svn provider. Thats simply too slow for thousands of files. – Dr. Max Völkel Oct 15 '10 at 12:06