I need to transfer to another person a Mavin project written in IDEA and the question arises - what exactly should be transmitted? As far as I understand the system, the .idea, src and POM file are transferred. Next with the command

mvn install

going project in local repository. I understood correctly?

When I execute this command a BUILD SUCCESSFUL is issued

C:\Users\Kru\IdeaProjects\PopularWords>mvn install [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building ParagonCase 1.2 [INFO] ------------------------------------------------------------------------ [WARNING] The artifact org.apache.commons:commons-io:jar:1.3.2 has been relocate d to commons-io:commons-io:jar:1.3.2 [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ ParagonCas e --- [WARNING] Using platform encoding (Cp1251 actually) to copy filtered resources, ie build is platform dependent! [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ ParagonCase --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ Pa ragonCase --- [WARNING] Using platform encoding (Cp1251 actually) to copy filtered resources, ie build is platform dependent! [INFO] Copying 1 resource [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ Paragon Case --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ ParagonCase --- [INFO] Surefire report directory: C:\Users\Kru\IdeaProjects\PopularWords\target\ surefire-reports ------------------------------------------------------- TESTS ------------------------------------------------------- Running MainTest Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.118 sec Results : Tests run: 2, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ ParagonCase --- [INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) @ ParagonCase --- [INFO] Installing C:\Users\Kru\IdeaProjects\PopularWords\target\ParagonCase-1.2. jar to C:\Users\Kru\.m2\repository\ru\nick\kru\ParagonCase\1.2\ParagonCase-1.2.j ar [WARNING] Failed to create parent directories for tracking file C:\Users\Kru\.m2 \repository\ru\nick\kru\ParagonCase\1.2\_remote.repositories [INFO] Installing C:\Users\Kru\IdeaProjects\PopularWords\pom.xml to C:\Users\Kru \.m2\repository\ru\nick\kru\ParagonCase\1.2\ParagonCase-1.2.pom [WARNING] Failed to create parent directories for tracking file C:\Users\Kru\.m2 \repository\ru\nick\kru\ParagonCase\1.2\_remote.repositories [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.874 s [INFO] Finished at: 2016-03-31T20:25:37+03:00 [INFO] Final Memory: 10M/155M [INFO] ------------------------------------------------------------------------ 

However, on completion, nothing appears in the local repository.

  • and what do you check? you clearly indicate Installing in the log ... to C: \ Users \ Kru \ .m2 \ repository \ ru \ nick \ kru \ ParagonCase \ 1.2 \ ParagonCase-1.2.j ar - Vartlok
  • This is the folder that I look at - Nick
  • If you are given an exhaustive answer, mark it as correct (a daw opposite the selected answer). - Nicolas Chabanovsky

1 answer 1

Maven directory structure .

If you want to transfer the source code , you need to transfer:

  • src directory;
  • pom.xml ;
  • configuration files and resources used in your project if they are not inside the src directory.

It is convenient to share the project through a version control system, for example, Git. This will require hosting, which allows you to store git repositories, which can be public or private. Free services: Github , BitBucket .


If you vyhite send the assembled distribution , ie JAR file in your case, it is formed in the target/ directory:

C:\Users\Kru\IdeaProjects\PopularWords\target\ParagonCase-1.2.jar

This is the directory in which, by default, the project itself is assembled, and temporary files used by Maven and its plug-ins during the build process are saved.

The artifact is installed in the local Maven repository so that your other projects can use it as a dependency. To not install the assembled project into the local repository, use the mvn package command to build.

.idea/ , .iml , .project , .settings/ , .classpath and other files and directories starting with dots are usually the configuration files and resources of your IDE, OS, and other applications. Some of these files need to be transferred, for example, .gitignore , findbugs-exclude.xml , but in such cases you usually know what these files are and why they are needed.