PR: MPNATIVE-10

add DLL support


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@123478 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
brett 2004-12-28 07:34:25 +00:00
parent f19c14ae96
commit a492d32f8f
7 changed files with 59 additions and 20 deletions

View File

@ -106,7 +106,7 @@
<j:set var="dep" value="${lib.dependency}"/>
<!-- include sos-->
<j:if test="${dep.type=='so'}">
<j:if test="${dep.type=='so' or dep.type=='dll'}">
<j:set var="delim" value="lib"/>
<!-- replace ${delim} in the name -->
@ -132,11 +132,25 @@
</cc>
<!-- just copy the file don't move because we don't want the compiler to compile if for no reason -->
<ant:available property="outputPresent" file="${maven.build.dir}/native/lib_.so"/>
<j:if test="${outputPresent == 'true'}">
<!-- so -->
<ant:available property="outputPresentSO" file="${maven.build.dir}/native/lib_.so"/>
<j:if test="${outputPresentSO == 'true'}">
<ant:copy file="${maven.build.dir}/native/lib_.so"
tofile="${maven.build.dir}/native/lib${pom.artifactId}-${pom.currentVersion}.so" overwrite="true"/>
<!-- needed if cygwin gcc is used -->
<j:if test="${context.getVariable('maven.native.include.os')=='win32'}">
<ant:move file="${maven.build.dir}/native/lib${pom.artifactId}-${pom.currentVersion}.so"
tofile="${maven.build.dir}/native/${pom.artifactId}-${pom.currentVersion}.dll"
overwrite="true"/>
</j:if>
</j:if>
<!-- dll -->
<ant:available property="outputPresentDLL" file="${maven.build.dir}/native/_.dll"/>
<j:if test="${outputPresentDLL == 'true'}">
<ant:copy file="${maven.build.dir}/native/_.dll"
tofile="${maven.build.dir}/native/${pom.artifactId}-${pom.currentVersion}.dll" overwrite="true"/>
</j:if>
</goal>
@ -151,9 +165,21 @@
artifactDirectory = '${pom.artifactDirectory}'
</ant:echo>
<!-- so -->
<ant:available property="libPresentSO" file="${maven.build.dir}/native/lib${pom.artifactId}-${pom.currentVersion}.so"/>
<j:if test="${libPresentSO == 'true'}">
<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"/>
</j:if>
<!-- dll -->
<ant:available property="libPresentDLL" file="${maven.build.dir}/native/${pom.artifactId}-${pom.currentVersion}.dll"/>
<j:if test="${libPresentDLL == 'true'}">
<ant:property name="libdir__" value="${maven.repo.local}/${pom.artifactDirectory}/dlls"/>
<ant:mkdir dir="${libdir__}"/>
<ant:copy file="${maven.build.dir}/native/${pom.artifactId}-${pom.currentVersion}.dll" tofile="${libdir__}/${pom.artifactId}-${pom.currentVersion}.dll" overwrite="true"/>
</j:if>
</goal>
<!-- ================================================================== -->

View File

@ -25,6 +25,7 @@
</properties>
<body>
<release version="1.2-SNAPSHOT" date="in CVS">
<action dev="brett" type="fix" issue="MPNATIVE-10" due-to="Joachim Bader">Add DLL support to the plugin</action>
<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>

19
native/xdocs/faq.fml Executable file
View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<faqs title="Frequently Asked Questions">
<part id="general">
<title>General</title>
<faq id="cygwin">
<question>How to run the gcc under cygwin?</question>
<answer>
Set the follwing properties in your <code>project.properties</code>:
<source>
maven.native.include.os=win32
maven.native.compiler.arg.start=-mno-cygwin
maven.native.linker.arg.start=-mno-cygwin -Wl,--add-stdcall-alias
</source>
</answer>
</faq>
</part>
</faqs>

View File

@ -40,6 +40,13 @@
<th>Description</th>
</tr>
<tr>
<td>17 October 2004</td>
<td>
support for dlls added
</td>
</tr>
<tr>
<td>31 July 2004</td>
<td>

View File

@ -30,6 +30,7 @@
<item href="/index.html" name="Overview"/>
<item href="/goals.html" name="Goals"/>
<item href="/properties.html" name="Properties"/>
<item href="/faq.html" name="Faqs"/>
<item href="/tasks.html" name="Tasks"/>
</menu>
</body>

View File

@ -180,7 +180,7 @@
<code>syslibset</code> tag is used insted of the normal
<code>libset</code> tag.
Only <code>so</code>s are supported a the moment.
<code>so</code>s and <code>dll</code>s are supported a the moment.
</p>
<source><![CDATA[

View File

@ -29,21 +29,6 @@
<p>
Lists of todos and ideas for future versions.
</p>
<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>
</section>
</body>
</document>