<target name="startmanaged" description="Start Managed Server">
<if>
<equals arg1="${server-host}" arg2="localhost" />
<then>
<echo message="__________ Check Weblogic" />
<if>
<available file="${weblogic}"/>
<then>
<echo message="Weblogic server found" />
<echo message="__________ Starting managed Weblogic server" />
<property name="weblogic.console" value="http://${host}:${port}/console"/>
<exec dir="${weblogic.domain.dir}/bin" executable="cmd.exe" failonerror="true">
<arg line="/C ${weblogic.domain.dir}/bin/${start-managed-server} ${server1} ${adminURL}"/>
</exec>
</then>
<else>
<fail message="No Weblogic server has been found" />
</else>
</if>
</then>
</if>
</target>
如何通过ANT脚本在运行时运行此ANT脚本后传递用户名和密码?
答案 0 :(得分:0)
查看startManagedWebLogic.sh文件本身:
在服务器启动期间,将WLS_USER设置为等于系统用户名,WLS_PW等于系统密码,无用户名和密码提示。两者都需要绕过启动提示。
旁路提示部分还介绍了其他方法:http://docs.oracle.com/cd/E13222_01/wls/docs70/adminguide/startstop.html
您可以设置boot.properties文件或添加java选项:
-Dweblogic.management.username=username
-Dweblogic.management.password=password