我想使用AppSensor框架以将入侵检测和自动化响应添加到我的C#Web应用程序。OWASP AppSensor - 部署Java后端API
但我不知道如何让AppSensor API运行,所以我可以通过我的C#应用程序通过RESTful访问它。
让我先告诉你,我不与Java/Maven的/摇篮太familiair,但我知道如何从C#访问REST API。
我试图遵循Getting Started页面,并通过Git Bash命令行从GitHub下载AppSensor项目:git clone https://github.com/jtmelton/appsensor.git
。
然后我通过GIT中的Bash导航到AppSensor目录(我的电脑上):cd appsensor
我在AppSensor目录我后,我通过安装多模块父:mvn -N install
它的后安装它告诉我,构建是成功的,然后我决定运行测试与命令:mvn test
而当这一切完成Git Bash告诉我,每一个测试都取得了成功。但是现在我陷入了一种不知道下一步该做什么的风格。我想'部署'我的AppSensor API,以便我可以在我的C#应用程序中使用它。
某处GitHub的文档上是说mvn spring-boot:run
应该运行/部署的组件。然而,当我在appsensor父目录并运行此命令时,它给了我这个错误:
[ERROR] No plugin found for prefix 'spring-boot' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\dbr\.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException
我做了一些研究,发现该命令mvn deploy
应该部署的组件?但是,当我输入部署命令时,它会在第一个组件(appsensor-parent)中给我一个构建错误并停止部署。这也好心给我这个错误:
[ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.3:deploy (injected-nexus-deploy) on project appsensor-parent: Execution injected-nexus-deploy of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.3:deploy failed: Server credentials with ID "ossrh" not found! -> [Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
我也试图只把组件我need(AppSensor核心,分析引擎,存储,配置,门禁控制器,REST客户端,REST服务器)到一个文件夹。然后试图通过这样只有这些部件在<modules>...</modules>
但也没有工作对我来说改变POM.XML
文件来部署它。
但是什么工作是DemoSetup,但我不知道在哪里可以运行这个演示时发现的REST API(通过我的浏览器)。
谁能帮我通过获取运行,这样我可以用我的C#应用程序通过浏览器访问它,也是REST API服务器?