I have a project that is hosted on github. Now what I want is that just by including a few lines like these, anyone is able to use my library in their maven project.
> <dependency>
> <groupId>org.anahata</groupId>
> <artifactId>anahata-core</artifactId>
> <version>1.0</version>
</dependency>
I am new to maven, so please tell me the exact steps. Can it be hosted from github itself?
You can have your project hosted in the Maven Central Repository following the tips posted here, here and here. See also this question and this one.
Edit: Also Sonatype’s guide as suggested by khmarbaise (it is referred to by the guides above).