Dependency resolution with -am/-amd

2020-03-12 Thread Mitch Denny
I’m using Maven in a CI scenario right now making use of the -am and -amd 
switches. We are having an issue right now with how the list of projects to 
make is solved. Consider the following five projects:

A, B, C, D, and E.

The dependencies between these projects are as follows:

E depends on A
E depends on C
E depends on D
C depends on A
C depends on B
D depends on A
B depends on A

So I execute the following command:

mvn install -pl C -am -amd

The following happens:

A builds because C depends on it (-am switch)
B builds because C depends on it (-am switch)
C builds because it is in the project list (-pl switch)
E builds because it depends on C … but fails (-amd switch)
D does not build

D is not covered by -am (makes sense) but I was surprised that -amd didn’t 
result in it getting picked up. I thought that when Maven was resolving the 
dependencies to build it would see that D was in the graph and in order to 
successfully build E, it would also need to build D.

But it appears that -amd doesn’t work that way. In these scenarios, what is the 
expected way to resolve this dependency arrangement. Assume that this is just a 
subset of a larger graph and my intention is not to build the entire graph.

One thing that I am considering doing is making D depend explicitly on C via a 
test dependency. This seems to work, but feels hacky. In a picture this is what 
our graph looks like:

[cid:image001.png@01D5F94D.BA6AD820]



Sent from Mail for Windows 10



Maven Embedder 3.3.9 Functional Example Help

2017-04-07 Thread Mitch Turner
Hello folks,

I am attempting to use maven-embedder:3.3.9 and have thus far been
unsuccessful.

I forked a functioning repo for Maven version 3.1.1 however I would like to
use 3.3.9 or newer.


My attempt to run 3.3.9 is here:
https://github.com/tc-turner/maven-embedder-otg/tree/339

You can see the full stack trace here:
https://github.com/tc-turner/maven-embedder-otg/issues/1


Here is a portion of the stack trace in case it is obvious to you:

mturner-ol:target mturner$ java -jar
maven-embedder-example-1-jar-with-dependencies.jar
[main] WARN Sisu - Error injecting:
org.apache.maven.project.DefaultProjectBuildingHelper
com.google.inject.ProvisionException: Unable to provision, see the
following errors:

1) No implementation for org.apache.maven.classrealm.ClassRealmManager
was bound.
  while locating org.apache.maven.project.DefaultProjectBuildingHelper

1 error
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1025)
at 
com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1051)
at 
org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
at 
com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
at 
com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53)
at 
com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:65)
at 
com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
at 
com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:133)
at 
com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
at 
com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:63)
at 
com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
at 
com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at 
com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)



Does anyone have a functional example of using maven-embedder?

Thanks,

Mitchell Turner


automate localhost deploy

2007-11-15 Thread mitch
Hello, I'm using maven2 (and the m2eclipse integration plugin) and am able
to use the deploy goal successfully to deploy to a remote repository.  But I
wonder what the easiest way is to automate my manual steps of deploying to
my localhost tomcat (including stopping and starting the container).  Any
idea how I could automate these steps?  The steps would be:

- stop tomcat
- delete old war and app in my tomcat/webapps
- rename the new war in my eclipse project /target dir
- deploy the new war from my eclipse project /target dir to my localhost
tomcat/webapps dir
- start tomcat

Thx for any help!


Upgrading a .jar in maven's /lib directory for plugin..

2004-12-07 Thread Mitch Mattek
Hey,

My plugin, I needed to upgrade the jelly-util from the somewhat old one
released with Maven 1.01 (commons-jelly-tags-util-20030211.141939.jar).. I
was replacing it in my /lib and someone suggested I could just put it as a
dependency of my plugin's project.xml, but this doesn't work. Any ideas? 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Can't set plugin variables before bootstrap

2004-10-14 Thread Mitch Mattek
I'm trying to make a bootstrap from nothing build of our projects. I have
a project, which you can pull down, then execute multiproject, so my
thinking was.

1: execute maven cdp:bootstrap (this is my custom plugin)

This would 

maven:set plugin=scm property=maven.scm.cvs.module
value=cdpMultiBuild/
maven:set plugin=scm property=maven.scm.checkout.dir
value=${basedir}/
attainGoal name=scm:bootstrap-project/

Unfortunately I get
Plugin 'scm' in project 'null' is not available.

I suspect this because there is no pom context because there is no
project.xml for directory?

Also, I tried
${systemScope.put('maven.scm.cvs.module', 'cdpMultiBuild')}

But it doesn't seem to see these (I still get 'you must specify
maven.scm.cvs.module' like it didn't set it.

Any thoughts? Is there a way in code to get create a POM context? I realize
I could write a script which set all the properties with -D upon launch, but
my idea was for someone to have NO files at all and start fresh with just
maven.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Using more JSTL tag libraries in jelly?

2004-09-28 Thread Mitch Mattek
 
Ah... Thanks a lot. That is perfect. I was trying to use the jelly:new to
create a new string object, then use split() with invoke but couldn't
figure out how to handle passing an argument to the method. This does
exactly what I need.


-Original Message-
From: Felipe Leme [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 27, 2004 10:35 PM
To: Maven Users List
Subject: Re: Using more JSTL tag libraries in jelly?

Mitch,

On Mon, 2004-09-27 at 18:55, Mitch Mattek wrote:
 I want to use the JSTL split function from JSTL functions library. 
 This is

Although this is not exactly the behavior you want, you could use the
tokenizer tag instead:


http://jakarta.apache.org/commons/jelly/libs/util/tags.html#util:tokenize

 implemented in JSTL, but Maven isn't setup with jelly out of the box for
it.

No, this is not a Maven problem, but a Jelly/JEXL issue.

 How do I set up a new taglib for use in jelly? I know the JSTL taglib 
 jar is already in the maven iblio repository, so how would I do that?

Actually, jelly tags are not the same as JSTL/JSP tags. Although they share
the concepts, they are different classes, so Jelly doesn't depend on the JSP
jars. In other words, you can't simply use the JSTL/Standard JAR on Jelly -
you need to implement the equivalent tags using Jelly's API. Regarding the
split function per se, it's even more complicated, as it must be implemented
using Jelly's EL, which I think it's JEXL (I'm still not that familiar with
Jelly to tell you for sure :-)

-- Felipe




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Using more JSTL tag libraries in jelly?

2004-09-27 Thread Mitch Mattek
I want to use the JSTL split function from JSTL functions library. This is
implemented in JSTL, but Maven isn't setup with jelly out of the box for it.
How do I set up a new taglib for use in jelly? I know the JSTL taglib jar is
already in the maven iblio repository, so how would I do that?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Ant:copy to absolute path?

2004-09-08 Thread Mitch Mattek
I'll reply to myself and say we figured this out. It's really more of an ant
thing.

I changed it to:

ant:copy 
file=${maven.build.dir}/${maven.final.name}.jar
todir=//${maven.cdp.riskserver.home}/bin/
/ 

The // tells ant it's an absolute path.
Then having maven.cdp.riskserver.home=c:/whatever in the build.properties
works fine.

-Original Message-
From: Jefferson K. French [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 07, 2004 2:32 PM
To: Maven Users List
Subject: Re: Ant:copy to absolute path?

How is maven.cdp.riskserver.home defined?

On Tue, 07 Sep 2004, at 13:19:34 [GMT -0400] Mitch Mattek wrote:

 Hey, I've got to copy some files to an absolute target. I'm putting 
 this is in a property, and trying to use the ant:copy, but maven keeps 
 apending the relative path in front.

 ant:copy 
 file=${maven.build.dir}/${maven.final.name}.jar 
 todir=${maven.cdp.riskserver.home}/bin

 /

 The todir above is append the maven.build.dir in front of it. Is 
 there some way to override this?

--
mailto:[EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Ant:copy to absolute path?

2004-09-07 Thread Mitch Mattek
Hey, I've got to copy some files to an absolute target. I'm putting this is
in a property, and trying to use the ant:copy, but maven keeps apending the
relative path in front.

ant:copy 
file=${maven.build.dir}/${maven.final.name}.jar 
todir=${maven.cdp.riskserver.home}/bin

/

The todir above is append the maven.build.dir in front of it. Is there
some way to override this?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Pass classpath to ant

2004-08-26 Thread Mitch Mattek
Hey,

I'm trying to slowly migrate our build system to maven.

As step one, I'm just trying to use the maven jar dependency thing to
download jar's then shell to ant scripts which have everything happening
correctly.

I have a custom plugin and am trying to do this

goal name=cdp:antbuild
echocdp antbuild/echo
echoadding the classpath/echo

!--deploy:copy-deps todir=/path/--

ant:ant dir=${basedir} antfile=build.xml
target=all   
ant:classpath
ant:path
refid=maven.dependency.classpath/
ant:pathelement path=${maven.build.dest}/
/ant:classpath
/ant:ant  
/goal

I got the snippet above from the java:compile plugin, but I get a message
that maven.dependency.classhpath is undefined. 

The way we build now is, we have a large bat file which builds the classpath
for ant and includes it when it launches ant.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Pass classpath to ant

2004-08-26 Thread Mitch Mattek
 
-Original Message-
From: Jarrell, Maury [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 26, 2004 2:50 PM
To: 'Maven Users List'
Subject: RE: Pass classpath to ant

You might try the maven ant goal. It creates a build.xml file that allows
ant to build your project.
 

Well, that builds an ant file with all the classpath dependencies built into
the file. This isn't really what I want. I've got some pretty complex ant
files. Initally, the big gain for us would be able to get rid of each
project's jars and replace them with maven project.xml files defining
dependecies.

Obviously, maven is able to pass this classpath along to ant in the
java:compile plugin. That's what I want to do, except call the all target
in the existing build.xml files, passing along the build classpath that
maven builds thru the dependencies.

Eventually, I plan on building all the stuff that is in the ant files to the
plugin I'm writing. But we could solve some huge problems right away just by
using the jar dependencies quickly.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]