当前位置: 首页 > news >正文

中小学生做试卷的网站6如何做招聘网站效果评估

中小学生做试卷的网站6,如何做招聘网站效果评估,wordpress文章详情展示不了,网站诊断内容介绍 Java 8出现了#xff0c;人们所期待的革命终于发布了#xff0c;我敢肯定#xff0c;你们中的许多人都在想着同样的问题“我应该在项目中使用它吗#xff1f;”。 好吧#xff0c;几个月来我遇到了同样的问题#xff0c;今天我有一个答案想与大家分享。 很多方面都… 介绍 Java 8出现了人们所期待的革命终于发布了我敢肯定你们中的许多人都在想着同样的问题“我应该在项目中使用它吗”。 好吧几个月来我遇到了同样的问题今天我有一个答案想与大家分享。 很多方面都在影响这一决定但是在这篇文章中我想特别关注一个方面 我可以继续与Java 8和NetBeans Platform进行持续集成吗 主要问题是进行CI所需的工具的成熟度以及将其与NetBeans平台的ant构建脚本集成起来有多容易。 幸运的是我们发现这是可行且容易的 我还要感谢Alberto Requena Sanchez对本文的贡献。 技术环境 在以安全与质量为主要驱动力的项目中CI至关重要。 因此我从我的团队开始进行“概念验证”以表明以下技术已准备好协同工作 Java 8NetBeans 8.0和Ant JUnit 4和Jacoco 0.7.1 詹金斯与声纳4.2 本文的范围是解释为使Java 8的CI服务器完全正常运行而安装和设置必要工具的所有步骤请注意该证明已在Windows 7的开发人员机器上完成但很容易做到。在Linux服务器中也是如此。 下图高层次显示了将在帖子中描述的体系结构。 持续集成图 Java 8NetBeans 8.0和Ant Java 8已发布可以在此处下载安装学习最好并开始使用它 我们正在使用NetBeans Platform 8.0创建模块化应用程序。 该应用程序具有多层体系结构 其中每个层都是模块套件而最终的可执行文件只是一组集成套件。 我们正在使用Ant来构建我们的项目但是如果您正在使用Maven那么甚至可以简化该过程因为可以通过使用Maven的插件来完成Jenkins中的Sonar集成。 JUnit 4和Jacoco 0.7.1 自然我们正在进行单元测试因此我们使用JUnit4。它在任何地方都可以很好地集成尤其是在NetBeans中。 Jacoco是生成代码覆盖率的绝佳工具并且自0.7.1版起它完全支持Java 8。 詹金斯与声纳4.2 Jenkins是我们CI服务器的引擎它将与上述所有技术集成在一起没有任何问题。 测试的版本是1.554。 声纳正在对代码进行所有质量分析。 4.2版与Java 8完全兼容。 将Sonar与Ant一起使用需要一个小型库其中包含要集成到Jenkins中的目标。 如果您使用的是Maven则可以只安装Maven插件 。 开始困惑 步骤1 – NetBeans 安装Java 8和NetBeans 8.0 创建一个包含几个模块几个类和几个jUnit测试的模块套件 将代码提交到您的源代码版本管理服务器中 深入了解NetBeans 在名为“ jacoco-0.7.1”的线束中创建一个文件夹其中包含下载的jacoco jars 在名为“ sonar-ant-task”的线束中创建一个文件夹并将其放入下载的声纳蚂蚁罐中 在名为sonar-jacoco-module.xml的工具中创建一个文件并将以下代码粘贴到其中 ?xml version1.0 encodingUTF-8? !---- project namesonar-jacoco-module basedir. xmlns:jacocoantlib:org.jacoco.ant xmlns:sonarantlib:org.sonar.ant descriptionBuilds the module suite otherSuite./descriptionproperty namejacoco.dir location${nbplatform.default.harness.dir}/jacoco-0.7.1/ property nameresult.exec.file location${jacoco.dir}/jacoco.exec/ property namebuild.test.results.dir locationbuild/test/unit/results/property filenbproject/project.properties/!-- Step 1: Import JaCoCo Ant tasks -- taskdef uriantlib:org.jacoco.ant resourceorg/jacoco/ant/antlib.xml classpath path${jacoco.dir}/jacocoant.jar/ /taskdef!-- Target at the level of modules -- target name-do-junit dependstest-init echo messageDoing testing for jacoco / macrodef namejunit-impl attribute nametest.type/ attribute namedisable.apple.ui defaultfalse/ sequential jacoco:coverage destfile${build.test.results.dir}/${code.name.base}_jacoco.exec junit showoutputtrue forktrue failurepropertytests.failed errorpropertytests.failed filtertrace${test.filter.trace} tempdir${build.test.{test.type}.results.dir} timeout${test.timeout} batchtest todir${build.test.{test.type}.results.dir} fileset dir${build.test.{test.type}.classes.dir} includes${test.includes} excludes${test.excludes}/ /batchtest classpath refidtest.{test.type}.run.cp/ syspropertyset refidtest.{test.type}.properties/ jvmarg value${test.bootclasspath.prepend.args}/ jvmarg line${test.run.args}/ !--needed to have tests NOT to steal focus when running, works in latest apple jdk update only.-- sysproperty keyapple.awt.UIElement value{disable.apple.ui}/ formatter typebrief usefilefalse/ formatter typexml/ /junit /jacoco:coverage copy file${build.test.results.dir}/${code.name.base}_jacoco.exec todir${suite.dir}/build/coverage/ !-- Copy the result of all the unit tests of all the modules into one common folder at the level of the suite, so that sonar could find those files to generate associated reports -- copy todir${suite.dir}/build/test-results fileset dir${build.test.results.dir} include name**/TEST*.xml/ /fileset /copy fail iftests.failed unlesscontinue.after.failing.testsSome tests failed; see details above./fail /sequential /macrodef junit-impl test.type${run.test.type} disable.apple.ui${disable.apple.ui}/ /target/project 该文件的范围是覆盖添加jacoco覆盖范围的do-junit任务并复制套件构建中每个模块的单元测试结果以便sonar可以一起找到所有模块以进行分析。 在名为sonar-jacoco-suite.xml的线束中创建一个文件并将以下代码粘贴到其中 ?xml version1.0 encodingUTF-8? project namesonar-jacoco-suite basedir. xmlns:jacocoantlib:org.jacoco.ant xmlns:sonarantlib:org.sonar.ant descriptionBuilds the module suite otherSuite./descriptionproperty namejacoco.dir location${nbplatform.default.harness.dir}/jacoco-0.7.1/ property nameresult.exec.file locationbuild/coverage/    !-- Define the SonarQube global properties (the most usual way is to pass these properties via the command line) -- property namesonar.jdbc.url valuejdbc:mysql://localhost:3306/sonar?useUnicodetruecharacterEncodingutf8 / property namesonar.jdbc.username valuesonar / property namesonar.jdbc.password valuesonar / !-- Define the SonarQube project properties -- property namesonar.projectKey valueorg.codehaus.sonar:example-java-ant / property namesonar.projectName valueSimple Java Project analyzed with the SonarQube Ant Task / property namesonar.projectVersion value1.0 / property namesonar.language valuejava / !-- Load the project properties file for retrieving the modules of the suite -- property filenbproject/project.properties/!-- Using Javascript functions to build the paths of the data source for sonar configuration -- script languagejavascript  ![CDATA[// getting the value modulesName project.getProperty(modules); modulesName modulesName.replace(:,,); res modulesName.split(,); srcModules ; binariesModules ; testModules ; //Build the paths   for (var i0; ires.length; i) { srcModules res[i]/src,; binariesModules res[i]/build/classes,; testModules res[i]/test,; } //Remove the last comma srcModules srcModules.substring(0, srcModules.length - 1); binariesModules binariesModules.substring(0, binariesModules.length - 1); testModules testModules.substring(0, testModules.length - 1); // store the result in a new properties project.setProperty(srcModulesPath,srcModules); project.setProperty(binariesModulesPath,binariesModules); project.setProperty(testModulesPath,testModules); ]] /script   !-- Display the values --        property namesonar.sources value${srcModulesPath}/ property namesonar.binaries value${binariesModulesPath} / property namesonar.tests value${testModulesPath} / !-- Define where the coverage reports are located -- !-- Tells SonarQube to reuse existing reports for unit tests execution and coverage reports -- property namesonar.dynamicAnalysis valuereuseReports / !-- Tells SonarQube where the unit tests execution reports are -- property namesonar.junit.reportsPath valuebuild/test-results / !-- Tells SonarQube that the code coverage tool by unit tests is JaCoCo -- property namesonar.java.coveragePlugin valuejacoco / !-- Tells SonarQube where the unit tests code coverage report is -- property namesonar.jacoco.reportPath value${result.exec.file}/merged.exec / !--  Step 1: Import JaCoCo Ant tasks  -- taskdef uriantlib:org.jacoco.ant resourceorg/jacoco/ant/antlib.xml classpath path${jacoco.dir}/jacocoant.jar/ /taskdef     target namemerge-coverage         jacoco:merge destfile${result.exec.file}/merged.exec fileset dir${result.exec.file} includes*.exec/ /jacoco:merge /targettarget namesonar taskdef uriantlib:org.sonar.ant resourceorg/sonar/ant/antlib.xml !-- Update the following line, or put the sonar-ant-task-*.jar file in your $HOME/.ant/lib folder -- classpath path${harness.dir}/sonar-ant-task-2.1/sonar-ant-task-2.1.jar / /taskdef!-- Execute the SonarQube analysis -- sonar:sonar / /target/project 该文件的范围是在套件级别定义声纳配置和声纳任务。 如果您使用声纳则某些特殊的数据库或特殊的用户必须在此处更改配置。 定义的另一项任务是jacoco合并该合并实际上将获取每个模块的所有生成的exec并将它们合并到套件构建中的单个exec中以允许声纳进行分析。 用以下内容替换每个模块的build.xml的内容 descriptionBuilds, tests, and runs the project com.infrabel.jacoco./description property filenbproject/suite.properties/ property file${suite.dir}/nbproject/private/platform-private.properties/ property file${user.properties.file}/ import file${nbplatform.default.harness.dir}/sonar-jacoco-module.xml/ import filenbproject/build-impl.xml/ 用以下内容替换每个套件的build.xml的内容 descriptionBuilds the module suite otherSuite./description property filenbproject/private/platform-private.properties/ property file${user.properties.file}/ import file${nbplatform.default.harness.dir}/sonar-jacoco-suite.xml/ import filenbproject/build-impl.xml/步骤2 –詹金斯 在“管理Jenkins-管理插件”中进入可用列表并安装如果尚未存在以下插件 JaCoCo 水星或颠覆 声纳 如果您在防火墙或代理后面并且在配置网络设置时遇到问题可以随时从此处手动下载并安装它们。 在这种情况下请记住还要先下载每个插件的依赖项。 在“管理Jenkins-配置系统”中检查是否正确安装了所有插件请参见以下屏幕截图以获取示例将文件夹替换为适合您的文件夹 创建一个新的自由样式项目配置您的首选项的版本控制然后在“构建”面板中添加以下三个“ Invoce Ant”任务 最后在“构建后操作”面板中添加新的“记录Jacoco覆盖率报告”其配置如下 步骤3 –声纳 按照此脚本创建数据库并选择运行此查询以使连接正常工作 GRANT ALL PRIVILEGES ON sonar.* TO sonarlocalhost; 进入声纳的配置文件sonar.properties并启用MySQL该文件位于安装的conf文件夹中 # Permissions to create tables, indices and triggers # must be granted to JDBC user. # The schema must be created first. sonar.jdbc.usernamesonar sonar.jdbc.passwordsonar#----- MySQL 5.x # Comment the embedded database and uncomment the following # line to use MySQL sonar.jdbc.urljdbc:mysql://localhost:3306/sonar?useUnicodetruecharacterEncodingutf8rewriteBatchedStatementstrue 在声纳的配置中如果需要与Java 8兼容请更新Java插件 如有必要请始终在sonar.properties文件中配置代理 做完了 现在一切都已设置好您可以进入NetBeans进行构建提交代码然后在Jenkins中启动构建然后在确定构建之后检查Sonar中的项目。 就这样 希望我不会忘记任何事情但是如果您在此过程中发现一些错误可以随时提出评论我将尝试找到解决方案。 翻译自: https://www.javacodegeeks.com/2014/04/how-to-do-continuous-integration-with-java-8-netbeans-platform-8-jenkins-jacoco-and-sonar.html
http://www.sadfv.cn/news/310524/

相关文章:

  • 江苏越润建设有限公司网站国内做网站网站代理怎么样
  • 郴州网站建设公司有哪些网络推广方法技巧
  • 做网站要用到ps吗敏捷开发
  • 用什么工具做网站阅文集团旗下哪个网站做的最好
  • 深圳企业营销型网站建设怎么制作游戏app
  • 平面设计网站有哪些比较好的logo和网站主色调
  • 网站流量查询最准的做百度竞价对网站空间有什么要求
  • 外贸网站建设公司价格北京网站开发价格
  • 深圳高端响应式网站沈阳求做商城 网站
  • 怎么建设网站zy258东莞专业网络营销公司
  • 广东省特色专业建设网站专业企业建站价格
  • 做直播券的网站有多少钱做网站要什么软件
  • 网站开发软件著作权归谁化工建设网站
  • 正规专业的网站建设公网页设计教程步骤
  • 咋做网站企业的网站建设前期工作总结
  • 浦口区网站建设质量推荐网站内部推广
  • 目标网站上做关键字布局网络工程专业是什么
  • 城阳网站建设公司免费服务器主机
  • 58同城上海网站建设企业信息公示管理系统
  • 买个网站域名多少钱一年公司主页和公司网站
  • 网站运营的含义是什么常见的网络营销有哪些
  • 网站开发简单吗网站建设活动计划
  • 如何做做网站如何在外管局网站上做延期
  • 广州市网站建站wordpress火车头发布模块
  • win7 iis搭建网站教程wordpress静态链接
  • 做货代网站江苏天宇建设集团有限公司网站
  • 上海的建设网站制作西安大雁塔附近酒店推荐
  • 网站上线 串词中国最新消息
  • 高端网站官网山东省住房和城乡建设厅注册中心
  • 光明新区城市建设局网站北京星光灿烂影视有限公司