{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/azure-maven-plugins/issues/92","repository_url":"https://api.github.com/repos/Microsoft/azure-maven-plugins","labels_url":"https://api.github.com/repos/Microsoft/azure-maven-plugins/issues/92/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/azure-maven-plugins/issues/92/comments","events_url":"https://api.github.com/repos/Microsoft/azure-maven-plugins/issues/92/events","html_url":"https://github.com/Microsoft/azure-maven-plugins/issues/92","id":301604788,"number":92,"title":"Azure Functions Maven Plugin requires CLI authentication every time a new console session is open","user":{"login":"damadei","id":7613919,"avatar_url":"https://avatars0.githubusercontent.com/u/7613919?v=4","gravatar_id":"","url":"https://api.github.com/users/damadei","html_url":"https://github.com/damadei","followers_url":"https://api.github.com/users/damadei/followers","following_url":"https://api.github.com/users/damadei/following{/other_user}","gists_url":"https://api.github.com/users/damadei/gists{/gist_id}","starred_url":"https://api.github.com/users/damadei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damadei/subscriptions","organizations_url":"https://api.github.com/users/damadei/orgs","repos_url":"https://api.github.com/users/damadei/repos","events_url":"https://api.github.com/users/damadei/events{/privacy}","received_events_url":"https://api.github.com/users/damadei/received_events","type":"User","site_admin":false},"labels":[{"id":799988511,"url":"https://api.github.com/repos/Microsoft/azure-maven-plugins/labels/azure-functions","name":"azure-functions","color":"2a7ce0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-01T23:57:02Z","updated_at":"2018-03-22T08:55:27Z","closed_at":null,"author_association":"NONE","body":"Every time a console session is started, even though the CLI V2 (az) is authenticated, I get the following error:\r\n\r\nExecution default-cli of goal com.microsoft.azure:azure-functions-maven-plugin:0.1.10:deploy failed: An API incompatibility was encountered while executing com.microsoft.azure:azure-functions-maven-plugin:0.1.10:deploy: java.lang.NoSuchMethodError: com.microsoft.aad.adal4j.AuthenticationResult.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;JLjava/lang/String;Lcom/microsoft/aad/adal4j/UserInfo;Z)V\r\n\r\nFirst it's worth mentioning that this is not a friendly error and it's hard to figure the reason out. The other thing is that it makes no sense having to authenticate every time a console session (cmd) is started. The CLI v2 API holds the authentication for a couple of days and the maven plugin should support that.\r\n\r\n\r\n### Plugin name and version\r\ncom.microsoft.azure:azure-functions-maven-plugin:0.1.10\r\n\r\n### Plugin configuration in your `pom.xml`\r\n\t\t<plugins>\r\n\t\t\t<plugin>\r\n\t\t\t\t<groupId>com.microsoft.azure</groupId>\r\n\t\t\t\t<artifactId>azure-functions-maven-plugin</artifactId>\r\n\t\t\t\t<configuration>\r\n\t\t\t\t\t<resourceGroup>xxxxxx</resourceGroup>\r\n\t\t\t\t\t<appName>${functionAppName}</appName>\r\n\t\t\t\t\t<region>${functionAppRegion}</region>\r\n\t\t\t\t\t<appSettings>\r\n\t\t\t\t\t\t<property>\r\n\t\t\t\t\t\t\t<name>FUNCTIONS_EXTENSION_VERSION</name>\r\n\t\t\t\t\t\t\t<value>beta</value>\r\n\t\t\t\t\t\t</property>\r\n\t\t\t\t\t</appSettings>\r\n\t\t\t\t</configuration>\r\n\t\t\t\t<executions>\r\n\t\t\t\t\t<execution>\r\n\t\t\t\t\t\t<id>package-functions</id>\r\n\t\t\t\t\t\t<goals>\r\n\t\t\t\t\t\t\t<goal>package</goal>\r\n\t\t\t\t\t\t</goals>\r\n\t\t\t\t\t</execution>\r\n\t\t\t\t</executions>\r\n\r\n\t\t\t\t<dependencies>\r\n\t\t\t\t\t<dependency>\r\n\t\t\t\t\t\t<groupId>org.apache.poi</groupId>\r\n\t\t\t\t\t\t<artifactId>poi</artifactId>\r\n\t\t\t\t\t\t<version>${apache.poi.version}</version>\r\n\t\t\t\t\t</dependency>\r\n\r\n\t\t\t\t\t<dependency>\r\n\t\t\t\t\t\t<groupId>org.apache.poi</groupId>\r\n\t\t\t\t\t\t<artifactId>poi-ooxml</artifactId>\r\n\t\t\t\t\t\t<version>${apache.poi.version}</version>\r\n\t\t\t\t\t</dependency>\r\n\r\n\t\t\t\t\t<dependency>\r\n\t\t\t\t\t\t<groupId>org.springframework</groupId>\r\n\t\t\t\t\t\t<artifactId>spring-jdbc</artifactId>\r\n\t\t\t\t\t\t<version>${spring.components.version}</version>\r\n\t\t\t\t\t</dependency>\r\n\r\n\t\t\t\t\t<dependency>\r\n\t\t\t\t\t\t<groupId>com.microsoft.sqlserver</groupId>\r\n\t\t\t\t\t\t<artifactId>mssql-jdbc</artifactId>\r\n\t\t\t\t\t\t<version>${mssql-jdbc.version}</version>\r\n\t\t\t\t\t</dependency>\r\n\r\n\t\t\t\t\t<dependency>\r\n\t\t\t\t\t\t<groupId>org.springframework</groupId>\r\n\t\t\t\t\t\t<artifactId>spring-beans</artifactId>\r\n\t\t\t\t\t\t<version>${spring.components.version}</version>\r\n\t\t\t\t\t</dependency>\r\n\r\n\t\t\t\t\t<dependency>\r\n\t\t\t\t\t\t<groupId>org.springframework</groupId>\r\n\t\t\t\t\t\t<artifactId>spring-context</artifactId>\r\n\t\t\t\t\t\t<version>${spring.components.version}</version>\r\n\t\t\t\t\t</dependency>\r\n\r\n\t\t\t\t\t<dependency>\r\n\t\t\t\t\t\t<groupId>org.springframework</groupId>\r\n\t\t\t\t\t\t<artifactId>spring-web</artifactId>\r\n\t\t\t\t\t\t<version>${spring.components.version}</version>\r\n\t\t\t\t\t</dependency>\r\n\r\n\t\t\t\t\t<dependency>\r\n\t\t\t\t\t\t<groupId>commons-dbcp</groupId>\r\n\t\t\t\t\t\t<artifactId>commons-dbcp</artifactId>\r\n\t\t\t\t\t\t<version>${commons.dbcp.version}</version>\r\n\t\t\t\t\t</dependency>\r\n\t\t\t\t</dependencies>\r\n\t\t\t</plugin>\r\n\r\n\r\n### Steps to reproduce the problem\r\nAuthenticate using az login, deploy an Azure function using Maven plugin. Close the CMD window and open another one, check that az is still authenticated however if you try to deploy your function, an error is shown. If you authenticate again via az login in the same CMD session, it works."},"comment":{"url":"https://api.github.com/repos/Microsoft/azure-maven-plugins/issues/comments/375222984","html_url":"https://github.com/Microsoft/azure-maven-plugins/issues/92#issuecomment-375222984","issue_url":"https://api.github.com/repos/Microsoft/azure-maven-plugins/issues/92","id":375222984,"user":{"login":"jdneo","id":6193897,"avatar_url":"https://avatars1.githubusercontent.com/u/6193897?v=4","gravatar_id":"","url":"https://api.github.com/users/jdneo","html_url":"https://github.com/jdneo","followers_url":"https://api.github.com/users/jdneo/followers","following_url":"https://api.github.com/users/jdneo/following{/other_user}","gists_url":"https://api.github.com/users/jdneo/gists{/gist_id}","starred_url":"https://api.github.com/users/jdneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdneo/subscriptions","organizations_url":"https://api.github.com/users/jdneo/orgs","repos_url":"https://api.github.com/users/jdneo/repos","events_url":"https://api.github.com/users/jdneo/events{/privacy}","received_events_url":"https://api.github.com/users/jdneo/received_events","type":"User","site_admin":false},"created_at":"2018-03-22T08:55:27Z","updated_at":"2018-03-22T08:55:27Z","author_association":"MEMBER","body":"Hi @damadei Could you provide full logs?"}}
{"actor":{"display_login":"jdneo"}}