Hi, I am a newbie to Maven and I have questions about dependencies and artifact publication.
Let's imagine I work for www.mycompany.com. Let's imagine I develop two projects A and B. B has a dependency on A. Let's imagine I want to publish the jars for project A and project B in www.mycompany.com/myprojects. i) Is is correct to define the coordinates of Project A as following? <groupId>com.mycompany</groupId> <artifactId>ProjectA</artifactId> <version>1.2</version> or should it be <groupId>com.mycompany.myprojects</groupId> <artifactId>ProjectA</artifactId> <version>1.2</version> ? By default, the ProjectA-1.2.jar artifact will be created in \ProjectA\target. ii) Should I copy this jar under: www.mycompany.com/myprojects/ or www.mycompany.com/myprojects/ProjectA-1.2/ or www.mycompany.com/myprojects/ProjectA/1.2/ ? iii) How should I declare the dependency in my project B? Should I do it like this? <dependencies> <dependency> <groupId>com.mycompany</groupId> <artifactId>ProjectA</artifactId> <version>1.2</version> </dependency> </dependencies> or like this? <dependencies> <dependency> <groupId>myprojects.com.mycompany</groupId> <artifactId>ProjectA</artifactId> <version>1.2</version> </dependency> </dependencies> iv) Do I need to include the following in Project B's pom.xml? <repositories> <repository> <id>my-repository</id> <url>http://www.mycompany.com</url> </repository> </repositories> or eventually this <repositories> <repository> <id>my-repository</id> <url>http://www.mycompany.com/myprojects</url> </repository> </repositories> ? What are the best practices? Thanks, UseTheFork -- View this message in context: http://www.nabble.com/Questions-about-dependencies-and-artifact-publication-tp25300769p25300769.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
