Tim,

I haven't gotten all the way there yet, but I was looking at doing this
with an Ant script using the antrun module.

My build section looks like this:

    <build>

        <plugins>
                <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                  <execution>
                        <phase>initialize</phase>
                        <configuration>
                        <goals>
                           <goal>run</goal>
                        </goals>
                           <tasks>
                                <echo>Renaming Sample Project</echo>
                                <move
todir="${basedir}/src/java/mil/af/amc/${pom.artifactId}">
                                   <fileset
dir="${basedir}/src/java/mil/af/amc/sample" />
                                </move>
                                <move
todir="${basedir}/test/java/mil/af/amc/${pom.artifactId}">
                                   <fileset
dir="${basedir}/test/java/mil/af/amc/sample" />
                                </move>
                           </tasks>
                        </configuration>

                  </execution>
                </executions>
                </plugin>
        </plugins>
                


        <sourceDirectory>${basedir}/src/java</sourceDirectory>

    </build>

Unfortunately, it didn't work, and I never learned Ant (by the time I
trained as a programmer, the programming shop had converted to Maven).

Can anyone tell me if anything is obviously wrong with that? I try
running "mvn initialize" and get some sort of "no goals" error.

Jason 

-----Original Message-----
From: Tim Kettler [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 29, 2007 12:55 AM
To: Maven Users List
Subject: Re: Using Maven to Rename a Package

Hi,

as far as I can tell you can't do this with the current archetype
plugin. However, there is currently a successor in development over at
the mojo project that should support this kind of things.

Currently no website is set up for it and I can't tell if there are any
binary releases of it.  Your best option probably is to just check out
the sources[1] and try if it does what you need.

-Tim

[1]
https://svn.codehaus.org/mojo/trunk/mojo/mojo-sandbox/maven-archetypeng/

Ferguson, Jason M TSgt 375 CSPTS/SCE schrieb:
> Sorry, I'm a newbie at Maven 2, I admit it.
>  
> I have a project template that I use for all new development projects.
>  
> The package directory (under the java directory) will look like this:
>  
> org.jason.sample.dao
> org.jason.sample.service
> org.jason.sample.model
> org.jason.sample.web
> (etc)
>  
> My test directory will look similar to the java directory (along with 
> resources and test-resources, etc).
>  
> Since the packages under sample (dao, service, etc) are not empty, I 
> need them as part of a Maven archetype.
>  
> However, I want to rename "sample" to something more descriptive (such

> as "photogallery" or something like that).
>  
> Is there a simple way to have Maven rename "sample"?
>  
> Jason
> 


---------------------------------------------------------------------
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]

Reply via email to