简体   繁体   中英

Netbeans Maven project from cloned GitHub Java (with jni and C) repository

I cloned the git repository here and I would like to add it as a Maven or NetBeans Java project in NetBeans so I can use it as dependency for other application and to also be able to contribute to the repository.

The problem is that after cloning it NetBeans does not allow me to add it as a project. I'm guessing this is because it does not follow the structure of neither Maven, nor Netbeans projects.

Is there any way I can add it as a project in NetBeans and still have it liked to the GitHub repository so I can commit and push changes? The project is using Java , jni with C and R (I think).

You have to create a new project and then pull into it.

  1. Create a new Netbeans Java project.
  2. Open up your terminal and navigate to that directory.
  3. Initialize a git repo: git init
  4. Set the remote: git remote add origin https://github.com/su/rJava.git
  5. Pull: git pull origin master

Now you have the project set up!

Starting from Anubian Noob's answer I tried the same for Maven and the following will get you a Maven project:

  1. Create a new Java Maven project: NetBeans -> New Project -> Maven -> Java Application
  2. Open up your terminal and navigate to the project's directory, then to src/main/java/ inside the project
  3. Run git clone https://github.com/su/rJava.git --recursive

Anubian Noob's commands also work for initializing the git repository inside src/main/java folder but I couldn't get the submodules.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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