简体   繁体   English

如何在这个java项目中使用maven

[英]How do I use maven with this java project

夹
(source: gyazo.com ) (来源: gyazo.com

The basic tutorial on the maven website only shows how to make a new project from scratch. maven网站上的基本教程仅显示如何从头开始创建新项目。 I'm confused about using maven with an existing project 我对将maven与现有项目一起使用感到困惑

I just want to compile the .java files into bin, not package them into a jar 我只想将.java文件编译成bin,而不是将它们打包成jar

If you set up the default maven configuration, the compiled .class files will be placed in target/classes. 如果设置了默认的maven配置,则编译的.class文件将放在target / classes中。

Note: make sure your project has the correct layout for maven to work (without additional hassle): 注意:确保您的项目具有正确的布局以便maven工作(没有额外的麻烦):

project root
  - pom.xml
  - src
    - main
      - java
        - <.java classes and directories for packages>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM