hs-web/hsweb-expands

github下载代码和maven下载代码运行效果不一致的问题

Closed this issue · 4 comments

同样是调用ExcelIO.writeTemplate(inputStream, outputStream, var);
debug调试到org.hswebframework.expands.script.engine.common.CommonScriptEngine的init方法的ScriptEngine engine = manager.getEngineByName(getScriptName());时,使用git clone的代码是能获取对象的,但是从maven下载的依赖获取的engine == null,不知道这是什么原因呢?这个导致NullPointException了

pom.xml是按照readme.md里配置的

    <!--pom.xml-->
     <dependency>
        <groupId>org.hswebframework</groupId>
        <artifactId>hsweb-expands-office</artifactId>
        <version>3.0.0-SNAPSHOT</version>
    </dependency>
    
      <repositories>
        <repository>
            <id>hsweb-nexus</id>
            <name>Nexus Release Repository</name>
            <url>http://nexus.hsweb.me/content/groups/public/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
     </repositories>

十分感谢!修改hsweb-expands-office的版本号为3.0.3-SNAPSHOT,手动添加groovy依赖后能正常运行了。

<dependency>
    <groupId>org.codehaus.groovy</groupId>
    <artifactId>groovy-all</artifactId>
    <version>2.1.3</version>
</dependency>

就是不知道为什么hsweb-expands-office的pom.xml里要将groovy-all的optional设置为true呢,有什么讲究吗?