You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Rahul Thakur (JIRA)" <ji...@codehaus.org> on 2005/06/19 13:16:52 UTC

[jira] Created: (MNG-490) Creating an archetype with a different folder structure for java and test sources still results in default (src/main/java) folder being generated.

Creating an archetype with a different folder structure for java and test sources still results in default (src/main/java) folder being generated.
--------------------------------------------------------------------------------------------------------------------------------------------------

         Key: MNG-490
         URL: http://jira.codehaus.org/browse/MNG-490
     Project: Maven 2
        Type: Bug
 Environment: Windows XP, JDK 1.5.0, Maven2 SVN 
    Reporter: Rahul Thakur


Creating an archetype with a different folder structure for java and test sources still results in default (src/main/java) folder being generated, even though these are being created empty.

I created an archetype and need to follow a set folder structure (all java sources to sit under folder "src" and tests under "test" folder respectively)

Also the Archetype plugin makes an assumption that the archetype resources will always reside under "archetype-resources/". User should be able to override this and specify a custom name. 


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


Re: [jira] Updated: (MNG-490) Creating an archetype with a different folder structure for java and test sources still results in default (src/main/java) folder being generated.

Posted by Brett Porter <br...@apache.org>.
Ah, sorry, I must have missed the patch!

I'll take a look before beta-1.

- Brett

Rinku wrote:

> Hi,
>
> Wondering if this can be closed? I had submitted a patch that fixed this.
>
> Cheers,
>
> Rahul



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


Re: [jira] Updated: (MNG-490) Creating an archetype with a different folder structure for java and test sources still results in default (src/main/java) folder being generated.

Posted by Rinku <ra...@gmail.com>.
Hi,

Wondering if this can be closed? I had submitted a patch that fixed this.

Cheers,

Rahul


----- Original Message ----- 
From: "Brett Porter (JIRA)" <ji...@codehaus.org>
To: <de...@maven.apache.org>
Sent: Friday, August 26, 2005 3:24 PM
Subject: [jira] Updated: (MNG-490) Creating an archetype with a different 
folder structure for java and test sources still results in default 
(src/main/java) folder being generated.


>     [ http://jira.codehaus.org/browse/MNG-490?page=all ]
>
> Brett Porter updated MNG-490:
> -----------------------------
>
>    Fix Version:     (was: 2.0-beta-1)
>                 2.0-beta-2
>
>> Creating an archetype with a different folder structure for java and test 
>> sources still results in default (src/main/java) folder being generated.
>> --------------------------------------------------------------------------------------------------------------------------------------------------
>>
>>          Key: MNG-490
>>          URL: http://jira.codehaus.org/browse/MNG-490
>>      Project: Maven 2
>>         Type: Bug
>>  Environment: Windows XP, JDK 1.5.0, Maven2 SVN
>>     Reporter: Rahul Thakur
>>      Fix For: 2.0-beta-2
>>  Attachments: DefaultArchetype.diff
>>
>>
>> Creating an archetype with a different folder structure for java and test 
>> sources still results in default (src/main/java) folder being generated, 
>> even though these are being created empty.
>> I created an archetype and need to follow a set folder structure (all 
>> java sources to sit under folder "src" and tests under "test" folder 
>> respectively)
>> Also the Archetype plugin makes an assumption that the archetype 
>> resources will always reside under "archetype-resources/". User should be 
>> able to override this and specify a custom name.
>
> -- 
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
>   http://jira.codehaus.org/secure/Administrators.jspa
> -
> For more information on JIRA, see:
>   http://www.atlassian.com/software/jira
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 


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


[jira] Updated: (MNG-490) Creating an archetype with a different folder structure for java and test sources still results in default (src/main/java) folder being generated.

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-490?page=all ]

Brett Porter updated MNG-490:
-----------------------------

    Fix Version:     (was: 2.0-beta-1)
                 2.0-beta-2

> Creating an archetype with a different folder structure for java and test sources still results in default (src/main/java) folder being generated.
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: MNG-490
>          URL: http://jira.codehaus.org/browse/MNG-490
>      Project: Maven 2
>         Type: Bug
>  Environment: Windows XP, JDK 1.5.0, Maven2 SVN 
>     Reporter: Rahul Thakur
>      Fix For: 2.0-beta-2
>  Attachments: DefaultArchetype.diff
>
>
> Creating an archetype with a different folder structure for java and test sources still results in default (src/main/java) folder being generated, even though these are being created empty.
> I created an archetype and need to follow a set folder structure (all java sources to sit under folder "src" and tests under "test" folder respectively)
> Also the Archetype plugin makes an assumption that the archetype resources will always reside under "archetype-resources/". User should be able to override this and specify a custom name. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Updated: (MNG-490) Creating an archetype with a different folder structure for java and test sources still results in default (src/main/java) folder being generated.

Posted by "Rahul Thakur (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-490?page=all ]

Rahul Thakur updated MNG-490:
-----------------------------

    Attachment: DefaultArchetype.diff

DefaultArchetype now overrides defaults if following are specified in the POM template: 
- source directory
- test source directory
- resources director(y/ies)
- test resource director(y/ies)
- script source directory

Re. Overriding the default archetype resource location within the archetype JAR 
An alternative  to do this would be to have a tag, say <directory>, in the archetype descriptor that points to the location under which all the archetype resources are sitting. This, however, hasn't been implemented as this would require change in method signature for processTemplate() in DefaultArchetype class. 


> Creating an archetype with a different folder structure for java and test sources still results in default (src/main/java) folder being generated.
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: MNG-490
>          URL: http://jira.codehaus.org/browse/MNG-490
>      Project: Maven 2
>         Type: Bug
>  Environment: Windows XP, JDK 1.5.0, Maven2 SVN 
>     Reporter: Rahul Thakur
>      Fix For: 2.0-beta-1
>  Attachments: DefaultArchetype.diff
>
>
> Creating an archetype with a different folder structure for java and test sources still results in default (src/main/java) folder being generated, even though these are being created empty.
> I created an archetype and need to follow a set folder structure (all java sources to sit under folder "src" and tests under "test" folder respectively)
> Also the Archetype plugin makes an assumption that the archetype resources will always reside under "archetype-resources/". User should be able to override this and specify a custom name. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (MNG-490) Creating an archetype with a different folder structure for java and test sources still results in default (src/main/java) folder being generated.

Posted by "Rahul Thakur (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-490?page=comments#action_41674 ] 

Rahul Thakur commented on MNG-490:
----------------------------------

Yep! This is mine :-)

> Creating an archetype with a different folder structure for java and test sources still results in default (src/main/java) folder being generated.
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: MNG-490
>          URL: http://jira.codehaus.org/browse/MNG-490
>      Project: Maven 2
>         Type: Bug
>  Environment: Windows XP, JDK 1.5.0, Maven2 SVN 
>     Reporter: Rahul Thakur
>      Fix For: 2.0-beta-1

>
>
> Creating an archetype with a different folder structure for java and test sources still results in default (src/main/java) folder being generated, even though these are being created empty.
> I created an archetype and need to follow a set folder structure (all java sources to sit under folder "src" and tests under "test" folder respectively)
> Also the Archetype plugin makes an assumption that the archetype resources will always reside under "archetype-resources/". User should be able to override this and specify a custom name. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Closed: (MNG-490) Creating an archetype with a different folder structure for java and test sources still results in default (src/main/java) folder being generated.

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-490?page=all ]
     
Brett Porter closed MNG-490:
----------------------------

    Resolution: Fixed

applied, thanks

> Creating an archetype with a different folder structure for java and test sources still results in default (src/main/java) folder being generated.
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: MNG-490
>          URL: http://jira.codehaus.org/browse/MNG-490
>      Project: Maven 2
>         Type: Bug
>  Environment: Windows XP, JDK 1.5.0, Maven2 SVN 
>     Reporter: Rahul Thakur
>     Assignee: Brett Porter
>      Fix For: 2.0-beta-1
>  Attachments: DefaultArchetype.diff
>
>
> Creating an archetype with a different folder structure for java and test sources still results in default (src/main/java) folder being generated, even though these are being created empty.
> I created an archetype and need to follow a set folder structure (all java sources to sit under folder "src" and tests under "test" folder respectively)
> Also the Archetype plugin makes an assumption that the archetype resources will always reside under "archetype-resources/". User should be able to override this and specify a custom name. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Updated: (MNG-490) Creating an archetype with a different folder structure for java and test sources still results in default (src/main/java) folder being generated.

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-490?page=all ]

Brett Porter updated MNG-490:
-----------------------------

    Fix Version: 2.0-beta-1

thanks Rahul. Are you able to work on a fix for this?

> Creating an archetype with a different folder structure for java and test sources still results in default (src/main/java) folder being generated.
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: MNG-490
>          URL: http://jira.codehaus.org/browse/MNG-490
>      Project: Maven 2
>         Type: Bug
>  Environment: Windows XP, JDK 1.5.0, Maven2 SVN 
>     Reporter: Rahul Thakur
>      Fix For: 2.0-beta-1

>
>
> Creating an archetype with a different folder structure for java and test sources still results in default (src/main/java) folder being generated, even though these are being created empty.
> I created an archetype and need to follow a set folder structure (all java sources to sit under folder "src" and tests under "test" folder respectively)
> Also the Archetype plugin makes an assumption that the archetype resources will always reside under "archetype-resources/". User should be able to override this and specify a custom name. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Updated: (MNG-490) Creating an archetype with a different folder structure for java and test sources still results in default (src/main/java) folder being generated.

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-490?page=all ]

Brett Porter updated MNG-490:
-----------------------------

      Assign To: Brett Porter
    Description: 
Creating an archetype with a different folder structure for java and test sources still results in default (src/main/java) folder being generated, even though these are being created empty.

I created an archetype and need to follow a set folder structure (all java sources to sit under folder "src" and tests under "test" folder respectively)

Also the Archetype plugin makes an assumption that the archetype resources will always reside under "archetype-resources/". User should be able to override this and specify a custom name. 


  was:
Creating an archetype with a different folder structure for java and test sources still results in default (src/main/java) folder being generated, even though these are being created empty.

I created an archetype and need to follow a set folder structure (all java sources to sit under folder "src" and tests under "test" folder respectively)

Also the Archetype plugin makes an assumption that the archetype resources will always reside under "archetype-resources/". User should be able to override this and specify a custom name. 


    Fix Version:     (was: 2.0-beta-2)
                 2.0-beta-1

has a patch, review and apply before beta-1

> Creating an archetype with a different folder structure for java and test sources still results in default (src/main/java) folder being generated.
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: MNG-490
>          URL: http://jira.codehaus.org/browse/MNG-490
>      Project: Maven 2
>         Type: Bug
>  Environment: Windows XP, JDK 1.5.0, Maven2 SVN 
>     Reporter: Rahul Thakur
>     Assignee: Brett Porter
>      Fix For: 2.0-beta-1
>  Attachments: DefaultArchetype.diff
>
>
> Creating an archetype with a different folder structure for java and test sources still results in default (src/main/java) folder being generated, even though these are being created empty.
> I created an archetype and need to follow a set folder structure (all java sources to sit under folder "src" and tests under "test" folder respectively)
> Also the Archetype plugin makes an assumption that the archetype resources will always reside under "archetype-resources/". User should be able to override this and specify a custom name. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (MNG-490) Creating an archetype with a different folder structure for java and test sources still results in default (src/main/java) folder being generated.

Posted by "Rahul Thakur (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-490?page=comments#action_41763 ] 

Rahul Thakur commented on MNG-490:
----------------------------------

ok, an update on this one and some notes : 

'archetype.xml' or archetype descriptor contains elements that need to be merged and copied over when a new archetype is being created. For projects with a custom archetypes/skeletons, it would be desirable to copy sources, testsources and resources defined in archetype.xml to appropriate directories referred by the POM template. 

This is how I have gone about implementing it so far: 
a) create a POM model instance from the generated POM for the archetype resources(skeleton resources).
b) check if following definitions are set up in generated POM : 
   b-1) sourceDirectory : if yes, create it and then process sources defined via archetype descriptor's <sources> tag and copy them to source directory defined in POM.
  b-2) testSourceDirectory: same deal as (b-1)
  b-3) resources/resource: Iterate and create directories for each resource and then copy over the one's defined in archetype.xml (<resource> tag)
 b-4) testResources/resource: same deal as (b-3)

Now, the problem I am hitting (assuming I am on right track!) is that if there is a directory defined as a resource in case of (b-3) and (b-4) I am not sure of a way to copy them over to the target archetype that is being setup. 

Also, I'd like to be able to specify nested resources via the archetype descriptor, for instance: 
[snip]
 <resources>
    <resource>bare/readme.txt</resource>    
    <resource>build/**</resource>               (this should copy 'build' dir and everything under it)
  </resources>
[/snip]

Ideally, I think we'd like to have everything defined by the archetype skeleton to be copied over to the target project. Do you think  this is a reasonable/rational extension to add to the existing archetype creation mechanism. 

Look forward to thoughts...

> Creating an archetype with a different folder structure for java and test sources still results in default (src/main/java) folder being generated.
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: MNG-490
>          URL: http://jira.codehaus.org/browse/MNG-490
>      Project: Maven 2
>         Type: Bug
>  Environment: Windows XP, JDK 1.5.0, Maven2 SVN 
>     Reporter: Rahul Thakur
>      Fix For: 2.0-beta-1

>
>
> Creating an archetype with a different folder structure for java and test sources still results in default (src/main/java) folder being generated, even though these are being created empty.
> I created an archetype and need to follow a set folder structure (all java sources to sit under folder "src" and tests under "test" folder respectively)
> Also the Archetype plugin makes an assumption that the archetype resources will always reside under "archetype-resources/". User should be able to override this and specify a custom name. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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