Executing sencha minify command from build.xml - build

I'm trying to minify an additional file that is not included in the whole build process after the build finished.
I think this could be done from within the build.xml file by calling the sencha cmd from the "-after-build" section and tried the following way:
<target name="-after-build">
<x-sencha-command dir="${build.dir}">
fs
minify
-f additional-file.js
-t additional-file.min.js
-yui
</x-sencha-command>
</target>
Unfortunately this results in an pretty generic error:
[INF] -after-build:
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.BasicException
[ERR]
[ERR] Total time: 18 seconds
[ERR] The following error occurred while executing this line:
...\build.xml:31: com.sencha.exceptions.BasicException
Line 31 of build.xml is:
<x-sencha-command dir="${build.dir}">
How can this be done?
Thanks & best regards
ps.: I've already posted this question on the sencha forum but didn't get no repsonse so far: http://www.sencha.com/forum/showthread.php?272190-Executing-sencha-minify-command-from-build.xml

The above task-call was only missing "=" between the parameternames (-t & -f) and their values. So this is working:
<x-sencha-command>
fs
minify
-f=${build.dir}/bootstrap-app.js
-t=${build.dir}/bootstrap-app.js
${build.compression}
</x-sencha-command>

Related

Adding an appsetting to the root web.config file in a helix solution

We are trying to figure out how to add an appsetting into the root websites web.config from a helix feature project. Its my understanding that if you add a transform file e.g (web.config.transform) into the root of your feature project and build the project using the helix gulp script, the transform should update the root config. Is this correct? Unfortunately when we run the gulp script we get an error
[11:26:54] Starting '04-Apply-Xml-Transform'...
[11:26:55] Applying configuration transform: D:\Projects\xxxxxxx\src\Feature\Claims\code\xxxxx.Website.Feature.Claim\App_Config\Include\Web.config.transform
D:\Projects\xxxxxxx\scripts\applytransform.targets(14,5): error : Could not open Source file: Could not find a part of the path 'C:\inetpub\wwwroot\xxxxxxxxx\website\xxxxxxx.Website.Feature.Claim\App_Config\Include\Web.config'.
Process terminated with code 1.
[11:26:56] MSBuild failed with code 1!
[11:26:56] '04-Apply-Xml-Transform' errored after 1.59 s
error!
[11:26:56] Error: MSBuild failed with code 1!
at ChildProcess.<anonymous> (D:\Projects\xxxxxxxxxxxx\node_modules\gulp-msbuild\lib\msbuild-runner.js:66:25)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
It looks to me as like it is trying to update a local web.config.
Your web.config would not reside here C:\inetpub\wwwroot\xxxxxxxxx\website\xxxxxxx.Website.Feature.Claim\App_Config\Include\Web.config
It would reside here: C:\inetpub\wwwroot\xxxxxxxxx\website\Web.config

Mahout 0.13.0 spark-shell examples fails with "no jniViennaCL in java.library.path"

I'm Trying to make Mahout 0.13.0 works with spark 1.6.3,
I already have spark 1.6.3 and Hadoop 2.7 working.
I download the last build from the homepage mahout_download.
Unpackage on /opt/mahout.
try to execute the example on spark-shell from the web.
Enter on the scala prompt
MASTER=local mahout spark-shell
Execute:
:load /opt/mahout/examples/bin/SparseSparseDrmTimer.mscala
timeSparseDRMMMul(1000,1000,1000,1,.02,1234L)
And I get thw follow error:
18/08/08 15:22:23 ERROR executor.Executor: Exception in task 0.0 in stage 3.0 (TID 3)
java.lang.UnsatisfiedLinkError: no jniViennaCL in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:726)
at org.bytedeco.javacpp.Loader.load(Loader.java:501)
at org.bytedeco.javacpp.Loader.load(Loader.java:434)
at org.apache.mahout.viennacl.opencl.javacpp.Context$.loadLib(Context.scala:63)
at org.apache.mahout.viennacl.opencl.javacpp.Context$.<init>(Context.scala:65)
at org.apache.mahout.viennacl.opencl.javacpp.Context$.<clinit>(Context.scala)
at org.apache.mahout.viennacl.opencl.GPUMMul$.org$apache$mahout$viennacl$opencl$GPUMMul$$gpuSparseRWRW(GPUMMul.scala:282)
at org.apache.mahout.viennacl.opencl.GPUMMul$.org$apache$mahout$viennacl$opencl$GPUMMul$$jvmSparseRWCW(GPUMMul.scala:343)
at org.apache.mahout.viennacl.opencl.GPUMMul$$anonfun$18.apply(GPUMMul.scala:86)
at org.apache.mahout.viennacl.opencl.GPUMMul$$anonfun$18.apply(GPUMMul.scala:86)
at org.apache.mahout.viennacl.opencl.GPUMMul$.apply(GPUMMul.scala:127)
at org.apache.mahout.viennacl.opencl.GPUMMul$.apply(GPUMMul.scala:33)
at org.apache.mahout.math.scalabindings.RLikeMatrixOps.$percent$times$percent(RLikeMatrixOps.scala:37)
at org.apache.mahout.sparkbindings.blas.ABt$.org$apache$mahout$sparkbindings$blas$ABt$$mmulFunc$1(ABt.scala:98)
at org.apache.mahout.sparkbindings.blas.ABt$$anonfun$6.apply(ABt.scala:113)
at org.apache.mahout.sparkbindings.blas.ABt$$anonfun$6.apply(ABt.scala:113)
at org.apache.mahout.sparkbindings.blas.ABt$$anonfun$pairwiseApply$1.apply(ABt.scala:209)
at org.apache.mahout.sparkbindings.blas.ABt$$anonfun$pairwiseApply$1.apply(ABt.scala:209)
at scala.collection.Iterator$$anon$11.next(Iterator.scala:328)
at org.apache.spark.util.collection.ExternalSorter.insertAll(ExternalSorter.scala:191)
at org.apache.spark.shuffle.sort.SortShuffleWriter.write(SortShuffleWriter.scala:64)
at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:73)
at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:41)
at org.apache.spark.scheduler.Task.run(Task.scala:89)
at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:227)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.UnsatisfiedLinkError: /tmp/javacpp106197113868261/libjniViennaCL.so: libOpenCL.so.1: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:709)
... 27 more
After a search for the problem, I install the ViennaCL libraries as is showed on the web.
mkdir ~/tmp
cd ~/tmp && git clone https://github.com/viennacl/viennacl-dev.git
cp -r viennacl/ /usr/local/
cp -r CL/ /usr/local/
Also, I try with copying on the path: /usr/local/include/
But nothing change...
When working with ViennaCL, you must build from source. Please try pulling the mahout 0.13.0 tag and build from source (with the -Pviennacl profile activated).

what is an error "Error: Unexpected token '}' in JSON at position 1923" in ionic 2

I am using Ionic-2 framework. When I install any native plugin in my application it throws the following error in command line.
Error: Unexpected token '}' in JSON at position 1923
I am not getting what is causing this error, now I'm unable to install any plugin.
I had a similar problem:
Error: Unexpected token / in JSON at position 1057
when I issued the command:
ionic plugin add phonegap-plugin-barcodescanner
The reason was I made a mistake by trying to comment a line of "plugins/fetch.json" by "//". Cerntainly, a json file couldn't be commented this way. However, Ionic 2 didn't tell you which file had the problem.
So, please check the json file Ionic might touch during the process, e.g. package.json & plugins/fetch.json
Make sure all the {} pair are matched.
I run into this problem when trying to execute cordova build --release android
Execute cordova plugin rm cordova-plugin-console to solve it.

ExtJS - sencha app build dependency error

I'm trying to extend a third party class. The code is something like this. Note I'm specifying where to load openGL.view.
Ext.Loader.setPath({
'openGL.view': 'C:/Users/«username»/Documents/third-party/openGL/view/'
});
Ext.define('myOpenGL.view.Qxga',{
extend: 'openGL.view.Uxga',
alias: 'widget.qxga',
itemId: 'qxga',
requires: [
'openGL.view.Uxga',
'myOpenGL.view.QxgaController'
],
controller: 'QxgaController'
});
When I build it, I get errors like this:
[ERR] Failed to resolve dependency openGL.view.Uxga for file myOpenGL.view.Qxga
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExNotFound: Unknown definition for dependency : openGL.view.Uxga
[ERR]
[ERR] Total time: 6 seconds
[ERR] The following error occurred while executing this line:
C:\Users\«username»\Applications\Sencha\Cmd\5.1.0.26\plugins\ext\current\plugin.xml:403: The following error occurred while executing this line:
C:\Users\«username»\Documents\workspace\openGL\.sencha\app\build-impl.xml:378: The following error occurred while executing this line:
C:\Users\«username»\Documents\workspace\openGL\.sencha\app\init-impl.xml:303: com.sencha.exceptions.ExNotFound: Unknown definition for dependency : openGL.view.Uxga
Some questions:
Why isn't it finding openGL.view.Uxga?
I've read about modifying build-impl.xml, but with various degrees of success. What would I have to do, and is there a way to do the same without having to modify the file? Say some kind of override or command line parameter?
If there is a way to do this using setPath, the third-party directory may not be in the same place. Is there a way to include a Windows environment variable or something similar?
Sencha Cmd doesn't know about the Ext.Loader.setPath call, Cmd doesn't execute the JavaScript. Instead, in your app.json you can add C:/Users/«username»/Documents/third-party to the classpath config. classpath is a comma-delimited (I think it may even be able to be an array these days) list of paths Cmd will use to inspect the files within it to search for Ext JS classes (or via certain comment tags like #require and #class).
"classpath": "app,C:/Users/«username»/Documents/third-party"

Sencha Touch: Unable to Build Package: com.sencha.exceptions.ExNotFound: Unknown definition for dependency

I have a Sencha Touch App and also a Sencha Touch Package with the following basic structure:
MyApp
/app
/packages/MyPackage
When I try to build the package by executing:
sencha package build
(inside packages/MyPackage)
I get the following error:
[ERR] Failed to resolve dependency Ext.data.writer.Writer for file Ext.ux.MyClass [ERR] [ERR] BUILD FAILED [ERR]
com.sencha.exceptions.ExNotFound: Unknown definition for dependency :
Ext.data.writer.Writer [ERR] [ERR] Total time: 1 second [ERR] The
following error occurred while executing this line:
/MyApp/packages/MyPackage/.sencha/package/build-impl.xml:137: The
following error occurred while executing this line:
/MyApp/packages/MyPackage/.sencha/package/js-impl.xml:32:
com.sencha.exceptions.ExNotFound: Unknown definition for dependency :
Ext.data.writer.Writer
MyClass extends Ext.data.writer.Writer, in the following way:
Ext.define('Ext.ux.MyClass', {
extend: 'Ext.data.writer.Writer',
alias: 'writer.myclass',
I understand that during the compiling process the source of the class Ext.data.writer.Writer cannot be determined. How can I solve this?
Thank you!
In your sencha.cfg you should set:
package.framework=touch
It will add the framework to the classpath
OK Guys, I was able to build my package by editing the following config file:
/MyApp/packages/MyPackage/.sencha/package/sencha.cfg
I added the touch framework to the package classpath.
Before:
package.classpath=${package.dir}/src
After
package.classpath=${package.dir}/src,${touch.dir}