1 package org.apache.maven.perforcelib;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 import org.apache.maven.changelog.ChangeLogFactory;
22 import org.apache.maven.changelog.ChangeLogGenerator;
23 import org.apache.maven.changelog.ChangeLogParser;
24
25
26 /**
27 * Provides Perforce specific instances of the ChangeLogGenerator and
28 * ChangeLogParser interfaces.
29 *
30 * It expects the repository connection element in the POM to be of
31 * this form: <b><code>scm:perforce[:P4PORT]:FILESPEC</code></b>. If
32 * the P4PORT is omitted, the corresponding environment variable will
33 * be used. The FILESPEC should use "depot syntax" with the
34 * appropriate Perforce wildcards to represent all of the project's
35 * files, i.e. '...'
36 *
37 * The repository URL element should refer to a <a
38 * href="http://www.perforce.com/perforce/products/p4web.html">p4web</a>
39 * instance. The portion of the URL following the host:port should
40 * match the FILESPEC in the repository connection element, sans the
41 * '...'. It must end with a '/'.
42 *
43 * For example,
44 * <pre>
45 * <repository>
46 * <connection>
47 * scm:perforce:some.host.com:1666://depot/projects/maven/...
48 * </connection>
49 * <url>
50 * http://public.perforce.com:8080//depot/projects/maven/
51 * </url>
52 * </repository>
53 * </pre>
54 *
55 * @author <a href="mailto:jim@crossleys.org">Jim Crossley</a>
56 * @version $Id:
57 */
58 public class PerforceChangeLogFactory implements ChangeLogFactory
59 {
60 /**
61 * Default no-arg constructor.
62 */
63 public PerforceChangeLogFactory()
64 {
65 }
66
67 /**
68 * Create a Perforce specific ChangeLogGenerator.
69 *
70 * @return a Perforce specific ChangeLogGenerator.
71 */
72 public ChangeLogGenerator createGenerator()
73 {
74 return new PerforceChangeLogGenerator();
75 }
76
77 /**
78 * Create a Perforce specific ChangeLogParser.
79 *
80 * @return a Perforce specific ChangeLogParser.
81 */
82 public ChangeLogParser createParser()
83 {
84 return new PerforceChangeLogParser();
85 }
86 }