[m2] target directory layout

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[m2] target directory layout

John Fallows
I've been using Maven 1.0 since 1.0-rc1, and have also written my own
plugin for Maven 1.0.

Now Maven2 looks to be a significant improvement, keep up the good work!

Q. Is the layout of the "target" directory standardized consistently
with the "src" directory for generated sources?

For example:
  src
  src/main
  src/main/java
  src/main/resources

  target
  target/src
  target/src/main
  target/src/main/java
  target/src/main/resources

This would be convenient for plugin developers who are writing for the
"generate-sources" m2 lifecycle phase.

Kind Regards,
John Fallows.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [m2] target directory layout

brettporter
Administrator
John Fallows wrote:

>Now Maven2 looks to be a significant improvement, keep up the good work!
>  
>
Thanks!

>Q. Is the layout of the "target" directory standardized consistently
>with the "src" directory for generated sources?
>  
>
Yes, but not in the way you have written. The recommended format is:

generated-sources/<short-plugin-name>/...
eg:
generated-sources/modello/org/apache/maven/model/Model.java

(of course, this can be set to something different in the POM by the user).

It really shouldn't have to be too much of a worry for the plugin
developer: you take it as input once, and after generation add it to the
list of compile source roots in the project, and that is used everywhere
else. Any time you need to configure a value twice should raise a
warning flag about why it is being repeated :)

Cheers,
Brett


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]