You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by br...@apache.org on 2004/10/15 12:10:17 UTC

cvs commit: maven-plugins/native/xdocs changes.xml index.xml properties.xml tasks.xml

brett       2004/10/15 03:10:17

  Modified:    native   plugin.jelly plugin.properties
               native/xdocs changes.xml index.xml properties.xml tasks.xml
  Log:
  MPNATIVE-7
  Submitted By: Joachim Bader
  Add support for native dependencies and Add support for optional include path (includepath/sysincludepath)
  
  Revision  Changes    Path
  1.12      +40 -1     maven-plugins/native/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/maven-plugins/native/plugin.jelly,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- plugin.jelly	12 May 2004 13:12:53 -0000	1.11
  +++ plugin.jelly	15 Oct 2004 10:10:17 -0000	1.12
  @@ -90,6 +90,45 @@
               <includepath location="${java.home}/../include/${maven.native.include.os}"/>
               <includepath location="${maven.build.dir}/native/jni"/>
            </j:if>   
  +         
  +        <util:tokenize var="includePathList" delim=" " trim="true">${maven.native.compile.includepath}</util:tokenize>
  +        <j:forEach var="includePath" items="${includePathList}">    
  +            <includepath location="${includePath}"/>
  +        </j:forEach>         
  +        
  +        <util:tokenize var="sysincludePathList" delim=" " trim="true">${maven.native.compile.sysincludepath}</util:tokenize>
  +        <j:forEach var="sysincludePath" items="${sysincludePathList}">    
  +            <sysincludepath location="${sysincludePath}"/>
  +        </j:forEach>             
  +        
  +        <!-- add depended libraries -->
  +        <j:forEach var="lib" items="${pom.artifacts}">
  +            <j:set var="dep" value="${lib.dependency}"/>
  +
  +            <!-- include sos-->
  +            <j:if test="${dep.type=='so'}">
  +                <j:set var="delim" value="lib"/>                
  +                
  +                <!-- replace ${delim} in the name -->
  +                <util:tokenize var="libnameTokenizer" delim="${delim}" trim="true">${dep.artifactId}</util:tokenize>
  +                <j:forEach var="libnamePart" items="${libnameTokenizer}" varStatus="index">    
  +                    <j:if test="${index == 0}">
  +                        <j:set var="libname" value="${libnamePart}"/>
  +                    </j:if>
  +                    <j:if test="${index > 0}">
  +                        <j:set var="libname" value="${libname}${delim}${libnamePart}"/>
  +                    </j:if>
  +                </j:forEach>
  +                
  +                <!-- use syslibst or libset -->
  +                <j:if test="${dep.getProperty('native.syslib') != 'true'}">
  +                    <libset dir="${lib.file.parent}" libs="${libname}-${dep.version}"/>
  +                </j:if>                
  +                <j:if test="${dep.getProperty('native.syslib') == 'true'}">
  +                    <syslibset dir="${lib.file.parent}" libs="${libname}-${dep.version}"/>
  +                </j:if>                
  +            </j:if>
  +        </j:forEach>            
          </cc>
   
          <!-- just copy the file don't move because we don't want the compiler to compile if for no reason -->
  @@ -112,7 +151,7 @@
                   artifactDirectory = '${pom.artifactDirectory}'
         </ant:echo>
         
  -      <ant:property name="libdir__" value="${maven.repo.local}/${pom.artifactDirectory}/so"/>
  +      <ant:property name="libdir__" value="${maven.repo.local}/${pom.artifactDirectory}/sos"/>
         <ant:mkdir dir="${libdir__}"/>
         <ant:copy file="${maven.build.dir}/native/lib${pom.artifactId}-${pom.currentVersion}.so" tofile="${libdir__}/lib${pom.artifactId}-${pom.currentVersion}.so" overwrite="true"/>
       </goal>
  
  
  
  1.3       +3 -0      maven-plugins/native/plugin.properties
  
  Index: plugin.properties
  ===================================================================
  RCS file: /home/cvs/maven-plugins/native/plugin.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- plugin.properties	8 May 2004 01:16:02 -0000	1.2
  +++ plugin.properties	15 Oct 2004 10:10:17 -0000	1.3
  @@ -10,3 +10,6 @@
   
   maven.native.src.includes=**/*.h **/*.c **/*.cpp
   maven.native.src.excludes=
  +
  +maven.native.compile.includepath=
  +maven.native.compile.sysincludepath=
  
  
  
  1.5       +7 -0      maven-plugins/native/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/native/xdocs/changes.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- changes.xml	16 May 2004 01:52:48 -0000	1.4
  +++ changes.xml	15 Oct 2004 10:10:17 -0000	1.5
  @@ -24,6 +24,13 @@
       <author email="brett@apache.org">Brett Porter</author>
     </properties>
     <body>
  +    <release version="1.2-SNAPSHOT" date="in CVS">
  +      <action dev="brett" type="fix" issue="MPNATIVE-7" due-to="Joachim Bader">Changed repository location of libraries from <code>so</code> to <code>sos</code> so Maven can handle them as dependencies</action>
  +      <action dev="brett" type="add" issue="MPNATIVE-7" due-to="Joachim Bader">Add support for native dependencies (libset/syslibset)</action>
  +      <action dev="brett" type="add" issue="MPNATIVE-7" due-to="Joachim Bader">Add support for optional include path (includepath/sysincludepath)</action>
  +      <action dev="brett" type="add" issue="MPNATIVE-8" due-to="Joachim Bader">update bcel (consistency) and cpptasks (cross compile) dependencies</action>
  +    </release>
  +
       <release version="1.1" date="2004-05-15">
         <action dev="brett" type="add" issue="MPNATIVE-5" due-to="Joachim Bader">add src includes/excludes.</action>
         <action dev="brett" type="add" issue="MPNATIVE-4" due-to="Joachim Bader">Linker and compiler argument passing.</action>
  
  
  
  1.4       +9 -0      maven-plugins/native/xdocs/index.xml
  
  Index: index.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/native/xdocs/index.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- index.xml	25 Apr 2004 02:34:08 -0000	1.3
  +++ index.xml	15 Oct 2004 10:10:17 -0000	1.4
  @@ -22,6 +22,7 @@
     <properties>
       <title>Maven Native Plug-in</title>
       <author email="apache@kav.dk">Kasper Nielsen</author>
  +    <author email="info@joachim-bader.de">Joachim Bader</author>
     </properties>
   
     <body>
  @@ -38,6 +39,14 @@
             <th>Date</th>
             <th>Description</th>
           </tr>
  +
  +        <tr>
  +          <td>31 July 2004</td>
  +          <td>
  +            support for native dependencies added
  +          </td>
  +        </tr>                
  +        
           <tr>
             <td>26 Mar 2003</td>
             <td>
  
  
  
  1.5       +82 -0     maven-plugins/native/xdocs/properties.xml
  
  Index: properties.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/native/xdocs/properties.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- properties.xml	8 May 2004 01:16:02 -0000	1.4
  +++ properties.xml	15 Oct 2004 10:10:17 -0000	1.5
  @@ -22,6 +22,7 @@
     <properties>
       <title>Maven Native Plugin Properties</title>
       <author email="apache@kav.dk">Kasper Nielsen</author>
  +    <author email="info@joachim-bader.de">Joachim Bader</author>
     </properties>
     <body>
       <section name="Native Plugin Properties">
  @@ -112,7 +113,88 @@
             </td>
           </tr>				
   		
  +        <tr>
  +            <td>maven.native.compiler.target</td>
  +            <td>Yes</td>
  +            <td>
  +                Optional compiler target. Used for cross compile. 
  +                <code>arm-linux</code> means that <code>arm-linux-gcc</code> is 
  +                used.
  +            </td>
  +        </tr>	        
  +        
  +        <tr>
  +            <td>maven.native.linker.target</td>
  +            <td>Yes</td>
  +            <td>
  +                Optional linker target. Used for cross compile. 
  +                Default value <code>${maven.native.compiler.target}</code>
  +            </td>
  +        </tr>	                
  +        
  +        <tr>
  +            <td>maven.native.compiler.arg.start|mid|end</td>
  +            <td>Yes</td>
  +            <td>
  +                Space delimted list of optional compiler arguments. 
  +                <code>start|mid|end</code> spcifies the position in the compiler
  +                argument list.
  +            </td>
  +        </tr>	
  +
  +        <tr>
  +            <td>maven.native.linke.arg.start|mid|end</td>
  +            <td>Yes</td>
  +            <td>
  +                Space delimted list of optional linke arguments. 
  +                <code>start|mid|end</code> spcifies the position in the linker
  +                argument list.
  +            </td>
  +        </tr>	
  +                
  +        <tr>
  +            <td>maven.native.compile.includepath</td>
  +            <td>Yes</td>
  +            <td>
  +                Space delimted list of optional include pathes.
  +            </td>
  +        </tr>        	
  +        
  +        <tr>
  +            <td>maven.native.compile.sysincludepath</td>
  +            <td>Yes</td>
  +            <td>
  +                Space delimted list of optional system include pathes.
  +            </td>
  +        </tr>        	
  +        
         </table>
  +    </section>
  +    
  +    <section name="Dependencies on native libraries">
  +        <p>
  +            Dependencies on native libraries can be handled by the maven 
  +            dependency mechanism.
  +            
  +            The property <code>native.syslib</code> is optional. If set the
  +            <code>syslibset</code> tag is used insted of the normal 
  +            <code>libset</code> tag.            
  +            
  +            Only <code>so</code>s are supported a the moment. 
  +        </p>
  +        
  +  <source><![CDATA[
  +    <dependency>
  +      <groupId>group</groupId>
  +      <artifactId>libmyDependendLib</artifactId
  +      <version>1.0</version>
  +      <type>so</type>
  +      <properties>
  +        <native.syslib>true</native.syslib>
  +      </properties>
  +    </dependency>
  +  ]]></source>
  +            
       </section>
     </body>
   </document>
  
  
  
  1.3       +8 -0      maven-plugins/native/xdocs/tasks.xml
  
  Index: tasks.xml
  ===================================================================
  RCS file: /home/cvs/maven-plugins/native/xdocs/tasks.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- tasks.xml	4 Mar 2004 18:37:54 -0000	1.2
  +++ tasks.xml	15 Oct 2004 10:10:17 -0000	1.3
  @@ -32,6 +32,14 @@
   
         <subsection name="Unassigned">
           <p>
  +            <ul>
  +                <li>
  +                    Add support for other native dependencies. Currently only 
  +                    <code>so</code> is supported. <code>dll</code> and 
  +                    <code>a</code> are not supported. Maybe introduce a property
  +                    like <code>maven.native.libType</code>.
  +                </li>
  +            </ul>
           </p>
         </subsection>
   
  
  
  

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