You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by a <se...@163.com> on 2012/12/02 16:21:07 UTC

hi, is these any properties like ${project.module} in maven's system properties?

I assembly a multi-module project, in the assembly, I write like the follow,
is there any property  word like  ${project.module}  to replace "module1"?
or can i user .properties file to set project.module1=module1?

<moduleSets> 
    <moduleSet> 
          <useAllReactorProjects>true</useAllReactorProjects>      
          <includes>
              <include>${project.groupId}:module1</include>
          </includes>
          <binaries>
            <outputDirectory>module1</outputDirectory>
            <unpack>false</unpack>
            <includeDependencies>true</includeDependencies>
            <dependencySets>
                <dependencySet>
                    <outputDirectory>module1/lib</outputDirectory>
                    <scope>runtime</scope>
                </dependencySet>
            </dependencySets>
          </binaries>
        </moduleSet> 

thanks



a

Re: hi, is these any properties like ${project.module} in maven's system properties?

Posted by Jeff MAURY <je...@jeffmaury.com>.
project.artifactId ?

Jeff



On Sun, Dec 2, 2012 at 4:21 PM, a <se...@163.com> wrote:

>
> I assembly a multi-module project, in the assembly, I write like the
> follow,
> is there any property  word like  ${project.module}  to replace "module1"?
> or can i user .properties file to set project.module1=module1?
>
> <moduleSets>
>     <moduleSet>
>           <useAllReactorProjects>true</useAllReactorProjects>
>           <includes>
>               <include>${project.groupId}:module1</include>
>           </includes>
>           <binaries>
>             <outputDirectory>module1</outputDirectory>
>             <unpack>false</unpack>
>             <includeDependencies>true</includeDependencies>
>             <dependencySets>
>                 <dependencySet>
>                     <outputDirectory>module1/lib</outputDirectory>
>                     <scope>runtime</scope>
>                 </dependencySet>
>             </dependencySets>
>           </binaries>
>         </moduleSet>
>
> thanks
>
>
>
> a




-- 
Jeff MAURY


"Legacy code" often differs from its suggested alternative by actually
working and scaling.
 - Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury

Re: hi, is these any properties like ${project.module} in maven's system properties?

Posted by Thomas Broyer <t....@gmail.com>.
There apparently are special ${module.*} properties you can use in a
moduleSet (e.g. ${module.artifactId}); see
http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html#class_binaries
(outputFileNameMapping's default value)
And you might be able to use ${artifactId} also, see
http://maven.apache.org/plugins/maven-assembly-plugin/examples/multimodule/module-binary-inclusion-simple.html
(your modules should have the same name as their artifactId:
http://www.sonatype.com/people/2011/01/maven-tip-project-directories-and-artifact-ids/
)

On Sun, Dec 2, 2012 at 4:21 PM, a <se...@163.com> wrote:
>
> I assembly a multi-module project, in the assembly, I write like the follow,
> is there any property  word like  ${project.module}  to replace "module1"?
> or can i user .properties file to set project.module1=module1?
>
> <moduleSets>
>     <moduleSet>
>           <useAllReactorProjects>true</useAllReactorProjects>
>           <includes>
>               <include>${project.groupId}:module1</include>
>           </includes>
>           <binaries>
>             <outputDirectory>module1</outputDirectory>
>             <unpack>false</unpack>
>             <includeDependencies>true</includeDependencies>
>             <dependencySets>
>                 <dependencySet>
>                     <outputDirectory>module1/lib</outputDirectory>
>                     <scope>runtime</scope>
>                 </dependencySet>
>             </dependencySets>
>           </binaries>
>         </moduleSet>
>
> thanks
>
>
>
> a



-- 
Thomas Broyer
/tɔ.ma.bʁwa.je/

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