Making resources separate dependencies
Hi all, I have a question: One of my projects needs a wsdl file resource from another project, but doesn't need anything else from this project. Is there a method to create some dependency (jar?) containing only that resource? Now I specify needed resources by pointing relative path to resource directory of the other project. -- View this message in context: http://www.nabble.com/Making-resources-separate-dependencies-tf4299111s177.html#a12236643 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Making resources separate dependencies
A couple options: 1. This resource should live in its own artifact since it is a shared resource. So move it to its own project, and use maven-dependency-plugin:unpack mojo to make it available where it is needed (in both projects) at build time. 2. Copy this resource to a public webserver somewhere and use maven-remote-resources-plugin to pull it into both projects at build time. 3. Leave the resource where it currently lives (in project1's jar), and use dependency:unpack to copy it somewhere in project2 when it is needed at build time. Wayne On 8/20/07, DCVer [EMAIL PROTECTED] wrote: Hi all, I have a question: One of my projects needs a wsdl file resource from another project, but doesn't need anything else from this project. Is there a method to create some dependency (jar?) containing only that resource? Now I specify needed resources by pointing relative path to resource directory of the other project. -- View this message in context: http://www.nabble.com/Making-resources-separate-dependencies-tf4299111s177.html#a12236643 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
resources as dependencies
Hi, We want to farm off some of our common resources (java scripts and images) into a project that other projects can use as a dependency. Does Maven2 have a way of getting such dependencies into a resources phase? Regards, John Eurobase International Limited and its subsidiaries (Eurobase) are unable to exercise control over the content of information in E-Mails. Any views and opinions expressed may be personal to the sender and are not necessarily those of Eurobase. Eurobase will not enter into any contractual obligations in respect of any part of its business in any E-mail. Privileged / confidential information may be contained in this message and /or any attachments. This E-mail is intended for the use of the addressee(s) only and may contain confidential information. If you are not the / an intended recipient, you are hereby notified that any use or dissemination of this communication is strictly prohibited. If you receive this transmission in error, please notify us immediately, and then delete this E-mail. Neither the sender nor Eurobase accepts any liability whatsoever for any defects of any kind either in or arising from this E-mail transmission. E-Mail transmission cannot be guaranteed to be secure or error-free, as messages can be intercepted, lost, corrupted, destroyed, contain viruses, or arrive late or incomplete. Eurobase does not accept any responsibility for viruses and it is your responsibility to scan any attachments. Eurobase Systems Limited is the main trading company in the Eurobase International Group; registered in England and Wales as company number 02251162; registered address: Essex House, 2 County Place, Chelmsford, Essex CM2 0RE, UK.
Re: resources as dependencies
John Coleman [EMAIL PROTECTED] writes: The web.xml in the dependency war does seem to be ignored so this is quite a neat solution. :) We are using this to provide a library of resources all our web applications can draw from. I still don't have a good answer on how to do what I call client flavours. The client may need to have tweaked js, their own images and properties files instead of plain-vanilla. I don't see this as fitting the dependency concept very well - because we really need a switch at build time to control which set of assets to incorporate. The main nasty occurs if we have tweaked scripts because ideally we don't want to clone large pieces of script, just for small client tweaks. This is particularly unpleasant in terms of vcs. What we really need is all the tweaks to be parameterised in some way so they work like components and can be snapped in. We may have to create our own flavour plugin. Is there a way to have resource directories in the Maven project that are ignored by default, and then switch a selected one on to merge into the target? Possibly we might have a properties file that tells Maven to ignore certain resource directories? I don't really want to config this inside the POM. What I did was the following: - define the filter file to use as a property - define profiles for the different flavo(u)rs, each setting its own dependencies - at build time, choose profile and set the filter file(s) properties so that they correspond to the 'flavour' you build. I did this to build three different web apps: 1. one with the real business layer and addresses 2. one with the test dao layer 3. one with a mock business layer out of the same presentation layer. Regards, -- OQube software engineering \ génie logiciel Arnaud Bailly, Dr. \web http://www.oqube.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: resources as dependencies
The web.xml in the dependency war does seem to be ignored so this is quite a neat solution. :) We are using this to provide a library of resources all our web applications can draw from. I still don't have a good answer on how to do what I call client flavours. The client may need to have tweaked js, their own images and properties files instead of plain-vanilla. I don't see this as fitting the dependency concept very well - because we really need a switch at build time to control which set of assets to incorporate. The main nasty occurs if we have tweaked scripts because ideally we don't want to clone large pieces of script, just for small client tweaks. This is particularly unpleasant in terms of vcs. What we really need is all the tweaks to be parameterised in some way so they work like components and can be snapped in. We may have to create our own flavour plugin. Is there a way to have resource directories in the Maven project that are ignored by default, and then switch a selected one on to merge into the target? Possibly we might have a properties file that tells Maven to ignore certain resource directories? I don't really want to config this inside the POM. John -Original Message- From: Arnaud Bailly [mailto:[EMAIL PROTECTED] Sent: 26 July 2007 17:11 To: Maven Users List Subject: Re: resources as dependencies John Coleman [EMAIL PROTECTED] writes: Hi, The Maven war packaging forces me to have a web.xml which is not required in the dependency project. Perhaps I can switch that off? I Hi John, Yes, It seems so. But it is not used in overlays and you can control it so this is not big deal. (see http://maven.apache.org/plugins/maven-war-plugin/examples/war-overlay.html) just want to pack generic script and images up for web projects. Or will my project web.xml simply overrule the dependency web.xml? BTW, I used this in a real world project together with profiles to generate different flavors of the same application. HTH -- OQube software engineering \ génie logiciel Arnaud Bailly, Dr. \web http://www.oqube.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Eurobase International Limited and its subsidiaries (Eurobase) are unable to exercise control over the content of information in E-Mails. Any views and opinions expressed may be personal to the sender and are not necessarily those of Eurobase. Eurobase will not enter into any contractual obligations in respect of any part of its business in any E-mail. Privileged / confidential information may be contained in this message and /or any attachments. This E-mail is intended for the use of the addressee(s) only and may contain confidential information. If you are not the / an intended recipient, you are hereby notified that any use or dissemination of this communication is strictly prohibited. If you receive this transmission in error, please notify us immediately, and then delete this E-mail. Neither the sender nor Eurobase accepts any liability whatsoever for any defects of any kind either in or arising from this E-mail transmission. E-Mail transmission cannot be guaranteed to be secure or error-free, as messages can be intercepted, lost, corrupted, destroyed, contain viruses, or arrive late or incomplete. Eurobase does not accept any responsibility for viruses and it is your responsibility to scan any attachments. Eurobase Systems Limited is the main trading company in the Eurobase International Group; registered in England and Wales as company number 02251162; registered address: Essex House, 2 County Place, Chelmsford, Essex CM2 0RE, UK. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: resources as dependencies
Hi, The Maven war packaging forces me to have a web.xml which is not required in the dependency project. Perhaps I can switch that off? I just want to pack generic script and images up for web projects. Or will my project web.xml simply overrule the dependency web.xml? John -Original Message- From: Arnaud Bailly [mailto:[EMAIL PROTECTED] Sent: 26 July 2007 14:02 To: Maven Users List Subject: Re: resources as dependencies John Coleman [EMAIL PROTECTED] writes: Hi, We want to farm off some of our common resources (java scripts and images) into a project that other projects can use as a dependency. Hello, If you are using wars, then you could you use the war overlay capability of maven: Just add a war dependency to another war and the first one will 'overlaid' over the second. HTH -- OQube software engineering \ génie logiciel Arnaud Bailly, Dr. \web http://www.oqube.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Eurobase International Limited and its subsidiaries (Eurobase) are unable to exercise control over the content of information in E-Mails. Any views and opinions expressed may be personal to the sender and are not necessarily those of Eurobase. Eurobase will not enter into any contractual obligations in respect of any part of its business in any E-mail. Privileged / confidential information may be contained in this message and /or any attachments. This E-mail is intended for the use of the addressee(s) only and may contain confidential information. If you are not the / an intended recipient, you are hereby notified that any use or dissemination of this communication is strictly prohibited. If you receive this transmission in error, please notify us immediately, and then delete this E-mail. Neither the sender nor Eurobase accepts any liability whatsoever for any defects of any kind either in or arising from this E-mail transmission. E-Mail transmission cannot be guaranteed to be secure or error-free, as messages can be intercepted, lost, corrupted, destroyed, contain viruses, or arrive late or incomplete. Eurobase does not accept any responsibility for viruses and it is your responsibility to scan any attachments. Eurobase Systems Limited is the main trading company in the Eurobase International Group; registered in England and Wales as company number 02251162; registered address: Essex House, 2 County Place, Chelmsford, Essex CM2 0RE, UK. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: resources as dependencies
Hi, Yes that does the right kind of thing, was thinking of using dependency:unpack. However, I'd like to use a zip file instead of JAR. But nevermind. It looks like it can deal with Java source. Not quiet what I want, but maybe it can be used anyway. Thanks, John -Original Message- From: John Patrick [mailto:[EMAIL PROTECTED] Sent: 26 July 2007 12:30 To: Maven Users List Subject: Re: resources as dependencies Initial thoughts are you could have it as a seperate project and get the dependency plugin to unpack it. http://maven.apache.org/plugins/maven-dependency-plugin/unpack-mojo.html On 26/07/07, John Coleman [EMAIL PROTECTED] wrote: Hi, We want to farm off some of our common resources (java scripts and images) into a project that other projects can use as a dependency. Does Maven2 have a way of getting such dependencies into a resources phase? Regards, John Eurobase International Limited and its subsidiaries (Eurobase) are unable to exercise control over the content of information in E-Mails. Any views and opinions expressed may be personal to the sender and are not necessarily those of Eurobase. Eurobase will not enter into any contractual obligations in respect of any part of its business in any E-mail. Privileged / confidential information may be contained in this message and /or any attachments. This E-mail is intended for the use of the addressee(s) only and may contain confidential information. If you are not the / an intended recipient, you are hereby notified that any use or dissemination of this communication is strictly prohibited. If you receive this transmission in error, please notify us immediately, and then delete this E-mail. Neither the sender nor Eurobase accepts any liability whatsoever for any defects of any kind either in or arising from this E-mail transmission. E-Mail transmission cannot be guaranteed to be secure or error-free, as messages can be intercepted, lost, corrupted, destroyed, contain viruses, or arrive late or incomplete. Eurobase does not accept any responsibility for viruses and it is your responsibility to scan any attachments. Eurobase Systems Limited is the main trading company in the Eurobase International Group; registered in England and Wales as company number 02251162; registered address: Essex House, 2 County Place, Chelmsford, Essex CM2 0RE, UK. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: resources as dependencies
John Coleman [EMAIL PROTECTED] writes: Hi, The Maven war packaging forces me to have a web.xml which is not required in the dependency project. Perhaps I can switch that off? I Hi John, Yes, It seems so. But it is not used in overlays and you can control it so this is not big deal. (see http://maven.apache.org/plugins/maven-war-plugin/examples/war-overlay.html) just want to pack generic script and images up for web projects. Or will my project web.xml simply overrule the dependency web.xml? BTW, I used this in a real world project together with profiles to generate different flavors of the same application. HTH -- OQube software engineering \ génie logiciel Arnaud Bailly, Dr. \web http://www.oqube.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: resources as dependencies
Initial thoughts are you could have it as a seperate project and get the dependency plugin to unpack it. http://maven.apache.org/plugins/maven-dependency-plugin/unpack-mojo.html On 26/07/07, John Coleman [EMAIL PROTECTED] wrote: Hi, We want to farm off some of our common resources (java scripts and images) into a project that other projects can use as a dependency. Does Maven2 have a way of getting such dependencies into a resources phase? Regards, John Eurobase International Limited and its subsidiaries (Eurobase) are unable to exercise control over the content of information in E-Mails. Any views and opinions expressed may be personal to the sender and are not necessarily those of Eurobase. Eurobase will not enter into any contractual obligations in respect of any part of its business in any E-mail. Privileged / confidential information may be contained in this message and /or any attachments. This E-mail is intended for the use of the addressee(s) only and may contain confidential information. If you are not the / an intended recipient, you are hereby notified that any use or dissemination of this communication is strictly prohibited. If you receive this transmission in error, please notify us immediately, and then delete this E-mail. Neither the sender nor Eurobase accepts any liability whatsoever for any defects of any kind either in or arising from this E-mail transmission. E-Mail transmission cannot be guaranteed to be secure or error-free, as messages can be intercepted, lost, corrupted, destroyed, contain viruses, or arrive late or incomplete. Eurobase does not accept any responsibility for viruses and it is your responsibility to scan any attachments. Eurobase Systems Limited is the main trading company in the Eurobase International Group; registered in England and Wales as company number 02251162; registered address: Essex House, 2 County Place, Chelmsford, Essex CM2 0RE, UK.