• 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
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Why is my EAR Module Assembly constantly being renamed by Eclipse M2E Maven?

 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I use MAVEN SNAPSHOTS for my dependencies - which typically have a naming schema like "dependency-2.1.1.01-SNAPSHOT.jar"

However - every time I update my Maven Java project in my Eclipse Luna (with internal MAVEN 3.2.1) - it gives me the Ear Module Assembly as:

Source
/home/user/.m2/repository/com/dependency-2.1.1.01-SNAPSHOT.jar
Deploy Path
dependency-2.1.1.01-20150403.221111-1.jar

It seems to constantly append the Timestamp to the Deploy Path - when I want it to stay the same naming of "-SNAPSHOT".

Is there a MAVEN configuration in Eclipse (or outside) that I'm missing somewhere?

All I want is the following:

Source
/home/user/.m2/repository/com/dependency-2.1.1.01-SNAPSHOT.jar
Deploy Path
dependency-2.1.1.01-SNAPSHOT.jar

This is causing issues on my local JBoss test server - as it expects the naming of the JARs to be exactly using the "-SNAPSHOT.jar" naming schema when its Published.
 
author & internet detective
Posts: 41967
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Perry,
It's a two part fix. #2 is what you are asking about specifically. I'm posting both because it is more subtle being a runtime issue.

1) When configuring maven-ejb-plugin, add <useUniqueVersions>true</useUniqueVersions> in the manifest. Note that if you have multiple ear's (that depend on other ears), you need to do this for each or put this config in a parent pom. For example:



2) In your ear configuration in the pom, set <useBaseVersion>true</useBaseVersion>

These two combined will generate a jar without the timestamp and remove that timestamp from the manifest.mf dependencies.
 
Perry Terrance
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Jeanne for the response - let me try that and let you know.

One more thing, I found that when I ran Eclipse Kepler on the exact same workspace - it do not any Timestamps in the Deploy Path! Is there some different between Eclipse Luna and Kepler thats causing this - cause its all reading the same workspace (basically same MAVEN settings, POMs, etc)?
 
Jeanne Boyarsky
author & internet detective
Posts: 41967
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Different version of Maven maybe? I encountered this problem/solution with pure Maven and not specifically to Eclipse.
 
Good night. Drive safely. Here's a tiny ad for the road:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic