Diff
Goal
Generates a diff between two STEP elements. Each of these elements can be either a STEPXML file or a STEP environment. Provided environments are decompiled to STEPXML.
Between two STEPXML files:
mvn c4d:diff -DoriginalInputFile=<STEPXML file> -DrevisedInputFile=<STEPXML file>
Between a STEPXML file and a STEP environment:
mvn c4d:diff -DoriginalInputFile=<STEPXML file> -DrevisedStepUrl=<URL> -DrevisedStepUsername=<Username> -DrevisedStepPassword=<Password> -DrevisedStepContext=<Context> -DrevisedStepWorkspace=<Workspace> -DrevisedStepConfigId=<Config> -DrestApiVersion=<Version>
Between two STEP environments:
mvn c4d:diff -DoriginalStepUrl=<URL> -DoriginalStepUsername=<Username> -DoriginalStepPassword=<Password> -DoriginalStepContext=<Context> -DoriginalStepWorkspace=<Workspace> -DoriginalStepConfigId=<Config> -DrevisedStepUrl=<URL> -DrevisedStepUsername=<Username> -DrevisedStepPassword=<Password> -DrevisedStepContext=<Context> -DrevisedStepWorkspace=<Workspace> -DrevisedStepConfigId=<Config> -DrestApiVersion=V2
Goal will generate html files allowing to review the differences for each category that has changed between versions.
Parameters
Mandatory parameters :
The first input element that can be either :
originalInputFile
path to a STEPXML file- the information to retrieve a STEP environment, namely :
originalStepUrl
URL to the environmentoriginalStepUsername
username to access the environmentoriginalStepPassword
password to access the environmentoriginalStepContext
STEP context used for the exportoriginalStepWorkspace
STEP workspace used for the exportoriginalStepConfigId
id of the export configuration
The second input element that can be either :
revisedInputFile
path to a STEPXML file- the information to retrieve a STEP environment, namely :
revisedStepUrl
URL to the environmentrevisedStepUsername
username to access the environmentrevisedStepPassword
password to access the environmentrevisedStepContext
STEP context used for the exportrevisedStepWorkspace
STEP workspace used for the exportrevisedStepConfigId
id of the export configuration
Optional parameters :
outputDirectory
(default=target/
) path to the folder where generated files are storedcontextSize
(default=5
) number of context lines around diff blocksrestApiVersion
(default=V2
) STEP Rest API version used to retrieve environments, only used if at least one of the input elements is a STEP environment.attributeGroupBy
- Description: Used to choose how to split attributes files when decompiling STEPXML file.
- Allowed values:
BOTH
(default value),AttributeGroup
,UserType
,None
.
Output
No differences found
If no differences are found, no output files are generated. Only a message is displayed that indicate no result is generated.
[INFO] Diff content are identical, no result is generated
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for companion-example 1.0.0-SNAPSHOT:
[INFO]
[INFO] companion-example .................................. SUCCESS [02:20 min]
[INFO] step-contexts ...................................... SKIPPED
[INFO] step-datamodel ..................................... SKIPPED
[INFO] step-tree .......................................... SKIPPED
[INFO] step-portal ........................................ SKIPPED
[INFO] step-integration ................................... SKIPPED
-----------
[INFO] Total time: 02:21 min
[INFO] Finished at: 2023-02-21T14:34:41+01:00
[INFO] ------------------------------------------------------------------------
Differences are found
If differences are found, you can find the following folders in the output directory:
- html: contains the html files to view the differences, they are segmented into differents types like Attributes, BusinessRules, etc.
- diff: contains the raw diff files resulting from the comparison.
- resources: contains the javascript files used in the html files for visualization.
Visualisation
The delivery companion gives you a quick view of all changes made between environments.
To compare the changes, you have two types of views:
- Inline
- Side by side