When creating a new Nexus Plugin project with the Nexus Plugin archetype, a default target Nexus version will be set. To change the target Nexus version of the new Nexus Plugin project, you will need to edit the project’s POM.
Open up the POM of your Nexus Plugin and find the section that defines properties. Here you can change the value of the nexus-version property to target a specific Nexus version.
<project>
...
<properties>
<!-- Set the Nexus version here, against which you build the plugin -->
<nexus-version>1.4.1</nexus-version>
</properties>
...
</project>
It is also possible to override the archetype’s default value of this property during the creation of a new project. To do that, you would set the "nexusVersion" system property value on the command-line:
$ mvn archetype:generate -DarchetypeGroupId=org.sonatype.nexus.archetypes \ -DarchetypeArtifactId=nexus-plugin-archetype \ -DarchetypeVersion=1.2 \ -DnexusVersion=1.9.2