First, make sure your maven can find artifacts from the java.net maven2 repository. This is done by making sure that your ~/.m2/setggins.xml has a proper entry like this:
<settings>
...
<profiles>
<profile>
<id>v3</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repository>
<id>java.net2</id>
<url>https://maven2-repository.dev.java.net/nonav/repository</url>
</repository>
</repositories>
</profile>
</profiles>
</settings>
Next, check out the part of the glassfish that you are interested in working on. For example, if you are working on appserv-webtier, you'd do the following.
cvs -d :pserver:@{user.name}@cvs.dev.java.net:/cvs co -r GF_V3_PREWORK_BRANCH glassfish/appserv-webtier