I have a single file where I specify my version:
I try to update it with the 'Update AssemblyInfo' task on build pipeline:
when executing the task do logs the update:
Searching for files...
============================================================
D:\BuildAgent01\_work\21\s\AutomationGeneral\Properties\SharedAssemblyInfo.cs
Updating attributes
-------------------
Skipped 'AssemblyProduct' (no value defined)
Updating 'AssemblyVersion'...
Updating 'AssemblyFileVersion'...
Updating 'AssemblyInformationalVersion'...
Saving changes...
But the content of the file is not updated: it stills remains:
[assembly: AssemblyFileVersion(SolutionItem.Version)]
Do I need to remove the const string and put the string content inside of the parameter of the method?
[assembly: AssemblyFileVersion("1.1.1.1")]
so the replacement will be really done?
is not the Task messing here? or is it me?
yes it seems that once there is no more variable inside the parenthesis it works:
it manages to update only if there is string content in the parenthesis.
and when it succeeds it prints the version number too:
Configuration:
Version: 1.20.1120.05
File version: 1.20.1120.05
InformationalVersion: 1.20.1120.05
Custom attributes:
Related
My application uses log4j but OkHttpClient uses java util logging. So apart from log4j.properties, I created a logging.properties file with the following contents:
handlers=java.util.logging.FileHandler
.level=FINE
okhttp3.internal.http2.level=FINE
java.util.logging.FileHandler.pattern = logs/%hjava%u.log
java.util.logging.FileHandler.limit = 50000
java.util.logging.FileHandler.count = 1
java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter
java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
I then added this to jvm params used for starting the application -Djava.util.logging.config.file="file://${BASE_DIR}/logging.properties"
But I don't see any new folders being created as indicated by the Filehandler. Any one know why?
But I don't see any new folders being created as indicated by the Filehandler. Any one know why?
The FileHandler will not create any new folders. A directory must be created before the FileHandler will create a file.
The system property requires a path to file that is located on the filesystem It will not expand system properties or environment variables by using the dollar sign syntax.
You can use a relative path based off of the working directory or you have to use an absolute path to the logging.properties. The logging properties can not be packaged inside of an archive.
If you want to work around this limitation then you want to create a custom config class and use the java.util.logging.config.class property in conjunction with the java.util.logging.config.file property. You then write a class that reads the file://${BASE_DIR}/logging.properties and performs the needed transformation into a path to a file. Then update the configuration if you are using JDK9 or newer. On older versions you need to use readConfiguration and add code to work work around limitations of the LogManager
I'm trying to deploy a process definition from a file using the following code
DeploymentBuilder deploymentBuilder = repositoryService.createDeployment().name(definitionName);
deploymentBuilder.addInputStream(definitionName, definitionFileInputStream);
String deploymentId = deploymentBuilder.deploy().getId();
System.out.println(deploymentId);
The above code runs successfully and the new deploymentId is printed out.
Later, I tried to list the deployed process definitions using the following code
List<ProcessDefinition> definitions = repositoryService.createProcessDefinitionQuery().list();
System.out.println(definitions.size());
The above code runs successfully but the output is always 0.
I've done some investigations and found that in the ACT_GE_BYTEARRAY table an entry with the corresponding deploymentId exists and the BYTES_ column contains that contents of the definitions file.
I have also found that there is no corresponding entry found in ACT_RE_PROCDEF table.
Is there something messing? from the API and the examples I found it seems that the above code shall suffice, or is there a missing step?
Thanks for your help
It turned out that the issue was related to definitionName (thanks thorben!) as it has to ends on either .bpmn20.xml or .bpmn.
After further testing, the suffix is required for the following definitionName of the code
deploymentBuilder.addInputStream(definitionName, definitionFileInputStream);
Leaving the following definitionName without the suffix is fine
repositoryService.createDeployment().name(definitionName);
It seems that you forget the isExecutable flag on your deployed process definitions. Please check if your process model contains a isExecutable flag. If you use the camunda modeler simply set this option in the properties panel of the process.
If you call #deploy() with non-executable definitions an deployment will created, but the process definition are not deployed since they are not executable.
On the latest version of camunda platform (7.7), a new method called #deployWithResult() was added to the DeploymentBuilder. This method returns the deployed process definitions, so it is easy to check if process definitions are deployed.
USING OpenEdge.Net.HTTP.*.
USING OpenEdge.Net.URI.
USING Progress.Json.ObjectModel.JsonObject.
DEFINE VARIABLE oClient AS IHTTPClient NO-UNDO.
i am getting an error
Multiple markers at this line - Could not understand line 8. (196) -
Invalid datatype specified: IHTTPClient. Specify a datatype such as
'character' or the name of a class. (5638)"
The REST client isn't really provided out of the box so you need to make sure you have it in your PROPATH.
Depending on your enviroment you might need to change it in a ini-file via PROTOOLS or programatically:
PROPATH = PROPATH + ",C:\Progressx86\OpenEdge\gui\netlib\OpenEdge.Net.pl".
Make sure to change the actual PATH to something that matches your installation. Also the "gui" part should be changed to tty if you're running a character client.
Helpful knowledgebase entry
I am trying to run a facedetection application and I get the following error:
Unexpected Standard exception from MEX file.
What() is:..\..\..\..\opencv\modules\core\src\persistence.cpp:2697: error: (-27)
NULL or empty buffer in function cvOpenFileStorage
If you're using haarcascade_frontalface_default.xml, check the xml file content.
The first 3 lines should be:
<?xml version="1.0"?>
<!--
Stump-based 24x24 discrete(?) adaboost frontal face detector.
I inadvertently downloaded the html that linked to the haarcascade_frontalface_default.xml file instead of the xml itself and got the same error you did.
You should provide some code and information.Nevertheless the error indicates that it can not access the haarcascade file. I suggest you make sure you have the "xml" in the same folder as your code (e.g. "ViewController.mm") and check permissions. additionally Assuming you are using Objective-c or swift:
1-check the file is in your Xcode project; and, if it is,
2-check it's included in the 'Copy Bundle Resources' phase underneath your selected Target (in the project tree view on the left in the normal Xcode window layout) and, if it is,
3-look inside the generated application bundle (find your product, right click, select 'Reveal in Finder', from Finder right click on the app and select 'Show Package Contents', then look for your file in there) to make sure that it's there.
I've got the same problem, and then I figure out what's the problem
First
Add file haarcascade_frontalface_default.xml to xcode project
make sure when you add the xml file with option below:
Destination: Copy items if need [check]
Added Folder: Create Folder References [check]
Add to targets: Your Project target [check]
Second
in you Wrapper.mm file add this code to your obj-c function:
const NSString* cascadePath = [[NSBundle mainBundle]pathForResource:#"haarcascade_frontalface_default" ofType:#"xml"];
or in case you wanna load the xml file, use this code:
cv::CascadeClassifier classifier;
const NSString* cascadePath = [[NSBundle mainBundle]pathForResource:#"haarcascade_frontalface_default" ofType:#"xml"];
classifier.load([cascadePath UTF8String]);
this actually fixes my problem, anywaythis question has been questioned for a long time but I hope someone face this problem can come to this answer and help them solve their problem like mine, cheer.
I have done the below steps, it is working fine on my local machine but when I worked with TFS solution explore below error display (newlines added for clarity):
Error: The character encoding for the file D:\Testcase\data.csv has changed.
Your source control provider may have problems managing files with this type of encoding.
For example, if you save an ANSI-encoded file as UTF-8 you may not be able to merge or show differences.
Steps:
Created data.csv file.
Advance save as a unicode (utf-8 without signature Codepage-65001).
Make data.csv file as copy if new
Code:
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\data.csv", "data#csv", DataAccessMethod.Sequential), DeploymentItem("data.csv"), TestMethod]
public void CodedUITestMethod1()
{
Console.WriteLine(TestContext.DataRow["firstname"].ToString());
// To generate code for this test, select "Generate Code for Coded UI Test" from the shortcut menu and select one of the menu items.
}
Set the Copy to Output Directory in the properties window for that file to Copy Always or Copy if Newer.