Ticket #775 (closed Defect: fixed)
hot deployment on Windows
Reported by: | dgf | Owned by: | |
---|---|---|---|
Priority: | Major | Milestone: | |
Component: | DeepaMehta Standard Distribution | Version: | 4.5 |
Keywords: | Cc: | AsifM, Malte | |
Complexity: | 3 | Area: | Runtime Environment |
Module: |
Description
Pax Runner fails on a fresh Windows 8 installation with Java 8u31 and Maven 3.2.5
The dynamic resolution of the file installation uses the basedir property and this results in unusable paths.
<felix.fileinstall.dir> ${project.basedir}/modules/dm4-core/target, ... </felix.fileinstall.dir>
After cloning and starting DeepaMehta in C:\projects\deepamehta the property evaluation results in C:\projects\deepamehta/modules/dm4-core/target and the Pax Runner throws a strange class not found exception for the main class of C:\projects\deepamehta.modules.dm4-core.target
Some research and tests later, I realized that the Felix Fileinstall Plugin can only handle directories with slashes or escaped back-slashes like C:/projects/deepamehta/modules/dm4-core/target and the escaped form C:\\projects\\deepamehta\\modules\\dm4-core\\target
A manually adjusted configuration works with static paths and only without the leading/trailing comma.
<felix.fileinstall.dir> C:/daten/deepamehta/modules/dm4-core/target, ... </felix.fileinstall.dir>
The underlying question is - How we can create such a dynamic relative path in the right form? This is a Maven specific topic and there are also other properties like the logging file and repository path. I have found different solutions to replace the Maven property basedir value:
http://stackoverflow.com/questions/3872355/how-to-convert-file-separator-in-maven
http://mojo.codehaus.org/build-helper-maven-plugin/regex-property-mojo.html
http://mojo.codehaus.org/build-helper-maven-plugin/bsh-property-mojo.html
Change History
comment:5 follow-up: ↓ 6 Changed 8 years ago by Malte
Is this still an issue with the introduction of the bundle-dev directory and the dm4.deploy.dir property?
comment:6 in reply to: ↑ 5 Changed 8 years ago by jri
- Status changed from new to closed
- Resolution set to fixed
Replying to Malte:
Is this still an issue with the introduction of the bundle-dev directory and the dm4.deploy.dir property?
This should no longer be an issue anymore.
Thank you for reminding!
Summary for Windows users:
A workaround is to set absolute paths in the felix.fileinstall.dir property (in pom.xml), e.g.
Note the forward slashes. (Alternatively you could use backward slashes but you have to escape them as \\ then.)
IMPORTANT: you must remove the 2 surprising leading and trailing commas.
If still not working remove the line breaks between the individual <felix.fileinstall.dir> entries.
Unfortunately there is no apparent general fix to this issue.
Thanks to dgf and AsifM for providing help!