You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by George Christman <gc...@cardaddy.com> on 2012/04/30 16:41:42 UTC
Configuring pom to use .properties from root.
Hello, I'm trying to get my project to use a login.properties file that has
been placed in the java package. "I'm not entirely sure this is where it
should be placed". In order to get it to work, I needed to had the following
build code to my pom
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
</includes>
</resource>
</resources>
</build>
This resulted with the application leaving out my hibernate xml files at
build time. My hibernate config files are placed within my resource package.
To get this to work, I needed to add the following xml to my pom,
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*</include>
</includes>
</resource>
</resources>
</build>
This does work, however I'm wondering if there is a better/proper way to
handle this.
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Configuring-pom-to-use-properties-from-root-tp5676092.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Configuring pom to use .properties from root.
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Mon, 30 Apr 2012 11:41:42 -0300, George Christman
<gc...@cardaddy.com> wrote:
> Hello,
Hi!
This is a pure Maven question. Please avoid asking non-Tapestry related
questions in the Tapestry mailing lists.
> I'm trying to get my project to use a login.properties file that has
> been placed in the java package. "I'm not entirely sure this is where it
> should be placed".
If you want to use the Maven standards, which have the huge advantage of
not needing any configuration for Maven to find stuff, just place your
.properties file under src/main/resources. src/main/java should have only
Java files.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Configuring pom to use .properties from root.
Posted by Chris Mylonas <ch...@opencsta.org>.
Dear Tap List [ Attn: George],
Just to put my 2cents into the [OT] subject.
This book from Packt publishing will get you going with maven well enough
http://www.packtpub.com/apache-maven-2-effective-implementation/book
The author(s) is from the Apache Archiva project (http://archiva.apache.org)- which is an alternative open source repository manager to the Sonatype product.
It is also covered in the book as well as Apache Continuum for CI although I have not gone through the book myself, I got what I needed and plugged away (http://continuum.apache.org)
It is available through Oreilly's Book Safari subscription service if your organisation has this service for you.
http://my.safaribooksonline.com/?portal=oreilly
/plug
Cheerio
Chris
On 01/05/2012, at 3:29 AM, George Christman wrote:
> All set,
>
> If you could point me to something in regards to using tapestry without
> maven, it would be greatly appreciated. Thanks Thiago.
>
> On Mon, Apr 30, 2012 at 1:06 PM, Thiago H de Paula Figueiredo [via
> Tapestry] <ml...@n5.nabble.com> wrote:
>
>> On Mon, 30 Apr 2012 13:58:17 -0300, George Christman
>> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5676414&i=0>>
>> wrote:
>>
>>> If you wouldn't mind answering this question, I moved the .properties to
>>> the resources as you and lance both suggested. Should the application
>>> automatically pick this up? or would I need to configure it in the pom
>>> using include? Thanks Thiago.
>>
>> Another pure Maven question. I don't know which code or package will read
>>
>> this file, but Maven will include it in the classpath. Remember, Maven is
>>
>> a build tool: it doesn't change how your application works.
>>
>> --
>> Thiago H. de Paula Figueiredo
>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
>> and instructor
>> Owner, Ars Machina Tecnologia da Informação Ltda.
>> http://www.arsmachina.com.br
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=5676414&i=1>
>> For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=5676414&i=2>
>>
>>
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://tapestry.1045711.n5.nabble.com/Configuring-pom-to-use-properties-from-root-tp5676092p5676414.html
>> To unsubscribe from Configuring pom to use .properties from root., click
>> here<http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5676092&code=Z2NocmlzdG1hbkBjYXJkYWRkeS5jb218NTY3NjA5MnwxNjMyOTYxMjA3>
>> .
>> NAML<http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>
> --
> George Christman
> www.CarDaddy.com
> P.O. Box 735
> Johnstown, New York
>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Configuring-pom-to-use-properties-from-root-tp5676092p5676465.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
Re: Configuring pom to use .properties from root.
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Mon, 30 Apr 2012 14:29:54 -0300, George Christman
<gc...@cardaddy.com> wrote:
> If you could point me to something in regards to using tapestry without
> maven, it would be greatly appreciated. Thanks Thiago.
There is no difference between Tapestry with Maven and Tapestry without
Maven. Again, Maven is a build tool and Tapestry doesn't depend nor use it.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Configuring pom to use .properties from root.
Posted by George Christman <gc...@cardaddy.com>.
All set,
If you could point me to something in regards to using tapestry without
maven, it would be greatly appreciated. Thanks Thiago.
On Mon, Apr 30, 2012 at 1:06 PM, Thiago H de Paula Figueiredo [via
Tapestry] <ml...@n5.nabble.com> wrote:
> On Mon, 30 Apr 2012 13:58:17 -0300, George Christman
> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5676414&i=0>>
> wrote:
>
> > If you wouldn't mind answering this question, I moved the .properties to
> > the resources as you and lance both suggested. Should the application
> > automatically pick this up? or would I need to configure it in the pom
> > using include? Thanks Thiago.
>
> Another pure Maven question. I don't know which code or package will read
>
> this file, but Maven will include it in the classpath. Remember, Maven is
>
> a build tool: it doesn't change how your application works.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=5676414&i=1>
> For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=5676414&i=2>
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://tapestry.1045711.n5.nabble.com/Configuring-pom-to-use-properties-from-root-tp5676092p5676414.html
> To unsubscribe from Configuring pom to use .properties from root., click
> here<http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5676092&code=Z2NocmlzdG1hbkBjYXJkYWRkeS5jb218NTY3NjA5MnwxNjMyOTYxMjA3>
> .
> NAML<http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
George Christman
www.CarDaddy.com
P.O. Box 735
Johnstown, New York
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Configuring-pom-to-use-properties-from-root-tp5676092p5676465.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
Re: Configuring pom to use .properties from root.
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Mon, 30 Apr 2012 13:58:17 -0300, George Christman
<gc...@cardaddy.com> wrote:
> If you wouldn't mind answering this question, I moved the .properties to
> the resources as you and lance both suggested. Should the application
> automatically pick this up? or would I need to configure it in the pom
> using include? Thanks Thiago.
Another pure Maven question. I don't know which code or package will read
this file, but Maven will include it in the classpath. Remember, Maven is
a build tool: it doesn't change how your application works.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Configuring pom to use .properties from root.
Posted by George Christman <gc...@cardaddy.com>.
This is where the Tap training would come in real handy. Is there any good
setup tutorials using the new method?
If you wouldn't mind answering this question, I moved the .properties to
the resources as you and lance both suggested. Should the application
automatically pick this up? or would I need to configure it in the pom
using include? Thanks Thiago.
On Mon, Apr 30, 2012 at 12:29 PM, Thiago H de Paula Figueiredo [via
Tapestry] <ml...@n5.nabble.com> wrote:
> On Mon, 30 Apr 2012 12:53:09 -0300, George Christman
> <[hidden email] <http://user/SendEmail.jtp?type=node&node=5676326&i=0>>
> wrote:
>
> > I just assumed it was part of the Tapestry's configuration
>
> Tapestry isn't built on Maven. By the way, since some months ago, Tapestry
>
> isn't built using Maven anymore (but this won't make any difference for
> anyone who doesn't use Tapestry sources directly).
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=5676326&i=1>
> For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=5676326&i=2>
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://tapestry.1045711.n5.nabble.com/Configuring-pom-to-use-properties-from-root-tp5676092p5676326.html
> To unsubscribe from Configuring pom to use .properties from root., click
> here<http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5676092&code=Z2NocmlzdG1hbkBjYXJkYWRkeS5jb218NTY3NjA5MnwxNjMyOTYxMjA3>
> .
> NAML<http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
George Christman
www.CarDaddy.com
P.O. Box 735
Johnstown, New York
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Configuring-pom-to-use-properties-from-root-tp5676092p5676389.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
Re: Configuring pom to use .properties from root.
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Mon, 30 Apr 2012 12:53:09 -0300, George Christman
<gc...@cardaddy.com> wrote:
> I just assumed it was part of the Tapestry's configuration
Tapestry isn't built on Maven. By the way, since some months ago, Tapestry
isn't built using Maven anymore (but this won't make any difference for
anyone who doesn't use Tapestry sources directly).
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Configuring pom to use .properties from root.
Posted by George Christman <gc...@cardaddy.com>.
I just assumed it was part of the Tapestry's configuration and felt adding
Tapestry to the question would of just been redundant on a Tapestry mailing
list. Just FYI, up until about 6 months ago, I've only ever really did front
end development, so back end is pretty new. I was recently handed this
entire project with most of it configured from a previous project by another
developer. That being said, I have very limited knowledge of
maven/hibernate/tapestry and some of the other non tap questions I
accidentally may ask. However, thanks for being so supportive.
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Configuring-pom-to-use-properties-from-root-tp5676092p5676253.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Configuring pom to use .properties from root.
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Mon, 30 Apr 2012 12:07:55 -0300, George Christman
<gc...@cardaddy.com> wrote:
> Sorry Thiago, I didn't realize this was a pure maven issue. I really need
> Howards Tap class to better understand the workings of tap so I can
> define what is tap related and what's not.
In your e-mail, you haven't mentioned the word 'tapestry' not even once
and asked about Maven configuration, so I thought you knew you were
posting an off-topic message. I'm sorry for that.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Configuring pom to use .properties from root.
Posted by George Christman <gc...@cardaddy.com>.
Sorry Thiago, I didn't realize this was a pure maven issue. I really need
Howards Tap class to better understand the workings of tap so I can define
what is tap related and what's not.
I didn't feel java was the right spot for this, but was directed to place it
there by a non tapestry developer, but senior java developer in our
organization. I'll move it to src/main/resources and look at some maven docs
to see how to configure it.
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Configuring-pom-to-use-properties-from-root-tp5676092p5676154.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Configuring pom to use .properties from root.
Posted by Lance Java <la...@googlemail.com>.
I'm a bit of a maven purist and I think that src/main/java is for java
files only and any resource files should go in src/main/resources
If you still want to do this, instead of whitelisting property files, you
should blacklist *.java instead.
Also, you don't need to include **/* in your second <resource> as this is
the default.