You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Edwin Dhondt (JIRA)" <ji...@codehaus.org> on 2010/02/08 10:59:55 UTC

[jira] Commented: (MNG-2598) profile element in POM should support overriding project.build.directory

    [ http://jira.codehaus.org/browse/MNG-2598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=209442#action_209442 ] 

Edwin Dhondt commented on MNG-2598:
-----------------------------------

I do have some concerns about whether this workaround is complete ?

Will the <outputDirectory>${build.outputDir}</outputDirectory> also be picked up by the jar/war/ear plugins, or will those plugins continu to produce their artifact (jar/war/ear) underneath the target directory, given that the default value for outputDirectory for, for example the war plugin, is project.build.directory and not project.build.outpuDirectory ?
If my explanation is correct, then the workaround should also include adding all those plugins setting their outputDirectory explicitely.

Related to this I was wondering what we try to achieve with the workaround mentioned in: 
http://m2eclipse.sonatype.org/project-faq.html#8

Is it the intention to let maven, when run from the cmdline, produce the output underneath target.
And is it then the intention when running Maven from Eclipse (using m2 eclipse Run As Maven ...) to specify a profile due to which the output is produced underneath target-eclipse ? 
Where does Eclipse itself than produce the output ?

Thanks,
EDH

> profile element in POM should support overriding project.build.directory
> ------------------------------------------------------------------------
>
>                 Key: MNG-2598
>                 URL: http://jira.codehaus.org/browse/MNG-2598
>             Project: Maven 2 & 3
>          Issue Type: Improvement
>          Components: Profiles
>    Affects Versions: 2.0.4
>            Reporter: Ian Springer
>             Fix For: 3.1
>
>
> I am trying to set up a 'dev' build profile that, when enabled, will cause my j2ee artifacts to be built directly to exploded j2ee deployment dirs, instead of target/classes/. The purpose is to make the everyday development process more efficient by skipping a number of time-consuming intermediate mvn steps (i.e. jarring artifacts, copying the jars to the local repo, then unjarring the artifacts to their deploy locations).
> The intuitive way to achieve this is to override 'project.build.directory' and/or 'project.build.outputDirectory' in a profile; e.g.:
> <profile>
> ...
>  <build>
>   <outputDirectory>${jboss.home}/server/default/deploy/my.ear/my-exploded-ejb.jar
>  </build>
> ...
> </profile>
> Unfortunately, profiles currently do not allow one to override either 'project.build.directory' or 'project.build.outputDirectory'. Please change Maven to allow profiles to override these props. Otherwise, I can't see any other way to achieve what my team needs to do to have a practical build/dev infrastructure.
> Thanks,
> Ian

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