Deploying a pom only module

There seem to be two options.

One is to use only 'file' and specify the groupId/artifactId/version/packaging as properties:

C:\Temp>mvn deploy:deploy-file -Dfile=apache-3.pom.xml  -Durl=file:///c:/temp/m2-test-repo -DrepositoryId=test-repo \
                               -DgroupId=org.apache -DartifactId=apache -Dversion=3 -Dpackaging=pom
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'deploy'.
[INFO] artifact org.apache.maven.plugins:maven-deploy-plugin: checking for updat
es from central
[INFO] -------------------------------------------------------------------------
---
[INFO] Building Maven Default Project
[INFO]    task-segment: [deploy:deploy-file] (aggregator-style)
[INFO] -------------------------------------------------------------------------
---
[INFO] [deploy:deploy-file]
Uploading: file:///c:/temp/m2-test-repo/org/apache/apache/3/apache-3.pom
3K uploaded
[INFO] Retrieving previous metadata from test-repo
[INFO] Uploading repository metadata for: 'artifact org.apache:apache'
[INFO] Retrieving previous metadata from test-repo
[INFO] Uploading project information for apache 3
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Tue Jan 30 14:19:31 MST 2007
[INFO] Final Memory: 2M/4M
[INFO] ------------------------------------------------------------------------

Another is to pass the pom file (with path) as both 'file' and 'pomFile'. Following is an example using the top-level Apache pom:

C:\Temp>mvn deploy:deploy-file -Dfile=apache-3.pom.xml -DpomFile=apache-3.pom.xml -Durl=file:///c:/temp/m2-test-repo -DrepositoryId=test-repo
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'deploy'.
[INFO] artifact org.apache.maven.plugins:maven-deploy-plugin: checking for updates from central
[INFO] -------------------------------------------------------------------------
---
[INFO] Building Maven Default Project
[INFO]    task-segment: [deploy:deploy-file] (aggregator-style)
[INFO] -------------------------------------------------------------------------
---
[INFO] [deploy:deploy-file]
Uploading: file:///c:/temp/m2-test-repo/org/apache/apache/3/apache-3.pom
3K uploaded
[INFO] Retrieving previous metadata from test-repo
[INFO] Uploading repository metadata for: 'artifact org.apache:apache'
Uploading: file:///c:/temp/m2-test-repo/org/apache/apache/3/apache-3.pom
3K uploaded
[INFO] Retrieving previous metadata from test-repo
[INFO] Uploading repository metadata for: 'artifact org.apache:apache'
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Tue Jan 30 14:14:19 MST 2007
[INFO] Final Memory: 2M/4M
[INFO] ------------------------------------------------------------------------
{noformat]

In both casaes, the resulting repository structure is: 

{noforamt}
C:\Temp>tree m2-test-repo
Folder PATH listing
Volume serial number is BCCB-CB88
C:\TEMP\M2-TEST-REPO
└───org
    └───apache
        └───apache
            └───3