Win a copy of Head First Android this week in the Android forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

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: 3714
523
Android 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: 3714
523
Android 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: 3714
523
Android 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: 3714
523
Android 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic