-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: Fix licence check #694
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -241,14 +241,6 @@ | |
<configuration> | ||
<parameters>--diff</parameters> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<phase>validate</phase> | ||
<goals> | ||
<goal>format</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
|
@@ -397,60 +389,98 @@ | |
</executions> | ||
</plugin> | ||
|
||
<!-- license plugin --> | ||
<plugin> | ||
<groupId>com.mycila</groupId> | ||
<artifactId>license-maven-plugin</artifactId> | ||
<configuration> | ||
<includes> | ||
<include>**/*.scala</include> | ||
<include>**/*.java</include> | ||
</includes> | ||
<mapping> | ||
<java>SLASHSTAR_STYLE</java> | ||
<scala>SLASHSTAR_STYLE</scala> | ||
</mapping> | ||
</configuration> | ||
</plugin> | ||
|
||
</plugins> | ||
|
||
</build> | ||
|
||
<profiles> | ||
<!-- profile to auto format --> | ||
<profile> | ||
<id>license-header-check</id> | ||
<properties> | ||
<plugin.version.license>4.2</plugin.version.license> | ||
<license.inlineHeader> | ||
Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH | ||
under one or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information regarding copyright | ||
ownership. Camunda licenses this file to you under the Apache License, | ||
Version 2.0; you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
</license.inlineHeader> | ||
</properties> | ||
<id>autoFormat</id> | ||
<activation> | ||
<activeByDefault>true</activeByDefault> | ||
</activation> | ||
Comment on lines
+416
to
+418
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💭 One thing to remember with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good to know. Thank you for the hint. 👍 |
||
<build> | ||
<plugins> | ||
<!-- license plugin --> | ||
<plugin> | ||
<groupId>org.antipathy</groupId> | ||
<artifactId>mvn-scalafmt_2.12</artifactId> | ||
<executions> | ||
<execution> | ||
<id>scala-format</id> | ||
<phase>validate</phase> | ||
<goals> | ||
<goal>format</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>com.mycila</groupId> | ||
<artifactId>license-maven-plugin</artifactId> | ||
<version>${plugin.version.license}</version> | ||
<configuration> | ||
<skipExistingHeaders>false</skipExistingHeaders> | ||
<includes> | ||
<include>**/*.scala</include> | ||
<include>**/*.java</include> | ||
</includes> | ||
<mapping> | ||
<java>SLASHSTAR_STYLE</java> | ||
<scala>SLASHSTAR_STYLE</scala> | ||
</mapping> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>add-license-header</id> | ||
<phase>compile</phase> | ||
<id>add-license</id> | ||
<goals> | ||
<goal>format</goal> | ||
</goals> | ||
<phase>process-sources</phase> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
|
||
<!-- profile to perform strict validation checks --> | ||
<profile> | ||
<id>checkFormat</id> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.antipathy</groupId> | ||
<artifactId>mvn-scalafmt_2.12</artifactId> | ||
<executions> | ||
<execution> | ||
<id>scala-format</id> | ||
<phase>validate</phase> | ||
<goals> | ||
<goal>format</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>com.mycila</groupId> | ||
<artifactId>license-maven-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>check-license</id> | ||
<goals> | ||
<goal>check</goal> | ||
</goals> | ||
<phase>validate</phase> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔧 With
activeByDefault
you don't need to disable theautoFormat
profile. Simply by activating thecheckFormat
profile, theautoFormat
profile will already be disabled.