I have hybris custom extension in svn and hybris package in local machine. I need to use svn custom extension so that i can commit my module changes/updates to svn server. How to edit custom extension path in localextensions.xml to use svn code with hybris package?
So my understanding is you want your extensions save in a different folder than say hybris/bin/myextensions, is this correct?
If so this is not a problem. To do this create your folder where you want to save your extensions, like you've said you have done. Open up your localextensions.xml in the config.
Include your extensions like this:
<extension>
<!--
There should be a path dir defined within the config like below
-->
<path dir="${HYBRIS_BIN_DIR}" />
<!--
Navigate to where your extensions are defined, you can create your
own path variable above if you want too, this is just an example for you
-->
<extension name="${HYBRIS_BIN_DIR}/../../myExtensionsFolder/extension1" />
<extension name="${HYBRIS_BIN_DIR}/../../myExtensionsFolder/extension2" />
</extension>
Once you build these extensions should be built too.
Related
Running the command nuget.exe pack <path-to-nuspec> -NoDefaultExcludes -OutputDirectory <path-to-output-dir> on a Windows 10 machine does not include files without a dot, such as "Dockerfile". I have not been able to find any information on this, apart from information on how to include files starting with a dot.
Is it working as intended or am I missing some option? Seems like a strange limitation, gives that Dockerfile is something one might want to include in a nuget package.
I found a work-around for this. In the .nuspec file, just replace
<file src="include/**/*.*" target="include" />
with
<file src="include/**/*" target="include" />
It seems that '*' catches the "*.*" files as well.
I have taken custom hybris extension folder from git and it does not contains any .project file. Will eclipse autogenerate this file while import or I need to make a new one?
See this answer: https://stackoverflow.com/a/53880050/90513
If the Git project / repository is what your team is using, it's probably better to ask your team mate to push the .project file.
My source code for Hybris (custom extensions) are in a GIT Repository but my Hybris platform binaries are in another folder. (I am a newbie to hybris)
How to set my build path in this case?
Say if my custom extension folders are under (TFS Git Repository)
C:\HybrisCommerce
Whereas my Platform binaries
C:\HybrisBinary\Bin\Platform
C:\HybrisBinary\Config
C:\HybrisBinary\data\
C:\HybrisBinary\log\
How to configure Build Path in such a case?
You can create a Windows symlink to link your custom extensions folder to your hybris project folder.
Here is an example. I am not sure if it will work exactly for your system so you may have to modify it.
mklink /J "C:\HybrisCommerce" "C:\HybrisBinary\Bin\custom"
This way, the default hybris build will search for its extension in bin/custom, which will actually point to you git repository.
For eclipse, you can just add all the projects into the workspace. General > Existing Project into Workspace First all project from you hybris folder and after that all your custom projects from the git repository folder. Important! Keep in mind, that eclipse will change the .project file of your custom extensions. Don't commit this file to git repository, because you might break the other team members projects.
Good luck!
You can simply create symbolic link as suggested by #Hristo Staykov
Or
Modify localextenstion.xml as below, to target all your custom extenstions (Taken from GIT/SVN) by giving full path (dir).
e.g. <extension dir='C:\HybrisCommerce\custmocore' />
Then configure your Eclipse for hybris e-commerce using these steps
Go to your Local Hybris setup,reach this location:
[LOCAL_Path]\hybris\config\
Open the localextensions.xml,you will see something like this in the file:
<path dir='[PUT_YOUR_CUSTOM_LOCATION_PATH HERE]' autoload='false' />
Then add all the extension name(that needs to be included from custom/default here) right below it:
<extension name='abc' />
<extension name='xyz' />
<extension name='efg' />
Save it and Run ant clean all.
In theory, given that Azure now includes go support by default, I should be able to run:
go get github.com/etsy/hound/cmds/...
and have Azure pull down the necessary files but when I run that I get the following:
D:\home\site\wwwroot
'go' is not recognized as an internal or external command,
operable program or batch file.
If I cd to d:\program files\go\1.7\bin and run it again I get:
D:\Program Files\Go\1.7\bin
go: cannot find GOROOT directory: c:\go
Is this simply a limitation of Azure web apps?
Thanks,
Alex.
After you install Go Lang for Azure Websites, please restart the site to make it available and you need to ensure Go binaries (found in D:\home\site\wwwroot\go\bin) are in Path system environment variables. You could add a folder to the PATH through an XDT Transform.
<environmentVariables xdt:Transform="InsertIfMissing">
<add name="PATH" value="D:\home\site\wwwroot\go\bin" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing" />
</environmentVariables>
Besides, as far as I know, you should also add GOROOT and GOPATH to environment variables.
We have a problem with our azure build such that we can only get it to work if we use absolute paths in the WebRole/Contents/Content/SourceDirectory sections of our csdef file. Although it does support relative paths (including '..') and environment variables (! Yes as in SET) the problem is we cant get any non-absolute path to successfully build because it appears the .csdef file is "validated" twice: once where it sits in the project directory before packaging, and once again after it had been moved to the /bin folder. Obviously there is no one relative path that will be able to resolve to the same content directories if we start in two separate places! What you can do is get the paths right for ONE of the two build steps phases... but then it will fail on the other. The offending target is PreValidateServiceModel which calls the ValidateServiceFiles task.
In order to make my project build using relative paths i need to disable the PreValidateServiceModel target. The packaging appears to work although I'm worried some vital process is being missed by skipping the targets (aside from the obvious... the service files are not validated!). That said the .csdef file is still "validated" in the sense it has to be parsed to create the package.
I had a similar problem. Checking the documentation on the Source directory element of the WebRole schema, I saw that environment variable expension in the directory path is supported. This led me to the following solution.
In a pre-build event of the project containing the csdef file, I copy my files from the UpdaterFiles directory to a directory under the Temp directory:
IF NOT EXIST %TEMP%\UpdaterFiles MKDIR %TEMP%\UpdaterFiles
XCOPY $(ProjectDir)..\UpdaterFiles\*.* %TEMP%\UpdaterFiles\ /Y
Then my source directory just becomes:
<SourceDirectory path="%TEMP%\UpdaterFiles" />
The above works like a charm
Here is a different solution, which avoids copying to temp.
As already mentioned, the problem is that the relative path does not work from two different places:
1. ProjectFolder\ServiceDefinition.csdef
2. ProjectFolder\bin\Debug\ServiceDefinition.csdef
So I moved the source location of ServiceDefinition.csdef down two folder levels, so that the same relative path will work in both cases:
1. ProjectFolder\Service\Definition\ServiceDefinition.csdef
2. ProjectFolder\bin\Debug\ServiceDefinition.csdef
To do this, I edited the project file (right click, 'Edit Project File') and changed:
<ServiceDefinition Include="ServiceDefinition.csdef" />
into:
<ServiceDefinition Include="Service\Definition\ServiceDefinition.csdef" />
I created those two sub-folders in Windows Explorer and moved the file to its new location. Then I reloaded the project.
I noticed that Visual Studio automatically added these two lines for me:
<Folder Include="Service\" />
<Folder Include="Service\Definition\" />
In my ServiceDefinition.csdef file, I refer to the source directory by going up three folders to the solution folder, and then navigating from there:
<SourceDirectory path="..\..\..\MySourceProject\MySourceFolder" />