You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by GitBox <gi...@apache.org> on 2019/09/30 19:39:46 UTC

[GitHub] [camel-quarkus] lburgazzoli commented on a change in pull request #216: Remove scaffold-integration-test.groovy

lburgazzoli commented on a change in pull request #216: Remove scaffold-integration-test.groovy
URL: https://github.com/apache/camel-quarkus/pull/216#discussion_r329752111
 
 

 ##########
 File path: build/scripts/scaffold-integration-test.groovy
 ##########
 @@ -1,131 +0,0 @@
-/*
- * 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.
- */
-import java.util.stream.Collectors
-import java.nio.charset.Charset
-import java.nio.charset.StandardCharsets
-import java.nio.file.Files
-import java.nio.file.Path
-import java.nio.file.Paths
-
-import freemarker.cache.ClassTemplateLoader
-import freemarker.cache.FileTemplateLoader
-import freemarker.cache.MultiTemplateLoader
-import freemarker.cache.TemplateLoader
-import freemarker.template.Configuration
-import freemarker.template.Template
-import freemarker.template.TemplateException
-import freemarker.template.TemplateExceptionHandler
-
-import io.quarkus.maven.CreateExtensionMojo.TemplateParams
-import io.quarkus.maven.utilities.PomTransformer
-import io.quarkus.maven.utilities.PomTransformer.Transformation
-
-import org.slf4j.Logger
-import org.slf4j.LoggerFactory
-
-/* Keep in sync with the current file name */
-@groovy.transform.Field static final String currentScript = "scaffold-integration-test.groovy"
-@groovy.transform.Field static final Logger log = LoggerFactory.getLogger('scaffold-integration-test')
-final Path extensionsDir = project.basedir.toPath()
-final Path templatesDir = extensionsDir.resolve('../build/create-extension-templates')
-final String artifactIdBase = properties['quarkus.artifactIdBase']
-final Path itestDir = extensionsDir.resolve('../integration-tests/' + artifactIdBase)
-final Charset charset = StandardCharsets.UTF_8
-
-final nameBase = properties['quarkus.nameBase'] == null ? artifactIdBase.split(' ').collect{it.capitalize()}.join(' ') : artifactIdBase
-
-Files.createDirectories(itestDir)
-
-final Configuration cfg = new Configuration(Configuration.VERSION_2_3_28)
-cfg.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER)
-cfg.setTemplateLoader(createTemplateLoader(templatesDir))
-cfg.setDefaultEncoding('UTF-8')
-cfg.setInterpolationSyntax(Configuration.SQUARE_BRACKET_INTERPOLATION_SYNTAX)
-cfg.setTagSyntax(Configuration.SQUARE_BRACKET_TAG_SYNTAX)
-
-TemplateParams model = new TemplateParams()
-
-model.artifactIdBase = artifactIdBase
-model.artifactIdBaseCamelCase = toCapCamelCase(model.artifactIdBase)
-model.version = project.version
-
-model.nameBase = nameBase
-
-model.javaPackageBase = getJavaPackage('org.apache.camel.quarkus', 'component', artifactIdBase)
-final String javaPackageBasePath = model.javaPackageBase.replace('.', '/')
-
-evalTemplate(cfg, "integration-test-pom.xml", itestDir.resolve('pom.xml'), charset, model)
-evalTemplate(cfg, "TestResource.java", itestDir.resolve('src/main/java/' + javaPackageBasePath + '/it/'+ model.artifactIdBaseCamelCase + 'Resource.java'), charset, model)
-evalTemplate(cfg, "TestRouteBuilder.java", itestDir.resolve('src/main/java/' + javaPackageBasePath + '/it/'+ model.artifactIdBaseCamelCase + 'RouteBuilder.java'), charset, model)
 
 Review comment:
   I'm for removing it

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services