Skip to main content

πŸ“¦ What is a 2Pack in iDempiere?

A 2Pack in iDempiere is a powerful packaging mechanism that enables easy configuration management across environments.

What is a 2Pack?

A 2Pack allows you to export and import application metadata and configuration (such as windows, processes, tables, reports, and even data) between different iDempiere environments.

Think of it as a "configuration snapshot" that can be easily transferred and applied to different iDempiere instances.


🎯 Purpose​

2Packs are used to:

  • Transfer configurations between development, test, and production environments
  • Distribute customizations as part of plug-ins
  • Automatically initialize or update application components when deploying a plug-in

🧩 What Can Be Included?​

A 2Pack can include the following elements:

TypeDescription
Windows / Tabs / FieldsEntire UI components
Processes / ReportsCustom processes or Jasper reports
Tables / ColumnsCustom database structures
Roles / Menus / MessagesSecurity settings and localization
SQL ScriptsExecuted automatically during Pack In
Dynamic ValidationsInput validation rules
Print Formats / ReferencesCustom documents and reference data
Arbitrary DataAny row from any table using SQL

πŸ” Key Concepts​

  • Pack Out: Export configuration and/or data into a .zip file
  • Pack In: Import the .zip file into another iDempiere environment

The .zip file contains an XML manifest and associated data files.


βš™οΈ How It Works​

πŸ“‹ Step-by-Step Workflow​

  1. Define Package: Developers define a Pack Out package using the iDempiere UI
  2. Generate Archive: 2Pack generates a .zip file with all the selected metadata and data
  3. Deploy Package: The .zip can be imported using multiple methods:

Import Methods​

Manual Import

  • Use the Pack In window in iDempiere UI

Automated via Plug-ins

  • AdempiereActivator: Basic activation
  • Incremental2PackActivator: Advanced activation with version control

Automatic External Pack In

  • iDempiere automatically scans a configured folder for .zip files
  • Installs them automatically on startup
  • Perfect for automated deployments and containerized environments
Pro Tip

Use Automatic External Pack In for CI/CD pipelines and Docker deployments to achieve zero-touch configuration updates.


πŸ› οΈ File Naming Conventions​

Standard 2Pack Naming​

For general use, 2Pack files are typically named using a descriptive format:

2Pack_1.0.0_MyPlugin.zip

Automatic External Pack In​

Automatic External Pack In Feature

If you use the Automatic External Pack In feature, you must follow a specific naming convention for iDempiere to automatically detect and process your 2Pack files.

Required Format:

[Timestamp]_[ClientValue]_[AdditionalInformation].zip

Components:

  • Timestamp: Format YYYYMMDDHHMM (Year, Month, Day, Hour, Minute)
  • ClientValue: The client identifier (e.g., SYSTEM, GardenWorld)
  • AdditionalInformation: Descriptive name for the pack

Example:

201803161725_SYSTEM_CreateNewColumn.zip
Best Practice

Use descriptive names for the AdditionalInformation part to make it easy to identify what the 2Pack contains, especially when managing multiple packs.


βœ… Benefits​

  • Enables consistent configuration across systems
  • Automates initial setup for plug-ins
  • Reduces risk of manual errors
  • Cleanly separates code from configuration
  • Works with version control and CI/CD
tip

2Pack is an essential component for working with iDempiere in a professional and scalable way. It's the foundation for maintainable, enterprise-grade iDempiere deployments.


πŸ‘‰ What’s Next?​

Now that you understand what a 2Pack is, read the next section to learn step-by-step how to create and import 2Packs in your own plug-ins or iDempiere environments.