0

My maven-project is build in the "modes" production and develop through maven profiles.

At the moment I deploy the production code to the nexus repo, but now I have to deploy the develop mode as well, but it should be stored at another nexus-folder, because I have to use this project in another maven project, like this:

<!-- Profile A: -->
<dependency>
        <groupId>com.mavenproject</groupId>
        <artifactId>mavenproject-production</artifactId>
        <version>1.0</version>
</dependency>

<!-- Profile B: -->
<dependency>
        <groupId>com.mavenproject</groupId>
        <artifactId>mavenproject-develop/artifactId>
        <version>1.0</version>
</dependency>

Could anyone help me here? Do I have to create a second pom.xml, because the artifactId of a pom.xml is unique and I cannot deploy to nexus with "mavenproject-production" and/or "mavenproject-develop" inside one pom?

Best Regards

Alex
  • 21
  • 4
  • you can use classifiers in this case http://stackoverflow.com/questions/20909634/what-is-the-purpose-of-classifier-tag-in-maven or use SNAPSHOT for development mode http://stackoverflow.com/questions/5901378/what-exactly-is-a-maven-snapshot-and-why-do-we-need-it – A_Di-Matteo Jan 28 '16 at 10:11
  • It sound you are doing in general something wrong...Profiles are the wrong way to make a difference between prod/dev and in particular if you change the coordinates...What is the reason to make this difference? A configuration? – khmarbaise Jan 28 '16 at 10:18
  • In debug mode I add some debug-data to the code. These code sections are not needed in production mode and therefore I build the projects with 2 profiles – Alex Jan 28 '16 at 14:05
  • What kind of debug code? Does not make sense in Java..you can make things like remote debugging... – khmarbaise Jan 28 '16 at 15:22
  • Its a web project with UI-Widgets. In debug mode, the UI-code get some custom css classes to be able to use automatic UI-Testingtools and the css is not obfuscated – Alex Jan 29 '16 at 09:56

0 Answers0