Azure / Azure-Spring-Apps

Azure Spring Cloud
MIT License
8 stars 5 forks source link

Error while Launch an Azure Spring Cloud app by using the Maven plug-in #4

Closed helayoty closed 1 year ago

helayoty commented 4 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

Pre-steps: I followed the steps here to login into az and configure my spring-cloud service

  1. Clone the code from ADO
  2. Add all maven dependencies as stated here
  3. install the cli extension az extension add -y --source https://azureclitemp.blob.core.windows.net/spring-cloud/spring_cloud-0.1.0-py2.py3-none-any.whl
  4. Perform mvn clean package -DskipTests
  5. Perform mvn com.microsoft.azure:azure-spring-cloud-maven-plugin:0.1.0-SNAPSHOT:config and follow steps by entering the app name and expose public access.
  6. Perform mvn com.microsoft.azure:azure-spring-cloud-maven-plugin:0.1.0-SNAPSHOT:deploy

The result:

  1. I got the following error:

[ERROR] Failed to execute goal com.microsoft.azure:azure-spring-cloud-maven-plugin:0.1.0-SNAPSHOT:deploy (default-cli) on project<my_project_name>: Target file does not exist or is not executable, please check the configuration. ->

  1. when I checked the portal, I found my app has been created with status disabled as well as the deployment has been created without any version. Please refer to screenshots

Expected behavior

  1. app should be deployed successfully
  2. if something happened, everything should be rollback.

Screenshots

image

image

Additional context

allxiao commented 1 year ago

It seems this issue was not tracked properly in the early days.

For the "Target file does not exist or is not executable, please check the configuration." please check if the JAR file is properly generated in the target folder, and confirm the /deployment/resources configuration for the azure-spring-apps-maven-plugin is properly configured:

<configuration>
    ...
    <deployment>
        ...
        <resources>
            <resource>
                <filtering/>
                <mergeId/>
                <targetPath/>
                <directory>${project.basedir}/target</directory>
                <includes>
                    <include>*.jar</include>
                </includes>
            </resource>
        </resources>
    </deployment>
</configuration>