Well, the difference is in what you say you want. In the first case you say “just publish this artifact without any further information” which almost always is a bad idea. I’m the second case you tell to publish the Java component which has the information about artifacts to publish - including sources jar, JavaDoc jar, feature variant jars, … -, the dependencies to put in the pom, and so on.