Hi 
 
 
I am new Maven, I have few questions
 
1.)  Currently I have all my jar files for the code to complie in  
/sporty2g/distribution/lib, Can copy to /target/classes by doing the following when I 
run "maven site:generate":
<resources>
    <resource>
               <directory>/sporty2g/distribution/lib</directory>
         <targetPath>/distribution/lib</targetPath>
      </resource>
      </resources> 
Inside <build>

1a.) If question 1 is sucess in copying the jars into /target.classes, Then can I use 
the jar files copied in /target/classes in maven when run "maven site:generate": 
instead of using the following <dependency> tag, My reason of asking this because I 
have like 45 jar files, and wondering if I can just make maven point a directory 
instead of listing each jar file in  <dependency> tag.

<dependencies> <dependency>
      <groupId>xmlunit</groupId>
      <artifactId>xmlunit</artifactId>
      <version>1.0</version>
    </dependency>
   </dependencies>

2.)According maven-project.xsd the xml schema for project.xml file, it states that 
build element can have  zero to many sourceDirectory elements as stated below. Well 
when I put multiple  sourceDirectory elements in my body element, it doesn't complain 
about project.xml, but when run "maven site:generate", it only looks at one of  
sourceDirectory element  and processes it, and ignores the other one. see Below for my 
example: 


   1.)   <sourceDirectory>/sporty2g/home/ejb/generated-src/java</sourceDirectory>
    2.)  <sourceDirectory>/sporty2g/home/web/src/java</sourceDirectory>
Note: for some reason in this case it agnores 1.), but picks up 2.) . If this is the 
way it works, then Why does xml schema for project.xml allows you to have multiple 
sourceDirectory element.

maven-project.xsd the xml schema for project.xml file:

<xs:element name="build">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="nagEmailAddress" minOccurs="0"/>
        <xs:element ref="sourceDirectory" minOccurs="0"/>
        <xs:element ref="sourceModifications" minOccurs="0"/>
        <xs:element ref="unitTestSourceDirectory" minOccurs="0"/>
        <xs:element ref="integrationUnitTestSourceDirectory" minOccurs="0"/>
        <xs:element ref="aspectSourceDirectory" minOccurs="0"/>
        <xs:element ref="unitTest" minOccurs="0"/>
        <!-- no longer appears in build.java 
        <xs:element ref="integrationUnitTest" minOccurs="0"/>
        -->
        <xs:element ref="resources" minOccurs="0"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

<xs:element name="sourceDirectory" type='xs:string'/>

 

 

3.) If question 2 is an issue,which means I cannot process multiple sourceDirectory 
element, Then what is an work around this? Because my src code in located in 10 
diffrent directories, Here is where all the directories where my source code is 
located to process, just to create the site using maven.  

      <sourceDirectory>/sporty2g/home/ejb/generated-src/java</sourceDirectory>
      <sourceDirectory>/sporty2g/home/ejb/src/java</sourceDirectory>
      
      <sourceDirectory>/sporty2g/home/web/src/java</sourceDirectory>
      
      
<sourceDirectory>/sporty2g/administration/ejb/generated-src/java</sourceDirectory>
      <sourceDirectory>/sporty2g/administration/ejb/src/java</sourceDirectory>
      
<sourceDirectory>/sporty2g/administration/web/generated-src/java</sourceDirectory>
      <sourceDirectory>/sporty2g/administration/web/src/java</sourceDirectory>
      
      <sourceDirectory>/sporty2g/bondadmin/ejb/generated-src/java</sourceDirectory>
      <sourceDirectory>/sporty2g/bondadmin/ejb/src/java</sourceDirectory>
      <sourceDirectory>/sporty2g/bondadmin/web/generated-src/java</sourceDirectory>
      <sourceDirectory>/sporty2g/bondadmin/web/src/java</sourceDirectory>
      
      <sourceDirectory>/sporty2g/cashmgt/ejb/generated-src/java</sourceDirectory>
      <sourceDirectory>/sporty2g/cashmgt/ejb/src/java</sourceDirectory>
      <sourceDirectory>/sporty2g/cashmgt/web/generated-src/java</sourceDirectory>
      <sourceDirectory>/sporty2g/cashmgt/web/src/java</sourceDirectory>
      
      <sourceDirectory>/sporty2g/defproc/ejb/generated-src/java</sourceDirectory>
      <sourceDirectory>/sporty2g/defproc/ejb/src/java</sourceDirectory>
      <sourceDirectory>/sporty2g/defproc/web/generated-src/java</sourceDirectory>
      <sourceDirectory>/sporty2g/defproc/web/src/java</sourceDirectory>
      
      <sourceDirectory>/sporty2g/doctrack/ejb/generated-src/java</sourceDirectory>
      <sourceDirectory>/sporty2g/doctrack/ejb/src/java</sourceDirectory>
      <sourceDirectory>/sporty2g/doctrack/web/generated-src/java</sourceDirectory>
      <sourceDirectory>/sporty2g/doctrack/web/src/java</sourceDirectory>
      
      
      <sourceDirectory>/sporty2g/eai/ejb/generated-src/java</sourceDirectory>
      <sourceDirectory>/sporty2g/eai/ejb/src/java</sourceDirectory>
      <sourceDirectory>/sporty2g/eai/web/generated-src/java</sourceDirectory>
      <sourceDirectory>/sporty2g/eai/web/src/java</sourceDirectory>
      
      <sourceDirectory>/sporty2g/servacct/ejb/generated-src/java</sourceDirectory>
      <sourceDirectory>/sporty2g/servacct/ejb/src/java</sourceDirectory> 
      <sourceDirectory>/sporty2g/servacct/web/generated-src/java</sourceDirectory>
      <sourceDirectory>/sporty2g/servacct/web/src/java</sourceDirectory>

4.) From question three you have seen all the directories I need to process just do 
run "maven site:generate", What is best to go about doing this?

 

5.) Considering questions 1 to 4, My only goal  of using maven is just to creat 
documentation on all these directories only , Nothing more. What is the best way

to reach my goal: "maven is just to creat documentation on all these directories only "

Please give your fellow developer feeback, I have spend 4 days, 16 hours a day, And I 
have not been able to come up with solution yet. I looked at Maven documentation, And 
it's only good for begiiners and just to get you up and running, but beyond that it 
doesn't really talk much about topic I am intresting in "How 

to use maven just for documentation with having many src directories."

 

This how my build elements looks like currently:

<build>
    <nagEmailAddress>[EMAIL PROTECTED]</nagEmailAddress>
    <resources>
    <resource>
               <directory>/sporty2g/distribution/lib</directory>
         <targetPath>/distribution/lib</targetPath>
      </resource>
      </resources> 
      <sourceDirectory>/sporty2g/home/ejb/generated-src/java</sourceDirectory>
      <sourceDirectory>/sporty2g/home/web/src/java</sourceDirectory>
    </build>

 

Any help will be greatlty appericated! :-)

Best Regards,

Rauf

 

  

 

 

 

 
 
 

         


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to