azure-client-archetype
is a Maven archetype to generate an Azure track 2 client library template.
To generate a client library template, execute the following maven command from sdk/<servicedirectory>
in
"azure-sdk-for-java" repository. Alternatively, you can run this in an empty directory and copy the generated maven
project to its appropriate location later.
mvn archetype:generate \
-DarchetypeGroupId=com.azure.tools \
-DarchetypeArtifactId=azure-client-archetype \
-DarchetypeVersion=1.0-SNAPSHOT
Running the above command will prompt you to enter details of the new client library
groupId
- This is the Maven groupId of the client library. For data-plane libraries, this is generallycom.azure
.artifactId
- This is the Maven artifactId of the client library. For data-plane libraries, follow the naming pattern ofazure-<group>-<service>
as defined in the Java guidelines.version
- The version of the client library. This defaults to1.0.0-beta.1
but you can override the version by entering 'N' when you are prompted to confirm the details of the package after all these steps.package
- Name of the root package. The recommended name iscom.azure.<group>.<service>
. This will also be the module name for JDK 9+ versions.servicedirectory
- This is the directory undersdk/
this client library will be placed inazure-sdk-for-java
repository.servicename
- This is the name used in package description and README. For e.g. Text Analytics, Storage Blob, App Configuration, CosmosDB etc. NOTE: Do not prefixAzure
to the service name as this is already included in the template.- Accept the package details when prompted to generate the maven project.
- Copy the generated project to appropriate service directory in azure-sdk-for-java repository if this is run from an empty directory.