当前位置: 首页 > 知识库问答 >
问题:

Smoks-无法执行目标org.codehaus.mojo:exec-maven-plugin:1.2.1:exec

郁和通
2023-03-14

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

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

<?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>

共有1个答案

西门振
2023-03-14

将此插件添加到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>
 类似资料: