Quantcast

Porpuse of src/main/config

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Porpuse of src/main/config

DOMINGUEZ Felipe



Hello.

I am new to Maven, and I am a bit confuse about the porpuse of directory
src/main/config porpuse

I have been looking for information about it but it does not seems to be
much.

I initially thought that in directory src/main/resources I could put any
static resource used by the jar file and in src/main/config I could put
any configuration file that needs to be customised before the jar file
is used. For example in the config file I would add the
hibernate.cfg.xml file, since the DB connection information needs to be
modify by the person who will use the jar file.

placing hibernage.cfg.xml in the resources files is not good, since this
file will be added to the jar file, so the person who will use the jar
file will have to extract it to be able to modify its properties. So
initially I thought that src/main/config  was for this porpuse, but all
files that I put in congif directory are ignored.

Can any body clarify the usage of src/main/config  and what is maven
approach for using configuration files such as hibernate.cfg.xml or
other config files that need to be modified on the live environment?

Thanks in advance.

Felipe

____

This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful.

Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL, unless it is confirmed by appropriately signed hard copy.

Any views expressed in this message are those of the sender.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Porpuse of src/main/config

Geoffrey Wiseman
On Fri, Aug 1, 2008 at 11:00 AM, DOMINGUEZ Felipe <
[hidden email]> wrote:

> I am new to Maven, and I am a bit confuse about the porpuse of directory
> src/main/config porpuse
>
> I have been looking for information about it but it does not seems to be
> much.
>
> I initially thought that in directory src/main/resources I could put any
> static resource used by the jar file and in src/main/config I could put
> any configuration file that needs to be customised before the jar file
> is used. For example in the config file I would add the
> hibernate.cfg.xml file, since the DB connection information needs to be
> modify by the person who will use the jar file.
>
> placing hibernage.cfg.xml in the resources files is not good, since this
> file will be added to the jar file, so the person who will use the jar
> file will have to extract it to be able to modify its properties. So
> initially I thought that src/main/config  was for this porpuse, but all
> files that I put in congif directory are ignored.
>
> Can any body clarify the usage of src/main/config  and what is maven
> approach for using configuration files such as hibernate.cfg.xml or
> other config files that need to be modified on the live environment?
>

What about this?
http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html

--
Geoffrey Wiseman
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Porpuse of src/main/config

Ken Tanaka


Geoffrey Wiseman wrote:
> On Fri, Aug 1, 2008 at 11:00 AM, DOMINGUEZ Felipe <
> [hidden email]> wrote:
>
>  
>> I am new to Maven, and I am a bit confuse about the porpuse of directory
>> src/main/config porpuse
>>
>>    
...

>> Can any body clarify the usage of src/main/config  and what is maven
>> approach for using configuration files such as hibernate.cfg.xml or
>> other config files that need to be modified on the live environment?
>>
>>    
>
> What about this?
> http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
>
>  
I think that page is a bit sparse, it's a good list of what should be in
the directory structure, but doesn't explain differences, provide
examples of use or problems solved, version control interaction or best
practices.  I think the books are a good place (
http://maven.apache.org/articles.html ) for detail, but beware that "A
Developer's Notebook" is for version 1.0.2 which is significantly
different. The version 2.0 references I've looked into from here are good.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Porpuse of src/main/config

Jean-Louis MONTEIRO
In reply to this post by Geoffrey Wiseman

Geoffrey Wiseman wrote
On Fri, Aug 1, 2008 at 11:00 AM, DOMINGUEZ Felipe <
Felipe.DOMINGUEZ@eurocontrol.int> wrote:

> I am new to Maven, and I am a bit confuse about the porpuse of directory
> src/main/config porpuse
>
> I have been looking for information about it but it does not seems to be
> much.
>
> I initially thought that in directory src/main/resources I could put any
> static resource used by the jar file and in src/main/config I could put
> any configuration file that needs to be customised before the jar file
> is used. For example in the config file I would add the
> hibernate.cfg.xml file, since the DB connection information needs to be
> modify by the person who will use the jar file.
>
> placing hibernage.cfg.xml in the resources files is not good, since this
> file will be added to the jar file, so the person who will use the jar
> file will have to extract it to be able to modify its properties. So
> initially I thought that src/main/config  was for this porpuse, but all
> files that I put in congif directory are ignored.
>
> Can any body clarify the usage of src/main/config  and what is maven
> approach for using configuration files such as hibernate.cfg.xml or
> other config files that need to be modified on the live environment?
>

What about this?
http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html

--
Geoffrey Wiseman
Hi Geoffrey,

it's not clear at all.
Can you please explicitly give us the difference between src/main/resources and src/main/config ?
I guess src/main/resources goes to target package (jar, war, ...). And from my understanding, src/main/config is not part of the classpath and is used only for build (configuration files used to build, ...).

Thanks for your help.
Regards,
Jean-Louis
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Porpuse of src/main/config

Chris Helck
Here's my understanding...

In maven1, files in 'config' were packaged into the jar file. At some
point it was decided that 'resources' was a better name than 'config',
so now 'config' is just another directory that Maven doesn't do anything
with.

In general Maven doesn't know how you're going to deploy your package,
so it doesn't know what to do with directories like: config, etc, bin,
and so on. So you need to figure this out and come up with your own
convention. Plugin's like assemble (assembly?) can help a lot. I often
use it to create a tar ball that unpacks into a directory something
like:

  app/
    bin     # all files have execute
    etc     # User configurable files
    jars    # all dependencies
    logs    # where app writes logs.

Basically my bin and etc directories under src/main get copied into the
tar ball.

Hope this helps.
C. Helck



 

-----Original Message-----
From: Jean-Louis MONTEIRO [mailto:[hidden email]]
Sent: Wednesday, September 16, 2009 12:06 PM
To: [hidden email]
Subject: Re: Porpuse of src/main/config




Geoffrey Wiseman wrote:
>
> On Fri, Aug 1, 2008 at 11:00 AM, DOMINGUEZ Felipe <
> [hidden email]> wrote:
>
>> I am new to Maven, and I am a bit confuse about the porpuse of
>> directory src/main/config porpuse
>>
>> I have been looking for information about it but it does not seems to

>> be much.
>>
>> I initially thought that in directory src/main/resources I could put
>> any static resource used by the jar file and in src/main/config I
>> could put any configuration file that needs to be customised before
>> the jar file is used. For example in the config file I would add the
>> hibernate.cfg.xml file, since the DB connection information needs to
>> be modify by the person who will use the jar file.
>>
>> placing hibernage.cfg.xml in the resources files is not good, since
>> this file will be added to the jar file, so the person who will use
>> the jar file will have to extract it to be able to modify its
>> properties. So initially I thought that src/main/config  was for this

>> porpuse, but all files that I put in congif directory are ignored.
>>
>> Can any body clarify the usage of src/main/config  and what is maven
>> approach for using configuration files such as hibernate.cfg.xml or
>> other config files that need to be modified on the live environment?
>>
>
> What about this?
> http://maven.apache.org/guides/introduction/introduction-to-the-standa
> rd-directory-layout.html
>
> --
> Geoffrey Wiseman
>
>
Hi Geoffrey,

it's not clear at all.
Can you please explicitly give us the difference between
src/main/resources and src/main/config ?
I guess src/main/resources goes to target package (jar, war, ...). And
from my understanding, src/main/config is not part of the classpath and
is used only for build (configuration files used to build, ...).

Thanks for your help.
Regards,
Jean-Louis
--
View this message in context:
http://www.nabble.com/Porpuse-of-src-main-config-tp18776348p25475583.htm
l
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


**********************************************************************
This communication and all information (including, but not limited to,
 market prices/levels and data) contained therein (the "Information") is
 for informational purposes only, is confidential, may be legally
 privileged and is the intellectual property of ICAP plc and its affiliates
 ("ICAP") or third parties. No confidentiality or privilege is waived or
 lost by any mistransmission. The Information is not, and should not
 be construed as, an offer, bid or solicitation in relation to any
 financial instrument or as an official confirmation of any transaction.
 The Information is not warranted, including, but not limited, as to
 completeness, timeliness or accuracy and is subject to change
 without notice. ICAP assumes no liability for use or misuse of the
 Information. All representations and warranties are expressly
 disclaimed. The Information does not necessarily reflect the views of
 ICAP. Access to the Information by anyone else other than the
 recipient is unauthorized and any disclosure, copying, distribution or
 any action taken or omitted to be taken in reliance on it is prohibited. If
 you receive this message in error, please immediately delete it and all
 copies of it from your system, destroy any hard copies of it and
 notify the sender.
**********************************************************************



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Porpuse of src/main/config

Jean-Louis MONTEIRO
Hi,

Thanks for the answer. It's a bit more clear now.
May be, it would be nice to update online documentation http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html 

I googled a lot to get such information without any success even if i found this question a lot of times.

Jean-Louis

Chris Helck wrote
Here's my understanding...

In maven1, files in 'config' were packaged into the jar file. At some
point it was decided that 'resources' was a better name than 'config',
so now 'config' is just another directory that Maven doesn't do anything
with.

In general Maven doesn't know how you're going to deploy your package,
so it doesn't know what to do with directories like: config, etc, bin,
and so on. So you need to figure this out and come up with your own
convention. Plugin's like assemble (assembly?) can help a lot. I often
use it to create a tar ball that unpacks into a directory something
like:

  app/
    bin     # all files have execute
    etc     # User configurable files
    jars    # all dependencies
    logs    # where app writes logs.

Basically my bin and etc directories under src/main get copied into the
tar ball.

Hope this helps.
C. Helck



 

-----Original Message-----
From: Jean-Louis MONTEIRO [mailto:jean-louis.monteiro@atosorigin.com]
Sent: Wednesday, September 16, 2009 12:06 PM
To: users@maven.apache.org
Subject: Re: Porpuse of src/main/config




Geoffrey Wiseman wrote:
>
> On Fri, Aug 1, 2008 at 11:00 AM, DOMINGUEZ Felipe <
> Felipe.DOMINGUEZ@eurocontrol.int> wrote:
>
>> I am new to Maven, and I am a bit confuse about the porpuse of
>> directory src/main/config porpuse
>>
>> I have been looking for information about it but it does not seems to

>> be much.
>>
>> I initially thought that in directory src/main/resources I could put
>> any static resource used by the jar file and in src/main/config I
>> could put any configuration file that needs to be customised before
>> the jar file is used. For example in the config file I would add the
>> hibernate.cfg.xml file, since the DB connection information needs to
>> be modify by the person who will use the jar file.
>>
>> placing hibernage.cfg.xml in the resources files is not good, since
>> this file will be added to the jar file, so the person who will use
>> the jar file will have to extract it to be able to modify its
>> properties. So initially I thought that src/main/config  was for this

>> porpuse, but all files that I put in congif directory are ignored.
>>
>> Can any body clarify the usage of src/main/config  and what is maven
>> approach for using configuration files such as hibernate.cfg.xml or
>> other config files that need to be modified on the live environment?
>>
>
> What about this?
> http://maven.apache.org/guides/introduction/introduction-to-the-standa
> rd-directory-layout.html
>
> --
> Geoffrey Wiseman
>
>
Hi Geoffrey,

it's not clear at all.
Can you please explicitly give us the difference between
src/main/resources and src/main/config ?
I guess src/main/resources goes to target package (jar, war, ...). And
from my understanding, src/main/config is not part of the classpath and
is used only for build (configuration files used to build, ...).

Thanks for your help.
Regards,
Jean-Louis
--
View this message in context:
http://www.nabble.com/Porpuse-of-src-main-config-tp18776348p25475583.htm
l
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


**********************************************************************
This communication and all information (including, but not limited to,
 market prices/levels and data) contained therein (the "Information") is
 for informational purposes only, is confidential, may be legally
 privileged and is the intellectual property of ICAP plc and its affiliates
 ("ICAP") or third parties. No confidentiality or privilege is waived or
 lost by any mistransmission. The Information is not, and should not
 be construed as, an offer, bid or solicitation in relation to any
 financial instrument or as an official confirmation of any transaction.
 The Information is not warranted, including, but not limited, as to
 completeness, timeliness or accuracy and is subject to change
 without notice. ICAP assumes no liability for use or misuse of the
 Information. All representations and warranties are expressly
 disclaimed. The Information does not necessarily reflect the views of
 ICAP. Access to the Information by anyone else other than the
 recipient is unauthorized and any disclosure, copying, distribution or
 any action taken or omitted to be taken in reliance on it is prohibited. If
 you receive this message in error, please immediately delete it and all
 copies of it from your system, destroy any hard copies of it and
 notify the sender.
**********************************************************************



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Loading...