Maven自动增加编辑过的Stanford NLP文件的大小

时间:2015-11-21 05:13:21

标签: java maven pom.xml stanford-nlp

我正在使用stanford的核心nlp模型jar文件:stanford-corenlp-3.5.2-models.jar

我编辑并剪切了这个文件的很多内容,使其形成340 MB,其仅约7 MB。当我用maven构建这个jar文件时,它将它添加到.m2 / repository /中并创建一个新的文件夹edu /并将其中的所有内容转储。当我查看jar文件的大小时,它显示我7 MB。

然而,当我将此文件上传到我的服务器时,它出于某种原因显示他的文件是329 MB?我尝试过很多方法来解决这个问题但却做不到。 maven如何使这个文件从7 MB到329 MB,即使它告诉我它是7 MB?

这是stanford-corenlp-3.5.2中所有jar文件的pom.xml

<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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>edu.stanford.nlp</groupId>
  <artifactId>stanford-corenlp</artifactId>
  <version>3.5.2</version>
  <packaging>jar</packaging>
  <name>Stanford CoreNLP</name>
  <description>Stanford CoreNLP provides a set of natural language analysis tools which can take raw English language text input and give the base forms of words, their parts of speech, whether they are names of companies, people, etc., normalize dates, times, and numeric quantities, mark up the structure of sentences in terms of phrases and word dependencies, and indicate which noun phrases refer to the same entities. It provides the foundational building blocks for higher level text understanding applications.</description>
  <url>http://nlp.stanford.edu/software/corenlp.shtml</url>
  <licenses>
    <license>
      <name>GNU General Public License Version 3</name>
      <url>http://www.gnu.org/licenses/gpl-3.0.txt</url>
    </license>
  </licenses>
  <scm>
    <url>http://nlp.stanford.edu/software/stanford-corenlp-2015-04-21.zip</url>
    <connection>http://nlp.stanford.edu/software/stanford-corenlp-2015-04-21.zip</connection>
  </scm>
  <developers>
    <developer>
      <id>christopher.manning</id>
      <name>Christopher Manning</name>
      <email>manning@stanford.edu</email>
    </developer>
    <developer>
      <id>john.bauer</id>
      <name>John Bauer</name>
      <email>horatio@gmail.com</email>
    </developer>
  </developers>
  <properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <encoding>UTF-8</encoding>
  </properties>
  <dependencies>
    <dependency>
      <groupId>com.io7m.xom</groupId>
      <artifactId>xom</artifactId>
      <version>1.2.10</version>
    </dependency>
    <dependency>
      <groupId>joda-time</groupId>
      <artifactId>joda-time</artifactId>
      <version>2.1</version>
    </dependency>
    <dependency>
      <groupId>de.jollyday</groupId>
      <artifactId>jollyday</artifactId>
      <version>0.4.7</version>
    </dependency>
    <dependency>
      <groupId>com.googlecode.efficient-java-matrix-library</groupId>
      <artifactId>ejml</artifactId>
      <version>0.23</version>
    </dependency>
    <dependency>
      <groupId>javax.json</groupId>
      <artifactId>javax.json-api</artifactId>
      <version>1.0</version>
    </dependency>
  </dependencies>
  <build>
    <sourceDirectory>src</sourceDirectory>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.7</version>
        <executions>
          <execution>
            <id>attach-models</id>
            <phase>package</phase>
            <goals>
              <goal>attach-artifact</goal>
            </goals>
            <configuration>
              <artifacts>
                <artifact>
                  <file>${project.basedir}/stanford-corenlp-3.5.2-models.jar</file>
                  <type>jar</type>
                  <classifier>models</classifier>
                </artifact>
              </artifacts>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>

顺便说一句,我的jar文件也称为stanford-corenlp-3.5.2-models.jar。 另外,我使用的是狂野的服务器

感谢您的帮助!

0 个答案:

没有答案