Overview

RepreZen API Studio features a powerful Code Generation framework. You can generate service implementation scaffolds, client SDK libraries, documentation, and even custom codefrom your Swagger–OpenAPI and RAPID-ML API specifications. 


RepreZen API Studio uses Maven to manage dependencies for code generation. A Maven build process, or a Gradle build script with Maven dependencies, allows code generation from within API Studio, from the command line or from a CI/CD automated build. 


The libraries required for code generation reside in Maven repositories on the internet, primarily on RepreZen's Maven repository at http://maven.reprezen.com/repository/releases/.  In order for projects to build successfully, these repositories (or the dependencies found there) need to be accessible from RepreZen API Studio.


Determining your Proxy Settings


If you're having problems with code generation, or see error markers on your project POM.XML configuration files, it's likely that you are running API Studio behind a corporate firewall, and need to configure Maven's proxy settings for internet access. 


You will need to know the host, port, and in some cases the login credentials for your internet proxy. We recommend that you coordinate with your IT support team to determine the correct proxy settings, and make sure that you're use of these settings follows your organization's network security policies and guidelines.


The following links may have useful information to inspect your current proxy settings:


Configuring Maven's Proxy Settings


To configure Maven for external repository access through a proxy server:


1. Locate the user settings file.  

By default, this should be located in your user home directory:


Windows: %USERPROFILE%\.m2\settings.xml
Linux: ~/.m2/settings.xml
Mac OSX: ~/.m2/settings.xml


2. Create the following settings.xml file...


...or, if the settings.xml file already exists, add the highlighted content:


<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">
      <localRepository />
      <interactiveMode />
      <usePluginRegistry />
      <offline />
      <pluginGroups />
      <servers />
      <mirrors />
      <proxies>

            <proxy>
                  <id>myproxy</id>
                  <active>true</active>
                  <protocol>http</protocol>
                  <host>192.168.1.100</host>
                  <port>6666</port>
                  <username></username>
                  <password></password>
                  <nonProxyHosts>localhost,127.0.0.1</nonProxyHosts>
            </proxy>
           
      </proxies>
      <profiles />
      <activeProfiles />
</settings>


3. Edit the Proxy Settings


Edit the host, port, and, if your HTTP proxy requires authentication, set the username and password. 


4. Open Maven Settings


Open the Maven settings page in Window > Preferences > Maven:


     


5. Configure the User Settings File Location


 The User Settings should reference the filename and location of the settings.xml file you just edited in the previous step.  If necessary, change this to use the new settings file by pressing the Browse button. 


6. Click the ‘Update Settings’ button to reload the settings... 


Then click OK to exit Preferences. 


7. Force a Maven Update in your Project

  • Right-click on your project in the Project Explorer view.  From the menu, choose Maven > Update project.

 

  • Make sure ForceUpdate of Snapshots/Releases is checked, and click OK.



Whitelisting the Maven Repository

RepreZen's Maven Repository must be reachable through your proxy.  In most cases, this is resolved just by configuring Maven's proxy settings as described above.  But a firewall with a default-deny policy will need to have the Maven repository added to a whitelist.


In this case, you'll need to have your system administrator add maven.reprezen.com to the whitelist.


Note: In this kind of environment, there are likely to be other host names that need to be whitelisted.  We recommend that you contact RepreZen Support for further information, so your sysadmins can add all required host names in one batch.