Selecting class by Maven build profile

前端 未结 2 1403
夕颜
夕颜 2021-01-23 03:43

I am quite new to Maven and Java EE programming all-together.

I would like to create a stub class for authentication testing which should be activated in the default Ma

2条回答
  •  暖寄归人
    2021-01-23 04:13

    It is possible, with some footwork. You will have to put your class(es) in a dependency and use the profiles in this manner:

    
        
            default
            
                 ...
           
        
        
            someotherprofile
            
                 ...
           
        
     
    

    Also, the classes will have to be in the same package for this to work.

    Cheers,

提交回复
热议问题