Prepare environment for archetype generation
To generate a Maven project from the command line, you must install Java 21 and Maven 3.9.x. The preparation steps are as follows:
- Download and install the latest Azul JDK 21.x. To verify availability from the command line, use the
java -versioncommand. - Download and install the latest Maven 3.9.x. To verify availability from the command line, use the
mvn -versioncommand.
Once you install Java and Maven, configure Maven's settings.xml file located in the C:/Users/[USER_NAME]/.m2 folder. If you installed Work.AI Developer, the file is updated automatically. Otherwise, make sure it contains the following configuration:
<servers>
<!-- Nexus credentials for Maven to download WF dependencies to build a project. Read only permissions are needed for this user -->
<server>
<id>wf-dependencies</id>
<username>odf-user</username>
<password>Workfusion!5</password>
</server>
</servers>
<profiles>
<profile>
<id>wf-repo</id>
<repositories>
<repository>
<id>wf-dependencies</id>
<url>https://repository.workfusion.com/content/groups/dependencies</url>
</repository>
<repository>
<id>wf-archetypes</id>
<url>https://repository.workfusion.com/content/repositories/archetypes</url>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>wf-repo</activeProfile>
</activeProfiles>
note
If you don't have the .m2 folder and settings.xml, create them manually in the C:/Users/[USER_NAME] folder.
If you use custom Nexus—other than <https://repository.workfusion.com>—your default settings.xml file looks as follows:
Click to see settings.xml
<servers>
<!-- Nexus credentials for Maven to download WF dependencies to build a project. Read only permissions are needed for this user -->
<server>
<id>wf-dependencies</id>
<username>odf-user</username>
<password>*****</password>
</server>
</servers>
<profiles>
<profile>
<id>wf-repo</id>
<repositories>
<repository>
<id>wf-dependencies</id>
<!-- URL to Nexus with dependencies, such as https://repository.workfusion.com/content/repositories/wf-dependencies -->
<url>dependenciesUrl</url>
</repository>
<repository>
<id>wf-archetypes</id>
<!-- URL to Nexus with archetypes, such as https://repository.workfusion.com/content/repositories/archetypes -->
<url>archetypesUrl</url>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>wf-repo</activeProfile>
</activeProfiles>