简体   繁体   English

maven-deploy-plugin没有执行它的执行

[英]maven-deploy-plugin not executing its execution

I need to deploy custom jar's from my project itself I overrides maven-deploy-plugin with two more execution with its default execution. 我需要从我的项目本身部署自定义jar我使用默认执行覆盖maven-deploy-plugin两次执行。 below are my pom.xml with distributionManagement and maven-deploy-plugin which I use for my deployment. 下面是我的pom.xml,其中包含我用于部署的distributionManagement和maven-deploy-plugin。

<groupId>mycompany</groupId>
<artifactId>myproject</artifactId>
<packaging>jar</packaging>

<distributionManagement>
    <repository>
        <id>temp</id>
        <name>Release Repository</name>
        <url>http://localhost:8000/nexus/content/repositories/temp/</url>
    </repository>
</distributionManagement>

<dependencies>
    <dependency>
        some dependency
    </dependency>

    <dependency>
        some dependency
    </dependency>

    <dependency>
        some dependency
    </dependency>
</dependencies>
<build>
    <plugins>


        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-deploy-plugin</artifactId>
            <executions>
                <execution>
                    <id>default-deploy</id>
                    <phase>none</phase>
                </execution>

                <execution>
                    <id>myjar-one</id>
                    <phase>deploy</phase>
                    <configuration>
                        <repositoryId>temp</repositoryId>
                        <url>http://localhost:8000/nexus/content/repositories/temp/</url>
                        <packaging>jar</packaging>
                        <artifactId>myjar-one</artifactId>
                        <groupId>${project.groupId}</groupId>
                        <version>${project.version}</version>
                        <sources>${project.build.directory}/build/lib/myjar-one.jar</sources>
                    </configuration>
                </execution>


                <execution>
                    <id>myjar-two</id>
                    <phase>deploy</phase>
                    <configuration>
                        <repositoryId>temp</repositoryId>
                        <url>http://localhost:8000/nexus/content/repositories/temp/</url>
                        <packaging>jar</packaging>
                        <artifactId>myjar-two</artifactId>
                        <groupId>${project.groupId}</groupId>
                        <version>${project.version}</version>
                        <sources>${project.build.directory}/build/lib/myjar-two.jar</sources>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>


</build>

Guys I figure out the issue, there are following thing I need to fix. 伙计们我找出了问题,我需要解决以下问题。

  1. Need to add goal. 需要添加目标。
  2. Need to use file tag instead of source tag. 需要使用文件标签而不是源标签。 So final maven-deploy-plugin looks like. 所以最终的maven-deploy-plugin看起来像。

     <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-deploy-plugin</artifactId> <executions> <execution> <id>default-deploy</id> <phase>none</phase> </execution> <execution> <id>myjar-one</id> <phase>deploy</phase> <goals> <goal>deploy-file</goal> </goals> <configuration> <repositoryId>temp</repositoryId> <url>http://localhost:8000/nexus/content/repositories/temp/</url> <packaging>jar</packaging> <artifactId>myjar-one</artifactId> <groupId>${project.groupId}</groupId> <version>${project.version}</version> <file>${project.build.directory}/build/lib/myjar-one.jar</file> </configuration> </execution> <execution> <id>myjar-two</id> <phase>deploy</phase> <goals> <goal>deploy-file</goal> </goals> <configuration> <repositoryId>temp</repositoryId> <url>http://localhost:8000/nexus/content/repositories/temp/</url> <packaging>jar</packaging> <artifactId>myjar-two</artifactId> <groupId>${project.groupId}</groupId> <version>${project.version}</version> <file>${project.build.directory}/build/lib/myjar-two.jar</file> </configuration> </execution> </executions> </plugin> 

    after fixing this issue, my both custom jar's are deployed at my maven repository. 修复此问题后,我的两个自定义jar都部署在我的maven存储库中。 Thanks for help 感谢帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Maven部署插件存储库 - maven-deploy-plugin repository maven-deploy-plugin忽略版本号? - maven-deploy-plugin Ignores Version Number? 目标org.apache.maven.plugins的执行default-deploy:maven-deploy-plugin部署失败。 空指针异常 - Execution default-deploy of goal org.apache.maven.plugins:maven-deploy-plugin deploy failed. NullPointerException maven-deploy-plugin部署文件目标坚持要为先前的部署文件执行部署javadoc文件 - maven-deploy-plugin deploy-file goal insists on deploying javadoc file for previous deploy-file execution 用 maven-deploy-plugin 替换 nexus staging maven 插件 - replace nexus staging maven plugin with maven-deploy-plugin 如何加速 maven-deploy-plugin 将工件部署到 Artifactroy? - How to speed up maven-deploy-plugin to deploy artifacts to the Artifactroy? maven-deploy-plugin无法部署工件:ReasonPhrase:。 -无理由 - maven-deploy-plugin Failed to deploy artifacts: ReasonPhrase: . - No Reasonphrase 使用maven-deploy-plugin部署Eclipse产品 - Using maven-deploy-plugin to deploy Eclipse product Maven maven-deploy-plugin 总是上传两次 - Maven maven-deploy-plugin always upload twice 我可以修改 Maven 部署阶段以用我自己的插件替换 maven-deploy-plugin 吗? - Can I modify the Maven deploy phase to replace the maven-deploy-plugin with my own plugin?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM