2016-11-19 105 views
0

我正在使用AXIS創建Web服務並使用ANT腳本運行此服務。如何將屬性文件作爲類路徑提供

<target if="jars.ok" depends="make.repo" name="start.server"> 
    <property name="port" value="7070"/> 
     <java fork="true" classname="org.apache.axis2.transport.http.SimpleHTTPServer"> 
      <arg value="${build}/repo"/> 
      <classpath refid="axis2.class.path"/> 
      <arg value="-p${port}"/> 
     </java> 
    </target> 

使用

<path id="axis2.class.path"> 
     <pathelement path="${java.class.path}"/> 
     <pathelement path="${maven.class.path}"/> 
     <fileset dir="${axis2.home}"> 
      <include name="lib/*.jar"/> 
      <include name="resources/*.properties"/> 
     </fileset> 
    </path> 

但我正在逐漸誤差

[java] log4j:WARN Please initialize the log4j system properly [SimpleHTTPServer] 

什麼我需要做什麼來解決這個問題,非常感謝

回答

1

您可以設置好的類路徑不要將Property文件添加爲類路徑,只是文件夾和Jar文件。

因此,這裏包括整個資源文件夾:

pathelement PATH = 「$ {} axis2.home /資源」

+0

非常感謝,我完全迷失在這個:) – Arvind

相關問題