Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

Maven and Sourceforge

This page is a starting point for anyone that uses Maven and sourceforge.net. The intention is to provide a step-by-step guide on deploying your site and your files using Maven onto sourceforge.net.

Upload the website

SCM information

  • Download and install putty(Easiest is to use the windows installer)
  • Install svn itself (not only tortoiseSVN, otherwise you get an error from the scm plugin)
  • Add the scm information to your pom.xml (see http://maven.apache.org/scm/plugins/index.html). This is an example if you use subversion:
    Code Block
    <scm>
      <connection>scm:svn:https://vigilog.svn.sourceforge.net/svnroot/vigilog/trunk</connection>
      <developerConnection>scm:svn:https://vigilog.svn.sourceforge.net/svnroot/vigilog/trunk/</developerConnection>
      <url>http://vigilog.svn.sourceforge.net/viewvc/vigilog/trunk</url>
    </scm>
    
  • Use
    Code Block
    mvn scm:validate
    
    to check your scm information
  • Use
    Code Block
    mvn scm:changelog
    
    , just to test the connection to sourceforge. If you get the error
    No Format
    svn: PROPFIND of '/svnroot/vigilog/trunk': Server certificate verification failed: issuer is not trusted (https://svn.sourceforge.net)
    
    , then run the svn command manually: "svn log -v https://svn.sourceforge.net/svnroot/vigilog/trunk" and choose "accept permanently". After that, run the maven command again.

Mailinglists and forums

  • If you use mailinglists, you can add them to your pom.xml as follows:
    Code Block
    <mailingLists>
      <mailingList>
        <name>JWebUnit Development Mailing list</name>
        <subscribe>http://lists.sourceforge.net/mailman/listinfo/jwebunit-development</subscribe>
        <unsubscribe>http://lists.sourceforge.net/mailman/listinfo/jwebunit-development</unsubscribe>
        <archive>http://sourceforge.net/mailarchive/forum.php?forum_id=40831</archive>
        <post>jwebunit-development@lists.sourceforge.net</post>
      </mailingList>
      <mailingList>
        <name>JWebUnit User Mailing list</name>
        <subscribe>http://lists.sourceforge.net/mailman/listinfo/jwebunit-users</subscribe>
        <unsubscribe>http://lists.sourceforge.net/mailman/listinfo/jwebunit-users</unsubscribe>
        <archive>http://sourceforge.net/mailarchive/forum.php?forum_id=40830</archive>
        <post>jwebunit-users@lists.sourceforge.net</post>
      </mailingList>
    </mailingLists>
    
    Of course, you will need to add the maven-project-info-reports-plugin to your <reports/> section.

Change report and issue tracking

In the pom.xml:

Code Block
<issueManagement>
  <system>sourceforge</system><!--don't care-->
  <url>http://sourceforge.net/tracker/?group_id=61302</url>
</issueManagement>

Do not forget to set your own sourceforge group_id.

Then add the changes plugin to the reports:

Code Block
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-changes-plugin</artifactId>
  <inherited>false</inherited>
  <reportSets>
    <reportSet>
      <reports>
        <report>changes-report</report>
      </reports>
    </reportSet>
  </reportSets>
  <configuration>
    <issueLinkTemplate>http://sourceforge.net/support/tracker.php?aid=%ISSUE%</issueLinkTemplate>
  </configuration>
</plugin>

Now in your change.xml, you can put:

Code Block
<action type="fix" dev="Julien Henry" due-to="Pete Bull" issue="1554148">
               bla bla
</action>

This will generate a link for your issue by replacing %ISSUE% with issue attribut value. (With the previous example: http://sourceforge.net/support/tracker.php?aid=1554148)

Deploy the site

  • Add a distribution management section to your pom.xml:
    Code Block
    <distributionManagement>
      <site>
       <id>sourceforge.net</id>
       <url>scp://shell.sourceforge.net/home/groups/v/vi/vigilog/htdocs</url>
      </site>
    </distributionManagement>
    
    Use the correct directory for your own project. Note that you have to use lowercase for the directories, otherwise the Maven plugin will try to create directories where it has no permissions.
  • Put this section in your settings.xml. Make sure the id's match!
    Code Block
    <settings>
      ...
      <servers>
            <server>
                <id>sourceforge.net</id>
                <username>festerwim</username>
                <password>mysecretpwd</password>
                <filePermissions>775</filePermissions>
                <directoryPermissions>775</directoryPermissions>
            </server>
        </servers>
    </settings>
    
    Replace username and password ofcourse.
    Sidenote: the "775" means owning user can do anything, all users of the owning group
    can do anything, anybody else can read and execute. This is important if you want others (besides yourself) to be able to update the website.
  • Deploy your website by using "mvn site:deploy"
    You will get a warning "The authenticity of host 'shell.sourceforge.net' can't be established.", but just type "yes" to continue.