views:

44

answers:

3

Maven won't overwrite the built version of an eclipse project in my local repository. I only changed a META-INF/MANIFEST.MF file, but Maven doesn't seem to recognize that and therefore doesn't overwrite the artifacts in the local repository. How can I force it to overwrite? This is the maven log:

[INFO] 
[INFO] --- maven-jar-plugin:2.2:jar (default-jar) @ message ---
[INFO] 
[INFO] --- maven-install-plugin:2.3:install (default-install) @ message ---
[INFO] **Skipped re-installing C:\dev\ws\Message\target\message-0.0.1.jar to C:\Users\Tim\.m2\repository\samba\message\message\0.0.1\message-0.0.1.jar, seems unchanged**
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.915s
[INFO] Finished at: Fri Sep 03 15:22:12 CEST 2010
[INFO] Final Memory: 7M/175M
[INFO] ------------------------------------------------------------------------
A: 

Okay, I think I just saw that Maven doesn't deploy the METAINF/MENIFEST.MF file with the other files in the targets. Seems I have to work on that somehow. Sorry, I'm new to Maven.

Akku
A: 

Be careful when using RELEASE Versions with maven. You should not "redeploy" them - as the contract is that they will never change anymore. If you deploy a RELEASE Version to a global Maven repository (e.g. Nexus) you will not be able to redeploy it again. You have to build a new Version if changes are necessary.

In phases of development use SNAPSHOT Versions (0.0.1-SNAPSHOT). These can be changed and redeployed.

If you are only working with your local repository the rules are not that strong but you should know about the RELEASE / SNAPSHOT version differences.

K. Claszen
A: 

The problem was that I used the bundle plugin to generate osgi bundles. With these, the bundle plugin generates it's own MANIFEST.MF file and doesn't use the file that I put into my resources. In fact I also got some error when I tried to use my own MANIFEST.MF file in addition to the one generated by the bundle plugin.

Akku