Tag: maven

什么是gem install bundler?

我知道我可以从http://bundler.io阅读,但是我有一些怀疑。 npm for NodeJs和Maven for Java/J2EE它是npm for NodeJs ? 我执行的第一个命令是gem install bundler 。 这里什么是gem,什么是bundler,有人可以用NodeJ或者Maven来启发我。 哪里得到安装? 我没有像在NodeJs中那样在全局中指定-g 。 C:\Users\Shane>gem install bundler Fetching: bundler-1.5.3.gem (100%) Successfully installed bundler-1.5.3 Parsing documentation for bundler-1.5.3 Installing ri documentation for bundler-1.5.3 1 gem installed C:\Users\Shane>gem install sqlite3 Fetching: sqlite3-1.3.9-x86-mingw32.gem (100%) Successfully installed sqlite3-1.3.9-x86-mingw32 Parsing documentation for sqlite3-1.3.9-x86-mingw32 unable to convert "\x90" […]

Grunt在MacOS上通知失败

我正在使用基于MacOS的相当复杂的现有软件系统。 它是使用Maven构build的。 这个构build过去对我来说是正确的,现在为我的团队中的其他人工作,所以这就是我在本地做的一些事情,导致了失败。 我最近不得不重新安装npm,grunt和bower。 现在我的机器上全部安装了这三个。 当它到达使用grunt的部分通知我得到一个致命的错误: >> npm Fatal error: spawn /private/tmp/git-repo/lumify-data/lumify-public/web/war/src/main/webapp/node_modules/grunt-notify/lib/platforms../bin/Grunt.app/Contents/MacOS/Grunt ENOENT 当我从命令行运行Grunt-notify时,Grunt-notify已经安装并正常工作。 有人能指点我哪里甚至看的方向? 有没有configuration文件铺设在我错过的地方?

如何将nodejs和npm可执行file upload到artifactory

我们有一个公司代理,防止我使用maven-front-plugin。 问题是,为了获取npm和bower依赖关系,我们使用内部的Artifactory,所以我们不应该有任何代理设置。 但是实际的可执行文件被直接提取,因此需要代理来获取它们。 而前端插件似乎不支持特定域的例外情况。 那么是否有一种简单的方法将npm和nodejs可执行file upload到我们的内部工件中,以便我们可以完全跳过这个代理? 或者解决这个问题的另一种方法 编辑 我在这里添加解决scheme,因为我需要修改我在下面批准的答案。 在Artifactory中设置两个远程仓库,一个到nodejs( https://nodejs.org/dist/ ),一个到npm( https://registry.npmjs.org/npm/-/ )。 编辑你的maven-frontend-pluginconfiguration: <execution> <!– optional: you don't really need execution ids, but it looks nice in your build log. –> <id>install node and npm</id> <goals> <goal>install-node-and-npm</goal> </goals> <!– optional: default phase is "generate-resources" –> <phase>generate-resources</phase> <configuration> <nodeVersion>v0.12.1</nodeVersion> <npmVersion>2.14.1</npmVersion> <!– use the URL […]

如何只将maven执行目标定位到构build文件夹?

我有一个项目使用Maven和前端Maven的插件(com.github.eirslett)。 当我运行mvn install从插件运行mvn install所有的执行,并且他们在src/main/webapp根目录下创build一个node_modules , bower_components和node文件夹,其中实际的前端代码是。 问题是,我想只mvn install执行,并在build目录中创build包,而不是在版本化的应用程序代码中创build这些包,就像在Java库中一样。 有没有办法做到这一点? 这是我的pom.xml的相关部分: <build> <directory>build</directory> <outputDirectory>build/classes</outputDirectory> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.3</version> <configuration> <source>${java.version}</source> <target>${java.version}</target> <encoding>UTF-8</encoding> <webResources> <resource> <filtering>true</filtering> <directory>src/main/webapp</directory> <includes> <include>WEB-INF/weblogic.xml</include> </includes> </resource> </webResources> </configuration> </plugin> … <plugin> <groupId>com.github.eirslett</groupId> <artifactId>frontend-maven-plugin</artifactId> <version>0.0.20</version> <configuration> <workingDirectory>src/main/webapp</workingDirectory> </configuration> <executions> <execution> <id>install node and npm</id> <goals> <goal>install-node-and-npm</goal> </goals> <configuration> <nodeVersion>v0.10.34</nodeVersion> <npmVersion>2.1.11</npmVersion> </configuration> </execution> […]

批处理脚本在`gulp`处理完成后停止执行,不会继续执行脚本的其余部分

我正在尝试编写一个简单的batch file来构build一个gulp项目和一个maven项目。 目前的文件如下: cd C:\my\file\path cmd /k gulp maven-deploy-local cd C:\my\file\path\two\project-pom-parent cmd /k mvn clean install -Dmaven.test.skip=true 每当我运行这个脚本时,命令行就会在第2行和第3行之前停止。最后我在cmd中用闪烁的光标查看这行: C:\我的\文件\path> 如果我运行没有cmd /k的文件(如下),那么提示符会在第2行之后和第3行之前简单地closures。 cd C:\my\file\path gulp maven-deploy-local cd C:\my\file\path\two\project-pom-parent mvn clean install -Dmaven.test.skip=true 如何修改批处理脚本,使其继续执行第3行和第4行的命令,然后使用以下行和闪烁的光标保持打开状态? C:\我的\文件\path\ 2 \项目-POM父> 我在Windows 7 64位上运行

错误消息沿着exec-maven-plugin> Node.js> r.js的某处被吃掉

我们使用exec-maven-plugin在Node.js下运行RequireJS的优化器(r.js)(因为它比Rhino快很多): <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.2</version> <executions> <execution> <id>compile-js</id> <phase>prepare-package</phase> <goals> <goal>exec</goal> </goals> <configuration> <executable>${node.executable}</executable> <arguments> <argument>${project.build.directory}/dependency/requirejs/r.js</argument> <argument>-o</argument> </arguments> </configuration> </execution> </executions> </plugin> 问题是,当编译过程中出现问题时,r.js应该脱口而出的错误消息在Maven的控制台输出中不会显示。 我所要解决的问题是,我使用-X标志重新运行Maven命令以获取debugging输出,以便exec-maven-plugin输出正在执行的实际命令。 这是像这样的: project-root / target / dependency / node / node \ project-root / target / dependency / requirejs / r.js \ -o src / main / webapp / app.build.json 当我从命令行手动运行命令,然后在控制台中得到实际的编译错误,然后继续修复它们。 我已经试验了用2>&1将stderrredirect到stdout无效(在Windows上),因为我无法立即find像redirect位那样使exec-maven-plugin作为参数的方法。 […]

Nexus兼容的存储库以获取节点和npm安装程序

我正在寻找一个nexus兼容的存储库,我可以得到一个节点安装程序(符合nexus的替代http://nodejs.org/dist/ 。 背景: 在Java环境中,我们的构build由maven处理。 最近,我们添加了一个JavaScript前端应用程序,我试图通过maven与优秀的插件前端Maven的插件 。 插件安装节点和npm,然后运行npm install和grunt build 。 一切正常。 但是我们必须把我们所有的依赖放在nexus(或者一些本地代理的仓库)下。 关于前端依赖关系:没有问题,因为nexus 2.10支持npmregistry。 有用。 关于节点和npm安装程序,它们最初是由插件从http://nodejs.org/dist/下载的,我不知道如何在本地代理此repo …或者我可以从哪里find这些安装程序合规的 有什么build议么 ? 谢谢。

使用Maven,量angular器和Selenium WebDriver进行集成testing

我们开发了一个Web应用程序,在后端使用Java,在UI中使用Angular,使用Maven作为构build系统。 我一直在尝试使用量angular器来设置自动化的集成testing,并且在Google负载/ StackOverflowing加载之后,仍然无法弄清楚如何实现最终的2端configuration。 Node.js / NPM安装(失败) 我已经尝试使用前端Maven插件来处理Node.js和NPM安装,但是由于我们是在公司防火墙的后面,似乎不可能直接下载任何东西。 虽然它可以从我们的Artifactory下载Node,但是在NPM下载失败(我不明白为什么它甚至会下载它,因为它是Node包的一部分)。 无论如何,我放弃了这个想法,并决定使用本地安装的节点。 启动Tomcat 为e2etesting启动/停止一个Tomcat实例很好地被处理 <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> <configuration> <url>${tomcat.manager.url}</url> <path>/</path> <server>Tomcat</server> </configuration> <executions> <!– Starting Tomcat –> <execution> <id>start-tomcat</id> <phase>pre-integration-test</phase> <goals> <goal>run</goal> </goals> <configuration> <!– Fork the process, otherwise the build will be blocked by the running Tomcat –> <fork>true</fork> <port>${tomcat.port}</port> <systemProperties> <!– We want to use […]

通过Maven安装NodeJS

我发现很多更新的JavaScript的Maven插件需要将NodeJS安装在构build的机器上(本地和CI服务器)。 例如:yeoman-maven-plugin,npm-maven-plugin等 问题是:检查NodeJS的存在和安装它是否有意义,如果通过Maven作为依赖失踪? 红利问题:如果你认为这是一个好主意,你将如何完成这项任务?

用maven和spring RESTconfigurationangular 2项目

我想将我的小应用程序从angular度1升级到angular度2.我对angular度2和节点configuration有点新。 我的Web应用程序使用Eclipse和Maven。 问题是我无法使用angular2configuration。 任何人都可以请帮助我,如果有任何教程configuration目录结构? 有可用的Maven插件,但我有点困惑我的angular2应用程序的目录结构。 提前致谢。