• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Bear Bibeault
  • paul wheaton
Saloon Keepers:
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Mikalai Zaikin
  • Piet Souris
Bartenders:

activate profiles

 
Ranch Hand
Posts: 210
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I have trouble understanding the activation of the profiles in the pom.xml, indeed I would like to make a test profile and a profile of production.
I read this link here  https://maven.apache.org/guides/introduction/introduction-to-profiles.html but I dont lose!
here is an excerpt from my pom.xml:



maven tells me that I duplicate profiles, I tested several solutions but alas without much positive results.
how to activate the profiles?

regards
philippe
 
Marshal
Posts: 4351
559
VSCode Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It looks like you have two profiles named test.
 
Philippe Ponceblanc
Ranch Hand
Posts: 210
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ron McLeod wrote:It looks like you have two profiles named test.



i do like this :

and without       <id>test</id>  just  <value>test</value>
maven tell me :

[ERROR]   The project org.exemple.demo:mon-appli:1.1-SNAPSHOT (/home/phipo/maven-projets/demo/mon-appli/pom.xml) has 1 error
[ERROR]     'profiles.profile.id' must be unique but found duplicate profile with id default @ line 71, column 12

 
Ron McLeod
Marshal
Posts: 4351
559
VSCode Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

[ERROR]     'profiles.profile.id' must be unique but found duplicate profile with id default @ line 71, column 12


I don't use maven, so this is only a guess:
   - you have 4 profile elements in your XML document
   - two of them are explicitly identified (test and prod), and two are not
   - the profile elements without the id sub-element are implicitly given the id default (I don't know if this is actually true)
   - whatever is processing the document determines you have two profiles with the id of default


 
Ron McLeod
Marshal
Posts: 4351
559
VSCode Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is from the schema for pom version 4:
I appears that the default value for id actually is default.
 
Philippe Ponceblanc
Ranch Hand
Posts: 210
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ron McLeod wrote:

[ERROR]     'profiles.profile.id' must be unique but found duplicate profile with id default @ line 71, column 12


I don't use maven, so this is only a guess:
   - you have 4 profile elements in your XML document
   - two of them are explicitly identified (test and prod), and two are not
   - the profile elements without the id sub-element are implicitly given the id default (I don't know if this is actually true)
   - whatever is processing the document determines you have two profiles with the id of default




this is my output with your code sample !
 
Philippe Ponceblanc
Ranch Hand
Posts: 210
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ron McLeod wrote:This is from the schema for pom version 4:
I appears that the default value for id actually is default.



where i put your script in my pom.xml ?
 
Philippe Ponceblanc
Ranch Hand
Posts: 210
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think I found the solution maven since eclipse returns no error.
On the other hand in VT terminal mode, I have errors:






 
Ron McLeod
Marshal
Posts: 4351
559
VSCode Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The build log says: Failed to delete /home/phipo/maven-projets/demo/mon-appli/target/mon-appli-1.1-SNAPSHOT.jar

Maybe there is a file permissions/ownership issue?
 
Philippe Ponceblanc
Ranch Hand
Posts: 210
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
post / thread SOLVED
 
You got style baby! More than this tiny ad:
Low Tech Laboratory
https://www.kickstarter.com/projects/paulwheaton/low-tech-0
reply
    Bookmark Topic Watch Topic
  • New Topic