天天看點

maven 記錄

clean compile

//推薦使用UTF-8編譯

  <build>

      <plugins>

          <plugin>

              <groupId>org.apache.maven.plugins</groupId>

              <artifactId>maven-compiler-plugin</artifactId>

              <version>3.1</version>

            <configuration>

                <encoding>UTF-8</encoding>

            </configuration>

          </plugin>

clean install

clean package

//如果需要把依賴的lib都copy到一個位置

<!-- 把依賴的jar包拷到lib目錄下 -->

<plugin>

    <groupId>org.apache.maven.plugins</groupId>

    <artifactId>maven-dependency-plugin</artifactId>

    <executions>

        <execution>

            <id>copy-dependencies</id>

            <phase>package</phase>

            <goals>

                <goal>copy-dependencies</goal>

            </goals>

                <outputDirectory>${project.build.directory}/lib</outputDirectory>

                <overWriteReleases>false</overWriteReleases>

                <overWriteSnapshots>false</overWriteSnapshots>

                <overWriteIfNewer>true</overWriteIfNewer>

        </execution>

    </executions>

</plugin>

如果修改一個項目(eframe)中的代碼,修改完後需要 運作 clean install (如果有搭建私有倉庫 運作 clean deploy)