Author: ltheussl
Date: Wed Feb 15 11:41:31 2006
New Revision: 378073

URL: http://svn.apache.org/viewcvs?rev=378073&view=rev
Log:
Add templates for ClearCase, Starteam and Perforce for scm-usage page.

Modified:
    maven/maven-1/plugins/trunk/xdoc/project.xml
    
maven/maven-1/plugins/trunk/xdoc/src/main/org/apache/maven/xdoc/util/ScmUtil.java
    
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/scm/clearcase.xml
    
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/scm/perforce.xml
    
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/scm/starteam.xml
    
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates.properties
    
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates_de.properties
    
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates_fr.properties
    
maven/maven-1/plugins/trunk/xdoc/src/test/org/apache/maven/xdoc/util/ScmUtilTest.java
    maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml

Modified: maven/maven-1/plugins/trunk/xdoc/project.xml
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/project.xml?rev=378073&r1=378072&r2=378073&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/project.xml (original)
+++ maven/maven-1/plugins/trunk/xdoc/project.xml Wed Feb 15 11:41:31 2006
@@ -268,5 +268,25 @@
         <comment>This library is already loaded by maven's core. Be careful to 
use the same version number as in the core.</comment>
       </properties>
     </dependency>
+    <dependency>
+      <groupId>org.apache.maven.scm</groupId>
+      <artifactId>maven-scm-api</artifactId>
+      <version>1.0-beta-2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.scm</groupId>
+      <artifactId>maven-scm-provider-perforce</artifactId>
+      <version>1.0-beta-2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.scm</groupId>
+      <artifactId>maven-scm-provider-clearcase</artifactId>
+      <version>1.0-beta-2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.scm</groupId>
+      <artifactId>maven-scm-provider-starteam</artifactId>
+      <version>1.0-beta-2</version>
+    </dependency>
   </dependencies>
 </project>

Modified: 
maven/maven-1/plugins/trunk/xdoc/src/main/org/apache/maven/xdoc/util/ScmUtil.java
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/src/main/org/apache/maven/xdoc/util/ScmUtil.java?rev=378073&r1=378072&r2=378073&view=diff
==============================================================================
--- 
maven/maven-1/plugins/trunk/xdoc/src/main/org/apache/maven/xdoc/util/ScmUtil.java
 (original)
+++ 
maven/maven-1/plugins/trunk/xdoc/src/main/org/apache/maven/xdoc/util/ScmUtil.java
 Wed Feb 15 11:41:31 2006
@@ -20,6 +20,19 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.commons.lang.StringUtils;
+
+import org.apache.maven.scm.manager.NoSuchScmProviderException;
+import org.apache.maven.scm.manager.ScmManager;
+import org.apache.maven.scm.provider.clearcase.ClearCaseScmProvider;
+import 
org.apache.maven.scm.provider.clearcase.repository.ClearCaseScmProviderRepository;
+import org.apache.maven.scm.provider.perforce.PerforceScmProvider;
+import 
org.apache.maven.scm.provider.perforce.repository.PerforceScmProviderRepository;
+import org.apache.maven.scm.provider.starteam.StarteamScmProvider;
+import 
org.apache.maven.scm.provider.starteam.repository.StarteamScmProviderRepository;
+import org.apache.maven.scm.repository.ScmRepository;
+import org.apache.maven.scm.repository.ScmRepositoryException;
+
 import org.apache.maven.util.EnhancedStringTokenizer;
 
 /**
@@ -117,6 +130,139 @@
 
         return null;
     }
+
+    /**
+     * Create the documentation to provide an developer access with a 
<code>Perforce</code> SCM.
+     * For example, generate the following command line:
+     * <p>p4 -H hostname -p port -u username -P password path</p>
+     * <p>p4 -H hostname -p port -u username -P password path submit -c 
changement</p>
+     *
+     * @param perforceRepo
+     * @see <a 
href="http://www.perforce.com/perforce/doc.051/manuals/cmdref/index.html";>http://www.perforce.com/perforce/doc.051/manuals/cmdref/index.html</>
+     */
+    public String developerAccessPerforce( String devConnection )
+    {
+        StringBuffer command = new StringBuffer();
+        char delim = getSCMConnectionSeparator( devConnection ).charAt( 0 );
+
+        PerforceScmProvider perforceProvider= new PerforceScmProvider();
+        PerforceScmProviderRepository perforceRepo;
+
+        String scmSpecificUrl = devConnection.substring( 13 );
+
+        try
+        {
+            perforceRepo = (PerforceScmProviderRepository)
+                perforceProvider.makeProviderScmRepository( scmSpecificUrl, 
delim );
+        }
+        catch (ScmRepositoryException e)
+        {
+            System.err.println( "Your developerConnection does not seem to be 
valid: " + e.getMessage() );
+            return "";
+        }
+
+
+        command.append( "p4" );
+        if ( !StringUtils.isEmpty( perforceRepo.getHost() ) )
+        {
+            command.append( " -H " ).append( perforceRepo.getHost() );
+        }
+        if ( perforceRepo.getPort() > 0 )
+        {
+            command.append( " -p " + perforceRepo.getPort() );
+        }
+        command.append( " -u username" );
+        command.append( " -P password" );
+        command.append( " " );
+        command.append( perforceRepo.getPath() );
+        command.append( "\n" );
+        command.append( "p4 submit -c \"A comment\"" );
+
+       return command.toString();
+    }
+
+    // Starteam
+
+    /**
+     * Create the documentation to provide an developer access with a 
<code>Starteam</code> SCM.
+     * For example, generate the following command line:
+     * <p>stcmd co -x -nologo -stop -p myusername:[EMAIL 
PROTECTED]:1234/projecturl -is</p>
+     * <p>stcmd ci -x -nologo -stop -p myusername:[EMAIL 
PROTECTED]:1234/projecturl -f NCI -is</p>
+     *
+     * @param starteamRepo
+     */
+    public String developerAccessStarteam( String devConnection )
+    {
+
+        StringBuffer command = new StringBuffer();
+        char delim = getSCMConnectionSeparator( devConnection ).charAt( 0 );
+
+        StarteamScmProvider starteamProvider= new StarteamScmProvider();
+        StarteamScmProviderRepository starteamRepo;
+
+        String scmSpecificUrl = devConnection.substring( 13 );
+
+        try
+        {
+            starteamRepo = (StarteamScmProviderRepository)
+                starteamProvider.makeProviderScmRepository( scmSpecificUrl, 
delim );
+        }
+        catch (ScmRepositoryException e)
+        {
+            System.err.println( "Your developerConnection does not seem to be 
valid: " + e.getMessage() );
+            return "";
+        }
+
+        // Safety: remove the username/password if present
+        String fullUrl = StringUtils.replace( starteamRepo.getFullUrl(), 
starteamRepo.getUser(), "username" );
+        fullUrl = StringUtils.replace( fullUrl, starteamRepo.getPassword(), 
"password" );
+
+        command.append( "stcmd co -x -nologo -stop -p " );
+        command.append( fullUrl );
+        command.append( " -is" );
+        command.append( "\n" );
+        command.append( "stcmd ci -x -nologo -stop -p " );
+        command.append( fullUrl );
+        command.append( " -f NCI -is" );
+
+        return command.toString();
+    }
+
+
+    /**
+     * Create the documentation to provide an developer access with a 
<code>Clearcase</code> SCM.
+     * For example, generate the following command line:
+     * <p>cleartool checkout module</p>
+     *
+     * @param clearCaseRepo
+     */
+    public String developerAccessClearCase( String devConnection )
+    {
+
+        StringBuffer command = new StringBuffer();
+        char delim = getSCMConnectionSeparator( devConnection ).charAt( 0 );
+
+        ClearCaseScmProvider clearCaseProvider= new ClearCaseScmProvider();
+        ClearCaseScmProviderRepository clearCaseRepo;
+
+        String scmSpecificUrl = devConnection.substring( 14 );
+
+        try
+        {
+            clearCaseRepo = (ClearCaseScmProviderRepository)
+                clearCaseProvider.makeProviderScmRepository( scmSpecificUrl, 
delim );
+        }
+        catch (ScmRepositoryException e)
+        {
+            System.err.println( "Your developerConnection does not seem to be 
valid: " + e.getMessage() );
+            return "";
+        }
+
+        command.append( "cleartool checkout " ).append( 
clearCaseRepo.getViewName( "id" ) );
+
+        return command.toString();
+    }
+
 
     /**
      * Splits an SCM string into parts.

Modified: 
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/scm/clearcase.xml
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/scm/clearcase.xml?rev=378073&r1=378072&r2=378073&view=diff
==============================================================================
--- 
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/scm/clearcase.xml
 (original)
+++ 
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/scm/clearcase.xml
 Wed Feb 15 11:41:31 2006
@@ -1,11 +1,42 @@
-<section name="Anonymous Clearcase Access with Maven">
-  <p>
-    <em>This section is under construction.</em>
-  </p>
-</section>
-
-<section name="Developer Clearcase Access with Maven">
-  <p>
-    <em>This section is under construction.</em>
-  </p>
+<section key="template.scm.section2.title"
+    bundle="plugin-resources.templates.templates"
+    name="Overview">
+    <p>
+        <message key="template.scm.section2.part1"
+            bundle="plugin-resources.templates.templates" />
+        <a 
href="http://www-306.ibm.com/software/awdtools/clearcase/";>Clearcase</a>
+        <message key="template.clearcase.section2.part2"
+            bundle="plugin-resources.templates.templates" />
+        <a 
href="http://www.redbooks.ibm.com/redbooks/pdfs/sg246399.pdf";>http://www.redbooks.ibm.com/redbooks/pdfs/sg246399.pdf</a>.
+    </p>
+
+  #if ($repository.developerConnection && $repository.developerConnection != 
'')
+      #set ($command = 
$scmUtil.developerAccessClearCase($repository.developerConnection))
+
+    <subsection key="template.scm.section6.title"
+        bundle="plugin-resources.templates.templates"
+        name="Developer Access">
+
+        <p>
+            <message key="template.clearcase.section6.description"
+                bundle="plugin-resources.templates.templates" />
+        </p>
+
+        <source>$command</source>
+
+    </subsection>
+
+    <subsection key="template.scm.accessbehindfirewall.title"
+        bundle="plugin-resources.templates.templates"
+        name="Access from behind a firewall">
+
+        <p>
+            <message key="template.scm.accessbehindfirewall.general.intro"
+                bundle="plugin-resources.templates.templates" />
+        </p>
+
+    </subsection>
+
+  #end
+
 </section>

Modified: 
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/scm/perforce.xml
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/scm/perforce.xml?rev=378073&r1=378072&r2=378073&view=diff
==============================================================================
--- 
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/scm/perforce.xml
 (original)
+++ 
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/scm/perforce.xml
 Wed Feb 15 11:41:31 2006
@@ -1,11 +1,42 @@
-<section name="Anonymous Perforce Access with Maven">
-  <p>
-    <em>This section is under construction.</em>
-  </p>
-</section>
+<section key="templatescm.section2.title"
+    bundle="plugin-resources.templates.templates"
+    name="Overview">
+    <p>
+        <message key="template.scm.section2.part1"
+            bundle="plugin-resources.templates.templates" />
+        <a href="http://www.perforce.com/";>Perforce</a>
+        <message key="template.perforce.section2.part2"
+            bundle="plugin-resources.templates.templates" />
+        <a 
href="http://www.perforce.com/perforce/doc.051/manuals/cmdref/index.html";>http://www.perforce.com/perforce/doc.051/manuals/cmdref/index.html</a>.
+    </p>
+
+  #if ($repository.developerConnection && $repository.developerConnection != 
'')
+      #set ($command = 
$scmUtil.developerAccessPerforce($repository.developerConnection))
+
+    <subsection key="template.scm.section6.title"
+        bundle="plugin-resources.templates.templates"
+        name="Developer Access">
+
+        <p>
+            <message key="template.perforce.section6.description"
+                bundle="plugin-resources.templates.templates" />
+        </p>
+
+        <source>$command</source>
+
+    </subsection>
 
-<section name="Developer Perforce Access with Maven">
-  <p>
-    <em>This section is under construction.</em>
-  </p>
-</section>
\ No newline at end of file
+    <subsection key="template.scm.accessbehindfirewall.title"
+        bundle="plugin-resources.templates.templates"
+        name="Access from behind a firewall">
+
+        <p>
+            <message key="template.scm.accessbehindfirewall.general.intro"
+                bundle="plugin-resources.templates.templates" />
+        </p>
+
+    </subsection>
+
+  #end
+
+</section>

Modified: 
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/scm/starteam.xml
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/scm/starteam.xml?rev=378073&r1=378072&r2=378073&view=diff
==============================================================================
--- 
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/scm/starteam.xml
 (original)
+++ 
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/scm/starteam.xml
 Wed Feb 15 11:41:31 2006
@@ -1,11 +1,41 @@
-<section name="Anonymous Starteam Access with Maven">
-  <p>
-    <em>This section is under construction.</em>
-  </p>
-</section>
+<section key="template.scm.section2.title"
+    bundle="plugin-resources.templates.templates"
+    name="Overview">
+    <p>
+        <message key="template.scm.section2.part1"
+            bundle="plugin-resources.templates.templates" />
+        <a href="http://www.borland.com/us/products/starteam/";>Starteam</a>
+        <message key="template.starteam.section2.part2"
+            bundle="plugin-resources.templates.templates" />.
+    </p>
+
+  #if ($repository.developerConnection && $repository.developerConnection != 
'')
+      #set ($command = 
$scmUtil.developerAccessStarteam($repository.developerConnection))
+
+    <subsection key="template.scm.section6.title"
+        bundle="plugin-resources.templates.templates"
+        name="Developer Access">
+
+        <p>
+            <message key="template.starteam.section6.description"
+                bundle="plugin-resources.templates.templates" />
+        </p>
+
+        <source>$command</source>
+
+    </subsection>
 
-<section name="Developer Starteam Access with Maven">
-  <p>
-    <em>This section is under construction.</em>
-  </p>
-</section>
\ No newline at end of file
+    <subsection key="template.scm.accessbehindfirewall.title"
+        bundle="plugin-resources.templates.templates"
+        name="Access from behind a firewall">
+
+        <p>
+            <message key="template.scm.accessbehindfirewall.general.intro"
+                bundle="plugin-resources.templates.templates" />
+        </p>
+
+    </subsection>
+
+  #end
+
+</section>

Modified: 
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates.properties
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates.properties?rev=378073&r1=378072&r2=378073&view=diff
==============================================================================
--- 
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates.properties
 (original)
+++ 
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates.properties
 Wed Feb 15 11:41:31 2006
@@ -64,6 +64,25 @@
 template.svn.section8.intro2=There are comments in the file explaining what to 
do. If you don't have that file, get the latest Subversion client and run any 
command; this will cause the configuration directory and template files to be 
created.
 template.svn.section8.intro3=Example : Edit the 'servers' file and add 
something like:
 
+# For clearcase.xml
+template.clearcase.section2.part2=to manage its source code. Instructions for 
using ClearCase can be found at
+template.clearcase.section6.description=Only project developers can access the 
ClearCase tree via this method. Substitute username with the proper value.
+
+# For perforce.xml
+template.perforce.section2.part2=to manage its source code. Instructions for 
using Perforce can be found at
+template.perforce.section6.description=Only project developers can access the 
Perforce tree via this method. Substitute username and password with the proper 
values.
+
+# For starteam.xml
+template.starteam.section2.part2=to manage its source code.
+template.starteam.section6.description=Only project developers can access the 
Starteam tree via this method. Substitute username and password with the proper 
values.
+
+# Used by clearcase.xml, perforce.xml, starteam.xml
+template.scm.section2.title=Source Repository
+template.scm.section2.part1=This project uses
+template.scm.section6.title=Developer Access
+template.scm.accessbehindfirewall.title=Access from behind a firewall
+template.scm.accessbehindfirewall.general.intro=Refer to the documentation of 
the SCM used for more information about an access behind a firewall.
+
 # For dependencies.xml
 template.dependencies.title=Dependencies
 template.dependencies.section.title=Dependencies

Modified: 
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates_de.properties
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates_de.properties?rev=378073&r1=378072&r2=378073&view=diff
==============================================================================
--- 
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates_de.properties
 (original)
+++ 
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates_de.properties
 Wed Feb 15 11:41:31 2006
@@ -54,9 +54,9 @@
 template.svn.section4.title=Anonymer Zugriff
 template.svn.section4.description=Das Quellcode Archiv dieses Projektes kann 
mit dem folgenden Befehl ausgecheckt werden:
 template.svn.section5.title=Entwickler Zugriff mit Maven
-template.svn.section5.description=Even though everyone can checkout the 
Subversion repository via HTTPS, committers have to use HTTPS if they want to 
be able to check back in their changes. Use the following instruction set on a 
single line:
+template.svn.section5.description=Jeder kann auf das Subversion Archiv via 
HTTPS zugreifen, aber Entwickler müssen es verwenden, wenn sie ihre Änderungen 
wider ein-checken wollen. Verwenden Sie die folgenden Instruktionen auf einer 
Linie:
 template.svn.section6.title=Entwickler Zugriff
-template.svn.section6.description=Even though everyone can checkout the 
Subversion repository via HTTPS, committers have to use HTTPS if they want to 
be able to check back in their changes. Use the following command:
+template.svn.section6.description=Jeder kann auf das Subversion Archiv via 
HTTPS zugreifen, aber Entwickler müssen es verwenden, wenn sie ihre Änderungen 
wider ein-checken wollen. Verwenden Sie den folgenden Befehl:
 template.svn.section7.title=Zugriff hinter einer Firewall
 template.svn.section7.description=Entwickler die sich hinter einer Firewall 
befinden die den http Zugriff auf das Quellcode Archiv blockiert, sollten 
versuchen über die Entwickler-Verbindung darauf zuzugreifen:
 template.svn.section8.title=Zugriff über einen Proxy
@@ -64,6 +64,25 @@
 verwendenden Proxy angeben. Es hängt von Ihrem System ab wo sich diese Datei 
befindet. Für Linux oder Unix ist sie in "~/.subversion". Für Windows ist sie 
in "%APPDATA%\\Subversion" (versuchen Sie "echo %APPDATA%", beachten Sie dass 
dies ein versteckter Folder ist).
 template.svn.section8.intro2=Diese Datei enthält einige Gebrauchshinweise. 
Sollte diese Datei nicht existieren, verwenden Sie die neueste Version von 
Subversion und exekutieren Sie irgend einen Befehl. Die Datei wird dann 
automatisch erzeugt.
 template.svn.section8.intro3=Beispiel: Editieren Sie die "servers" Datei und 
fügen Sie hinzu:
+
+# For clearcase.xml
+template.clearcase.section2.part2=um seinen Quellcode zu verwalten. 
Instruktionen zur Verwendung von ClearCase finden Sie hier:
+template.clearcase.section6.description=Nur Entwickler können auf das 
ClearCase Quellcode Archiv mit dieser Methode zugreifen. Ersetzen Sie den 
Benutzernamen ("username") durch Ihren eigenen.
+
+# For perforce.xml
+template.perforce.section2.part2=um seinen Quellcode zu verwalten. 
Instruktionen zur Verwendung von Perforce finden Sie hier:
+template.perforce.section6.description=Nur Entwickler können auf das Perforce 
Quellcode Archiv mit dieser Methode zugreifen. Ersetzen Sie den Benutzernamen 
("username") und 'password' mit den entsprechenden Werten.
+
+# For starteam.xml
+template.starteam.section2.part2=um seinen Quellcode zu verwalten.
+template.starteam.section6.description=Nur Entwickler können auf das Perforce 
Quellcode Archiv mit dieser Methode zugreifen. Ersetzen Sie den Benutzernamen 
("username") und 'password' mit den entsprechenden Werten.
+
+# Used by clearcase.xml, perforce.xml, starteam.xml
+template.scm.section2.title=Quellcode Archiv
+template.scm.section2.part1=Dieses Projekt verwendet
+template.scm.section6.title=Entwickler Zugriff
+template.scm.accessbehindfirewall.title=Zugriff hinter einer Firewall
+template.scm.accessbehindfirewall.general.intro=Konsultieren Sie die 
Gebrauchshinweisungen Ihres SCM's für Information über Zugriff hinter einer 
Firewall.
 
 # For dependencies.xml
 template.dependencies.title = Abhängigkeiten

Modified: 
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates_fr.properties
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates_fr.properties?rev=378073&r1=378072&r2=378073&view=diff
==============================================================================
--- 
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates_fr.properties
 (original)
+++ 
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates_fr.properties
 Wed Feb 15 11:41:31 2006
@@ -65,6 +65,25 @@
 template.svn.section8.intro2=Il y a des commentaires dans le fichier qui 
explique comment faire. Si vous n'avez pas ce fichier, télécharger la version 
la plus récente de Subversion et tapez n'importe quelle commande ; ceci créera 
les fichiers de configuration.
 template.svn.section8.intro3=Exemple : Editer le fichier 'servers' et ajouter 
quelque chose du genre:
 
+# For clearcase.xml
+template.clearcase.section2.part2=pour gérer son code source. Des instructions 
sur l'utilisation de ClearCase peuvent être trouvées à
+template.clearcase.section6.description=Seulement les dévelopeurs du projet 
peuvent accéder à l'arbre de ClearCase par l'intermédiaire de cette méthode. 
Remplacez username avec la valeur appropriée.
+
+# For perforce.xml
+template.perforce.section2.part2=pour gérer son code source. Des instructions 
sur l'utilisation de Perforce peuvent être trouvées à
+template.perforce.section6.description=Seulement les dévelopeurs du projet 
peuvent accéder à l'arbre de ClearCase par l'intermédiaire de cette méthode. 
Remplacez username et password avec les valeurs appropriées.
+
+# For starteam.xml
+template.starteam.section2.part2=tpour gérer son code source.
+template.starteam.section6.description=Seulement les dévelopeurs du projet 
peuvent accéder à l'arbre de Starteam par l'intermédiaire de cette méthode. 
Remplacez username et password avec les valeurs appropriées.
+
+# Used by clearcase.xml, perforce.xml, starteam.xml
+template.scm.section2.title=Dépôt de sources
+template.scm.section2.part1=Ce projet utilise
+template.scm.section6.title=Accès pour les dévelopeurs
+template.scm.accessbehindfirewall.title=Accès derrière un firewall
+template.scm.accessbehindfirewall.general.intro=Référez-vous à la 
documentation du dépôt d'archive utilisé pour plus d'informations sur l'accès 
derrière un firewall.
+
 # For dependencies.xml
 template.dependencies.title=Dépendances
 template.dependencies.section.title=Dépendances

Modified: 
maven/maven-1/plugins/trunk/xdoc/src/test/org/apache/maven/xdoc/util/ScmUtilTest.java
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/src/test/org/apache/maven/xdoc/util/ScmUtilTest.java?rev=378073&r1=378072&r2=378073&view=diff
==============================================================================
--- 
maven/maven-1/plugins/trunk/xdoc/src/test/org/apache/maven/xdoc/util/ScmUtilTest.java
 (original)
+++ 
maven/maven-1/plugins/trunk/xdoc/src/test/org/apache/maven/xdoc/util/ScmUtilTest.java
 Wed Feb 15 11:41:31 2006
@@ -32,6 +32,15 @@
     private final String cvs2 =
         "scm:cvs:ext:[EMAIL PROTECTED]:/cvs/root:module";
     private final String svn = "scm:svn:http://svn.apache.org/svn/root/module";;
+    private final String perforce1 =
+        "scm:perforce:[EMAIL PROTECTED]:21:path_to_repository";
+    private final String perforce2 = "scm:perforce://depot/modules/myproject";
+    private final String starteam1 =
+        "scm:starteam:john_doe:[EMAIL PROTECTED]:23456/project/view/folder";
+    private final String starteam2 =
+        "scm:starteam:[EMAIL PROTECTED]:23456/project/view/folder";
+    private final String clearcase =
+        
"scm:clearcase:my_module_view://myserver/clearcase/configspecs/my_module.txt";
     private final String invalid = "";
 
     public void testSCMConnectionSeparator()
@@ -68,4 +77,30 @@
             "scm:cvs:ext:[EMAIL PROTECTED]:/cvs/root:module" );
         assertEquals( scmUtil.getCvsConnection( svn, "" ), "" );
     }
+
+    public void testDeveloperAccessPerforce()
+    {
+        assertEquals( scmUtil.developerAccessPerforce( perforce1 ),
+            "p4 -H somehost -p 21 -u username -P password 
path_to_repository\np4 submit -c \"A comment\"" );
+        assertEquals( scmUtil.developerAccessPerforce( perforce2 ),
+            "p4 -u username -P password //depot/modules/myproject\np4 submit 
-c \"A comment\"" );
+    }
+
+//    TODO: FIXME: why does this fail with a NoClassDefFoundError?
+/*
+    public void testDeveloperAccessStarteam()
+    {
+        assertEquals( scmUtil.developerAccessStarteam( starteam1 ),
+            "stcmd co -x -nologo -stop -p username:[EMAIL 
PROTECTED]:23456/project/view/folder -is\nstcmd ci -x -nologo -stop -p 
username:[EMAIL PROTECTED]:23456/project/view/folder -f NCI -is" );
+        assertEquals( scmUtil.developerAccessStarteam( starteam2 ),
+            "stcmd co -x -nologo -stop -p 
username:@myhost:23456/project/view/folder -is\nstcmd ci -x -nologo -stop -p 
username:@myhost:23456/project/view/folder -f NCI -is" );
+    }
+*/
+
+    public void testDeveloperAccessClearCase()
+    {
+        assertEquals( scmUtil.developerAccessClearCase( clearcase ),
+            "cleartool checkout my_module_view" );
+    }
+
 }

Modified: maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml?rev=378073&r1=378072&r2=378073&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml Wed Feb 15 11:41:31 2006
@@ -27,6 +27,7 @@
   </properties>
   <body>
     <release version="1.10-SNAPSHOT" date="in SVN">
+      <action dev="ltheussl" type="add">Include instructions for ClearCase, 
Starteam and Perforce access in the scm-usage page.</action>
       <action dev="ltheussl" type="fix" 
issue="MPXDOC-181"><code>xdoc:init</code> was called six times during one 
<code>xdoc</code> run.</action>
       <action dev="ltheussl" type="add" issue="MPXDOC-191">Include 
dependencies' scope in dependencies page.</action>
       <action dev="ltheussl" type="add" issue="MPXDOC-190">Include the new 
theme <code>maven-stylus.css</code>.</action>


Reply via email to