我是java网络服务的新手。我在intellij中有一个启用了Web服务框架的java项目。我正在使用jetty server
。
要在本地部署项目,我创建了一个工件并定义了要在jetty
上部署的配置。一切都很好。
现在我将项目部署到google cloud
。我第一次手动复制战争。但现在我想在google cloud instance
本身上建立战争。如何从代码构建战争?有许多教程可以构建一个战争,但我想以intellij的风格构建它。因此,生产服务器和本地服务器之间始终存在一致性。
我还尝试查看intellij日志,以防在intellij中构建战争时打印步骤。但是没有帮助。以下日志正在打印:
2015-08-26 14:03:05,395 [5647274] INFO - indexing.UnindexedFilesUpdater - Indexable files iterated in 12590 ms
2015-08-26 14:03:14,008 [5655887] INFO - ij.compiler.impl.CompileDriver - COMPILATION STARTED (BUILD PROCESS)
2015-08-26 14:03:15,525 [5657404] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: Build process started. Classpath: /Applications/IntelliJ IDEA 14.app/Contents/lib/jps-launcher.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/lib/tools.jar:/Applications/IntelliJ IDEA 14.app/Contents/lib/optimizedFileManager.jar:/Applications/IntelliJ IDEA 14.app/Contents/lib/ecj-4.4.jar
2015-08-26 14:03:22,215 [5664094] INFO - indexing.UnindexedFilesUpdater - Unindexed files update canceled
2015-08-26 14:03:23,023 [5664902] INFO - indexing.UnindexedFilesUpdater - Indexable files iterated in 99 ms
2015-08-26 14:03:33,446 [5675325] INFO - .GenericCompilerPersistentData - Compiler info file doesn't exists: /Users/aapa/Library/Caches/IntelliJIdea14/compiler/supertext.144ac7bb/.caches/jasper_validator/info
2015-08-26 14:03:33,447 [5675326] INFO - ler.impl.GenericCompilerRunner - Clearing cache for Jasper Validator
2015-08-26 14:03:33,471 [5675350] INFO - lij.compiler.impl.CompilerUtil - COMPILATION FINISHED (BUILD PROCESS); Errors: 0; warnings: 3 took 19472 ms: 0 min 19sec
2015-08-26 14:03:34,758 [5676637] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: Build process started. Classpath: /Applications/IntelliJ IDEA 14.app/Contents/lib/jps-launcher.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/lib/tools.jar:/Applications/IntelliJ IDEA 14.app/Contents/lib/optimizedFileManager.jar:/Applications/IntelliJ IDEA 14.app/Contents/lib/ecj-4.4.jar
2015-08-26 14:03:36,370 [5678249] INFO - indexing.UnindexedFilesUpdater - Indexable files iterated in 4589 ms
2015-08-26 14:03:38,552 [5680431] INFO - ins.idea.svn.SvnChangeProvider - Rename not found for /Users/aapa/Projects/trunk/core/conf/spr.properties
2015-08-26 14:03:48,657 [5690536] INFO - ins.idea.svn.SvnChangeProvider - Rename not found for /Users/aapa/Projects/trunk/core/conf/spr.properties
请告诉我如何编写自己的构建脚本?怎么接近它?我的java Web服务概念不是那么强大。
以下是我的目录结构:
$ tree -L 2
.
├── libs
│ ├── common
│ ├── es
│ ├── logger
│ ├── rest
│ ├── spring
│ ├── test
│ ├── validation
│ └── ws
├── logs
├── resources
│ ├── conf
├── src
│ └── com
├── supertext.iml
├── test
│ └── com
└── web
├── WEB-INF
├── login.jsp
├── resources
└── ui