You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by dr_pompeii <dr...@yahoo.com> on 2009/06/11 23:13:22 UTC

About resource folder

Dear Members

I know how to create a default project according to maven structure

like 
mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app

and work without problem, but in this link
http://maven.apache.org/guides/getting-started/index.html

I see this structure, specially the bold part (I need these folders)

my-app
|-- pom.xml
`-- src
    |-- main
    |   |-- java
    |   |   `-- com
    |   |       `-- mycompany
    |   |           `-- app
    |   |               `-- App.java
    |   `-- resources
    |       `-- META-INF
    |           `-- application.properties
    `-- test
        `-- java
            `-- com
                `-- mycompany
                    `-- app
                        `-- AppTest.java

The comand mvn archetype:create .... (already written above)
doesnt create neither resources nor META-INF folders

Therefore 
Must I do this by hand?
or 
is there a special command to have these folders in the structure?

Thanks in advanced
-- 
View this message in context: http://www.nabble.com/About-resource-folder-tp23989113p23989113.html
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


Re: About resource folder

Posted by Mick Knutson <mi...@gmail.com>.
The archetype could be wrong. Just create the Directories. Although
/META-INF is now required unless you need to add files to that directory
manually.

---
Thank You…

Mick Knutson, President

BASE Logic, Inc.
Enterprise Architecture, Design, Mentoring & Agile Consulting
p. (866) BLiNC-411: (254-6241-1)
f. (415) 685-4233

Website: http://baselogic.com
Linked IN: http://linkedin.com/in/mickknutson
Vacation Rental: http://tahoe.baselogic.com
---



On Thu, Jun 11, 2009 at 5:13 PM, dr_pompeii <dr...@yahoo.com> wrote:

>
> Dear Members
>
> I know how to create a default project according to maven structure
>
> like
> mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app
>
> and work without problem, but in this link
> http://maven.apache.org/guides/getting-started/index.html
>
> I see this structure, specially the bold part (I need these folders)
>
> my-app
> |-- pom.xml
> `-- src
>    |-- main
>    |   |-- java
>    |   |   `-- com
>    |   |       `-- mycompany
>    |   |           `-- app
>    |   |               `-- App.java
>    |   `-- resources
>    |       `-- META-INF
>    |           `-- application.properties
>    `-- test
>        `-- java
>            `-- com
>                `-- mycompany
>                    `-- app
>                        `-- AppTest.java
>
> The comand mvn archetype:create .... (already written above)
> doesnt create neither resources nor META-INF folders
>
> Therefore
> Must I do this by hand?
> or
> is there a special command to have these folders in the structure?
>
> Thanks in advanced
> --
> View this message in context:
> http://www.nabble.com/About-resource-folder-tp23989113p23989113.html
> 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
>
>

Re: About resource folder in Maven structure

Posted by dr_pompeii <dr...@yahoo.com>.


RobertGloverJr wrote:
> 
> I have to respond from the perspective of a maven user, because that's me. 
> When I do what you asked about, I manually add the resources directory and
> manually put into it what I think should be there.  The key lesson I
> learned the hard way is that the java directory can only contain ".java"
> files.  If you put xml files or property files or velocity template files
> into the "java" directory, they will not become part of the target or the 
> jar file in the target. They MUST be placed in the resources directory or
> else maven will not put them into target.   I have no experience with 
> META-INF so your guess is as good as Mine. (My guess is you should
> manually add it).  
> 
> Thanks Robert and Mick for your replies
> 
> I see that is mandatory do this by hand,
> well I used to work with Spring Framework, thats the reason of the
> "/META-INF" folder
> 
> Best Regards
> 
> -Manuel
> 
> 
> 
> 
> ________________________________
> From: dr_pompeii <dr...@yahoo.com>
> To: users@maven.apache.org
> Sent: Thursday, June 11, 2009 5:13:55 PM
> Subject: About resource folder in Maven structure
> 
> 
> Dear Members
> 
> I know how to create a default project according to maven structure
> 
> like 
> mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app
> 
> and work without problem, but in this link
> http://maven.apache.org/guides/getting-started/index.html
> 
> I see this structure, specially the bold part (I need these folders)
> 
> my-app
> |-- pom.xml
> `-- src
>     |-- main
>     |   |-- java
>     |   |   `-- com
>     |   |       `-- mycompany
>     |   |           `-- app
>     |   |               `-- App.java
>     |   `-- resources
>     |       `-- META-INF
>     |           `-- application.properties
>     `-- test
>         `-- java
>             `-- com
>                 `-- mycompany
>                     `-- app
>                         `-- AppTest.java
> 
> The comand mvn archetype:create .... (already written above)
> doesnt create neither resources nor META-INF folders
> 
> Therefore 
> Must I do this by hand?
> or 
> is there a special command to have these folders in the structure?
> 
> Thanks in advanced
> -- 
> View this message in context:
> http://www.nabble.com/About-resource-folder-in-Maven-structure-tp23989113p23989113.html
> 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
> 

-- 
View this message in context: http://www.nabble.com/About-resource-folder-in-Maven-structure-tp23989113p23989791.html
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


Re: About resource folder in Maven structure

Posted by Robert Glover <ro...@yahoo.com>.
I have to respond from the perspective of a maven user, because that's me.  When I do what you asked about, I manually add the resources directory and manually put into it what I think should be there.  The key lesson I learned the hard way is that the java directory can only contain ".java" files.  If you put xml files or property files or velocity template files into the "java" directory, they will not become part of the target or the  jar file in the target. They MUST be placed in the resources directory or else maven will not put them into target.   I have no experience with  META-INF so your guess is as good as Mine. (My guess is you should manually add it).  




________________________________
From: dr_pompeii <dr...@yahoo.com>
To: users@maven.apache.org
Sent: Thursday, June 11, 2009 5:13:55 PM
Subject: About resource folder in Maven structure


Dear Members

I know how to create a default project according to maven structure

like 
mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app

and work without problem, but in this link
http://maven.apache.org/guides/getting-started/index.html

I see this structure, specially the bold part (I need these folders)

my-app
|-- pom.xml
`-- src
    |-- main
    |   |-- java
    |   |   `-- com
    |   |       `-- mycompany
    |   |           `-- app
    |   |               `-- App.java
    |   `-- resources
    |       `-- META-INF
    |           `-- application.properties
    `-- test
        `-- java
            `-- com
                `-- mycompany
                    `-- app
                        `-- AppTest.java

The comand mvn archetype:create .... (already written above)
doesnt create neither resources nor META-INF folders

Therefore 
Must I do this by hand?
or 
is there a special command to have these folders in the structure?

Thanks in advanced
-- 
View this message in context: http://www.nabble.com/About-resource-folder-in-Maven-structure-tp23989113p23989113.html
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