Maven plugin for posting your build state to LinkedIn.
In 2023 can you really call yourself a full-stack developer if you are not an influencer?
- Add the plugin to your
pom.xml
and configure the phases in which the plugin runs. In the following example, the plugin will post a LinkedIn message after compilation and again after tests (if they pass):
<plugin>
<groupId>co.aurasphere.maven.plugins</groupId>
<artifactId>linkedin-maven-plugin</artifactId>
<version>1.0.0</version>
<configuration>
<linkedinAccessToken>${env.LINKEDIN_ACCESS_TOKEN}</linkedinAccessToken>
<linkedinUserId>${env.LINKEDIN_USER_ID}</linkedinUserId>
</configuration>
<executions>
<execution>
<id>post-compile</id>
<phase>compile</phase>
<goals>
<goal>post</goal>
</goals>
<configuration>
<message>Today my code compiles...</message>
</configuration>
</execution>
<execution>
<id>post-test</id>
<phase>test</phase>
<goals>
<goal>post</goal>
</goals>
<configuration>
<message>...and it even passes all tests!</message>
</configuration>
</execution>
</executions>
</plugin>
- The
configuration
element supports the following parameters:
- linkedinAccessToken: your LinkedIn access token. You can obtain one by creating an app on LinkedIn developers and then authenticating yourself into it with Oauth2
- linkedinUserId: your LinkedIn user ID. You can obtain it by following this answer: https://stackoverflow.com/a/69304538/4921205
- message: the message to post to LinkedIn
Copyright (c) 2023 Donato Rimenti