Publishing to maven local cache

I am just looking to publish my artifacts to local maven cache (~/.m2/repository).

And I though unless you were publishing to a remote maven repository, just applying a maven plugin should be sufficient.
So I have a apply plugin : 'maven'

But this does not seem to install my artifacts into the local maven cache.
I started looking incubating maven-publish , but its just too confusing and complex for my needs atleast.

Am using gradle 2.10, And its a multi-module project and I am just trying to push one of the sub-modules.

I do see below lines in the debug log

16:56:22.385 [INFO] [org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyPublisher] Publishing to org.gradle.api.publication.maven.internal.deployer.BaseMavenInstaller@6e3acd7
16:56:22.584 [DEBUG] [org.gradle.api.internal.artifacts.mvnsettings.DefaultLocalMavenRepositoryLocator] No local repository in Settings file defined. Using default path: /Users/sseshac/.m2/repository

But they my local maven repository just does not contain my artifacts.

Update : I do see a jar file in my local maven. However the location is wrong. Its installed in ~/.m2/repository//unspecified/-unspecified.jar

So I am rephrasing my original question. How do I specify my groupId, artifactId and version. Note that I have specified my groupId and version in the root project and just assumed that maven plugin would pick it up. But apparently not.

Sorry, One of those days where you just gave up working this out yourself, and then once you’ve posted the answer is right in your face.

Adding allProjects { group='myGroup'; version='myVersion'} solved it.