You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by bryan hansen <bh...@yahoo.com> on 2006/05/05 03:33:33 UTC

[m2] Archetype/packageName/directory structure

I am creating a custom archetype and am not seeing a
way to have folders carried throught the archetype. I
have a source file in the resources directory such as:

src/main/resources/archetype-resources/src/main/java/App.java

When I run this through the archetype:create command
it will place this file under the package directory
correctly. src/main/java/com/mycompany/App.java 

I want to have some folders that get carried through
though such as:

src/main/resources/archetype-resources/src/main/java/service/AppService.java

so that when I run the archetype:create command it
will be placed in a folder like this:

src/main/java/com/mycompany/service/AppService.java

The way it is working now by putting it under the
resources directory it is building out a directory
structure and duplicating the package name underneath
it.
src/main/java/service/com/mycompany/AppService.java

Is it possible with the archetype to have it create
the directory structure and carry it through like I
described?

Thanks,

Bryan

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: [m2] Archetype/packageName/directory structure

Posted by Aaron Anderson <ni...@yahoo.com>.
I have been working on an enhanced archetype concept http://jira.codehaus.org/browse/ARCHETYPE-33 
   
  maybe it will get picked up
  


bryan hansen <bh...@yahoo.com> wrote:
  Well, it should work... If I put a folder under the
archetype resources directory such as:
src/main/resources/archetype-resources/src/main/java/services

I would expect it to then put the ${packageName}
directory structure in front of it and it doesn't.

Any ideas of what I should try? The documentation on
this is very little.

Thanks,

Bryan

--- Alexandre Poitras 
wrote:

> I see. I have never tried it myself but it should
> work. One thing you
> might consider is that right now the archetype
> plugin doesn't care
> about an empty directory (I think it is a bug) and
> so you have to put
> a dumb java file in the directory in order to make
> it work.
> 
> 
> On 5/5/06, bryan hansen wrote:
> > Ok here goes. I am using a custom archetype to
> create
> > an AppFuse style project. We create a lot of small
> > projects in our organization and we want the
> directory
> > structure to be the same. There will be a view,
> > service, and model directory in every application.
> > These directories contain some basic base classes.
> So
> > when I run the archetype I would like the
> directory
> > structure to have a
> > ${packageName}/services/SomeService.java file, a
> > ${packageName}/view/SomeBackingBean.java file, and
> a
> > ${packageName}/model/SomeModel.java file.
> >
> > From all the examples that I have seen out there
> all
> > the archetypes are very simple and just dump a
> file
> > out to the ${packageName}/App.java.
> >
> > I want to be able to do a little more with the
> > directory structure than just dump out the main
> > package. I would think that this is possible, but
> I
> > can't see how to do it.
> >
> > That help?
> >
> >
> >
> >
> >
> > --- Alexandre Poitras
> 
> > wrote:
> >
> > > I really don't get what you want. Could you
> explain
> > > more precisely
> > >
> > > On 5/4/06, bryan hansen wrote:
> > > > I am creating a custom archetype and am not
> seeing
> > > a
> > > > way to have folders carried throught the
> > > archetype. I
> > > > have a source file in the resources directory
> such
> > > as:
> > > >
> > > >
> > >
> >
>
src/main/resources/archetype-resources/src/main/java/App.java
> > > >
> > > > When I run this through the archetype:create
> > > command
> > > > it will place this file under the package
> > > directory
> > > > correctly.
> src/main/java/com/mycompany/App.java
> > > >
> > > > I want to have some folders that get carried
> > > through
> > > > though such as:
> > > >
> > > >
> > >
> >
>
src/main/resources/archetype-resources/src/main/java/service/AppService.java
> > > >
> > > > so that when I run the archetype:create
> command it
> > > > will be placed in a folder like this:
> > > >
> > > >
> > >
> src/main/java/com/mycompany/service/AppService.java
> > > >
> > > > The way it is working now by putting it under
> the
> > > > resources directory it is building out a
> directory
> > > > structure and duplicating the package name
> > > underneath
> > > > it.
> > > >
> > >
> src/main/java/service/com/mycompany/AppService.java
> > > >
> > > > Is it possible with the archetype to have it
> > > create
> > > > the directory structure and carry it through
> like
> > > I
> > > > described?
> > > >
> > > > Thanks,
> > > >
> > > > Bryan
> > > >
> > > >
> __________________________________________________
> > > > Do You Yahoo!?
> > > > Tired of spam? Yahoo! Mail has the best spam
> > > protection around
> > > > http://mail.yahoo.com
> > > >
> > > >
> > >
> >
>
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail:
> > > users-help@maven.apache.org
> > > >
> > > >
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail:
> > > users-help@maven.apache.org
> > >
> > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> users-unsubscribe@maven.apache.org
> > For additional commands, e-mail:
> users-help@maven.apache.org
> >
> >
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@maven.apache.org
> For additional commands, e-mail:
> users-help@maven.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: [m2] Archetype/packageName/directory structure

Posted by bryan hansen <bh...@yahoo.com>.
Well, it should work... If I put a folder under the
archetype resources directory such as:
src/main/resources/archetype-resources/src/main/java/services

I would expect it to then put the ${packageName}
directory structure in front of it and it doesn't.

Any ideas of what I should try? The documentation on
this is very little.

Thanks,

Bryan

--- Alexandre Poitras <al...@gmail.com>
wrote:

> I see. I have never tried it myself but it should
> work. One thing you
> might consider is that right now the archetype
> plugin doesn't care
> about an empty directory (I think it is a bug) and
> so you have to put
> a dumb java file in the directory in order to make
> it work.
> 
> 
> On 5/5/06, bryan hansen <bh...@yahoo.com> wrote:
> > Ok here goes. I am using a custom archetype to
> create
> > an AppFuse style project. We create a lot of small
> > projects in our organization and we want the
> directory
> > structure to be the same. There will be a view,
> > service, and model directory in every application.
> > These directories contain some basic base classes.
> So
> > when I run the archetype I would like the
> directory
> > structure to have a
> > ${packageName}/services/SomeService.java file, a
> > ${packageName}/view/SomeBackingBean.java file, and
> a
> > ${packageName}/model/SomeModel.java file.
> >
> > From all the examples that I have seen out there
> all
> > the archetypes are very simple and just dump a
> file
> > out  to the ${packageName}/App.java.
> >
> > I want to be able to do a little more with the
> > directory structure than just dump out the main
> > package. I would think that this is possible, but
> I
> > can't see how to do it.
> >
> > That help?
> >
> >
> >
> >
> >
> > --- Alexandre Poitras
> <al...@gmail.com>
> > wrote:
> >
> > > I really don't get what you want. Could you
> explain
> > > more precisely
> > >
> > > On 5/4/06, bryan hansen <bh...@yahoo.com> wrote:
> > > > I am creating a custom archetype and am not
> seeing
> > > a
> > > > way to have folders carried throught the
> > > archetype. I
> > > > have a source file in the resources directory
> such
> > > as:
> > > >
> > > >
> > >
> >
>
src/main/resources/archetype-resources/src/main/java/App.java
> > > >
> > > > When I run this through the archetype:create
> > > command
> > > > it will place this file under the package
> > > directory
> > > > correctly.
> src/main/java/com/mycompany/App.java
> > > >
> > > > I want to have some folders that get carried
> > > through
> > > > though such as:
> > > >
> > > >
> > >
> >
>
src/main/resources/archetype-resources/src/main/java/service/AppService.java
> > > >
> > > > so that when I run the archetype:create
> command it
> > > > will be placed in a folder like this:
> > > >
> > > >
> > >
> src/main/java/com/mycompany/service/AppService.java
> > > >
> > > > The way it is working now by putting it under
> the
> > > > resources directory it is building out a
> directory
> > > > structure and duplicating the package name
> > > underneath
> > > > it.
> > > >
> > >
> src/main/java/service/com/mycompany/AppService.java
> > > >
> > > > Is it possible with the archetype to have it
> > > create
> > > > the directory structure and carry it through
> like
> > > I
> > > > described?
> > > >
> > > > Thanks,
> > > >
> > > > Bryan
> > > >
> > > >
> __________________________________________________
> > > > Do You Yahoo!?
> > > > Tired of spam?  Yahoo! Mail has the best spam
> > > protection around
> > > > http://mail.yahoo.com
> > > >
> > > >
> > >
> >
>
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail:
> > > users-help@maven.apache.org
> > > >
> > > >
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail:
> > > users-help@maven.apache.org
> > >
> > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> users-unsubscribe@maven.apache.org
> > For additional commands, e-mail:
> users-help@maven.apache.org
> >
> >
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@maven.apache.org
> For additional commands, e-mail:
> users-help@maven.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: [m2] Archetype/packageName/directory structure

Posted by Alexandre Poitras <al...@gmail.com>.
I see. I have never tried it myself but it should work. One thing you
might consider is that right now the archetype plugin doesn't care
about an empty directory (I think it is a bug) and so you have to put
a dumb java file in the directory in order to make it work.


On 5/5/06, bryan hansen <bh...@yahoo.com> wrote:
> Ok here goes. I am using a custom archetype to create
> an AppFuse style project. We create a lot of small
> projects in our organization and we want the directory
> structure to be the same. There will be a view,
> service, and model directory in every application.
> These directories contain some basic base classes. So
> when I run the archetype I would like the directory
> structure to have a
> ${packageName}/services/SomeService.java file, a
> ${packageName}/view/SomeBackingBean.java file, and a
> ${packageName}/model/SomeModel.java file.
>
> From all the examples that I have seen out there all
> the archetypes are very simple and just dump a file
> out  to the ${packageName}/App.java.
>
> I want to be able to do a little more with the
> directory structure than just dump out the main
> package. I would think that this is possible, but I
> can't see how to do it.
>
> That help?
>
>
>
>
>
> --- Alexandre Poitras <al...@gmail.com>
> wrote:
>
> > I really don't get what you want. Could you explain
> > more precisely
> >
> > On 5/4/06, bryan hansen <bh...@yahoo.com> wrote:
> > > I am creating a custom archetype and am not seeing
> > a
> > > way to have folders carried throught the
> > archetype. I
> > > have a source file in the resources directory such
> > as:
> > >
> > >
> >
> src/main/resources/archetype-resources/src/main/java/App.java
> > >
> > > When I run this through the archetype:create
> > command
> > > it will place this file under the package
> > directory
> > > correctly. src/main/java/com/mycompany/App.java
> > >
> > > I want to have some folders that get carried
> > through
> > > though such as:
> > >
> > >
> >
> src/main/resources/archetype-resources/src/main/java/service/AppService.java
> > >
> > > so that when I run the archetype:create command it
> > > will be placed in a folder like this:
> > >
> > >
> > src/main/java/com/mycompany/service/AppService.java
> > >
> > > The way it is working now by putting it under the
> > > resources directory it is building out a directory
> > > structure and duplicating the package name
> > underneath
> > > it.
> > >
> > src/main/java/service/com/mycompany/AppService.java
> > >
> > > Is it possible with the archetype to have it
> > create
> > > the directory structure and carry it through like
> > I
> > > described?
> > >
> > > Thanks,
> > >
> > > Bryan
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Tired of spam?  Yahoo! Mail has the best spam
> > protection around
> > > http://mail.yahoo.com
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail:
> > users-help@maven.apache.org
> > >
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > users-unsubscribe@maven.apache.org
> > For additional commands, e-mail:
> > users-help@maven.apache.org
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: [m2] Archetype/packageName/directory structure

Posted by bryan hansen <bh...@yahoo.com>.
Ok here goes. I am using a custom archetype to create
an AppFuse style project. We create a lot of small
projects in our organization and we want the directory
structure to be the same. There will be a view,
service, and model directory in every application.
These directories contain some basic base classes. So
when I run the archetype I would like the directory
structure to have a
${packageName}/services/SomeService.java file, a
${packageName}/view/SomeBackingBean.java file, and a
${packageName}/model/SomeModel.java file. 

>From all the examples that I have seen out there all
the archetypes are very simple and just dump a file
out  to the ${packageName}/App.java. 

I want to be able to do a little more with the
directory structure than just dump out the main
package. I would think that this is possible, but I
can't see how to do it. 

That help?





--- Alexandre Poitras <al...@gmail.com>
wrote:

> I really don't get what you want. Could you explain
> more precisely
> 
> On 5/4/06, bryan hansen <bh...@yahoo.com> wrote:
> > I am creating a custom archetype and am not seeing
> a
> > way to have folders carried throught the
> archetype. I
> > have a source file in the resources directory such
> as:
> >
> >
>
src/main/resources/archetype-resources/src/main/java/App.java
> >
> > When I run this through the archetype:create
> command
> > it will place this file under the package
> directory
> > correctly. src/main/java/com/mycompany/App.java
> >
> > I want to have some folders that get carried
> through
> > though such as:
> >
> >
>
src/main/resources/archetype-resources/src/main/java/service/AppService.java
> >
> > so that when I run the archetype:create command it
> > will be placed in a folder like this:
> >
> >
> src/main/java/com/mycompany/service/AppService.java
> >
> > The way it is working now by putting it under the
> > resources directory it is building out a directory
> > structure and duplicating the package name
> underneath
> > it.
> >
> src/main/java/service/com/mycompany/AppService.java
> >
> > Is it possible with the archetype to have it
> create
> > the directory structure and carry it through like
> I
> > described?
> >
> > Thanks,
> >
> > Bryan
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> users-unsubscribe@maven.apache.org
> > For additional commands, e-mail:
> users-help@maven.apache.org
> >
> >
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@maven.apache.org
> For additional commands, e-mail:
> users-help@maven.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: [m2] Archetype/packageName/directory structure

Posted by Alexandre Poitras <al...@gmail.com>.
I really don't get what you want. Could you explain more precisely

On 5/4/06, bryan hansen <bh...@yahoo.com> wrote:
> I am creating a custom archetype and am not seeing a
> way to have folders carried throught the archetype. I
> have a source file in the resources directory such as:
>
> src/main/resources/archetype-resources/src/main/java/App.java
>
> When I run this through the archetype:create command
> it will place this file under the package directory
> correctly. src/main/java/com/mycompany/App.java
>
> I want to have some folders that get carried through
> though such as:
>
> src/main/resources/archetype-resources/src/main/java/service/AppService.java
>
> so that when I run the archetype:create command it
> will be placed in a folder like this:
>
> src/main/java/com/mycompany/service/AppService.java
>
> The way it is working now by putting it under the
> resources directory it is building out a directory
> structure and duplicating the package name underneath
> it.
> src/main/java/service/com/mycompany/AppService.java
>
> Is it possible with the archetype to have it create
> the directory structure and carry it through like I
> described?
>
> Thanks,
>
> Bryan
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: [m2] Archetype/packageName/directory structure

Posted by zarar <za...@gmail.com>.

Did you ever get this working?  I'm getting this error:

I'm trying to create/copy the directory structure form

archetype-resources\business\core\src\main\java

to

business\core\src\main\java

I've followed the directions here:
http://maven.apache.org/guides/mini/guide-creating-archetypes.html

But once I run the archetype:create command, all I get is my new project
directory with a single pom.xml in it.

Any ideas?






bryan hansen wrote:
> 
> I am creating a custom archetype and am not seeing a
> way to have folders carried throught the archetype. I
> have a source file in the resources directory such as:
> 
> src/main/resources/archetype-resources/src/main/java/App.java
> 
> When I run this through the archetype:create command
> it will place this file under the package directory
> correctly. src/main/java/com/mycompany/App.java 
> 
> I want to have some folders that get carried through
> though such as:
> 
> src/main/resources/archetype-resources/src/main/java/service/AppService.java
> 
> so that when I run the archetype:create command it
> will be placed in a folder like this:
> 
> src/main/java/com/mycompany/service/AppService.java
> 
> The way it is working now by putting it under the
> resources directory it is building out a directory
> structure and duplicating the package name underneath
> it.
> src/main/java/service/com/mycompany/AppService.java
> 
> Is it possible with the archetype to have it create
> the directory structure and carry it through like I
> described?
> 
> Thanks,
> 
> Bryan
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.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/-m2--Archetype-packageName-directory-structure-tf1561315.html#a6209664
Sent from the Maven - Users forum at Nabble.com.


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