Unofficial Content

>> Gx X java reorg console exporter v0.1.4 (build 85251)
>> by el Seba Cardello (scardello@acpsistemas.com.ar) for ACP Ing. en Sistemas (http://www.acpsistemas.com.ar)

# What? Why? How? #

The idea is to run a command line program that customize, manage and export Genexus X Java reorganizations. Basically provides the same functions that standard "export reorg" genexus option (Distribution of reorganization programs), but with some extra chili. This is because sometimes is needed to automate Gx build operations, and extracting reorg operations is one of those tasks.

Features:

  • Get a final ready to run result of the reorganization, this is not only the reorganization deploy but also extra libs (jdbc driver, gxclassr, reorg.cfg, etc)
  • Customize reorg.cfg parameters.
  • Automatic detection of package names and jdbc driver used.
  • Automatic generation of running scripts for windows and linux.
  • Avoid export the same reorganization more than once. After a success running, a "LastReorganizationScript.info" file is created with a md5 hash of the ReorganizationScript.txt. If you wan't to export it again, just delete the file.

# Where to get? #

Get it from Genexus Marketplace!

Open source KB: GxJavaReorgConsoleExporter

# Options #

  • -dest=Folder path
    Destination folder path to export. By default leaves the result in the environment data folder.
  • -jarfile=FileNameWithExtension
    File name of the jar packed reorganization. By default "Reorg.jar".
  • -package=PackageName
    Environment package name. By default is inferred from environment configuration.
  • -includecfg=true|false
    Include reorg.cfg into jar packed reorg. By default is "false".
  • -jdbcdrv=JdbcDriverClass
    JDBC driver class (like "org.postgresql.Driver"). By default is inferred from environment configuration.
  • -jdbcdrvpath=JdbcDriverFilePath
    JDBC driver file path to include in the exported. By default is inferred and automatically copied from drivers folder.
  • -jdbcurl=JdbcUrl
    JDBC Url. By default is inferred from environment configuration.
  • -dbuser=DatabaseUser
    Database user in plain text. By default is inferred from environment configuration and properly encripted.
  • -dbpass=DatabaseUserPassword
    Database user password in plain text (yeah this is bad and we will go to hell!). By default is inferred from environment configuration and properly encripted.
  • -force=true|false
    Avoid "LastReorganizationScript.info" file validation, so you could export the reorg again. By default is "false".
  • -h | /?
    This "short" help.

# How to run? #

  1. Go to environment model data folder, let say C:\Models\MyKb\DATA003\web
    > cd C:\Models\MyKb\DATA003\web
  2. Let say that you already have aereorg.jar in the DATA003 folder generated with the following tool. Then:
    > java -cp aereorg.jar;{OPTIONAL: .\packagename};gxclassR.zip;GxUtils.jar aereorg options

# Examples #

  1. Export reorg to c:\temp, with custom jar name:
    > java -cp aereorg.jar;gxclassR.zip;GxUtils.jar aereorg -dest=c:\temp -jarfile=myapp_v1.jar
  2. Just generate Reorg.jar, customizing db user and password and including reorg.cfg inside the jar:
    > java -cp aereorg.jar;gxclassR.zip;GxUtils.jar aereorg -includecfg=true -dbuser=enzo -dbpass=francescoli

# FAQ #

  1. The aereorg file is a reorganization jar file created with the Export Reorganization utility.
  2. This has been tested?
    In Gx X Ev1, Ev2 and Ev3. Any other extra successful test is very much appreciated.
  3. Why this works in differents Gx versions if it was build with {INSERT GX BUILD VERSION HERE}?
    Casually gxclassr.jar api hadn't changed basic functions so often. So i've tried to use as less gx functions as possible. For now it works. Future will provide.
  4. There is any other way of running it?
    Yeap. Just import the "ereorg" gx procedure and build it from Gx IDE. Then change your java command and extract aereorg.jar classpath options. If you use package name for your solution, invoke as packagename.aereorg. That's all.
  5. I made some changes. How redeploy new jar version of this tool?
    1. Mod the tool. Change the build number (optional, but a good reference) 
    2. Run:
      > java -cp .;gxclassR.zip;GxUtils.jar com.genexus.gx.deployment.udevelop
    3. You should know.

 

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant