Maven Archetype

No longer possible to place non-Java resources into package structure

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

From a thread on dev@struts. This used to work, and I could put (for example) .properties files into src/main/resources/org/example/myapp/Bundle.properties .

On 9/3/06, tm jee <tm_jee@yahoo.co.uk> wrote:

> Is there a way allow resource generated by maven archetype to change dynamically.
...
> The files under the generated resources directory seems to be static. It doesn't seems to change accordingly with the -DgroupId argument passed in. Is there a way to configured it to change according to the groupId?

Apparently not. In a prior version of Maven Archetype, you could put non-Java files in the <sources> section, and it would put them in the
proper package structure.

There are some notes in the Shale Blank archetype.xml file [1].

<!-- The next line causes an error with 'mvn archetype:create':
Embedded error: Template 'src/main/resources/Bundle.properties'
not in directory 'src/main/java' -->
<!-source>src/main/resources/Bundle.properties</source->
...
<!-- See above, but here, Bundle.properties
does not get placed in the package structure -->
<resource>src/main/resources/Bundle.properties</resource>

[1] http://svn.apache.org/repos/asf/shale/maven/trunk/archetypes/shale-archetype-blank/src/main/resources/META-INF/archetype.xml

Issue Links

Activity

Hide
Wendy Smoak added a comment -

Duplicate of ARCHETYPE-54

Show
Wendy Smoak added a comment - Duplicate of ARCHETYPE-54

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: