Greetings All,

Okay here is an issue and I am not sure what am I doing wrong.

I had this in one my "sub" project pom

       <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <configuration>
            <descriptors>
              <descriptor>src/assemble/CPWebService-assembly.xml</descriptor>
            </descriptors>
          </configuration>
        </plugin>

and now problem is that if I issue mvn assemly:assembly from "main" project 
then it complains that descriptior could not be found because I guess main POM 
has no clue for that. So every time I have to go to sub project and issue 
assembly command there.

c:\main\mvn assembly:assembly
====> comapins that descriptor is not found 
[INFO] [assembly:assembly]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] No assembly descriptors found.
[INFO] ------------------------------------------------------------------------

Now if I move to sub project 

c:\main\sublevel1\sublevel2\mvn assembly:assembly
====> It works fine and I get my zip file

Now I don't wanna move to sub project to issue assembly command

so is it possible if I could issue mvn assembly:assembly from main project ???

If it is _NOT_ possible then I have already tried following.
 
Alternate try:

What I did that I moved the above assemby plugin to main POM and made change in 
<descriptor> tag to find the assemly file with respect to main project then I 
issued mvn assembly from main project and I had success and got zip file which 
included all files and filesets but it did not inlcude all dependenices in my 
and showed no error by the way. 

My assembly.xml contains (just a snippet)

<files>
     <file>
      <source>src/main/lib/windows-x86-32.dll</source>
      <outputDirectory>/bin</outputDirectory>
    </file>    
</files>

<dependencySets>
    <dependencySet>
      <unpack>false</unpack>
      <scope>runtime</scope>
      <outputDirectory>/lib</outputDirectory>
      <includes>
        <include>com.abc.cp:cps-core</include>
        <include>com.abc.cp:cps-authn</include>
        <include>com.abc.cp:cps-authz</include>
        <include>com.abc.cp:cps-inv</include>
        <include>com.abc.cp:cps-perf</include>
        <include>com.abc.cp:CPWebService</include>
        <include>org.springframework:spring</include>
        <include>org.hibernate:hibernate</include>
        <include>org.hibernate:hibernate-annotations</include>
        <include>commons-dbcp:commons-dbcp</include>
        <include>dom4j:dom4j</include>
        <include>javax.transaction:jta</include>
        <include>com.microsoft.jdbcdriver:sqljdbc</include>
        <include>commons-pool:commons-pool</include>
        <include>javax.persistence:persistence-api</include>
        <include>commons-collections:commons-collections</include>
        <include>cglib:cglib</include>
        <include>asm:asm</include>
        <include>antlr:antlr</include>
      </includes>
    </dependencySet>
  </dependencySets>

Ok so I am wondering why my dependencies are not including if I add assmebly 
plugin in main project while if I leave assembly plugin in sub project, they 
are added. I have almostly tried one whole day to make it work but no luck. Any 
help is appreciated.

Thanks,

Petr V.

P.S. I admit that my maven knowledge is based on fire fighting. When ever I 
face issue, I google and get things done and I am not proeprly trained in maven.

       
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.

Reply via email to