mvn clean site install在安装阶段后删除目标目录

时间:2018-03-23 15:12:09

标签: java maven eclipse-rcp tycho

我想使用mvn clean site install来构建我的eclipse产品并创建checkstyle报告。问题是,在安装阶段之后项目被清理,我找不到目标目录。 这是我的父母:

<project>
 <modelVersion>4.0.0</modelVersion>
 <groupId>com.syskit.root</groupId>
 <artifactId>com.syskit.root.configuration</artifactId>
 <version>1.0.0-SNAPSHOT</version>
 <packaging>pom</packaging>

 <properties>
  <tycho.version>0.22.0</tycho.version>
  <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  <mars-repo.url>http://download.eclipse.org/releases/oxygen</mars-repo.url>
 </properties>
 <!-- 
 <repositories>
  <repository>
   <id>mars</id>
   <url>${mars-repo.url}</url>
   <layout>p2</layout>
  </repository>

 </repositories> -->
<profiles>
  <profile>
    <id>java8-doclint-disabled</id>
    <activation>
      <jdk>[1.8,)</jdk>
    </activation>
    <properties>
      <javadoc.opts>-Xdoclint:none</javadoc.opts>
    </properties>
  </profile>
</profiles>
 <build>
 <pluginManagement> 
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugin</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>2.17</version>
          <executions>
            <execution>
                <phase>validate</phase>
                <goals>
                    <goal>checkstyle</goal>
                </goals>
                <configuration>
                     <consoleOutput>true</consoleOutput>
                </configuration>
            </execution>
         </executions>
        </plugin>
      </plugins>
      </pluginManagement> 
  <plugins>
   <plugin>
    <groupId>org.eclipse.tycho</groupId>
    <artifactId>tycho-maven-plugin</artifactId>
    <version>${tycho.version}</version>
    <extensions>true</extensions>
   </plugin>

   <plugin>
    <groupId>org.eclipse.tycho</groupId>
    <artifactId>target-platform-configuration</artifactId>
    <version>${tycho.version}</version>
    <configuration>
    <target> 

        <artifact>
            <groupId>com.syskit.root</groupId>
            <artifactId>com.syskit.root.target</artifactId>
            <version>1.0.0-SNAPSHOT</version>
            <relativePath>../com.syskit.root.target</relativePath>
        </artifact>
    </target>
    <!-- Änderung!!!! -->
    <dependency-resolution>

                    <extraRequirements>
                        <requirement>
                            <type>eclipse-plugin</type>
                            <id>org.eclipse.equinox.event</id>
                            <versionRange>0.0.0</versionRange>
                        </requirement>
                    </extraRequirements>
                </dependency-resolution>
                <!-- Änderung Ende!!!! -->
     <environments>
      <environment>
       <os>linux</os>
       <ws>gtk</ws>
       <arch>x86</arch>
      </environment>
      <environment>
       <os>linux</os>
       <ws>gtk</ws>
       <arch>x86_64</arch>
      </environment>
      <environment>
       <os>win32</os>
       <ws>win32</ws>
       <arch>x86</arch>
      </environment>
      <environment>
       <os>win32</os>
       <ws>win32</ws>
       <arch>x86_64</arch>
      </environment>
      <environment>
       <os>macosx</os>
       <ws>cocoa</ws>
       <arch>x86_64</arch>
      </environment>
     </environments>
    </configuration>
   </plugin>

  </plugins>
 </build>
 <!-- Checkstyle JAvadoch Plugin -->
 <reporting>
   <plugins>
        <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.0.0</version>

        <configuration>
            <failOnError>false</failOnError>
            <additionalOptions>${javadoc.opts}</additionalOptions>
        </configuration>
    </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>2.17</version>
        <reportSets>
            <reportSet>
              <reports>
                <report>checkstyle</report>
              </reports>
            </reportSet>
          </reportSets>
          <configuration>
            <configLocation>google_checks.xml</configLocation>
        </configuration>
      </plugin>

      <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-project-info-reports-plugin</artifactId>
            <version>2.9</version>
        </plugin>
    </plugins>
  </reporting>
  <!-- Checkstyle JAvadoch Plugin  END-->
</project>

这是产品模块的孩子:

<project>
 <modelVersion>4.0.0</modelVersion>
 <parent>
  <groupId>com.syskit.root</groupId>
  <artifactId>com.syskit.root.releng</artifactId>
  <version>1.0.0-SNAPSHOT</version>
  <relativePath>../</relativePath>
 </parent>

    <groupId>com.syskit.root</groupId>
 <artifactId>com.syskit.root.product</artifactId>
 <packaging>eclipse-repository</packaging>
 <version>1.0.0-SNAPSHOT</version>

 <build>
  <plugins>
   <plugin>
    <groupId>org.eclipse.tycho</groupId>
    <artifactId>tycho-p2-repository-plugin</artifactId>
    <version>${tycho.version}</version>
    <configuration>
     <includeAllDependencies>true</includeAllDependencies>
    </configuration>
   </plugin>
   <plugin>
    <groupId>org.eclipse.tycho</groupId>
    <artifactId>tycho-p2-director-plugin</artifactId>
    <version>${tycho.version}</version>
    <executions>
     <execution>
      <id>materialize-products</id>
      <goals>
       <goal>materialize-products</goal>
      </goals>
     </execution>
     <execution>
      <id>archive-products</id>
      <goals>
       <goal>archive-products</goal>
      </goals>
     </execution>
    </executions>
   </plugin>
  </plugins>
 </build>
</project>

如果我只使用mvn clean install一切正常但我没有得到任何报告,并且mvn site install目标目录也被清除了,因此我觉得它与网站有关插入。 java doc插件也存在一个问题,它为每个模块提供了以下错误:error no module descriptor,也许问题与此有关。
如果有人能帮助我,我将不胜感激。

谢谢

0 个答案:

没有答案