Skip to content

Unable to deploy from devcontainer #2427

@vermegi

Description

@vermegi

Plugin name and version

I ran through the steps from https://learn.microsoft.com/en-us/azure/app-service/quickstart-java?pivots=java-maven-tomcat and tried with both mvn com.microsoft.azure:azure-webapp-maven-plugin:2.12.0:config and mvn com.microsoft.azure:azure-webapp-maven-plugin:2.13.0:config

Plugin configuration in your pom.xml

        <plugin>
            <groupId>com.microsoft.azure</groupId>
            <artifactId>azure-webapp-maven-plugin</artifactId>
            <version>2.13.0</version>
            <configuration>
                <schemaVersion>v2</schemaVersion>
                <resourceGroup>msal4j-servlet-auth-1707140060326-rg</resourceGroup>
                <appName>msal4j-servlet-auth-1707140060326</appName>
                <pricingTier>P1v2</pricingTier>
                <region>swedencentral</region>
                <runtime>
                    <os>Linux</os>
                    <javaVersion>Java 17</javaVersion>
                    <webContainer>Tomcat 10.0</webContainer>
                </runtime>
                <deployment>
                    <resources>
                        <resource>
                            <directory>${project.basedir}/target</directory>
                            <includes>
                                <include>*.war</include>
                            </includes>
                        </resource>
                    </resources>
                </deployment>
            </configuration>
        </plugin>

Expected behavior

Deploy to app service

Actual behavior

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.491 s
[INFO] Finished at: 2024-02-05T13:45:16Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.microsoft.azure:azure-webapp-maven-plugin:2.13.0:deploy (default-cli) on project msal4j-servlet-auth: login with (AUTO): UnsatisfiedLinkError: /usr/lib/jvm/msopenjdk-current/lib/libawt_xawt.so: libXext.so.6: cannot open shared object file: No such file or directory -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Steps to reproduce the problem

I executed exactly the same steps in a cloud shell and deploy was successful.

So somewhere/somehow this is failing when executed from a devcontainer. I also tried different Java versions/base container image versions, all failed on the same error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions