Try the maven mojo archetype or gmaven mojo archetype to create a sample plugin in Java or Groovy respectively. The source to a plugin is called a Mojo, just to help you navigate the terminology.
At a command prompt, type:
mvn archetype:generate
You'll get a menu of templates to choose from. Choose maven-archetype-mojo or gmaven-archetype-mojo
Using Java version: 1.6
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [archetype:generate] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] Preparing archetype:generate
[INFO] No goals needed for project - skipping
[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [archetype:generate]
[INFO] Generating project in Interactive mode
[INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
Choose archetype:
11: internal -> maven-archetype-j2ee-simple (A simple J2EE Java application)
12: internal -> maven-archetype-marmalade-mojo (A Maven plugin development project using marmalade)
13: internal -> maven-archetype-mojo (A Maven Java plugin development project)
14: internal -> maven-archetype-portlet (A simple portlet application)
15: internal -> maven-archetype-profiles ()
16: internal -> maven-archetype-quickstart ()
17: internal -> maven-archetype-site-simple (A simple site generation project)
18: internal -> maven-archetype-site (A more complex site project)
19: internal -> maven-archetype-webapp (A simple Java web application)
28: internal -> maven-archetype-har (Hibernate Archive)
29: internal -> maven-archetype-sar (JBoss Service Archive)
41: internal -> gmaven-archetype-basic (Groovy basic archetype)
42: internal -> gmaven-archetype-mojo (Groovy mojo archetype)
Choose a number:
Either of those will create a fully fleshed out Maven plugin example, ready to compile, install, and use.