SourceForge Usage

SweatSuite includes a parent POM designed to make using SourceForge.net projects even easier. SourceForge.net uses a common setup for projects, so only the configuration specific to the project is needed. The POM for SourceForge is used by specifying the sourceforge artifact as the parent of the project and providing sourceforge-group and sourceforge-shellgroup properties.

Assumptions

The SourceForge POM makes the following assumptions about the project:

  • The project uses Subversion rather than CVS. If this assumption is not correct, then the automatic scm configuration must be overridden by the project.
  • The Maven artifactId is the same as the SourceForge unix name. If this assumption is not correct, then sourceforge-project property must be overridden for the issueManagement, scm and distributionManagement settings to function correctly.
  • The SourceForge descriptive project name is the same as the unix name. If this assumption is not correct, the site goal will not render the appropriate project name. Simply provide the descriptive name in the project.name element of the POM.

Properties used in the sourceforge POM:

sourceforge-group
is the group id number assigned to your project. You can get this number from the project_id parameter in the URL after navigating to any of your project services, such as the tracker, mailing lists, forums, services, downloads or tasks.
sourceforge-shellgroup
is part of the shell name of the project. It is needed by the site:deploy goal to construct the scp target correctly. Typically, the value of this parameter is first character of the project name, a forward slash, and the first two characters of the project name. For example, the shell group for the project widget would be w/wi. Unfortunately, Maven lacks an easy way to compute this value.

You can verify that this value is correct by navigating to the Admin->Shell/DB/Web menu on the project page on SourceForge.net (you may have to sign on as a project administrator first). Under Shell Service, there will be a number of values that start with /home/groups/. The value of sourceforge-shellgroup is the part between that string and the name of the project, without a leading or trailing / characters.

sourceforge-project
is the unix name of the SourceForge project. By default, this property is automatically set to the artifactId of the project and normally does not need to be changed.
sourceforge-root
is the DNS name of the SourceForge.net servers. By default, this property is set to sourceforge.net and normally does not need to be changed.

Automatic Configuration

  • Default reports are available.
  • The issueManagement configuration links to the SourceForge tracker for the project.
  • The scm configuration includes a public connection, developer connection and viewer URL.
  • Snapshot distributionManagement configuration is ready to use the project web space. Snapshots will be deployed to the m2repos subdirectory of the web space root.
  • Site distributionManagement configuration is ready to use the project web space. The site will be deployed to the artifactId subdirectory of the web space root.
  • There is a default project.description. You will almost always want to override the default description.

Configuring the SourceForge.net Web Space

The POM is configured to deploy the site generated by Maven to the $artifactId subdirectory of the project web space. This allows other subdirectories in the project web space to be used for different purposes. One such use is for snapshots so that users can easily use the most recent or nightly build. The snapshot directory is configured as the m2repos subdirectory.

The m2repos subdirectory should be created manually. In addition, you may want to make the generated site the default home page for the project. To do this, put a redirection PHP script in the root of the project web space. The script is a one-liner: <?php header("Location: artifactId"); exit; ?>, replacing artifactId with the actual artifactId of the project. The resulting web space layout will be something like this:

/home/groups/x/xx/[projectname]
|-- index.php
|
|-- [artifactId]
|   `-- [generated site]
|
|-- m2repos
|  `-- [deployed snapshots]
|
`-- [other resources]