Create second property file from first property file using Maven - maven-3

I have s1.properties file in src/main/resources folder in project. It contents are
k1=v1
k2=v2
k3=v3
I have to create new file called t1.properties which shall have below mentioned contents
k1=#k1#
k2=#k2#
k3=#k3#
As you can see , my t1.properties file contents have been derived from s1.properties's keys. so, for all keys in s1.properties, I want to create t1.properties which above mentioned contents.
I hope I am able to understand my requirement.
I searched over internet but could not find a way to do through Maven.
Please let me know if it is possible to do it through Maven.
Thanks in advance

I achieved this requirement through custom java code and maven exec plugin

Related

Where should the erlang_ls.config go

I want to use coc.nvim and elrang_ls in vim8.2. There are some problems. It report missing an erlang_ls.config when I open a erlang file. But i have erlang_ls.config in project root.
the result of CocCommand workspace.showOutput show it read config from unexpected place
Where is correct position for erlang_ls.config?
Sorry for my poor English. Thanks.
It is possible to customize the behaviour of the erlang_ls server via
a configuration file, named erlang_ls.config. The erlang_ls.config
file should be placed in the root directory of a given project to
store the configuration for that project.
According to the picture, the clue has already been given to you. In the els_config.erl file consult_config function, line 126. error type = 2.
I think the information is enough, you can find source code file and read it and find why?
It is need create erlang_ls.config in C:\Users\Administrator\AppData\Roaming\erlang_ls and erlang_ls.config erlang_ls.yaml in the project root path. But I don't know why.

link analysis using nutch

I am new to nutch. I have crawled some urls using nutch. Now I want to get linkrank of them. I read about it here. The problem is that I can't create webGraphdb. In my crawl directory I have linkdb, segments and crawldb directory. I need it when I run the command
./nutch -webgraph -segment <seg name> -segmentDir <seg dir> webgrapgdb??
I need to give the address of webgraphdb. How should I generate it. My nutch version is 1.7.
The webgraph command is for generating or updating of webgraphs. You can pass anything as the value of webgraphdb argument. If a directory with that name does not exist, nutch will create one for you.

Issues with multiple build template (xaml files) in project

I'm having trouble with my TFS Build project. I'm following the example from here as far as setting up the project in VS.
I have a project just for the custom activities and a separate project for just the templates. The issue I have is that the Templates project can only contain one xaml file. If I copy and and paste it in the same project it wont build. I get the following error:
Error 102 The item "obj\Debug\TfsBuild_Process_BeforeInitializeComponentHelper.txt" was specified more than once in the "Resources" parameter. Duplicate items are not supported by the "Resources" parameter.
But if I remove it, it'll build just fine. Everything works, meaning it'll build if I queue a build.
I have also tried the solution suggested on here, but it doesn't seem to resolve my issue.
Solution:
Renaming the form name in the solution explorer.
Change the class name in the .cs and Designer.cs file.
Change the constructor and destructor name (which is same as class name)
Change the name space name (if needed).
Here is the link to download the project.
I can't seem to figure out why. Any help is greatly appreciated!
I don't know if you still have this problem but I also had the problem today. I found a resolution that (if you still facing the problem) can help you or others.
When you copy a Build Process template it automaticly gets the x:Class property set to TfsBuild.Process. When you have multiple process templates with the same value then you will get this error when building the project.
<Activity mc:Ignorable="sads sap sap2010" x:Class="TfsBuild.Process" this:Process.BuildNumberFormat="$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)" this:Process.AgentSettings="[New Microsoft.TeamFoundation.Build.Workflow.Activities.AgentSettings() With {.MaxWaitTime = New System.TimeSpan(4, 0, 0), .MaxExecutionTime = New System.TimeSpan(0, 0, 0), .TagComparison = Microsoft.TeamFoundation.Build.Workflow.Activities.TagComparison.MatchExactly}]" this:Process.Verbosity="[Microsoft.TeamFoundation.Build.Workflow.BuildVerbosity.Normal]" this:Process.OutputFullHistory="True" this:Process.OutputBranchOrigin="True" this:Process.OnlyOutputChangedFiles="True" this:Process.StartChangeset="0"......
I solved the problem by replacing TfsBuild.Process with another name for every template (ex. TfsBuild.ProcessLabDefault). Please note you should also change all the instances of this:Process because the two are linked together (ex. this:ProcessLabDefault).
<Activity mc:Ignorable="sads sap sap2010" x:Class="TfsBuild.MyProcess" this:MyProcess.BuildNumberFormat="$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)" this:MyProcess.AgentSettings="[New Microsoft.TeamFoundation.Build.Workflow.Activities.AgentSettings() With {.MaxWaitTime = New System.TimeSpan(4, 0, 0), .MaxExecutionTime = New System.TimeSpan(0, 0, 0), .TagComparison = Microsoft.TeamFoundation.Build.Workflow.Activities.TagComparison.MatchExactly}]" this:MyProcess.Verbosity="[Microsoft.TeamFoundation.Build.Workflow.BuildVerbosity.Normal]" this:MyProcess.OutputFullHistory="True" this:MyProcess.OutputBranchOrigin="True" this:MyProcess.OnlyOutputChangedFiles="True" this:MyProcess.StartChangeset="0"......
I didn't find a way to change this by using the interface, View Code & Find and replace works. Hope it helps.
I used the following approach and it worked very well. All that needs replaced is TfsBuild in two locations on the first line of the raw xaml.
http://social.msdn.microsoft.com/Forums/vstudio/en-US/d3fb6b89-b711-4a02-a10a-a88a0cb4f714/unable-to-add-more-than-one-templatexaml-into-activity-library-workflow-project?forum=tfsprocess
From the link:
1 Right-click your Copy of DefaultTemplate.xaml in Source Control and select View With… to open it in Notepad (you can also right-click the template in VS and select 'View Code').
2 Then in the first line change:
**x:Class="TfsBuild.Process"** to **x:Class="YourProcessTemplateName.Process"**
**xmlns:this="clr-namespace:TfsBuild"** to **xmlns:this="clr-namespace:YourProcessTemplateName"**
I ran in to this problem and wanted to add the solution I found to it. If you check the properties of the XAML files, when you link them to your project they're assigned a BuildAction of XamlAppDef. Changing this to 'Content' will resolve the error.
To find the properties screen you need to edit just highlight the XAML file in Solution Explorer and either hit F4 or Right-Click on the file and choose 'Properties' from the context menu.
Hope this helps.

How do I find a particular sub directory using Ant and then use it to create a symlink?

I need to create a symlink to a sub-directory using Ant. The issue is that I don't know where the target sub-directory is.
To create a symlink with ant I do this:
<symlink link="${parent.dir}/FOO/linkname" resource="${parent.dir}/BAR/target"/>
But I don't know what BAR is called in advance so I need to do a search for "target" under parent.dir and then pass the one result into the resource.
Is this possible using fileset? Or another way?
It might be possible to use a fileset but that might give you several symlinks or none.
A much better approach is to define the path to BAR in a property. If there is a dynamic part in this path, change the code so that Ant evaluates the dynamic part and everyone else uses Ant's value.
The typical example here is that the path contains a version or timestamp. Define those in your build file so you can use them everywhere. If a Java process needs the values, pass them to the process as a system property (-D...).

custom yaml files not being seen in symfony

I created a custom yaml handler, myRunnerConfigHandler, and placed it under
apps/frontend/lib/myRunnerConfigHandler.class.php
and created a new config_handler and placed it under
apps/frontend/config/config_handler.yml
Now, under config_handler.yml,I placed my configuration for my new rundown:
modules/*/config/rundown.yml:
class: myRundownConfigHandler
Basically, under each module, I want to have a yaml file under
/apps/frontend/modules/home/config/rundown.yml
However no rundown.yml files are being seen. Is there something else I need to do before rundown.ymls are seen?
Thanks
Naming-issues? myRunnerConfigHandler VS myRundownConfigHandler ? I see you have them both in your example.

Resources