Maven tips and Tricks: Perforce

Lately I had the bad time to use the Perforce SCM system. I created a maven goal to sync (=cvs update) my sources from the SCM.

You need:

  • jakarta oro as a dependency in your project.xml and loaded by the root classloader.
        <!--
         | Oro is needed by the Perforce tasks and needs to be loaded
         | by the root classloader
         +-->
        <dependency>
            <groupId>oro</groupId>
            <artifactId>oro</artifactId>
            <version>2.0.8</version>
            <properties>
                <classloader>root</classloader>
            </properties>
        </dependency>
  • The actual goal in maven.xml
        <!-- perforce -->
        <goal name="p4sync">
            <p4sync view="//depot/whatever/..." />
        </goal>

You can check all the perforce ant tasks you can use besides p4sync.

One thought on “Maven tips and Tricks: Perforce

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s