java - what does Maven -> Update Project... exactly? -
i getting frustrated one:
i using maven project, using jdbc eclipselink. mvn install
works intended. untill have alter pw in persitence.xml. when mvn clean
, afterwards mvn install
project broken , wrong (old) persitence.xml still in use. in eclipse have maven -> update project
(using m2e addon) , mvn install
works again.
now problem: on deployment server using command line scripting , found no mvn xyz
equivalent m2e functionality...
is there equivalent?
explicit scenario:
i developing on local maschine (osx/win7) in maven project imported in eclipse. i have jpa persistence interface encapsulate database connection realized via eclipselink. can deploy locally (mvn install
) after run mvn clean
, alter password in persitence.xml
mvn install
isnt possible anymore. classdefnotfound persitor
in tests because static initialize entitymanager cant connect cause of new persitence.xml
-- or to the lowest degree opinion, because stacktrace not helpful. but, after maven -> update project...
in eclipse on project, mvn install
works 1 time again , new password taken (tests run!).
when want deploy project on remote machine (debian, commandline) cant ´mvn install` pulled project, cause after changed password in persitence.xml deployment, 1 time again wrong persitence.xml or @ to the lowest degree cached used. hope create bit more clear.
solution: create sure persitence.xml placed in src/main/resources/meta-inf , not elsewhere. m2e catches persitence.xml wrong places (in case, src/main/java/meta-inf). wrong project structure.
looks can utilize mvn eclipse:clean eclipse:eclipse
regenerate eclipse project files -- hope sorts you.
java eclipse maven command-line
No comments:
Post a Comment