Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated groupId (removed agenpro suffix) and updated version numbers

With the AgenPro 3.x maven Maven plugin you can integrate the code generation into your Maven build process.

Prerequisites

  • Maven 23.23.1 or later.
  • AgenPro 34.0 or later.

...

  • 2 or later.

Installation

Maven Repository Settings

Before you can start to install the AgenPro Maven Plugin you need to setup a local repository for your Maven installation and to specify a shortcut for the AgenPro Maven plugin prefix.

You can specify your Maven settings in the settings.xml file in the .m2 directory within your home directory.

The settings.xml file should contain at least the following settings:

Code Block
<settings>
  <pluginGroups>
    <pluginGroup>com.agentpp.agenpro.maven.plugins</pluginGroup>
  </pluginGroups>
  <localRepository>D:/maven/repository</localRepository>
</settings>


Info

Note: Before AgenPro 5.0 the plugin group ID was com.oosnmp.agenpro instead now com.agentpp.agenpro.

SNMP4J and SNMP4J-Agent JARs 

(A) Maven Central

Instead manually installing SNMP4J and SNMP4J-Agent, you can also use the JARs from Maven Central:

Code Block
languagetext
<dependency>
    <groupId>org.snmp4j</groupId>
    <artifactId>snmp4j</artifactId>
    <version>3.4.4</version>
    <scope>compile</scope>
</dependency>
<dependency>
    <groupId>org.snmp4j</groupId>
    <artifactId>snmp4j-agent</artifactId>
    <version>3.3.6</version>
    <scope>compile</scope>
    <exclusions>
        <exclusion>
            <!-- Exclude transitive dependency to SNMP4J -->
            <groupId>org.snmp4j</groupId>
            <artifactId>snmp4j</artifactId>
        </exclusion>
    </exclusions>
</dependency>

(B) Manual Local Repository Installation

Download SNMP4J and SNMP4J-Agent ZIP files and unpack them in a local folder. Then run the following Maven commands from the dist/lib directories:

Code Block
mvn install:install-file -Dfile=SNMP4J.jar -DgroupId=org.snmp4j -DartifactId=snmp4j -Dversion=3.4.4 -Dpackaging=jar -DgeneratePom=true


Code Block
mvn install:install-file -Dfile=SNMP4J-Agent.jar -DgroupId=org.snmp4j -DartifactId=snmp4j-agent -Dversion=3.3.6 -Dpackaging=jar -DgeneratePom=true

AgenPro JAR

Download the AgenPro.jar file and install it into your Maven repository:

Code Block

mvn install:install-file -Dfile=agenpro3agenpro4.jar -DgroupId=com.oosnmp.agenproagentpp -DartifactId=agenpro -Dversion=35.0.0 -Dpackaging=jar -DgeneratePom=true

AgenPro Maven Plugin

Download the AgenPro 3 Maven plugin and install it into your Maven repository:

Code Block

mvn install:install-file -Dfile=agenpro3agenpro4-plugin.jar -DgroupId=com.oosnmp.agenproagentpp -DartifactId=agenpro-plugin -Dversion=35.0.0 -Dpackaging=jar -DgeneratePom=true