5

でこのエラーが発生しpom.xml、プロジェクトを実行するためにEclipseを取得するために何を変更する必要があるのか​​ 理解できません(実行-> mavenビルド)

<build>
    <plugins>
        <plugin>
            <artifactId>maven-jar-plugin</artifactId>
            <configuration>
                <archive>
                    <manifest>
                        <addClasspath>true</addClasspath>
                        <classpathPrefix>lib/</classpathPrefix>
                            <mainClass>com.cc.adapter.mock.InsertAccountStarter</mainClass>
                    </manifest>
                </archive>
            </configuration>
        </plugin>
        <plugin>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
       <!-- Line below is the error -->
                <execution>
                    <phase>install</phase>
                    <goals>
                        <goal>copy-dependencies</goal>
                    </goals>
                    <configuration>
                        <outputDirectory>${project.build.directory}/lib</outputDirectory>
                    </configuration>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-codegen-plugin</artifactId>
            <version>${cxf.version}</version>
            <dependencies>
                <dependency>
                    <groupId>org.apache.cxf</groupId>
                    <artifactId>cxf-rt-bindings-soap</artifactId>
                    <version>${cxf.version}</version>
                </dependency>
            </dependencies>
            <executions>
                <execution>
                    <id>generate-sources</id>
                    <configuration>
                        <sourceRoot>src/main/generated</sourceRoot>

                        <wsdlOptions>
                            <wsdlOption>
                                <wsdl>src/main/wsdl/CrmService.wsdl</wsdl>
                                <autoNameResolution>true</autoNameResolution>
                                <extendedSoapHeaders>true</extendedSoapHeaders>
                            </wsdlOption>
                        </wsdlOptions>
                    </configuration>
                    <goals>
                        <goal>wsdl2java</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

Eclipse内からビルドしようとしたときのエラーは

[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-site, site, post-site, site-deploy, pre-clean, clean, post-clean. -> [Help 1]

私は本当に助けていただければ幸いです!

4

3 に答える 3

5

私はあなたと同じ問題を抱えています

m2eclipse プラグインを使用して Maven プロジェクトをコンパイルする場合は、

実行 -> Maven ビルド

次に、目標にコンパイルを入力します

于 2012-05-02T04:38:58.037 に答える
3

上記のエラー メッセージから、実行Run as -> Maven Buildする Mavengoalを指定せずに を試したようです。

特定のMaven目標を試す必要があります-Run as -> Maven installまたはRun as -> Maven test. または、 で目標を指定することもできますMaven Build configuration

警告についてcopy-dependencies is not supported by m2eは、m2e がこのプラグインをサポートしていないことを意味します。すべての Maven 機能が現在 m2e でサポートされているわけではありません。

于 2011-11-26T17:51:10.730 に答える