java trying to deploy maven + azure JAXBException

maven-deploy plugin
maven repository
maven deploy to artifactory
maven-deploy to nexus
maven deploy-file multiple files
maven deploy:deploy
maven deploy snapshot
maven deploy phase

I am trying to do as it's written here:

https://spring.io/guides/gs/spring-boot-for-azure/

But everytime i deploy, i get this error:

Failed to execute goal com.microsoft.azure:azure-webapp-maven-plugin:0.1.5:deploy (default-cli) on project gs-spring-boot: Execution default-cli of goal com.microsoft.azure:azure-webapp-maven-plugin:0.1.5:deploy failed: A required class was missing while executing com.microsoft.azure:azure-webapp-maven-plugin:0.1.5:deploy: javax/xml/bind/JAXBException

I tried all these things:

How to resolve java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException in Java 9

And still doesn't work.


I followed the tutorial and deployed the sample spring-boot app to azure successfully. Please refer to my working steps.

1.create the spring boot app from the site.

2.create the service principal and configure the setting.xml in maven.(Just follow the above tutoral)

3.Add below plugin configuration in your pom.xml then run the command: mvnw azure-webapp:deploy.

<plugin>
    <groupId>com.microsoft.azure</groupId>
    <artifactId>azure-webapp-maven-plugin</artifactId>

    <configuration>

        <!-- Web App information -->
        <resourceGroup><your rg name></resourceGroup>
        <appName><app name></appName>
        <appServicePlanName><your service plan></appServicePlanName>

        <!-- Java Runtime Stack for Web App on Linux-->
        <!--<linuxRuntime>tomcat 8.5-jre8</linuxRuntime>-->
        <javaVersion>1.8</javaVersion>
        <javaWebContainer>tomcat 8.5</javaWebContainer>
    </configuration>
</plugin>

4.Navigate to the site:https://.azurewebsites.net/greeting

Apache Maven Deploy Plugin, You can also use Maven to test your app locally and deploy it to production App Engine. Setting up Maven. Configuring Java. If you don't have Java, download,  Getting Started. Before we need can deploy our package to lambda, we first need to make sure that we have maven installed, and that we have a Java project that can interface with AWS Lambda.


pom.xml:

<plugin>
            <groupId>com.microsoft.azure</groupId>
            <artifactId>azure-webapp-maven-plugin</artifactId>
            <version>0.1.5</version>
            <configuration>
                <authentication>
                    <serverId>azure-auth</serverId>
                </authentication>
                <resourceGroup>maven-plugin</resourceGroup>
                <appName>maven-web-app-${maven.build.timestamp}</appName>
                <region>westus</region>
                <javaVersion>11</javaVersion>
                <deploymentType>ftp</deploymentType>
                <stopAppDuringDeployment>true</stopAppDuringDeployment>
                <resources>
                    <resource>
                        <directory>${project.basedir}/target</directory>
                        <targetPath>/</targetPath>
                        <includes>
                            <include>*.jar</include>
                        </includes>
                    </resource>
                    <resource>
                        <directory>${project.basedir}</directory>
                        <targetPath>/</targetPath>
                        <includes>
                            <include>web.config</include>
                        </includes>
                    </resource>
                </resources>
            </configuration>
        </plugin>

Getting Started, Apache Maven is a build automation tool for Java, which builds WAR files for deployment into App Engine. For faster deployments, use the following Maven tools  Sets up the Java JDK, and also configures the Maven settings.xml file to add authentication for the ossrh repository using the MAVEN_USERNAME and MAVEN_PASSWORD environment variables. Runs the mvn -B deploy command to publish to the ossrh repository.


I got the same error message and I resolved the issue, please ensure that you are using Java 8 for your JAVA_HOME

For my case, the root cause of this that azure-webapp-maven-plugin is using java 1.8 but it cannot find it since I uninstalled it. I installed java 11.

Check out the below link: https://github.com/Microsoft/azure-maven-plugins/issues/162

Hope it helps.

Using Apache Maven and the App Engine Plugin (App Engine SDK , validate; compile; test; package; deploy. In the same way as a deployment pipeline (pp  Building Java Projects with Maven. Now that you have a project that is ready to be built with Maven, the next step is to install Maven. To try out the build


Using Apache Maven and the App Engine Plugin, During deployment, it tells Maven to deploy the WAR file to Tomcat server via mvn tomcat7:deploy mvn tomcat7:undeploy mvn tomcat7:redeploy Founder of Mkyong.com, love Java and open source stuff. When i am trying to deploy the project using “mvn tomcat:deploy” I am getting the error below. Click on new tab if path is not set, then set the path of maven. If it is set, edit the path and append the path of maven. Here, we have installed JDK and its path is set by default, so we are going to append the path of maven. The path of maven should be %maven home%/bin.


Building Java Applications With Maven, Use this task to build your Java code. Maven # Build, test, and deploy with Apache Maven - task: Maven@3 inputs: #mavenPomFile:  Java is the most fundamental of all the supported project types. The generator can create a Maven deployment from any self-contained executable JAR file, creating a rudimentary DC that specifies a single replica (pod) with the rolling update strategy. The DC:


How to deploy Maven based war file to Tomcat, 10.2.4 Deploying Your Java EE Project to the WebLogic Server Using Maven. To deploy the deployment archive using Maven, use the following command: mvn pre-integration-test This executes the deploy goal in the WebLogic Maven plug-in. This goal supports all standard types of deployment archives.