You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pp...@apache.org on 2023/06/23 13:37:51 UTC
[camel] 10/18: CAMEL-19461 - Enable license-maven-plugin's format mojo in full profile
This is an automated email from the ASF dual-hosted git repository.
ppalaga pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 50314d12312686bc88fac2cafba22c6095d1ceb3
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Mon Jun 19 16:32:58 2023 +0200
CAMEL-19461 - Enable license-maven-plugin's format mojo in full profile
---
.../camel/support/builder/ExpressionBuilder.java | 2 +-
pom.xml | 108 +++++++++++----------
2 files changed, 57 insertions(+), 53 deletions(-)
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/builder/ExpressionBuilder.java b/core/camel-support/src/main/java/org/apache/camel/support/builder/ExpressionBuilder.java
index 136a206b3c1..cb12a4c7285 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/builder/ExpressionBuilder.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/builder/ExpressionBuilder.java
@@ -2054,7 +2054,7 @@ public class ExpressionBuilder {
return null;
} else if (body.startsWith("{") && body.endsWith("}") || body.startsWith("[") && body.endsWith("]")) {
return Jsoner.prettyPrint(body); //json
- } else if(body.startsWith("<") && body.endsWith(">")) {
+ } else if (body.startsWith("<") && body.endsWith(">")) {
return ExpressionBuilder.prettyXml(body); //xml
}
diff --git a/pom.xml b/pom.xml
index 17ef5a0199d..bed94c8d522 100644
--- a/pom.xml
+++ b/pom.xml
@@ -137,7 +137,7 @@
<jaxb-osgi-version>4.0.1</jaxb-osgi-version>
<jaxb-xjc-version>4.0.1</jaxb-xjc-version>
<jaxb-jxc-version>4.0.1</jaxb-jxc-version>
- <mycila-license-version>3.0</mycila-license-version>
+ <mycila-license-version>4.2</mycila-license-version>
<gmavenplus-plugin-version>2.1.0</gmavenplus-plugin-version>
<groovy-version>4.0.12</groovy-version>
<cyclonedx-maven-plugin-version>2.7.9</cyclonedx-maven-plugin-version>
@@ -257,6 +257,48 @@
<pluginManagement>
<plugins>
+ <plugin>
+ <groupId>com.mycila</groupId>
+ <artifactId>license-maven-plugin</artifactId>
+ <version>${mycila-license-version}</version>
+ <configuration>
+ <failIfUnknown>true</failIfUnknown>
+ <header>${maven.multiModuleProjectDirectory}/buildingtools/src/main/resources/header.txt</header>
+ <excludes>
+ <exclude>KEYS</exclude>
+ <exclude>**/NOTICE</exclude>
+ <exclude>**/LICENSE</exclude>
+ <exclude>**/NOTICE.txt</exclude>
+ <exclude>**/LICENSE.txt</exclude>
+ <exclude>doap.rdf</exclude>
+ <exclude>**/README</exclude>
+ <exclude>**/*.adoc</exclude>
+ <exclude>**/node_modules/**</exclude>
+ <exclude>**/cacerts</exclude>
+ <exclude>**/*.p12</exclude>
+ <exclude>**/*.txt</exclude>
+ <exclude>**/*.mp3</exclude>
+ <exclude>**/*.mp4</exclude>
+ <exclude>.mvn/**</exclude>
+ <exclude>mvnw*</exclude>
+ <exclude>**/META-INF/persistence*.xsd</exclude>
+ <exclude>camel-sbom/*.xml</exclude>
+ </excludes>
+ <mapping>
+ <java>SLASHSTAR_STYLE</java>
+ <properties>CAMEL_PROPERTIES_STYLE</properties>
+ <spring.factories>CAMEL_PROPERTIES_STYLE</spring.factories>
+ <spring.provides>CAMEL_PROPERTIES_STYLE</spring.provides>
+ <Jenkinsfile.deploy>SLASHSTAR_STYLE</Jenkinsfile.deploy>
+ <Jenkinsfile.jdk17>SLASHSTAR_STYLE</Jenkinsfile.jdk17>
+ <Jenkinsfile.ppc64le>SLASHSTAR_STYLE</Jenkinsfile.ppc64le>
+ <Jenkinsfile.s390x>SLASHSTAR_STYLE</Jenkinsfile.s390x>
+ </mapping>
+ <headerDefinitions>
+ <headerDefinition>${maven.multiModuleProjectDirectory}/buildingtools/src/main/resources/license-properties-headerdefinition.xml</headerDefinition>
+ </headerDefinitions>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
@@ -705,57 +747,6 @@
</profile>
<profile>
- <id>license</id>
- <build>
- <defaultGoal>license:format</defaultGoal>
- <plugins>
- <plugin>
- <groupId>com.mycila</groupId>
- <artifactId>license-maven-plugin</artifactId>
- <version>${mycila-license-version}</version>
- <configuration>
- <header>header.txt</header>
- <excludes>
- <exclude>KEYS</exclude>
- <exclude>**/NOTICE</exclude>
- <exclude>**/LICENSE</exclude>
- <exclude>**/NOTICE.txt</exclude>
- <exclude>**/LICENSE.txt</exclude>
- <exclude>doap.rdf</exclude>
- <exclude>**/README</exclude>
- <exclude>**/*.adoc</exclude>
- <exclude>**/node_modules/**</exclude>
- <exclude>**/cacerts</exclude>
- <exclude>**/*.p12</exclude>
- <exclude>**/*.txt</exclude>
- <exclude>**/*.mp3</exclude>
- <exclude>**/*.mp4</exclude>
- <exclude>.mvn/**</exclude>
- <exclude>mvnw*</exclude>
- <exclude>**/META-INF/persistence*.xsd</exclude>
- </excludes>
- <mapping>
- <java>SLASHSTAR_STYLE</java>
- <properties>CAMEL_PROPERTIES_STYLE</properties>
- <spring.factories>CAMEL_PROPERTIES_STYLE</spring.factories>
- <spring.provides>CAMEL_PROPERTIES_STYLE</spring.provides>
- </mapping>
- <headerDefinitions>
- <headerDefinition>license-properties-headerdefinition.xml</headerDefinition>
- </headerDefinitions>
- </configuration>
- <dependencies>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-buildtools</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
<id>sbom</id>
<build>
<plugins>
@@ -810,6 +801,19 @@
</activation>
<build>
<plugins>
+ <plugin>
+ <groupId>com.mycila</groupId>
+ <artifactId>license-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>license-format</id>
+ <goals>
+ <goal>format</goal>
+ </goals>
+ <phase>process-sources</phase>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>