Closed touchvignesh closed 11 years ago
Which build script did you use to build the JAR file?
Thanks for looking into it Wabson,
I am using Eclipse to connect to Git and build it. I have Eclipse Juno, with Git Repository Exploring tab I have given the path of the repository. Downloaded it and under JAVA EE tab I can see the folder structure. Right click on build.xml file and Run As -> Ant build. I got the following in the output
Buildfile: C:\Users\259141\git\media-viewers\build.xml clean: [delete] Deleting directory C:\Users\259141\git\media-viewers\build prepare: [mkdir] Created dir: C:\Users\259141\git\media-viewers\build [mkdir] Created dir: C:\Users\259141\git\media-viewers\build\dist build-jar-prepare: [mkdir] Created dir: C:\Users\259141\git\media-viewers\build\jar build-jar-assemble: [copy] Copying 59 files to C:\Users\259141\git\media-viewers\build\jar [mkdir] Created dir: C:\Users\259141\git\media-viewers\build\jar\META-INF [copy] Copying 50 files to C:\Users\259141\git\media-viewers\build\jar\META-INF build-jar-jscompress: [yuicompress] [33%] web-preview.js [19974] ---> web-preview-min.js [6739] [yuicompress] [43%] Embed.js [8096] ---> Embed-min.js [3516] [yuicompress] [33%] FLVPlayer.js [36484] ---> FLVPlayer-min.js [12376] [yuicompress] [31%] MP3Player.js [22117] ---> MP3Player-min.js [6922] [yuicompress] [46%] PdfJs.js [106332] ---> PdfJs-min.js [49960] [yuicompress] [28%] Prettify.js [4818] ---> Prettify-min.js [1364] [yuicompress] [36%] WebODF.js [4956] ---> WebODF-min.js [1824] [yuicompress] [63%] compatibility.js [13520] ---> compatibility-min.js [8588] [yuicompress] [68%] pdf.js [1516287] ---> pdf-min.js [1039462] [yuicompress] [52%] spin.js [10196] ---> spin-min.js [5372] [yuicompress] [41%] web-preview-extend.js [3639] ---> web-preview-extend-min.js [1526] [yuicompress] [41%] lang-apollo.js [2618] ---> lang-apollo-min.js [1077] [yuicompress] [32%] lang-clj.js [2808] ---> lang-clj-min.js [924] [yuicompress] [36%] lang-css.js [2800] ---> lang-css-min.js [1018] [yuicompress] [13%] lang-go.js [2348] ---> lang-go-min.js [318] [yuicompress] [14%] lang-hs.js [4649] ---> lang-hs-min.js [689] [yuicompress] [24%] lang-lisp.js [3553] ---> lang-lisp-min.js [855] [yuicompress] [25%] lang-lua.js [2443] ---> lang-lua-min.js [630] [yuicompress] [39%] lang-ml.js [2976] ---> lang-ml-min.js [1180] [yuicompress] [58%] lang-n.js [3022] ---> lang-n-min.js [1769] [yuicompress] [23%] lang-proto.js [1294] ---> lang-proto-min.js [305] [yuicompress] [41%] lang-scala.js [2564] ---> lang-scala-min.js [1063] [yuicompress] [51%] lang-sql.js [3392] ---> lang-sql-min.js [1750] [yuicompress] [18%] lang-tex.js [1861] ---> lang-tex-min.js [340] [yuicompress] [52%] lang-vb.js [3514] ---> lang-vb-min.js [1860] [yuicompress] [68%] lang-vhdl.js [2230] ---> lang-vhdl-min.js [1519] [yuicompress] [31%] lang-wiki.js [1911] ---> lang-wiki-min.js [610] [yuicompress] [91%] lang-xq.js [25439] ---> lang-xq-min.js [23393] [yuicompress] [62%] lang-yaml.js [839] ---> lang-yaml-min.js [525] [yuicompress] [41%] prettify.js [55889] ---> prettify-min.js [23432] [yuicompress] [JavaScript] Compressed 30 files to 64% (1828KB to 1172KB, saving 656KB) [yuicompress] [CSS] No files to compress, or all files already up to date [yuicompress] Compressed 30 files to 64% (1828KB to 1172KB, saving 656KB) build-jar: dist-jar: [jar] Building jar: C:\Users\259141\git\media-viewers\build\dist\media-viewers-2.5.1.jar BUILD SUCCESSFUL Total time: 2 seconds
If I right click on project.xml file and Run As -> Ant build. I got the following output.
build-jar-jscompress: [yuicompress] [33%] web-preview.js [19974] ---> web-preview-min.js [6739] [yuicompress] [43%] Embed.js [8096] ---> Embed-min.js [3516] [yuicompress] [33%] FLVPlayer.js [36484] ---> FLVPlayer-min.js [12376] [yuicompress] [31%] MP3Player.js [22117] ---> MP3Player-min.js [6922] [yuicompress] [46%] PdfJs.js [106332] ---> PdfJs-min.js [49960] [yuicompress] [28%] Prettify.js [4818] ---> Prettify-min.js [1364] [yuicompress] [36%] WebODF.js [4956] ---> WebODF-min.js [1824] [yuicompress] [52%] spin.js [10196] ---> spin-min.js [5372] [yuicompress] [41%] web-preview-extend.js [3639] ---> web-preview-extend-min.js [1526] [yuicompress] [41%] lang-apollo.js [2618] ---> lang-apollo-min.js [1077] [yuicompress] [32%] lang-clj.js [2808] ---> lang-clj-min.js [924] [yuicompress] [36%] lang-css.js [2800] ---> lang-css-min.js [1018] [yuicompress] [13%] lang-go.js [2348] ---> lang-go-min.js [318] [yuicompress] [14%] lang-hs.js [4649] ---> lang-hs-min.js [689] [yuicompress] [24%] lang-lisp.js [3553] ---> lang-lisp-min.js [855] [yuicompress] [25%] lang-lua.js [2443] ---> lang-lua-min.js [630] [yuicompress] [39%] lang-ml.js [2976] ---> lang-ml-min.js [1180] [yuicompress] [58%] lang-n.js [3022] ---> lang-n-min.js [1769] [yuicompress] [23%] lang-proto.js [1294] ---> lang-proto-min.js [305] [yuicompress] [41%] lang-scala.js [2564] ---> lang-scala-min.js [1063] [yuicompress] [51%] lang-sql.js [3392] ---> lang-sql-min.js [1750] [yuicompress] [18%] lang-tex.js [1861] ---> lang-tex-min.js [340] [yuicompress] [52%] lang-vb.js [3514] ---> lang-vb-min.js [1860] [yuicompress] [68%] lang-vhdl.js [2230] ---> lang-vhdl-min.js [1519] [yuicompress] [31%] lang-wiki.js [1911] ---> lang-wiki-min.js [610] [yuicompress] [91%] lang-xq.js [25439] ---> lang-xq-min.js [23393] [yuicompress] [62%] lang-yaml.js [839] ---> lang-yaml-min.js [525] [yuicompress] [41%] prettify.js [55889] ---> prettify-min.js [23432] [yuicompress] [JavaScript] Compressed 28 files to 44% (334KB to 149KB, saving 185KB) [yuicompress] [CSS] No files to compress, or all files already up to date [yuicompress] Compressed 28 files to 44% (334KB to 149KB, saving 185KB) [jsmin] Minimizing C:\Users\259141\git\media-viewers\build\jar\META-INF\extras\components\preview\pdfjs\compatibility-min.js [jsmin] Minimizing C:\Users\259141\git\media-viewers\build\jar\META-INF\extras\components\preview\pdfjs\pdf-min.js build-jar: dist-jar: [jar] Building jar: C:\Users\259141\git\media-viewers\build\dist\media-viewers-2.5.1.jar BUILD SUCCESSFUL Total time: 10 seconds
I went to dist directory and took the jar file and copied under alfresco/tomcat/shared/lib/ directory and restarted alfresco.
Do let me know if I went wrong anywhere
Thanks, Vignesh
Please see the docs on Building from Source - you need to use project.xml
and not build.xml
.
Thanks Wabson,
I see both are compressing the js files and thought it doent make any difference. I will quickly use project.xml file , build and test it. I will let you know if I face any issues.
Thank you again,
Hi Wabson,
I have built a new jar file as suggested by you and deployed it. I started testing the preview. I need to disable FLV viewer, FLV configuration, Mp3 viewer and Mp3 configuration to make it work. If all modules are enabled I am getting "Audio conversion in progress" error while previewing any file.
I have tested and it is working for doc, pdf, xls, docx, xlsx, ppt, html, txt files and preview works fine as expected. Preview failed for jpg, png files (supposed to not do transformation). Also preview failed for avi, mp4, flv files because of disabling the modules.
As reported by David in issue 4 I have the same issue.
As suggested by you in issue 6 I have removed the jar file under shared/lib and kept it only under tomcat/webapps/share/WEB-INF/lib and this makes the preview available for mp4 and flv file (failed for avi) but all the other default transformation are not happenend. I mean preview went to default flash mode for doc, xls and ppt files.
Could you please advice on what we can do next to make the image files to use default transformation and media files to preview it
Thanks,
Vignesh
Issue 6 is now fixed in the latest master
branch. I have tested with all viewers (apart from WebODF) enabled and previews work fine for PDF, DOC, MP4 and AVI files.
Note that if you want to use the viewers for formats which require conversion, you will need to add the JAR file to the repository as well as to Share. The shared/lib
folder will make it available to both automatically, if you can get this to work.
I am therefore closing this issue.
Thanks for contributing this addon. I have tried deploying it in my 4.2.d version of Alfresco. I have built the jar file after pulling the latest code from git. (4 days old)
Also I have included the following lines in alfresco-global.properties file
content.transformer.ffmpeg.thumbnail.priority=50 content.transformer.ffmpeg.thumbnail.extensions.3g2.jpg.supported=true content.transformer.ffmpeg.thumbnail.extensions.3gp.jpg.supported=true content.transformer.ffmpeg.thumbnail.extensions.asf.jpg.supported=true content.transformer.ffmpeg.thumbnail.extensions.avi.jpg.supported=true content.transformer.ffmpeg.thumbnail.extensions.avx.jpg.supported=true content.transformer.ffmpeg.thumbnail.extensions.flv.jpg.supported=true content.transformer.ffmpeg.thumbnail.extensions.mov.jpg.supported=true content.transformer.ffmpeg.thumbnail.extensions.movie.jpg.supported=true content.transformer.ffmpeg.thumbnail.extensions.mp4.jpg.supported=true content.transformer.ffmpeg.thumbnail.extensions.mpeg2.jpg.supported=true content.transformer.ffmpeg.thumbnail.extensions.mpg.jpg.supported=true content.transformer.ffmpeg.thumbnail.extensions.ogv.jpg.supported=true content.transformer.ffmpeg.thumbnail.extensions.wmv.jpg.supported=true
Please let me know what I am missing. Please refer the screenshot for same
Removing Flv Player configuration and previewing the same documents shows