2013-10-22 133 views
2

當我在build.xml中使用「manifestclasspath」時,我在Ant中遇到了上述問題。Ant中沒有合適的相對路徑(操作系統:windows)

我在windows上得到的問題是;

沒有合適的相對路徑.................

C:\用戶\ TOSH \桌面\ sampleserver \庫\部件\插件\ XmlSchema_1。 4.7.wso2v2.jar

我的build.xml如下;

<path id="jar.classpath"> 
      <pathelement path="${class.dir}"/>   
      <fileset dir="${basedir}/../../../repository/components/plugins"> 
       <include name="*.jar"/> 
      </fileset>   
    </path> 

    <target name="init"> 
     <mkdir dir="${class.dir}"/> 
     <manifestclasspath property="tem.classpath" jarfile="pathing.jar"> 
      <classpath refid="jar.classpath"/> 
     </manifestclasspath> 
     <jar destfile="pathing.jar" basedir="target/classes"> 
      <manifest>    
       <attribute name="Class-Path" value="${tem.classpath}"/> 
      </manifest> 
     </jar> 
     <path id="javac.classpath"> 
      <pathelement path="${class.dir}"/> 
      <pathelement path="pathing.jar"/>    
     </path>  
    </target> 

有人知道原因嗎?

回答

4

我在教程中也發現了SimpleStockQuote示例。如果修改build.xml文件(對於本教程,在samples/axis2Client/build.xml下),並更改manifestclasspath任務以添加屬性maxParentLevels =「5」(或某個合適的值,缺省值2不足)可能會解決你的問題。

+0

這更可能是一個評論比答案 –

+0

這解決了我有類似的問題。 – Dave

相關問題