Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Maven 发布插件错误-此目录中没有POM_Maven_Release - Fatal编程技术网

Maven 发布插件错误-此目录中没有POM

Maven 发布插件错误-此目录中没有POM,maven,release,Maven,Release,我正在尝试使用maven发布插件,但我有一个错误,阻止我使用它 我的文件夹结构: +root +parent pom.xml +projectA pom.xml +projectB pom.xml pom.xml 根/父/pom.xml <project ...> <groupId>org.acme</groupId> <artifactId>pare

我正在尝试使用maven发布插件,但我有一个错误,阻止我使用它

我的文件夹结构:

+root
    +parent
        pom.xml
    +projectA
        pom.xml
    +projectB
        pom.xml
    pom.xml
根/父/pom.xml

<project ...>
    <groupId>org.acme</groupId>
    <artifactId>parent</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>pom</packaging>
    <name>throttling</name>
    <url>http://maven.apache.org</url>

    ...

    <scm>
        <connection>scm:hg:https://code.google.com/***</connection>
    </scm>

    <distributionManagement>
        <repository>
            <id>deployment</id>
            ...
        </repository>
        <snapshotRepository>
            <id>deployment</id>
            ...
        </snapshotRepository>
    </distributionManagement>
</project>
节流\parent\target中的文件夹结构

+throttling\parent\target
    +checkout
        +throttling
            +parent
            +projectA
            +projectB
谢谢,
V.

我最终可以解决这个问题,父pom的路径必须在父pom XML中定义

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <version>2.4.2</version>
            <executions>
                <execution>
                    <id>default</id>
                    <goals>
                        <goal>perform</goal>
                    </goals>
                    <configuration>
                        <pomFileName>parent/pom.xml</pomFileName>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

org.apache.maven.plugins
maven发布插件
2.4.2
违约
表演
parent/pom.xml

您是否已运行mvn release:在根文件夹中执行,对吗?嗨,emelendez,我假设首先必须将父项目发布为非快照版本,然后才能发布其余项目。还是我错了?谢谢,V。我需要知道哪个pom.xml(根或父)有xml中的模块部分。你能确认一下吗?嗨,埃门德斯,再次感谢你!模块部分位于root/pom.xml中。V.感谢您提供的信息,首先您需要删除-快照,然后运行mvn release:Performin root Projects此功能非常有效。。。但是为什么呢?我的pom文件名与此配置中的文件名不匹配。经过数小时的尝试解决(使用非标准pom位置/名称),这是唯一有效的方法(使用如上所示的配置)Hi-Noremac,实际上我无法回答,而且我对为什么必须设置父pom的路径感到奇怪。我也想知道答案是什么。另一个问题,你是如何得到这个特定配置的?你在某个网站上找到了它吗?幸运的是google.com非常友好并帮助了我:)事实上我不知道我在哪里找到了这些信息,但我真的很高兴。。。
[INFO] Checking out the project to perform the release ...
[INFO] Removing D:\work\throttling\code_google\***\throttling\parent\target\checkout
[INFO] EXECUTING: cmd.exe /X /C "hg clone -r release_parent-1.1 https://***:***@code.google.com/*** D:\work\throttling\code_google\***\throttling\parent\target\checkout"
[INFO] EXECUTING: cmd.exe /X /C "hg locate"
[INFO] Executing goals 'deploy'...
[WARNING] Maven will be executed in interactive mode, but no input stream has been configured for this MavenInvoker instance.
[INFO] [INFO] Scanning for projects...
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] BUILD FAILURE
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [ERROR] The goal you specified requires a project to execute but there is no POM in this directory (D:\work\throttling\code_google\***\throttling\parent\target\checkout). Please verify you invoked Maven from the correct directory. -> [Help 1]
+throttling\parent\target
    +checkout
        +throttling
            +parent
            +projectA
            +projectB
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <version>2.4.2</version>
            <executions>
                <execution>
                    <id>default</id>
                    <goals>
                        <goal>perform</goal>
                    </goals>
                    <configuration>
                        <pomFileName>parent/pom.xml</pomFileName>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>