Bamboo fails invoking “mvn install:install” - The packaging for this project did not assign a file to the build artifact

依然范特西╮ 提交于 2020-05-26 09:53:06

问题


I am looking at the Legacy code developed using Java 1.6 and uses SOA architecture uses SOAP Services. This code I'm trying to deploy on WAS 7.1 (WebShere Application Server) and giving me below error.

We're trying to run this code using Bamboo plans.

build   15-Apr-2020 09:51:01   [INFO] ------------------------------------------------------------------------
build   15-Apr-2020 09:51:01   [INFO] BUILD FAILURE
build   15-Apr-2020 09:51:01   [INFO] ------------------------------------------------------------------------
build   15-Apr-2020 09:51:01   [INFO] Total time: 08:24 min
build   15-Apr-2020 09:51:01   [INFO] Finished at: 2020-04-15T09:51:01-05:00
build   15-Apr-2020 09:51:01   [INFO] Final Memory: 14M/298M
build   15-Apr-2020 09:51:01   [INFO] ------------------------------------------------------------------------
build   15-Apr-2020 09:51:01   [ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-install) on project organization_ws-mdm_ear: The packaging for this project did not assign a file to the build artifact -> [Help 1]
build   15-Apr-2020 09:51:01        org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-install) on project organization_ws-mdm_ear: The packaging for this project did not assign a file to the build artifact
build   15-Apr-2020 09:51:01           at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
build   15-Apr-2020 09:51:01           at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
build   15-Apr-2020 09:51:01           at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
build   15-Apr-2020 09:51:01           at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
build   15-Apr-2020 09:51:01           at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
build   15-Apr-2020 09:51:01           at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
build   15-Apr-2020 09:51:01           at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
build   15-Apr-2020 09:51:01           at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
build   15-Apr-2020 09:51:01           at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
build   15-Apr-2020 09:51:01           at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
build   15-Apr-2020 09:51:01           at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
build   15-Apr-2020 09:51:01           at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
build   15-Apr-2020 09:51:01           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
build   15-Apr-2020 09:51:01           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
build   15-Apr-2020 09:51:01           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
build   15-Apr-2020 09:51:01           at java.lang.reflect.Method.invoke(Method.java:498)
build   15-Apr-2020 09:51:01           at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
build   15-Apr-2020 09:51:01           at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
build   15-Apr-2020 09:51:01           at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
build   15-Apr-2020 09:51:01           at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
build   15-Apr-2020 09:51:01   Caused by: org.apache.maven.plugin.MojoExecutionException: The packaging for this project did not assign a file to the build artifact
build   15-Apr-2020 09:51:01           at org.apache.maven.plugin.install.InstallMojo.execute(InstallMojo.java:136)
build   15-Apr-2020 09:51:01           at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
build   15-Apr-2020 09:51:01           at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
build   15-Apr-2020 09:51:01           ... 19 more
build   15-Apr-2020 09:51:01   [ERROR] 
build   15-Apr-2020 09:51:01   [ERROR] 
build   15-Apr-2020 09:51:01   [ERROR] For more information about the errors and possible solutions, please read the following articles:
build   15-Apr-2020 09:51:01   [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
simple  15-Apr-2020 09:51:01   Failing task since return code of [D:\BuildTools\apache-maven-3.2.3\bin\mvn.bat --batch-mode -Djava.io.tmpdir=C:\Users\users\AppData\Local\Temp\ABCD-ORGDXY -P bamboo-deploy-dev ASC-was7:wsDefaultBindings -X -P bamboo-deploy-dev ASC-was7:installApp -X -P bamboo-deploy-dev ASC-was7:wsResync -X -P bamboo-deploy-dev ASC-was7:wsStartApp -X deploy -s C:\Users\pvcs\.m2\settings-nz.xml] was 1 while expected 0

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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <artifactId>example_ws-cdm</artifactId>
        <groupId>com.example</groupId>
        <version>0.0.1-SNAPSHOT</version>
    </parent>

    <artifactId>example_ws-cdm_web</artifactId>
    <packaging>war</packaging>

    <name>example_ws-cdm_web</name>

    <properties>
        <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     </properties>
    <dependencies>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
            <version>1.8.2</version>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjtools</artifactId>
            <version>1.8.2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <version>2.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>2.0</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>
        <dependency>
            <groupId>com.mastercard.common</groupId>
            <artifactId>mcscjal</artifactId>
            <version>2.0</version>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
            <version>2.1.13</version>
        </dependency>
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <version>2.2.2</version>
        </dependency>
        <dependency>
            <groupId>javax.activation</groupId>
            <artifactId>activation</artifactId>
            <version>1.1</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
            <version>3.2.4.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>3.2.4.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.ws</groupId>
            <artifactId>spring-ws-core</artifactId>
            <version>2.1.4.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>3.2.4.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.0.1</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
        </dependency>
        <dependency>
            <groupId>wsdl4j</groupId>
            <artifactId>wsdl4j</artifactId>
            <version>1.6.3</version>
        </dependency>
        <dependency>
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
            <version>2.9.1</version>
        </dependency>
        <dependency>
            <groupId>xml-apis</groupId>
            <artifactId>xml-apis</artifactId>
            <version>2.0.2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ws.xmlschema</groupId>
            <artifactId>xmlschema-core</artifactId>
            <version>2.0.3</version>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>1.8.4</version>
        </dependency>
        <dependency>
            <groupId>com.mastercard.p2p.common</groupId>
            <artifactId>ppd-test</artifactId>
            <version>2.6</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.2.4</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.1</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.ws</groupId>
            <artifactId>spring-ws-security</artifactId>
            <version>2.2.0.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ws.security</groupId>
            <artifactId>wss4j</artifactId>
            <version>1.6.17</version>
        </dependency>
    </dependencies>



    <build>
        <sourceDirectory>src/main/java</sourceDirectory>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <compilerArguments>
                        <endorseddirs>${endorsed.dir}</endorseddirs>
                    </compilerArguments>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.1.1</version>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.1</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${endorsed.dir}</outputDirectory>
                            <silent>true</silent>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>javax</groupId>
                                    <artifactId>javaee-endorsed-api</artifactId>
                                    <version>6.0</version>
                                    <type>jar</type>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>


            <!-- AspectJ Compiler -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <version>1.7</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <sources>
                        <source>
                            <basedir>${project.basedir}/src/main/java</basedir>
                            <includes>
                                <include>com/example/employee/ws/*Impl.java</include>
                                <include>com/example/employee/dao/JdbccdmOrganizationDAO.java</include>
                                <include>com/example/employee/metrics/MetricsAspect.java</include>
                            </includes>
                        </source>
                    </sources>
                    <source>1.6</source>
                    <target>1.6</target>
                    <encoding>UTF-8</encoding>
                    <complianceLevel>1.6</complianceLevel>
                    <verbose>true</verbose>
                    <showWeaveInfo>true</showWeaveInfo>
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-dependency-plugin</artifactId>
                                        <versionRange>[2.1,)</versionRange>
                                        <goals>
                                            <goal>copy</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore></ignore>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

</project>

When I execute project using mvn install:install locally it gives me error. Now I am not too sure where to see this configuration in Bamboo.

来源:https://stackoverflow.com/questions/61243208/bamboo-fails-invoking-mvn-installinstall-the-packaging-for-this-project-did

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!