Trying Cybersource with Hybris 6.1 - sap-commerce-cloud

Hi i am new to hybris & i have hybris 6.1, Now i want to use Cybersource integration with my hybris. But it needs b2ccheckout addon which is not included in hybris package. I have commented the " -->" in cybersourceaddon/extensioninfo.xml.\,but while ant clean all it gives the error import de.hybris.platform.acceleratorfacades.order.impl.DefaultAcceleratorCheckoutFacade;
[yjavac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[yjavac] The import de.hybris.platform.acceleratorfacades.order.impl cannot be resolved

Cybersource extension is not part of the SAP Hybris commerce distribution anymore. Where did you find this extension ?
Deleting dependencies is not how you are going to fix this.
Have a look at the documentation.

For integrating cybersource with Hybris, first you need to install the addon using the below command:
ant addoninstall -Daddonnames="**CyberSourceAddonName**" -DaddonStorefront.yacceleratorstorefront="**YourStoreFrontName**"
CyberSourceAddonName could be cybersourcepaymentaddon,cybersourceb2bpaymentaddon
Also add the extensions to localextensions.xml file:
<extension name='cybersourcepayment' />
<extension name='cybersourcepaymentaddon' />
<extension name='cybersourceb2bpaymentaddon' />
<extension name='cybersourcefulfilmentprocess' />
These should resolve your issues.

Related

Target "addoninstall" does not exist in the project "platform"

This is regarding Hybris addon install issue.
I'm facing an issue while running ant addoninstall command from platform folder.
Build Failed:
Target "addoninstall" does not exist in the project "platform".
What I did was:
Created an extension using ant extgen.
Added the extension name in localextensions.xml
ran ant all
ran from platform folder:
ant addoninstall -Daddonnames="hartest" -DaddonStorefront.yacceleratorstorefront="yacceleratorstorefront"
Thanks In Advance
What you are currently try to do is to install the addon 'hartest' on the yacceleratorstorefront. The -Daddonnames parameter needs the name of the add-on you want to install on a extension. For example the 'secureportaladdon' is a correct one.
BR
I'm not sure, if it is the solution, but you should replace the yacceleratorstorefront value with your storefront extension name.
ant addoninstall -Daddonnames="hartest" -DaddonStorefront.yacceleratorstorefront="mystorefront"
Before you run the ant addoninstall command, Ensure that the addonsupport extension is listed in localextensions.xml file
...
<extension name="addonsupport"/>
...
Also, ensure that the AddOn and storefront extension that you want to install are listed in localextensions.xml file.
then run the command
ant addoninstall -Daddonnames="hartest" -DaddonStorefront.yacceleratorstorefront="yacceleratorstorefront"
But you should create your own storefront extension and install addon on custom extension rather than directly on template and make sure you choose yaddon template while creating your custom addon.

How to config jrebel in Hybris backoffice extensions?

After I created one backoffice extension using "ant extgen with ybackoffice template".
And I want add jrebel to this backoffice extensions but not reloading when i change code.
So, please help me to solve the problem to save time for deployment.Thanks
Check if backoffice extensions packaged as .jar packages contain rebel.xml files and if you make a code change in .java file, new .class files are generated in $PLATFORM_HOME/bin/custom/$EXTENSION_NAME/backoffice/classes directory that is defined in rebel.xml.
copy-paste from documentation portal:
Backoffice extensions that are packaged as JAR files need a descriptor file called rebel.xml. This XML file will tell JRebel that the .class files for this JAR are in that folder. To achieve this, you will need to do the following for all extensions you want reloaded:
To recompile via an IDE, set the compile output to where the classes are actually compiled to with ant build. For backoffice extensions, this would be $PLATFORM_HOME/bin/custom/$EXTENSION_NAME/backoffice/classes.
Create the following rebel.xml in $EXTENSION_NAME/backoffice/resources:
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_1.xsd">
<classpath>
<!-- Make sure to replace $PLATFORM_HOME and $EXTENSION_NAME with your concrete values -->
<dir name="$PLATFORM_HOME/bin/custom/$EXTENSION_NAME/backoffice/classes"/>
</classpath>
</application>
Edit $EXTENSION_NAME/buildcallbacks.xml and add the following before build callback:
<macrodef name="$EXTENSION_NAME_before_build">
<sequential>
<mkdir dir="${ext.$EXTENSION_NAME.path}/backoffice/classes" />
<copy file="${ext.$EXTENSION_NAME.path}/backoffice/resources/rebel.xml" todir="${ext.$EXTENSION_NAME.path}/backoffice/classes/" failonerror="false" />
</sequential>
</macrodef>
This will make sure that rebel.xml is bundled into the compiled extension JAR file on build.
When changing classes from the IDE, just recompile the class (either with ant build or via the IDE after setting the correct compile output) and reload the browser. The changed .class files are picked up by JRebel and reloaded on the fly.

cordova custom plugin use 3th party JAVA lib gradle

I want to reference a 3th party library:
import com.googlecode.mp4parser.authoring.Movie;
but in android studio, gradle puted the library in C:\Users\flieks\.gradle\...
Now how do i "export" the plugin project?
i want to have mp4parser somewhere in folders src\android\main.java
Greetings
Felix
You can reference a Gradle file in your plugin to allow you to pull in other libraries (if I'm understanding your question correctly). Check out plugin.xml in the crosswalk-webview plugin for an example on how to add one in:
https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview/blob/master/plugin.xml
Once you do that you can import the class in your plugin code.
adding this to the plugin.xml did the trick
<platform name="android">
<config-file parent="/*" target="res/xml/config.xml">
<feature name="Mp4Parser">
<param name="android-package" value="com.catwalk.mp4parser.Mp4Parser" />
</feature>
</config-file>
<config-file parent="/*" target="AndroidManifest.xml" />
<source-file src="src/android/Mp4Parser.java" target-dir="src/com/catwalk/mp4parser/Mp4Parser" />
<framework src="src/android/build.gradle" custom="true" type="gradleReference" />
</platform>
and this in same folder as the JAVA file
dependencies {
compile group: 'com.googlecode.mp4parser', name: 'isoparser', version: '1.1.7'
}

TFS 2010 build compiling TypeScript version 0.9.1.1

I'm hoping to stop including the generated JavaScript files in TFS source control, but I haven't managed to get the compiler to run on a build.
I've followed this chap's example and edited the project file to give me:
<ItemGroup>
<TypeScriptCompile Include="$(ProjectDir)\**\*.ts" />
</ItemGroup>
<Target Name="BeforeBuild">
<Message Text="Before Build" Importance="high" />
<CallTarget Targets="TypeScriptBuild"/>
</Target>
<Target Name="TypeScriptBuild" Inputs="#(TypeScriptCompile)" Outputs="%(Identity).Dummy" Condition="'$(CompileTypeScript)'=='true'">
<Message Text="Building typescript file - #(TypeScriptCompile)" Importance="high" />
<Exec Command=""$(MSBuildProgramFiles32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\tsc" -target ES3 "#(TypeScriptCompile)"" />
</Target>
I've changed the file location where the tsc executable is and removed the TypeScript version information, but it isn't doing anything for me. I'm a complete newbie at this build stuff so would appreciate any help, or tips on how to debug it.
Edit 1
Removed
<ItemGroup>
<TypeScriptCompile Include="$(ProjectDir)\**\*.ts" />
</ItemGroup>
as it was redundant - this is added individually for every TypeScript file in the project.
The only warnings I'm getting are about inconclusive unit tests. I assumed that <Message Text="Before Build" Importance="high" /> would produce some kind of log message but I can't see it anywhere.
Edit 2
Got it working locally within Visual Studio by putting
<Target Name="BeforeBuild">
<Message Text="Compiling typescript...">
</Message>
<Exec Command=""$(MSBuildProgramFiles32)\Microsoft SDKs\TypeScript\tsc" -target ES3 #(TypeScriptCompile ->'"%(fullpath)"', ' ')" />
at the end of the .csproj file. For some reason this doesn't work when TFS is building it. If I change the TypeScript compiler file location to something nonsensical it complains, but when it's correct there are no JavaScript files produced.
You really shouldn't have to do any of this. Make sure this line is in your csproj, before the </project>
<Import Project="$(VSToolsPath)\TypeScript\Microsoft.TypeScript.targets" />
Then install TypeScript on the build machine. Also you need to make sure the Build Action of the .ts files is set to TypeScriptCompile. At this point, TypeScript will compile your .ts files and generate the js files. You won't (and shouldn't) check the .js files into your code repository.
Unit Tests
You really want your unit tests building with the rest of your code. Even more, you can run these unit tests at build time and use them to fail the build if any of those tests fail!
Check out this post on msdn and this post on codeplex to help get you started. It will involve using Chutzpah. Also, be aware that the way your .js bundling / delivery may be different when using Chutzpah, since Chutzpah will have to build that bundle for you and I'm not sure how your actual site is doing it.

Use nant to build an archive and display it in cruisecontrol.net package list

I'm not sure if this is possible, but currently I am using a CruiseControl.net build server with a nAnt script to handle all of the building, testing, and packaging. I have nAnt manipulate some files and archive them. Is there a way to display that zip file that the nAnt script generated in the CruiseControl.net Package List? I am using ccnet 1.5 and nAnt 0.91 alpha2.
Thanks.
After much research, I have come to this conclusion:
Packages only show the files related to that build not all.
You can only build these packages within the CCNet.config
If you make a package by hand, it will be corrupted within the build server
It might be possible to create the package and drop the required files in the folder, but you will have to modify a couple of the statistic files and what not, but i gave up and no one has responded to this.
I did this because I was not happy with ccnet's package publisher. First you need to trick ccnet into creating a dummy package; the package will be created in [ArtifactDirectory]\[CCNetLabel]. Then run a nant script which replaces the package and updates the package xml.
ccnet config:
<publishers>
<package>
<name>Build-$[$CCNetLabel]</name>
<compression>0</compression>
<packageList />
</package>
<nant>
<buildArgs>-D:PackageName="Build-$[$CCNetLabel]"</buildArgs>
<buildFile>script.build</buildFile>
<targetList>
<target>PackagePublisher</target>
</targetList>
</nant>
</publishers>
nant:
<target name="PackagePublisher">
<property name="PackageDirectory" value="${CCNetArtifactDirectory}\${CCNetLabel}" />
<property name="PackageFullPath" value="${PackageDirectory}\${PackageName}.zip" />
<delete file="${PackageFullPath}" />
<zip zipfile="${PackageFullPath}">
<fileset>
<!-- include everything you need to package -->
</fileset>
</zip>
<!-- find package.xml; it is the only xml file in the PackageDirectory -->
<foreach item="File" property="PackageXml">
<in>
<items basedir="${PackageDirectory}">
<include>*.xml</include>
</items>
</in>
<do>
<xmlpoke file="${PackageXml}" xpath="//package[#name='${PackageName}']/#size" value="${file::get-length(PackageFullPath)}" />
</do>
</foreach>
</target>
The last part ensures the package size is displayed properly in the PackageList web page.

Resources