Repository: camel Updated Branches: refs/heads/master e0dd37cc3 -> 40d91ad95
Fixing generated version on BOM generator Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/40d91ad9 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/40d91ad9 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/40d91ad9 Branch: refs/heads/master Commit: 40d91ad953a92471f316764a39b5579d8c55ff33 Parents: e0dd37c Author: Nicola Ferraro <[email protected]> Authored: Wed Sep 28 14:59:55 2016 +0200 Committer: Nicola Ferraro <[email protected]> Committed: Wed Sep 28 14:59:55 2016 +0200 ---------------------------------------------------------------------- .../camel-spring-boot-dependencies/pom.xml | 7 +--- .../camel-spring-boot-generator-bom/pom.xml | 2 +- .../src/main/resources/target-template-pom.xml | 39 ++++++++++++++++++++ .../target-template-pom.xml | 39 -------------------- .../maven/bom/generator/BomGeneratorMojo.java | 9 +++++ 5 files changed, 50 insertions(+), 46 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/40d91ad9/spring-boot-dm/camel-spring-boot-dependencies/pom.xml ---------------------------------------------------------------------- diff --git a/spring-boot-dm/camel-spring-boot-dependencies/pom.xml b/spring-boot-dm/camel-spring-boot-dependencies/pom.xml index 8a6efa2..221440a 100644 --- a/spring-boot-dm/camel-spring-boot-dependencies/pom.xml +++ b/spring-boot-dm/camel-spring-boot-dependencies/pom.xml @@ -162,7 +162,7 @@ <dependency> <groupId>net.sf.saxon</groupId> <artifactId>Saxon-HE</artifactId> - <version>9.7.0-6</version> + <version>9.5.1-5</version> </dependency> <dependency> <groupId>ognl</groupId> @@ -257,11 +257,6 @@ </dependency> <dependency> <groupId>org.apache.camel</groupId> - <artifactId>camel-asterisk</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.camel</groupId> <artifactId>camel-atmos</artifactId> <version>${project.version}</version> </dependency> http://git-wip-us.apache.org/repos/asf/camel/blob/40d91ad9/spring-boot-dm/camel-spring-boot-generator-bom/pom.xml ---------------------------------------------------------------------- diff --git a/spring-boot-dm/camel-spring-boot-generator-bom/pom.xml b/spring-boot-dm/camel-spring-boot-generator-bom/pom.xml index 371066f..ffabf94 100644 --- a/spring-boot-dm/camel-spring-boot-generator-bom/pom.xml +++ b/spring-boot-dm/camel-spring-boot-generator-bom/pom.xml @@ -277,7 +277,7 @@ </excludes> </dependencies> - <sourcePom>${basedir}/target-template-pom.xml</sourcePom> + <sourcePom>${basedir}/src/main/resources/target-template-pom.xml</sourcePom> <targetPom>${basedir}/../camel-spring-boot-dependencies/pom.xml</targetPom> </configuration> http://git-wip-us.apache.org/repos/asf/camel/blob/40d91ad9/spring-boot-dm/camel-spring-boot-generator-bom/src/main/resources/target-template-pom.xml ---------------------------------------------------------------------- diff --git a/spring-boot-dm/camel-spring-boot-generator-bom/src/main/resources/target-template-pom.xml b/spring-boot-dm/camel-spring-boot-generator-bom/src/main/resources/target-template-pom.xml new file mode 100644 index 0000000..9956fa2 --- /dev/null +++ b/spring-boot-dm/camel-spring-boot-generator-bom/src/main/resources/target-template-pom.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); 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. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <parent> + <artifactId>camel-spring-boot-dm</artifactId> + <groupId>org.apache.camel</groupId> + <version>${project.version}</version> + </parent> + <modelVersion>4.0.0</modelVersion> + + <artifactId>camel-spring-boot-dependencies</artifactId> + <packaging>pom</packaging> + <name>Camel :: Spring-Boot :: Dependency Management :: BOM</name> + <description>Camel Spring-Boot BOM</description> + + <dependencyManagement> + <dependencies> + <!-- To be filled in --> + </dependencies> + </dependencyManagement> + +</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/40d91ad9/spring-boot-dm/camel-spring-boot-generator-bom/target-template-pom.xml ---------------------------------------------------------------------- diff --git a/spring-boot-dm/camel-spring-boot-generator-bom/target-template-pom.xml b/spring-boot-dm/camel-spring-boot-generator-bom/target-template-pom.xml deleted file mode 100644 index 5a44e07..0000000 --- a/spring-boot-dm/camel-spring-boot-generator-bom/target-template-pom.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); 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. ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <parent> - <artifactId>camel-spring-boot-dm</artifactId> - <groupId>org.apache.camel</groupId> - <version>2.18.0-SNAPSHOT</version> - </parent> - <modelVersion>4.0.0</modelVersion> - - <artifactId>camel-spring-boot-dependencies</artifactId> - <packaging>pom</packaging> - <name>Camel :: Spring-Boot :: Dependency Management :: BOM</name> - <description>Camel Spring-Boot BOM</description> - - <dependencyManagement> - <dependencies> - <!-- To be filled in --> - </dependencies> - </dependencyManagement> - -</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/40d91ad9/tooling/maven/bom-generator-maven-plugin/src/main/java/org/apache/camel/maven/bom/generator/BomGeneratorMojo.java ---------------------------------------------------------------------- diff --git a/tooling/maven/bom-generator-maven-plugin/src/main/java/org/apache/camel/maven/bom/generator/BomGeneratorMojo.java b/tooling/maven/bom-generator-maven-plugin/src/main/java/org/apache/camel/maven/bom/generator/BomGeneratorMojo.java index e426f01..9bfcb2a 100644 --- a/tooling/maven/bom-generator-maven-plugin/src/main/java/org/apache/camel/maven/bom/generator/BomGeneratorMojo.java +++ b/tooling/maven/bom-generator-maven-plugin/src/main/java/org/apache/camel/maven/bom/generator/BomGeneratorMojo.java @@ -204,6 +204,15 @@ public class BomGeneratorMojo extends AbstractMojo { private Document loadBasePom() throws Exception { DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document pom = builder.parse(sourcePom); + + XPath xpath = XPathFactory.newInstance().newXPath(); + XPathExpression expr = xpath.compile("/project/parent/version"); + + Node node = (Node) expr.evaluate(pom, XPathConstants.NODE); + if (node != null && node.getTextContent() != null && node.getTextContent().trim().equals("${project.version}")) { + node.setTextContent(project.getVersion()); + } + return pom; }
