I'm trying spring-integration-zip - useful stuff - and was wondering if it (somehow) can also uzip .gz files apart from zip ones?
Moreover, I wanted to change workDirectory ("java.io.tmpdir") for unzip transformer - is there a way to change UnZipTransformer class in xml config, I do not see such possibility or maybe I'm missing something (I know I can use Java Config) - as it is in case of int:splitter for example?
Hm. We don't expose work-directory into the XML configuration.
Please, raise a GH issue on the matter.
Meanwhile you can use:
<int:transformer>
<bean id="unZipTransformer" class="org.springframework.integration.zip.transformer.UnZipTransformer">
<property name="workDirectory" value="D:\tmp"/>
</bean>
</int:transformer>
And no we don't support GZIP format for (un)compression.
The project has been built on top of zt-zip library. So, this Spring Integration Zip extension really provides functionality only for ZIP archives.
Feel free to fill out an issue on the matter as well.
Related
While defining a RollingRandomAccessFile Appender or similar appender for the attribute "filepattern" if we specify standard extension as gz/zip log4j2 claims to automatically compress the file.
<RollingRandomAccessFile
name="RollingRandomAccessFile"
fileName="/var/log/myapp.log"
filePattern="/var/log/myapp.%d{yyyy_MM_dd}.%i.gz">
I wish to use a different extension instead of gz/zip but still have the file compressed using the gzip compression.
Is there a way to achieve this?
As of log4j2-rc1 this is not possible. The decision to compress or not, and which compression algorithm to use is currently determined by the "filePattern" file name extension.
If you want to decouple these, perhaps with an additional attribute in the configuration for RollingRandomAccessFile and RollingFile, then please raise a feature request in Log4j2's Jira issue tracker. Providing a patch with unit tests would be ideal. :-)
I have a proxy which accepts XML files with Base64 encoded files in it. For example the XML looks like:
<message>
<content>Hello World</content>
<attachements>
<attachement>*Base64 code here*</attachement>
<attachement>*Base64 code here*</attachement>
<attachement>*Base64 code here*</attachement>
</attachements>
</message>
My Problem:
I like to save the decoded files from the message into a folder of the filesystem of the server running the ESB. But how can I do this? If I encode a simple text like "Hello World" with Base64 I can decode it with an Script Mediator and Javascript, but how can I write a file to the filesystem? Do I have to write my own Mediator or is there another solution I don't know?
Would be nice if you could help me :)
I'm using the WSO2 ESB for my bachelor thesis. So I'm not a professional yet :)
Thank you
You have several options,
If file sizes are small, iterate through <attachments> and for each attachment, decode using the script mediator and write to a file with syntax like,
<property name="transport.vfs.ReplyFileName"
expression="expression-to-compute-file-name"
scope="transport"/>
<property action="set" name="OUT_ONLY" value="true"/>
<send>
<endpoint>
<address uri="vfs:file:///home/user/test/out"/>
</endpoint>
</send>
If the files are large then it's more efficient to write your own class mediator
Send the files to an local filesystem . Use VFS proxy
I have a multicore setup for solr, the directory structure of which goes like
-multicore
|-core0
|--conf
|---schema.xml
|---solrconfig.xml
|---stopwords
|---synonyms
|-core1
|--conf
|---schema.xml
|---solrconfig.xml
|---stopwords
|---synonyms
Both of these cores essentially use the same stop words and synonyms file. Is there a way, both these files could be located at a common place and both the cores read it from there?
According to the CoreAdmin documentation, you can
specify properties in solr.xml which can be used in the solrconfig.xml and schema.xml files.
So as an example you could create something similar to the following:
<solr persistent="true" sharedLib="lib">
<property name="synonymns" value="<your path here>/synonyms.txt" />
<property name="stopwords" value="<your path here>/stopwords.txt" />
<cores adminPath="/admin/cores">
<core name="core0" instanceDir="core0"/>
<core name="core1" instanceDir="core1" />
</cores>
</solr>
Hopefully this should get you started, you will obviously want/need to modify the solr.xml settings to meet your specific needs. Also there are a few other options for how the properties can be defined and the use of defaults. Please refer to the documentation for more details.
Not sure if there is any elegant way with the latest releases.
You can check using the absolute path of the stopwords file.
We have just created a symbolic link to a common shared files which are updated avoiding duplicates.
Does anyone have any example of how to use modification reader task?
Ok, I use this over XML:
<modificationReader>
<filename>mods.xml</filename>
<path>path/to/my/file/</path>
</modificationReader>
then, what? How do I get the information in "mods.xml" and use it?
Thanks
This appears to be used with the modificationWriter task which writes the modifications to a file (in the artifact directory by default).
http://build.sharpdevelop.net/ccnet/doc/CCNET/Modification%20Writer%20Task.html
If you're just trying to read in the modifications in to a different projects' buildLog, the above - with a path to the first project - should be sufficient.
Are you trying to do something different?
CruiseControl.NET: Build subproject obtained by SVN
I'm having problems simply configuring the server for CruiseControl.NET. I am using the source block that is given by ThoughtWorks to set it up, but I cannot seem to get it to be error-free. I am pretty new to all this and some sort of direction would be fantastic.
Does anyone use this combination?
Do you have a ccnet.config file I can look at?
This is what does not work for me:
<cruisecontrol>
<project name="test">
<sourcecontrol type="clearCase">
<exec>batch file</exec>
<viewPath>path_name</viewPath>
<branch>main</branch>
<autoGetSource>false</autoGetSource>
<useLabel>true</useLabel>
<useBaseline>false</useBaseline>
<projectVobName>vob_name</projectVobName>
<viewName>projecy_name</viewName>
<executable>cleartool.exe</executable>
<timeout>50000</timeout>
</sourcecontrol>
</project>
</cruisecontrol>
Thank you.
I have no direct experience with this kind of setup, but if you are using the <projectVobName> tag, that means:
you are declaring a pvob (project vob used only in UCM to store project, stream, activities and components, all UCM data)
your view (with the root directory referenced in <viewPath>) must be an UCM view.
All the other path elements (like 'executable') should reference an absolute path (and not just "cleartool.exe")