1 Reply Latest reply on Oct 17, 2013 2:26 PM by ssilvert

    How to add multiple modules using CLI script?

    spbhosale

      Hi,

      I am able to add single module in "JBoss-EAP-6.1" with the command

      [standalone@localhost:9999 /]module add --name=com.oracle.ojdbc6 --resources=JARS\oracle\ojdbc6.jar --dependencies=javax.api,javax.transaction.api

      It works fine for single jar file.

      Now I want to add multiple JARs(which are my common jar files) under a single common module, for this case it doesn't work. I have tested different ways but no result.

      How can I resolve this issue??

      Also controller search these JAR file from root of current drive (i.e. from C:\ or D:\ etc). Why is it so?

        • 1. Re: How to add multiple modules using CLI script?
          ssilvert

          I don't know if it works in EAP 6.1, but in the latest WildFly you can put more than one path in the --resources param.  Also, you can use the --resource-delimiter param to specify the path separator you want to use.

           

          SYNOPSIS

           

            To add a module

           

              module add --name=module_name [--slot=slot_name]

                         --resources=list_of_jars [--resource-delimiter=delimiter]

                         (--module-xml=file_path |

                          ([--dependencies=list_of_module_names]

                           [--properties=list_of_properties]

                           [--main-class=fully_qualified_class_name]])

                         )

           

            To remove a module

           

              module remove --name=module_name [--slot=slot_name]

           

           

          DESCRIPTION

           

            The command is used to add and remove modules.

           

            When a module is added, the corresponding to the module name directory

            structure will be created in the AS7 module repository. The JAR files

            specified as resources will be copied to the module's directory. Unless

            module.xml file was specified as an argument, it will be automatically

            generated.

           

            When a module is removed, its module.xml and other resources will be removed

            from the module repository as well as its directory structure up to the point

            where other modules met.

           

            NOTE: the command can generate only simple module.xml files.

            More specifically, it supports:

            - resources-root elements that point to files;

            - modules dependencies as simple module names;

            - module's main-class;

            - module properties.

           

           

          ARGUMENTS

           

          --name          - (required) the name of the module to be added or removed.

                             NOTE: slot is not a part of the module name.

           

          --slot          - (optional) specifies a slot which should be created or

                             removed. If this argument is not specified, "main" slot is

                             assumed.

           

          --resources     - (used with add, required unless module-xml is used) a list of

                             filesystem paths (usually jar files) separated by a

                             filesystem-specific path separator, i.e.

                             java.io.File.pathSeparatorChar. The file(s) specified will be

                             copied to the created module's directory.

           

          --resource-delimiter - (used with add and resources, optional)

                                 A user-defined path separator for the resources argument.

                                 If this argument is present, the command parser will use

                                 the value here instead of the filesystem-specific path

                                 separator. This allows the modules command to be used in

                                 cross-platform scripts.

           

          --module-xml    - (used with add, optional) filesystem path to the module.xml

                             file which should be used for the added module. The file will

                             be copied to the created module's directory. If this argument

                             is not specified, module.xml file will be generated in the

                             new created module's directory.

           

          --dependencies  - (used with add, optional) a comma-separated list of module

                             names the module being added depends on.

                             NOTE: this argument makes sense only when the module.xml file

                             is generated, i.e. when the --module-xml argument isn't

                             specified.

           

          --properties    - (used with add, optional) a comma-separated list of

                             property_name=property_value pairs that will define module

                             properties.

                             NOTE: this argument makes sense only when the module.xml file

                             is generated, i.e. when the --module-xml argument isn't

                             specified.

           

          --main-class    - (used with add, optional) a fully qualified class name that

                             declares the modules main method.

                             NOTE: this argument makes sense only when the module.xml file

                             is generated, i.e. when the --module-xml argument isn't

                             specified.

          1 of 1 people found this helpful