This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Understanding mvn -e with "-DeploymentRepository"

 
Mike London
Ranch Hand
Posts: 1192
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Our project build, using "mvn -e" includes a -DeploymentRepository argument that points to a repo that's not on the local machine.

I know some of the jar files on that remote repo include up to date jar files we need to build the correct war file.

My question is different, however.

The confusion I have is the name of the argument itself: "DeploymentRepository" as it implies I'm deploying something to that remote repo.

What am I deploying to the remote repo?

Doesn't seem to be a way to remove it and still get a successful build.

Thanks in advance.

- mike
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18152
52
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "-e" option, if memory serves, is just to tell Maven to output a stacktrace if an operation fails and maybe be a bit more verbose about what Maven is doing. So it should be optional.

However, also relying on my memory (which is a chancy thing!), the "-DeploymentRepository" is just plain WRONG!

Maven makes extensive use of the JVM's ability to inject extra definitions into its Environment via the "-D" command-line option. So what you are actually doing is defining a variable named "eploymentRepository".

More likely you should be coding "-DDeploymentRepository", in other words.

Now whether a deployment repository should be a command-line variable is another matter altogether. YMMV, but Maven is intended to give consistent results with minimal prompting. Or, in this case, command-line appendages.

I'd probably code the thing into a profile myself. Less external knowledge required and fewer characters to mis-type (which is always important to me!)
 
Mike London
Ranch Hand
Posts: 1192
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Holloway wrote:The "-e" option, if memory serves, is just to tell Maven to output a stacktrace if an operation fails and maybe be a bit more verbose about what Maven is doing. So it should be optional.

However, also relying on my memory (which is a chancy thing!), the "-DeploymentRepository" is just plain WRONG!

Maven makes extensive use of the JVM's ability to inject extra definitions into its Environment via the "-D" command-line option. So what you are actually doing is defining a variable named "eploymentRepository".

More likely you should be coding "-DDeploymentRepository", in other words.

Now whether a deployment repository should be a command-line variable is another matter altogether. YMMV, but Maven is intended to give consistent results with minimal prompting. Or, in this case, command-line appendages.

I'd probably code the thing into a profile myself. Less external knowledge required and fewer characters to mis-type (which is always important to me!)


Thanks for your reply, Tim.

Sorry about the typo above. Yes, it should have been -DDeploymentRepository.

Thanks again.

-mike
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic