Profile Properties affecting another Profile

2006-05-03 Thread David H. DeWolf
I am unable to get profiles to cooperate with each other as I would like.
Has anyone done something similar to the following:

1) setup one profile within my pom which includes
   several integration-test plugins which need to 
   be executed on multiple environments. 

2) setup several profiles within my 
   profiles.xml which specify the environment 
   information which this profile should use. 

3) Configure the plugins in #1 above to utilize
   profile properties (such as $\{db.driver\})
   set in the profiles specified in #2
   for their configuration.

I then activate the profiles by:

mvn -P itest -Denv=local
mvn -P itest -Denv=dev
mvn -P itest -Denv=test

Examples of the pom and profiles.xml are below.

Unfortunately the profile properties do not seem to be available in for the
plugins to use.  A quote on the maven wiki
(http://docs.codehaus.org/display/MAVEN/Build+Profiles)
led me to believe this was doable, but I haven't found any references to
anyone doing something similar.

The reason I'm doing this is to avoid having to configure each set of
integration tests for each and every environment.  This seems to be much
more rohbust than I need.

How are other people solving this problem?
Should what I'm trying to accomplish work?
Any suggestsion?  

Thanks,

David



pom.xml:
=
. . .
profile
  iditest/id
  build
plugins
. . .integration test plugins here. . .
/plugins
  /build
/profile

profiles.xml
=
profiles
  profile
idlocal/id
activation
property
nameenv/name
valuelocal/value
/property
/activation
properties
db.drivercom.mysql.jdbc.Driver/db.driver
 
db.urljdbc:mysql://localhost:3306/db?autoReconnect=true/db.url
db.useruser/db.user
db.passpass/db.pass
/properties
/profile
. . .
/profiles



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



RE: Profile Properties affecting another Profile

2006-05-03 Thread David H. DeWolf
Actually, it seems as thought if I use a normal property value in the plugin
configuration vs. an escaped one everything works.  I'm not sure I
understand why. . .

Solution:

Change: $\{db.driver\} in plugin configuration
TO: ${db.driver}


David

 -Original Message-
 From: David H. DeWolf [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, May 03, 2006 11:55 AM
 To: users@maven.apache.org
 Subject: Profile Properties affecting another Profile
 
 I am unable to get profiles to cooperate with each other as I 
 would like.
 Has anyone done something similar to the following:
 
 1) setup one profile within my pom which includes
several integration-test plugins which need to 
be executed on multiple environments. 
 
 2) setup several profiles within my 
profiles.xml which specify the environment 
information which this profile should use. 
 
 3) Configure the plugins in #1 above to utilize
profile properties (such as $\{db.driver\})
set in the profiles specified in #2
for their configuration.
 
 I then activate the profiles by:
 
 mvn -P itest -Denv=local
 mvn -P itest -Denv=dev
 mvn -P itest -Denv=test
 
 Examples of the pom and profiles.xml are below.
 
 Unfortunately the profile properties do not seem to be 
 available in for the plugins to use.  A quote on the maven wiki
 (http://docs.codehaus.org/display/MAVEN/Build+Profiles)
 led me to believe this was doable, but I haven't found any 
 references to anyone doing something similar.
 
 The reason I'm doing this is to avoid having to configure 
 each set of integration tests for each and every environment. 
  This seems to be much more rohbust than I need.
 
 How are other people solving this problem?
 Should what I'm trying to accomplish work?
 Any suggestsion?  
 
 Thanks,
 
 David
 
 
 
 pom.xml:
 =
 . . .
 profile
   iditest/id
   build
 plugins
 . . .integration test plugins here. . .
 /plugins
   /build
 /profile
 
 profiles.xml
 =
 profiles
   profile
 idlocal/id
 activation
 property
 nameenv/name
 valuelocal/value
 /property
 /activation
 properties
 db.drivercom.mysql.jdbc.Driver/db.driver
  
 db.urljdbc:mysql://localhost:3306/db?autoReconnect=true/db.url
 db.useruser/db.user
 db.passpass/db.pass
 /properties
 /profile
 . . .
 /profiles
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



RE: [m2] refering to the project root directory

2006-05-03 Thread David H. DeWolf
I think ${basedir} is what you're looking for.

David 

 -Original Message-
 From: Dan Adams [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, May 03, 2006 4:17 PM
 To: Maven users list
 Subject: [m2] refering to the project root directory
 
 How do you refer to the project root directory in a pom? I 
 have a configuration setting that I want to set to a path 
 relative to the project root in a number of sub-modules.
 
 --
 Dan Adams
 Software Engineer
 Interactive Factory
 617.235.5857
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



RE: [m2] refering to the project root directory

2006-05-03 Thread David H. DeWolf
Ahh, well the problem you'll have is that there's not always a base
directory for that. The reason is that the parent does not have to be
installed locally.  

Can that configuration file be pushed into another artifact and included as
a dependency?

David


 -Original Message-
 From: Dan Adams [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, May 03, 2006 4:31 PM
 To: Maven Users List
 Subject: RE: [m2] refering to the project root directory
 
 Well, it seems that basedir will refer to the directory of 
 the current project/module. I want the path to the top level 
 project from within the the module pom.xmls.
 
 On Wed, 2006-05-03 at 16:22 -0400, David H. DeWolf wrote:
  I think ${basedir} is what you're looking for.
  
  David
  
   -Original Message-
   From: Dan Adams [mailto:[EMAIL PROTECTED]
   Sent: Wednesday, May 03, 2006 4:17 PM
   To: Maven users list
   Subject: [m2] refering to the project root directory
   
   How do you refer to the project root directory in a pom? I have a 
   configuration setting that I want to set to a path 
 relative to the 
   project root in a number of sub-modules.
   
   --
   Dan Adams
   Software Engineer
   Interactive Factory
   617.235.5857
   
   
   
 
   - To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 --
 Dan Adams
 Software Engineer
 Interactive Factory
 617.235.5857
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



Re: Deploy to local tomcat

2006-03-15 Thread David H. DeWolf
Try using the tomcat-maven-plugin. Configure it like this in the webapp's pom.

build
plugins
plugin
groupIdorg.codehaus.mojo/groupId
artifactIdtomcat-maven-plugin/artifactId
version1.0-SNAPSHOT/version
configuration
path//path
/configuration
/plugin
/plugins


On 3/15/06, Andrew Watters [EMAIL PROTECTED] wrote:
 Hi

 I'm trying to deploy a WAR to tomcat running on my local machine. I feel
 like I'm missing something really obvious here as I haven't been able to
 get it to work. Or am I just using the wrong plugin? I would be grateful
 if someone could point out where I am going wrong.

 Regards
 Andrew


 In pom.xml I have added

   profiles
   profile
   idlocal-andrew/id
   activation
   property
   nameenv/name
   valuelocal-andrew/value
   /property
   /activation
   distributionManagement
   site
   idlocal-andrew/id

 urlfile://C:/development2/projects/gcsite/servers/jakarta-tomcat-4.1.31/webapps/url
   /site
   /distributionManagement
   /profile
   /profiles

 and when I run 'mvn site-deploy -Denv=local-andrew -e' I get the
 following error

 [INFO] Error uploading site

 Embedded error: Could not make directory
 'C:\development2\projects\gcsite\servers\jakarta-tomcat-4.1.31\webapps\.'.
 [INFO]
 
 [INFO] Trace
 org.apache.maven.lifecycle.LifecycleExecutionException: Error uploading site
 at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:556)
 at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:47
 2)
 at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:451)
 at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.jav
 a:303)
 at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
 at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
 at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at
 org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
 at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
 at
 org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
 at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
 Caused by: org.apache.maven.plugin.MojoExecutionException: Error
 uploading site
 at
 org.apache.maven.plugins.site.SiteDeployMojo.execute(SiteDeployMojo.java:142)
 at
 org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
 at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
 ... 16 more
 Caused by: org.apache.maven.wagon.TransferFailedException: Could not
 make directory 'C:\development2\projects\gcsite\ser
 vers\jakarta-tomcat-4.1.31\webapps\.'.
 at
 org.apache.maven.wagon.providers.file.FileWagon.putDirectory(FileWagon.java:113)
 at
 org.apache.maven.plugins.site.SiteDeployMojo.execute(SiteDeployMojo.java:134)
 ... 18 more





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



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



Profiles Extending Profiles (or similar)

2006-03-08 Thread David H. DeWolf

I have some integration test plugins which I'm binding to my pom as follows:

. . .
profiles
  profile
idlocal/id
build
  plugins
plugin
 . . .with all dependencies, executions, configuration, etc. . .

  profile
iddev/id
build
  plugins
plugin
 . . .with all dependencies, executions, configuration, etc. . .

  profile
idtest/id
build
  plugins
plugin
 . . .with all dependencies, executions, configuration, etc. . .

This works well and the benefit is that by default none of the profiles 
are activated - thus making the build portable and the integration tests 
easy to switch on - when needed.


The downfall is that even though 90% of the plugin contents for each 
profile is identical (really only the configuration is different), I 
have to specify the plugin dependencies, goals, etc. . .for each 
environment.  This obviously doesn't scale very well -especially when 
you have significant dependencies.


Have others found work-arounds? Can one phase extend another?  Is there 
another way to achieve the same results that I've overlooked?


Thanks,

David


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



Re: What scope is like 'provided' and 'test' together?

2006-02-04 Thread David H. DeWolf
Lee,

Have you tried using the exclusions that are available within the
dependency declarations?

If this webservices.jar is needed in a project (say project-a) which
is included within an ear (say ear-project), you would define the
following dependency within the ear-project pom:

dependency
  groupIdwhatever/groupId
  artifactIdproject-a/artifactId
  version1.0/version
  scopecompile/scope
  exclusions
exclusion
  groupIdwhatever/groupId
  artifactIdwebservices/artifactId
/exclusion
  /exclusions
/dependency

With this approach, you could use a compile scoped dependency but not
have it included in the ear.

Hope that helps,

David

On 2/3/06, Lee Meador [EMAIL PROTECTED] wrote:
 I have a jar (webservices.jar) that I need for these things:

 1) Compile main source.
 2) Run tests in projects that are dependant on this one.

 But not for running the main source since that will run in the ejb
 container.

 scopeprovided/scope doesn't work because the jar isn't available for the
 tests in the dependent projects which need to instantiate a class from the
 jar but not to call it.
 scopecompile/scope doesn't work because the jar ends up inside the ear
 scopetest/scope doesn't work because the main code doesn't compile.

 Am I looking at this wrong somehow?

 The one solution I have found is to put it as provided in this project and
 put it as 'test in another project that runs tests that need classes. (I
 use the term project to mean a think with a POM of its own.) The problems
 with this are:

 1) I can't run any such tests in the same project. (I can live with this.)
 2) I have to put the dependency in the other project even though it is only
 needed when running the test that references this project. That seems
 wrong in some way.

 Any ideas?

 -- Lee Meador
 Sent from gmail. My real email address is [EMAIL PROTECTED]



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



Re: [M2] Ant attrib task

2006-01-24 Thread David H. DeWolf
Lee,

I think that all of the  plugin dependencies (for any plugin,
including antrun) should be in your local repository.

See: http://maven.apache.org/using/repositories.html

David

On 1/24/06, Lee Meador [EMAIL PROTECTED] wrote:
 So, where are the ant jars kept for the Maven antrun plugin?

 Excuse the repost but I got no response for 6 days. Perhaps nobody knows a
 thing about the problem but I did want the one question at the bottom
 answered if possible.

 Thanks

 -- Lee

 On 1/18/06, Lee Meador [EMAIL PROTECTED] wrote:
 
  Is there some reason I can't use the attrib task in ant when invoked
  from within Maven2?
 
  Here is my POM.xml
 
  build
  plugins
  plugin
  artifactIdmaven-antrun-plugin/artifactId
  executions
  execution
  phasegenerate-sources/phase
  configuration
  tasks
  ant antfile=build.xml dir=.
  target=wasWsdl2Java inheritRefs=true /
  /tasks
  sourceRoot${ project.build.directory
  }/generated-sources/java/sourceRoot
  /configuration
  goals
  goalrun/goal
  /goals
  /execution
  /executions
  /plugin
  /plugins
  /build
 
  The line in build.xml is:
 
  attrib readonly=true
fileset dir=${was.generated.src.dir}/com/me/program1
  includes=**/*.java/
  /attrib
 
  I'm just trying to set the java files to readonly since they just got
  generated by webspheres wsdl2java ant task. I don't want to be ... er ...
  anybody to be ... modifying them by mistake.
 
  The error says
 
  [INFO]
  
  [ERROR] BUILD ERROR
  [INFO]
  
 
  [INFO] Error executing ant tasks
 
  Embedded error: The following error occurred while executing this line:
  C:\java\eclipse31MavenWorkspace\31WebService\build.xml:110: Could not
  create task or type of type: attrib.
 
  Ant could not find the task or a class this task relies upon.
 
  This is common and has a number of causes; the usual
  solutions are to read the manual pages then download and
  install needed JAR files, or fix the build file:
   - You have misspelt 'attrib'.
 Fix: check your spelling.
   - The task needs an external JAR file to execute
  snip
 
  and so forth.
 
  If the answer isn't obvious I will need to track it down but I don't know
  where the ant is coming from that maven 2 uses.
 
  Where is ant coming from?
 
  Thanks.
 
  -- Lee Meador
  Sent from gmail. My real email address is [EMAIL PROTECTED]




 --
 -- Lee Meador
 Sent from gmail. My real email address is [EMAIL PROTECTED]



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



Re: MavenProject

2005-12-15 Thread David H. DeWolf

To have it injected into your MoJo, use:

/**
 * @parameter expression=${project}
 * @required
 * @readonly
 */
protected MavenProject project;

Jochen Wiedmann wrote:

Christopher Cobb wrote:


How do I give my plugin access to MavenProject??



dependency
  groupIdorg.apache.maven/groupId
  artifactIdmaven-project/artifactId
  version2.0/version
/dependency

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




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



AutoSynched Maven Repo for Apache Projects?

2005-12-10 Thread David H. DeWolf
Pluto 1.1 is about to be released.  For the life of me, I can't seem
to find the maven 2 repository for apache projects that is auto-synced
to ibiblio.  Is there one, or do I need upload the request to jira
like everyone else?

David

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



Re: Where is the source code for Maven?

2005-11-10 Thread David H. DeWolf
http://maven.apache.org/source-repository.html

David

On 11/10/05, Pilgrim, Peter [EMAIL PROTECTED] wrote:


 From the Maven page, there is no link to source code? Why not?
 Every other OSS project that I remember has an easy way to navigate to the
 source code distribution. Does Maven has a source zip or gzip file that
 people can download?

 --
 Peter Pilgrim :: J2EE Software Development
 Operations/IT - Credit Suisse First Boston,
 Floor 15, 5 Canada Square, London E14 4QJ, United Kingdom
 Tel: +44-(0)207-883-4497



 ==
 Please access the attached hyperlink for an important electronic
 communications disclaimer:

 http://www.csfb.com/legal_terms/disclaimer_external_email.shtml


 ==


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




Re: [M2] Injecting ArtifactFactory and ArtifactResolver into Plugin

2005-11-09 Thread David H. DeWolf
Is there a reason why that would work for ArtifactFactory but not for 
ArtifactResolver?


Brett Porter wrote:

The @component tag is in 2.0. The other form is deprecated.

/**
 * @component
 */
private ArtifactFactory factory;

(role is only necessary for a list of components or if it differs from the type)

- Brett

On 11/9/05, David H. DeWolf [EMAIL PROTECTED] wrote:


Jason van Zyl wrote:


On Tue, 2005-11-08 at 22:08 -0500, David H. DeWolf wrote:



I'm developing a plugin which requires an ArtifactFactory and
ArtifactResolver and am attempting to get them injected.  I have tried
two approaches:

@component role=org.apache.maven.artifact.resolver.ArtifactResolver
@component role=org.apache.maven.artifact.factory.ArtifactFactory



What are you trying to do exactly?


I'm attempting to create a plugin which will automate the installation
of the Pluto Portalinto an app server.  My requirements go beyond simply
deploying the war as Pluto requires some configuration, integration with
other webapps, and the deployment of shared and endorsed artifacts into
the app server.

I currently have a version of the plugin that will complete this task
when executed from within a utilities subproject (using the just
created artifacts).  I'd like to modify the plugin so that the
installation can use artifacts in the repository so that users don't
have to check out the source code first.  I'd also prefer not to have
the artifacts embeded within the plugin.


Thanks,

David





and

@parameter
expression=${component.org.apache.maven.artifact.resolver.ArtifactResolver}

@parameter
expression=${component.org.apache.maven.artifact.factory.ArtifactFactory}

It appears the later approach is appropriate for 2.0 and the former is
appropriate for the current trunk, however, I've tried both and am
having no luck with either approach.

Both approaches result in a NullPointerException which is hidden by a
previously fixed bug in DiagnosisUtils (patch applied against the trunk)
in which a secondary NullPointer is thrown if an exception message is null.

Any ideas?

Thanks,

David


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





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





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





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



Re: [M2] Injecting ArtifactFactory and ArtifactResolver into Plugin

2005-11-09 Thread David H. DeWolf
Hmmm. Definately a possibility. Thanks for the hint!

David

On 11/9/05, Jason van Zyl [EMAIL PROTECTED] wrote:

 On Tue, 2005-11-08 at 22:36 -0500, David H. DeWolf wrote:

   What are you trying to do exactly?
 
  I'm attempting to create a plugin which will automate the installation
  of the Pluto Portalinto an app server. My requirements go beyond simply
  deploying the war as Pluto requires some configuration, integration with
  other webapps, and the deployment of shared and endorsed artifacts into
  the app server.
 
  I currently have a version of the plugin that will complete this task
  when executed from within a utilities subproject (using the just
  created artifacts). I'd like to modify the plugin so that the
  installation can use artifacts in the repository so that users don't
  have to check out the source code first. I'd also prefer not to have
  the artifacts embeded within the plugin.

 Are you strictly interested in creating a plug-in or are you interested
 in making a tool that you could use from a different environment, say an
 Eclipse plug-in? If you are then I would suggest taking a look at the
 embedder. You could create something with the embedder and then wrap the
 resulting tool you create in a mojo to make it work within Maven 2.x.

 http://maven.apache.org/guides/mini/guide-embedding-m2.html

 Inside a mojo you would then use the @component tag to pull in the
 embedder but that's the only component you would need as the embedder is
 really a facade over all the features of Maven we would like to expose
 to tool integrators.

 --
 jvz.

 Jason van Zyl
 jason at maven.org http://maven.org
 http://maven.apache.org

 We know what we are, but know not what we may be.

 -- Shakespeare


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




[M2] Injecting ArtifactFactory and ArtifactResolver into Plugin

2005-11-08 Thread David H. DeWolf
I'm developing a plugin which requires an ArtifactFactory and 
ArtifactResolver and am attempting to get them injected.  I have tried 
two approaches:


@component role=org.apache.maven.artifact.resolver.ArtifactResolver
@component role=org.apache.maven.artifact.factory.ArtifactFactory

and

@parameter 
expression=${component.org.apache.maven.artifact.resolver.ArtifactResolver}


@parameter 
expression=${component.org.apache.maven.artifact.factory.ArtifactFactory}


It appears the later approach is appropriate for 2.0 and the former is 
appropriate for the current trunk, however, I've tried both and am 
having no luck with either approach.


Both approaches result in a NullPointerException which is hidden by a 
previously fixed bug in DiagnosisUtils (patch applied against the trunk) 
in which a secondary NullPointer is thrown if an exception message is null.


Any ideas?

Thanks,

David


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



Re: [M2] Injecting ArtifactFactory and ArtifactResolver into Plugin

2005-11-08 Thread David H. DeWolf

Jason van Zyl wrote:

On Tue, 2005-11-08 at 22:08 -0500, David H. DeWolf wrote:

I'm developing a plugin which requires an ArtifactFactory and 
ArtifactResolver and am attempting to get them injected.  I have tried 
two approaches:


@component role=org.apache.maven.artifact.resolver.ArtifactResolver
@component role=org.apache.maven.artifact.factory.ArtifactFactory



What are you trying to do exactly?


I'm attempting to create a plugin which will automate the installation 
of the Pluto Portalinto an app server.  My requirements go beyond simply 
deploying the war as Pluto requires some configuration, integration with 
other webapps, and the deployment of shared and endorsed artifacts into 
the app server.


I currently have a version of the plugin that will complete this task 
when executed from within a utilities subproject (using the just 
created artifacts).  I'd like to modify the plugin so that the 
installation can use artifacts in the repository so that users don't 
have to check out the source code first.  I'd also prefer not to have 
the artifacts embeded within the plugin.



Thanks,

David





and

@parameter 
expression=${component.org.apache.maven.artifact.resolver.ArtifactResolver}


@parameter 
expression=${component.org.apache.maven.artifact.factory.ArtifactFactory}


It appears the later approach is appropriate for 2.0 and the former is 
appropriate for the current trunk, however, I've tried both and am 
having no luck with either approach.


Both approaches result in a NullPointerException which is hidden by a 
previously fixed bug in DiagnosisUtils (patch applied against the trunk) 
in which a secondary NullPointer is thrown if an exception message is null.


Any ideas?

Thanks,

David


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





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



Re: Right way to structure a project (and its site)

2005-11-02 Thread David H. DeWolf
There may be a couple of options, however, the approach I prefer is the
following:

1) leave the structure just as you have defined below
2) define the site distribution management section in your parent pom as
follows:

distributionManagement
site
idwebsite/id
urlscp://minotaur.apache.org/www/portals.apache.org/pluto/url
/site
/distributionManagement

because m2 appends the subproject name to the uri when the url is defined in
the parent, when executing site:site site:deploy at the parent level, the
reactor will deploy the site to each of the modules to the appropriate
sub-site location.

3) override the distribution management in the dps-site module. This will
ensure that the dps-site module is deployed to the root directory instead of
to root/dps-site

4) your results:

root = contents of dps-site website
root/dps-shared = contents of dps-shared website
root/dps-client = contents of dbs-client website
etc. . .

Hope that helps,

David

On 11/2/05, Duane Homick [EMAIL PROTECTED] wrote:

 I have a multi module project that I have structured similar to how maven
 itself is structured:

 data-publishing-service
 + dps-shared
 src/main/java...
 src/main/test...
 pom.xml
 + dps-client
 src/main/java...
 src/main/test...
 pom.xml
 + dps-server-core
 src/main/java...
 src/main/test...
 pom.xml
 + dps-site
 src/site/...
 src/site/site.xml
 pom.xml
 pom.xml

 Each one of those subdirectories is itself a project with the parent
 specified as data-publishing-service.

 The problem I am having is with the site. How do I get a site to be
 generated with the javadoc for all the subprojects when using a directory
 structure where dps-site is itself a subproject. This is similar to how
 maven does it and they have javadoc for the project as a whole. Anyone know
 the trick I need to get the javadoc for the project into the dps-site?

 Im currently running:

 C:\src\data-publishing-service\dps-site\mvn site-deploy

 Thanks
 Duane Homick
 [EMAIL PROTECTED]
 Software Engineer - Sandvine Incorporated


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




Re: [m2] deployment of Jetty 6

2005-11-01 Thread David H. DeWolf



David Jencks wrote:


On Oct 26, 2005, at 3:30 AM, Greg Wilkins wrote:


Brett Porter wrote:

 . . .


Ideally, I think apache should branch all the standard javax
stuff into a project of it's own.   That way tomcat, jetty and
geronimo would all be siblings and there would be no cross
dependancies and versioning could be correctly done.



+1

Several geronimo developers have discussed this as well but we haven't 
had time to gather support from the other apache projects bundling specs 
such as tomcat, axis, pluto, etc etc etc.




Sorry for being a few days late, but you've got Pluto's support. . .let 
us know what we can do to help.


David






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



Re: [m2] What is the Maven 2 equivalent for site logos etc?

2005-10-25 Thread David H. DeWolf
This information now belongs in your site.xml.

See:

http://maven.apache.org/guides/mini/guide-site.html

and specifically the part on creating the site descriptor.

David

On 10/25/05, Pilgrim, Peter [EMAIL PROTECTED] wrote:


 In Maven 1.0 you wrote this in your project.xml

 organization
 nameCSFB (c) 2005/name
 urlhttp://www.csfb.net//url
 logohttp://www.csfb.net/images/standardmaessig.gif/logo
 /organization
 !-- the year the project started --
 inceptionYear2005/inceptionYear
 packagecom.csfb.csar.private.internal.ithttp://com.csfb.csar.private.internal.it
 /package
 logohttp://private-details.internal.foo.csfb.net/images/project_logo.gif
 /logo

 What do you in M2 pom.xml?

 TIA

 --
 Peter Pilgrim :: J2EE Software Development
 Operations/IT - Credit Suisse First Boston,
 Floor 15, 5 Canada Square, London E14 4QJ, United Kingdom
 Tel: +44-(0)207-883-4497



 ==
 Please access the attached hyperlink for an important electronic
 communications disclaimer:

 http://www.csfb.com/legal_terms/disclaimer_external_email.shtml


 ==


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




Re: any open source projects on M2 for an example ( Cargo ? )

2005-10-20 Thread David H. DeWolf
pluto 1.1 branch has made the switch and includes some custom plugins as
well. Check out:

http://svn.apache.org/repos/asf/portals/pluto/branches/pluto-1.1/

On 10/19/05, Jorg Heymans [EMAIL PROTECTED] wrote:


 Pete Thomas wrote:
  I was looking for some example projects that are using M2 and have a
  reasonably comprehensive set of artifacts e.g.
 

 cocoon is migrating to m2 as well.

 Jorg


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




Re: [m2] Exception running site:site

2005-10-20 Thread David H. DeWolf
I experienced this issue when I attempted to nest menu items. To fix,
change:

menu
menu
item/
/menu
/menu

to

menu
item/
/menu

menu
item/
/menu

or something similar.

David

On 10/20/05, Kees de Kooter [EMAIL PROTECTED] wrote:

 Sorry Brett,

 I just installed maven 2 (congrats with the release!) but the error is
 still happening:

 [ERROR] VM #displayTree: error : too few arguments to macro. Wanted 2 got
 0
 [ERROR] VM #menuItem: error : too few arguments to macro. Wanted 1 got 0
 [INFO] Generate Dependencies report.
 [INFO]
 
 [ERROR] FATAL ERROR
 [INFO]
 
 [INFO] null
 [INFO]
 
 [INFO] Trace
 java.lang.ClassCastException
 at
 org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.mergeMetadata
 (DefaultRepositoryMetadataManager.java:142)
 at
 org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.resolve
 (DefaultRepositoryMetadataManager.java:115)
 at
 org.apache.maven.artifact.transform.AbstractVersionTransformation.resolveVersion
 (AbstractVersionTransformation.java:62)
 at
 org.apache.maven.artifact.transform.SnapshotTransformation.transformForResolve
 (SnapshotTransformation.java:60)
 at
 org.apache.maven.artifact.transform.DefaultArtifactTransformationManager.transformForResolve
 (DefaultArtifactTransformationManager.java:40)
 at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(
 DefaultArtifactResolver.java:104)
 at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(
 DefaultArtifactResolver.java:63)
 at
 org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository
 (DefaultMavenProjectBuilder.java:380)
 at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository
 (DefaultMavenProjectBuilder.java:346)
 at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository
 (DefaultMavenProjectBuilder.java:332)
 at
 org.apache.maven.report.projectinfo.DependenciesReport$DependenciesRenderer.getMavenProjectFromRepository
 (DependenciesReport.java:347)
 at
 org.apache.maven.report.projectinfo.DependenciesReport$DependenciesRenderer.renderBody
 (DependenciesReport.java:232)
 at org.apache.maven.reporting.AbstractMavenReportRenderer.render(
 AbstractMavenReportRenderer.java:65)
 at org.apache.maven.report.projectinfo.DependenciesReport.executeReport(
 DependenciesReport.java:147)
 at org.apache.maven.reporting.AbstractMavenReport.generate(
 AbstractMavenReport.java:117)
 at org.apache.maven.doxia.DoxiaMojo.generateReportsPages(DoxiaMojo.java
 :807)
 at org.apache.maven.doxia.DoxiaMojo.execute(DoxiaMojo.java:321)
 at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
 DefaultPluginManager.java:399)
 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
 DefaultLifecycleExecutor.java:519)
 at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(
 DefaultLifecycleExecutor.java:482)
 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
 DefaultLifecycleExecutor.java:452)
 at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
 (DefaultLifecycleExecutor.java:301)
 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments
 (DefaultLifecycleExecutor.java:268)
 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
 DefaultLifecycleExecutor.java:137)
 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
 at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(
 NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(
 DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
 at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
 at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
 at org.codehaus.classworlds.Launcher.main(Launcher.java:375)


 On 10/13/05, Brett Porter [EMAIL PROTECTED] wrote:
  In the next couple of days. We have a release coming up.
 
  - Brett
 

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




Re: [m2] Exception running site:site

2005-10-20 Thread David H. DeWolf
your descriptor (site.xml) -- probably located at
project-home/src/site/site.xml

David

On 10/20/05, Kees de Kooter [EMAIL PROTECTED] wrote:

 I have not attempted anything to change yet, just run site:site.
 Which file are you referring to?

 Kees

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




Re: any open source projects on M2 for an example ( Cargo ? )

2005-10-20 Thread David H. DeWolf
Yes, moving Pluto 1.1 to trunk is actually up for discussion right now on
the pluto dev list.

Thanks for the plug!

David

On 10/20/05, Jason van Zyl [EMAIL PROTECTED] wrote:

 On Thu, 2005-10-20 at 00:11 -0400, David H. DeWolf wrote:
  pluto 1.1 branch has made the switch and includes some custom plugins as
  well. Check out:
 
  http://svn.apache.org/repos/asf/portals/pluto/branches/pluto-1.1/

 Is this going to be in the main line soon? BTW, I added your article to
 the list: http://maven.apache.org/maven2/articles.html
 --
 jvz.

 Jason van Zyl
 jason at maven.org http://maven.org
 http://maven.apache.org

 Simplex sigillum veri. (Simplicity is the seal of truth.)


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




Re: [m2] NoSuchMethodError exception when executing site:site

2005-10-17 Thread David H. DeWolf
Zheng,

I got the same thing over the weekend and found that Maven was downloading
the most recent plugins but I didn't have the most recent dist to go with
them. To get things working (at least partway), I cleared out my maven
plugings from the repo and installed M2 RC.

This got me further, but I still had an issue. . .if I remember, it had
something to do with trying to generate a site from a project without any
source. If I create a main/java dir or generate the site from a project
which contains source, it execs fine.

David


On 10/17/05, Zhong ZHENG [EMAIL PROTECTED] wrote:

 Hi, there,

 I am trying to use m2 to generate the project site. When executing
 site:site, i got the following NoSuchMethodError exception:

 [INFO] Searching repository for plugin with prefix: 'site'.
 [INFO]

 
 [INFO] Building Apache Pluto Site Chinese Translation
 [INFO] task-segment: [site:site]
 [INFO]

 
 [INFO] Setting property: classpath.resource.loader.class = '
 org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
 [INFO] Setting property: velocimacro.messages.on = 'false'.
 [INFO] Setting property: resource.loader = 'classpath'.
 [INFO] Setting property: resource.manager.logwhenfound = 'false'.
 [INFO] **
 [INFO] Starting Jakarta Velocity v1.4
 [INFO] RuntimeInstance initializing.
 [INFO] Default Properties File:
 org\apache\velocity\runtime\defaults\velocity.properties
 [INFO] Default ResourceManager initializing. (class
 org.apache.velocity.runtime.resource.ResourceManagerImpl)
 [INFO] Resource Loader Instantiated:
 org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
 [INFO] ClasspathResourceLoader : initialization starting.
 [INFO] ClasspathResourceLoader : initialization complete.
 [INFO] ResourceCache : initialized. (class
 org.apache.velocity.runtime.resource.ResourceCacheImpl)
 [INFO] Default ResourceManager initialization complete.
 [INFO] Loaded System Directive:
 org.apache.velocity.runtime.directive.Literal
 [INFO] Loaded System Directive:
 org.apache.velocity.runtime.directive.Macro
 [INFO] Loaded System Directive:
 org.apache.velocity.runtime.directive.Parse
 [INFO] Loaded System Directive:
 org.apache.velocity.runtime.directive.Include
 [INFO] Loaded System Directive:
 org.apache.velocity.runtime.directive.Foreach
 [INFO] Created: 20 parsers.
 [INFO] Velocimacro : initialization starting.
 [INFO] Velocimacro : adding VMs from VM library template :
 VM_global_library.vm
 [ERROR] ResourceManager : unable to find resource 'VM_global_library.vm'
 in
 any resource loader.
 [INFO] Velocimacro : error using VM library template VM_global_library.vm
 :
 org.apache.velocity.exception.ResourceNotFoundException: Unable
 to find resource 'VM_global_library.vm'
 [INFO] Velocimacro : VM library template macro registration complete.
 [INFO] Velocimacro : allowInline = true : VMs can be defined inline in
 templates
 [INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline
 may
 NOT replace previous VM definitions
 [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will be
 global in scope if allowed.
 [INFO] Velocimacro : initialization complete.
 [INFO] Velocity successfully started.
 [INFO] [site:site]
 ---
 constituent[0]: file:/D:/javasoft/maven-2.0-beta-3/lib/maven-
 core-2.0-beta-3.jar
 constituent[1]: file:/D:/javasoft/maven-2.0-beta-3/lib/maven-
 artifact-manager-2.0-beta-3.jar
 constituent[2]: file:/D:/javasoft/maven-2.0-beta-3/lib/plexus-
 input-handler-1.0-alpha-2.jar
 constituent[3]: file:/D:/javasoft/maven-2.0-beta-3/lib/maven-
 plugin-api-2.0-beta-3.jar
 constituent[4]: file:/D:/javasoft/maven-2.0-beta-3/lib/maven-
 plugin-descriptor-2.0-beta-3.jar
 constituent[5]: file:/D:/javasoft/maven-2.0-beta-3/lib/maven-
 artifact-2.0-beta-3.jar
 constituent[6]: file:/D:/javasoft/maven-2.0-beta-3/lib/commons-cli-1.0.jar
 constituent[7]: file:/D:/javasoft/maven-2.0-beta-3/lib/maven-
 model-2.0-beta-3.jar
 constituent[8]: file:/D:/javasoft/maven-2.0-beta-3/lib/maven-
 settings-2.0-beta-3.jar
 constituent[9]: file:/D:/javasoft/maven-2.0-beta-3/lib/maven-
 repository-metadata-2.0-beta-3.jar
 constituent[10]: file:/D:/javasoft/maven-2.0-beta-3/lib/jsch-0.1.21.jar
 constituent[11]: file:/D:/javasoft/maven-2.0-beta-3/lib/wagon-
 provider-api-1.0-alpha-4.jar
 constituent[12]: file:/D:/javasoft/maven-2.0-beta-3/lib/maven-
 monitor-2.0-beta-3.jar
 constituent[13]: file:/D:/javasoft/maven-2.0-beta-3/lib/maven-
 reporting-api-2.0-beta-3.jar
 constituent[14]: file:/D:/javasoft/maven-2.0-beta-3/lib/maven-
 profile-2.0-beta-3.jar
 constituent[15]: file:/D:/javasoft/maven-2.0-beta-3/lib/wagon-
 file-1.0-alpha-4.jar
 constituent[16]: file:/D:/javasoft/maven-2.0-beta-3/lib/maven-
 project-2.0-beta-3.jar
 constituent[17]: 

[M2] Mix between Provided and Test Scopes

2005-07-14 Thread David H. DeWolf
I'm attempting to utilize the servlet api within some mock tests (in 
addition to needing it to compile my main source).  I have attempted to 
mark the scope of the servlet api in the following manners:


1) Provided Scope
2) Test Scope
3) Two Separate Dependencies of Provided Scope AND Test Scope

And none of these seem to work.  When the scope is 'provided', the tests 
throw a class not found exception.  When the scope is 'test' the main 
source fails to compile.  When I attempt to use both, it appears as 
though the second dependency is ignored.


Has anyone else encountered this and found a work around?

Thanks,

David


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