0

目前,我正在使用 Smooks(1.5 版)。在我的最后一步中,我更改了项目中包的名称,并引发了以下错误:

无法在项目 JavaBindings 上执行目标 org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli):命令执行失败。进程退出并出现错误:1(退出值:1)-> [帮助 1]

有我的 POM.xml 文件:

<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <name>SmooksConversion</name>
    <groupId>org.smooksservices</groupId>
    <artifactId>JavaBindings</artifactId>
    <version>1.0</version>

    <properties>
        <smooks.version>1.4</smooks.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.milyn</groupId>
            <artifactId>milyn-smooks-javabean</artifactId>
            <version>${smooks.version}</version>
        </dependency>
        <dependency>
            <groupId>org.milyn</groupId>
            <artifactId>milyn-smooks-csv</artifactId>
            <version>${smooks.version}</version>
        </dependency>
        <dependency>
            <groupId>org.milyn</groupId>
            <artifactId>milyn-smooks-json</artifactId>
            <version>${smooks.version}</version>
        </dependency>
        <dependency>
            <groupId>org.milyn</groupId>
            <artifactId>milyn-smooks-edi</artifactId>
            <version>${smooks.version}</version>
        </dependency>
        <dependency>
            <groupId>org.milyn</groupId>
            <artifactId>milyn-smooks-templating</artifactId>
            <version>${smooks.version}</version>
        </dependency>
        <dependency>
            <groupId>org.milyn</groupId>
            <artifactId>milyn-smooks-scripting</artifactId>
            <version>${smooks.version}</version>
        </dependency>
        <dependency>
            <groupId>org.milyn</groupId>
            <artifactId>milyn-smooks-validation</artifactId>
            <version>${smooks.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <directory>src/main/java</directory>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
        </resources>
    </build>

    <repositories>
        <repository>
            <id>codehaus.m2.snapshots</id>
            <url>http://snapshots.repository.codehaus.org</url>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
    </repositories>

</project>

谢谢!

4

1 回答 1

3

将此插件添加到您的 pom 中:

<plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>1.2.1</version>
            <executions>
                <execution>
                    <goals>
                        <goal>java</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <mainClass>...</mainClass>
            </configuration>
        </plugin>
于 2014-02-12T09:09:00.383 回答