I'm using install4j 6.0.4 and I need to update content of one WAR file. Regarding to this answer, I configured following actions as part of "Installation" screen:
ExtractZipFileAction - works as expected, unzipped correctly
ModifyTextFileAction - works as expected, file content is changed
CreateZipFileAction - no new WAR file is created and next action fails
But all three actions are marked as successful in log file:
[INFO] com.install4j.runtime.beans.actions.files.ExtractZipFileAction [ID 13956]: Execute action
Property mode: 666
Property dirMode: 777
Property zipFile: myApplication.war
Property showProgress: false
Property fileFilter: null
Property destinationDirectory: temp_war
Property rollbackSupported: true
Execute action successful after 30363 ms
[INFO] com.install4j.runtime.beans.actions.text.ModifyTextFileAction [ID 12713]: Execute action
Property searchValue: mySomething1
Property logReplacement: true
Property replaceValue: mySomething2
Property encoding: null
Property escapeForPropertyFile: false
Property failIfNoReplacement: true
Property files: [temp_war\myFile.txt]
Property rollbackSupported: true
Backing up C:\Program Files\MyApplication\temp_war\myFile.txt
Execute action successful after 16 ms
[INFO] com.install4j.runtime.beans.actions.files.CreateZipFileAction [ID 13957]: Execute action
Property zipFile: myApplication-new.war
Property recursive: true
Property addTopLevelDirectoriesToRelativePath: true
Property showFileNames: true
Property showProgress: true
Property files: [temp_war, myAnotherFile.txt]
Property fileFilter: null
Property directoryFilter: null
Property rollbackSupported: true
Execute action successful after 16721 ms
[INFO] com.install4j.runtime.beans.screens.InstallationScreen [ID 8]: Rollback barrier reached
command: move 1 screens, executing actions, checking condition
[INFO] com.install4j.runtime.beans.actions.files.MoveFileAction [ID 5318]: Execute action
Property shared: false
Property destinationFile: myDestinationFolder
Property mode: 644
Property uninstallMode: Always
Property overwriteMode: Always
Property directoryMode: 755
Property triggerReboot: false
Property recursive: true
Property delay: false
Property showProgress: true
Property showFileNames: false
Property directoryFilter: null
Property files: [myApplication-new.war]
Property fileFilter: null
Property rollbackSupported: true
The file "C:\Program Files\MyApplication\myApplication-new.war" does not exist
[ERROR] com.install4j.runtime.beans.actions.files.MoveFileAction [ID 5318]: Execute action not successful after 0 ms
Also, I'm not able to update existing WAR file. I specified it in property 'zipFile' in CreateZipFileAction, this action was again marked as successful but WAR file was not updated.
I would suggest to update to install4j 6.1 which has a "Modify ZIP file" action which makes this much easier.
Related
I'm developing a script on rundeck, sending custom webhooks.
But I am not able to send the log of the work execution itself.
I need the execution log to be sent in the message body.
As in the example:
Log rundeck:
enter image description here
I need this log to be in the body of the message, I've tried some ways but it didn't work, does anyone have any tips?
Download this plugin using the plugin manager, the plugin is for sending HTTP notifications against any node.
In your command step/script step use the multiline data capture filter (to capture all the output in a single data variable like ${data.mydata}).
Now using the global variable step, take the data value (the job output) and create a global variable to export across the job or use in notifications, e.g: ${export.tonotify}.
In your job (creating or editing), go to the Notifications tab, select any scenario (e.g: On Success), clic on the + Add Notification button, select the "Http Notification" on the "Notification type" list, then put the HTTP URL, POST method and ${export.tonotify} on body section.
Take a look at this Job definition example for testing:
- defaultTab: nodes
description: ''
executionEnabled: true
id: fdda4e33-9121-4119-9685-69a18a0e1989
loglevel: INFO
name: HelloWorld
nodeFilterEditable: false
notification:
onsuccess:
plugin:
configuration:
authentication: None
body: ${export.tonotify}
contentType: application/json
method: POST
remoteUrl: https://your/url/to/post
timeout: '30000'
type: HttpNotification
notifyAvgDurationThreshold: null
plugins:
ExecutionLifecycle: null
scheduleEnabled: true
sequence:
commands:
- description: 'Any command / script / wathever, the ouput is captured by multiline
regex data capture filter'
exec: ls -a
plugins:
LogFilter:
- config:
hideOutput: 'false'
logData: 'true'
name: mydata
regex: ^(.*)
type: key-value-data-multilines
- configuration:
export: tonotify
group: export
value: ${data.mydata*}
description: create an export variable to notofy or use acroos your jobs
nodeStep: false
type: export-var
- description: just for debugging
exec: echo ${export.tonotify}
keepgoing: false
strategy: node-first
uuid: fdda4e33-9121-4119-9685-69a18a0e1989
Result (I used webhook.site to test).
I'm using shared_preference version 2.0.6,
as per the documentation shared_preference version 0.5.6 by default supports web. as show in code 1st log works fine but the 2nd log not happening and in future builder showing
NoSuchMethodError: Unexpected Null Value
method not found
Receiver: null
Arguments: []
SharedPreferences prefs = await SharedPreferences.getInstance();
print("checking logged in user");//1st log
String loginedInUser = prefs.getString("user");
print("logged in user" + loginedInUser);//2nd log
Ok, I found what was the problem, consider below code:
SharedPreferences prefs = await SharedPreferences.getInstance();
String loginedInUser = prefs.getString("user"); //2nd line
While using shared_preferences for Flutter web, getter key(user) can't be null means that if stored value of user is null 2nd line will not return null instead it shows an error, if the user has some data then returns that value.
While using SharedPreferences for Flutter in Android 2nd line returns null without any errors.
My list view has a string and a delete button(this is with k-delete-button class). When I press delete I need to call a special method on my viewModel. and this should not update my datasource..
I'm using my own "remove" method as below on the kendo listview.
m("div" , {
id:"listView",
"data-role": "listview",
"data-template":"template",
selectable: "multiple",
"data-bind":"source: items, events: {remove: onItemRemove} ",
})
on my view Model :
onItemRemove = (e:any) => {this.removeWavelegnthFromList(e.model); }
I'm using e.model to get the value corresponding to the item that I'm trying to delete. But this is set to a wrong value. It doesn't return the value I've selected for delete.
I couldnt use e.sender.select() method to get my value and it throw "Uncaught TypeError: Cannot read property 'value' of undefined(…)" error.
please let me know if I'm doing anything wrong.
I must figure out that how can i create a component exactly as tfrxMemoView from fastReport with all properties except the database related ones?
Is there any solution to create an inherited component from tfrxMemoView or any similar component does exists?
See FR Developer's manual "Writing Custom Report Components" chapter
Also you can inherite your new component from TfrxMemoView and hide some properties like frxHideProperties(TfrxView, 'DataSetName;BrushStyle;URL');
uses frxDsgnIntf;
TfrxMemoView1 = class(TfrxCustomMemoView)
published
property AutoWidth;
property AllowExpressions;
property AllowHTMLTags;
property BrushStyle;
property CharSpacing;
property Clipped;
property Color;
//property DataField;
//property DataSet;
property DataSetName;
property DisplayFormat;
property ExpressionDelimiters;
property FlowTo;
property Font;
property Frame;
property FillType;
property Fill;
property GapX;
property GapY;
property HAlign;
property HideZeros;
property Highlight;
property LineSpacing;
property Memo;
property ParagraphGap;
property ParentFont;
property Rotation;
property RTLReading;
property Style;
property SuppressRepeated;
property Underlines;
property UseDefaultCharset;
property WordBreak;
property WordWrap;
property Wysiwyg;
property VAlign;
end;
initialization
frxObjects.RegisterObject1(TfrxMemoView1, nil, '', '', 0, 2, [ctReport, ctData]);
I have a following code initializing Formo
$form = Formo::form();
$form->add('field', 'input', 'default', array('required'=>true));
How do I access the "required" value inside the view file?
From the Form Docs:
$required = $field->view()->attr('required');