2013-03-25 52 views
4

我剛剛安裝了maven,並在構建hello world時,maven不斷向我詢問權限,並顯示如下消息 - 「該applet試圖訪問文件的」存在「狀態屬性。 ..「maven - 獲取彈出式窗口時詢問權限

似乎它不是一個很常見的問題。有沒有辦法將這些權限授予maven?

[INFO] Scanning for projects... 
[INFO]                   
[INFO] ------------------------------------------------------------------------ 
[INFO] Building tms-server 1.0-SNAPSHOT 
[INFO] ------------------------------------------------------------------------ 
[INFO] 
[INFO] --- maven-resources-plugin:2.3:resources (default-resources) @ tms-server --- 
Current policy properties: 
    mmc.sess_pe_act.block_unsigned: false 
    window.num_max: 5 
    jscan.sess_applet_act.sig_trusted: pass 
    jscan.sess_applet_act.block_all: false 
    file.destructive.state: disabled 
    window.num_limited: true 
    jscan.sess_applet_act.unsigned: instrument 
    mmc.sess_pe_act.action: validate 
    jscan.session.daemon_protocol: http 
    file.read.state: disabled 
    mmc.sess_pe_act.block_invalid: true 
    mmc.sess_pe_act.block_blacklisted: false 
    jscan.session.policyname: QXBwbGV0L0FjdGl2ZVggU2VjdXJpdHkgR2xvYmFsIFBvbGljeSA= 
    net.bind_enable: false 
    mmc.sess_cab_act.block_unsigned: false 
    file.nondestructive.state: disabled 
    jscan.session.origin_uri: 
http://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-filtering/1.0-beta-2/maven-filtering-1.0-beta-2.jar 
    mmc.sess_cab_act.action: validate 
    net.connect_other: false 
    jscan.session.user_ipaddr: 10.109.50.50 
    jscan.sess_applet_act.sig_invalid: block 
    thread.thread_num_max: 8 
    mmc.sess_cab_act.block_invalid: true 
    jscan.sess_applet_act.sig_blacklisted: block 
    net.connect_src: true 
    thread.thread_num_limited: true 
    jscan.sess_applet_act.stub_out_blocked_applet: true 
    mmc.sess_cab_act.block_blacklisted: true 
    jscan.session.user_name: MTAuMTA5LjUwLjUw 
    thread.threadgroup_create: false 
    file.write.state: disabled 
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! 
-->> returning Frame NULL 
BaseDialog: owner frame is a java.awt.Frame 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 5.925s 
[INFO] Finished at: Mon Mar 25 12:55:59 IST 2013 
[INFO] Final Memory: 7M/74M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.3:resources (default-resources) on project tms-server: 
Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.3:resources failed: The Applet is not allowed to access 
the "exists" state attributes of file /root/tms-server/src/main/resources by IWSVA Javascan site policy. -> [Help 1] 
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles: 
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException 

更新:這是我的pom.xml,它直接來自apache的入門指南。

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 
    <modelVersion>4.0.0</modelVersion> 
    <groupId>app</groupId> 
    <artifactId>tms-server</artifactId> 
    <packaging>jar</packaging> 
    <version>1.0-SNAPSHOT</version> 
    <name>tms-server</name> 
    <url>http://maven.apache.org</url> 
    <dependencies> 
    <dependency> 
     <groupId>junit</groupId> 
     <artifactId>junit</artifactId> 
     <version>3.8.1</version> 
     <scope>test</scope> 
    </dependency> 
    </dependencies> 
</project> 
+0

請發佈你'pom.xml'文件? – 2013-03-25 07:40:45

+1

你是怎麼建立這個的?哪個命令? – 2013-03-25 07:48:06

+0

@KugathasanAbimaran mvn包 – navgeet 2013-03-25 07:50:36

回答

7

它說,

的小程序不允許訪問「存在」通過IWSA的Javascan網站 政策 文件/根/ TMS服務器/ src目錄/主/資源狀態屬性。

您正在使用通過趨勢科技網關安全套件/設備代理從互聯網下載的jar。這個代理會在你從互聯網上下載的所有jar中掛鉤,這樣當他們試圖訪問文件時,你會看到彈出的「Applet alert」。

解決方案:

你有兩個選擇:

  1. 您可以下載存檔的jar文件。所以他們不會受到 代理的影響。
  2. 您可以配置代理不要修改下載jar文件。

還有另一個用戶得到了這個問題,並解決了,我得到了這個答案從here

+0

謝謝,問題確實是由趨勢科技防火牆引起的。 – navgeet 2013-03-25 08:47:45

0

你必須清理從趨勢科技垃圾類路徑罐子,我用這個螞蟻的腳本:

<?xml version="1.0"?> 
<project name="cleanTrendMicro" default="doit" basedir="."> 
    <taskdef resource="net/sf/antcontrib/antcontrib.properties"> 
     <classpath> 
     <pathelement location="/ant-contrib-1.0b3.jar"/> 
     </classpath> 
    </taskdef> 

    <!-- global properties --> 
    <property environment="env" /> 
    <property name="home.dir" location="." /> 
    <property name="tmp.dir" value="${home.dir}/tmp" /> 

    <path id="plugin.path" path="${home.dir}" > 
     <fileset dir="plugins" casesensitive="yes"> 
      <include name="**/*.jar"/> 
     </fileset> 
    </path> 

    <target name="doit"> 
     <echo message="Created by DanTechologies"/> 
     <foreach target="retar" param="theFile"> 
      <path refid="plugin.path" /> 
     </foreach> 
    </target> 

    <target name="retar"> 
     <if> 
      <available file="${theFile}" type="dir" /> 
      <then> 
       <echo message="Directory ${theFile}" /> 
      </then> 
      <else> 
       <echo message="Procesing file: ${theFile}"/> 
       <mkdir dir="${tmp.dir}" /> 
       <unzip src="${theFile}" dest="${tmp.dir}"/> 
       <jar destfile="${theFile}" basedir="${tmp.dir}" excludes="**/com/trend/**" /> 
       <delete quiet="true" dir="${tmp.dir}" /> 
      </else> 
     </if> 
    </target> 
</project>