Re: maven-compiler-plugin woes

2012-10-04 Thread Davis Ford
Appending this as well:

$ mvn -version
Apache Maven 3.0.4 (r1232337; 2012-01-17 08:44:56+)
Maven home: /home/ubuntu/apache-maven-3.0.4
Java version: 1.7.0_07, vendor: Oracle Corporation
Java home: /usr/lib/jvm/jdk1.7.0/jre
Default locale: en_US, platform encoding: UTF-8
OS name: linux, version: 3.0.0-23-virtual, arch: i386, family: unix

On Thu, Oct 4, 2012 at 2:22 PM, Davis Ford davisf...@gmail.com wrote:

 This doesn't make a whole lot of sense to me.  Any idea what the problem
 is here?

 [INFO] BUILD FAILURE
 [INFO]
 
 [INFO] Total time: 2.944s
 [INFO] Finished at: Thu Oct 04 17:54:16 UTC 2012
 [INFO] Final Memory: 9M/23M
 [INFO]
 
 [ERROR] Failed to execute goal
 org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile
 (default-compile) on project example-server: Compilation failure:
 Compilation failure:
 [ERROR]
 /home/ubuntu/git/example-server/src/main/java/com/example/m2m/service/DeviceService.java:[17,25]
 error: package com.sun.jersey.api does not exist
 [ERROR]
 /home/ubuntu/git/my-server/src/main/java/com/example/m2m/service/DeviceService.java:[33,11]
 error: cannot find symbol
 [ERROR] symbol:   class JResponse
 [ERROR] location: class DeviceService

 The class I wrote DeviceService.java has this import:

 import com.sun.jersey.api.JResponse;

 pom.xml snipped:

 dependencies
dependency
 groupIdcom.sun.jersey/groupId
 artifactIdjersey-server/artifactId
 version${jersey.version}/version
 scoperuntime/scope
   /dependency
etc...
 /dependencies

 Ok, the compiler can't find it -- works fine in Eclipse - I built the
 eclipse project with mvn eclipse:eclipse, it resolves to the
 jersey-server-1.14.jar - in Eclipse, I expand the jar, and see the class
 is indeed in there.  dependency:tree shows it is in the classpath, and
 scope is runtime =

 ubuntu@$ mvn dependency:tree
 [INFO] Scanning for projects...
 [INFO]

 [INFO]
 
 [INFO] Building Example Webapp 1.0-SNAPSHOT
 [INFO]
 
 [INFO]
 [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ example-server
 ---
 [INFO] com.example:example-server:war:1.0-SNAPSHOT
 [INFO] +- org.zeromq:jzmq:jar:1.0:compile
  [INFO] +- com.google.protobuf:protobuf-java:jar:LATEST:compile
 [INFO] +- javax.ws.rs:jsr311-api:jar:1.1.1:compile
 [INFO] +- com.sun.jersey:jersey-server:jar:1.14:runtime
 [INFO] |  +- asm:asm:jar:3.1:runtime
 [INFO] |  \- com.sun.jersey:jersey-core:jar:1.14:runtime
 [INFO] +- com.sun.jersey:jersey-json:jar:1.14:runtime
 [INFO] |  +- org.codehaus.jettison:jettison:jar:1.1:runtime
 [INFO] |  |  \- stax:stax-api:jar:1.0.1:runtime
 [INFO] |  +- com.sun.xml.bind:jaxb-impl:jar:2.2.3-1:runtime
 [INFO] |  |  \- javax.xml.bind:jaxb-api:jar:2.2.2:runtime
 [INFO] |  | +- javax.xml.stream:stax-api:jar:1.0-2:runtime
 [INFO] |  | \- javax.activation:activation:jar:1.1:runtime
 [INFO] |  +- org.codehaus.jackson:jackson-core-asl:jar:1.9.2:runtime
 [INFO] |  +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.2:runtime
 [INFO] |  +- org.codehaus.jackson:jackson-jaxrs:jar:1.9.2:runtime
 [INFO] |  \- org.codehaus.jackson:jackson-xc:jar:1.9.2:runtime
 [INFO] +- com.sun.jersey.contribs:jersey-spring:jar:1.14:runtime
 [INFO] |  +- com.sun.jersey:jersey-servlet:jar:1.14:runtime
 [INFO] |  +- org.springframework:spring-core:jar:3.0.0.RC3:runtime
 [INFO] |  |  \- org.springframework:spring-asm:jar:3.0.0.RC3:runtime
 [INFO] |  +- org.springframework:spring-beans:jar:3.0.0.RC3:runtime
 [INFO] |  +- org.springframework:spring-context:jar:3.0.0.RC3:runtime
 [INFO] |  |  +- aopalliance:aopalliance:jar:1.0:runtime
 [INFO] |  |  \- org.springframework:spring-expression:jar:3.0.0.RC3:runtime
 [INFO] |  +- org.springframework:spring-web:jar:3.0.0.RC3:runtime
 [INFO] |  \- org.springframework:spring-aop:jar:3.0.0.RC3:runtime
 [INFO] +- org.slf4j:jcl-over-slf4j:jar:1.5.8:compile
 [INFO] +- org.slf4j:slf4j-api:jar:1.5.8:compile
 [INFO] +- org.slf4j:slf4j-log4j12:jar:1.5.8:compile
 [INFO] +- log4j:log4j:jar:1.2.14:compile
 [INFO] \- junit:junit:jar:4.8.2:test

 Let's validate that the class does indeed exist in that jarfile...and it
 does =

 ubuntu@$ jar tf
 ~/.m2/repository/com/sun/jersey/jersey-server/1.14/jersey-server-1.14.jar
 META-INF/MANIFEST.MF
 META-INF/
 META-INF/jersey-module-version
 META-INF/maven/
 META-INF/maven/com.sun.jersey/
 META-INF/maven/com.sun.jersey/jersey-server/
 META-INF/maven/com.sun.jersey/jersey-server/pom.properties
 META-INF/maven/com.sun.jersey/jersey-server/pom.xml
 META-INF/services/
 META-INF/services/com.sun.jersey.spi.StringReaderProvider
 META-INF/services/com.sun.jersey.spi.container.ContainerProvider
 META-INF/services/com.sun.jersey.spi.container.ContainerRequestFilter

 META-INF/services

resources-plugin, testResources, relative path, eclipse plugin

2010-06-03 Thread Davis Ford
Hi,

I have a multi-module project.  I have some test resources that a
project needs at runtime that are defined in another project.  I know
the correct would be to move shared resources into their own project,
but I don't have that luxury right now.  So, I do this:

testResources
testResource
directory${basedir}/../other-project/src/test/resources//directory
includes
includesome-file.xml/include
/includes
/testResource
/testResources

Then run:

mvn process-test-resources

This puts some-file.xml under target/test-classes/some-file.xml, which
is great b/c I need it there on the test classpath.  So far so
good...until I create the eclipse project and the eclipse plugin adds
this line to the .classpath file:

classpathentry kind=src
path=C:/path/other-project/src/test/resources
output=target/test-classes including=some-file.xml
excluding=**/*.java/

The problem is the windows path-name
[C:/path/other-project/src/test/resources]...apparently, eclipse can't
deal with it.  Under the problems tab in eclipse, it notes that the
resource can't be found, and the project can't be built.  I have to
manually go into Eclipse and delete the link, and link it back in
manually.

I've tried a number of different ways to get around this looking at
the various options for maven-eclipse-plugin and
maven-resources-plugin, but I'm coming up short.  Any ideas??

Thanks in advance,
Davis

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: resources-plugin, testResources, relative path, eclipse plugin

2010-06-03 Thread Davis Ford
I don't have the luxury -- product is preparing to ship, build
refactorings won't be allowed.  Not under my control right now.
Believe me there are a lot of things I'd like to fix the right way.

Any other options?

On Thu, Jun 3, 2010 at 12:39 PM, Wayne Fay wayne...@gmail.com wrote:
 I have a multi-module project.  I have some test resources that a
 project needs at runtime that are defined in another project.  I know
 the correct would be to move shared resources into their own project,
 but I don't have that luxury right now.  So, I do this:

 You know what you should do -- just spend the time and fix it right.
 Surely that will take less time than constantly fighting with Eclipse,
 sending emails to this list, etc right??

 Wayne

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org





-- 
Zeno Consulting, Inc.
home: http://www.zenoconsulting.biz
blog: http://zenoconsulting.wikidot.com
p: 248.894.4922
f: 313.884.2977

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



mvn classpath weirdness with eclipse plugin

2009-05-05 Thread Davis Ford
Hi, I've been using mvn for a lot of years now, but I've just
encountered a bizarre issue that I have no explanation for.

I am having trouble with the following dependencies

dependency
groupIdaspectj/groupId
artifactIdaspectjrt/artifactId
version1.5.3/version
/dependency
dependency
groupIdaspectj/groupId
artifactIdaspectjweaver/artifactId
version1.5.3/version
/dependency

We are using Archiva -- and these are cached.  If I run:

$ mvn -X eclipse:eclipse

I can see the following in the output:
[DEBUG] Adding managed dependencies for com.example:drm
[DEBUG]   aspectj:aspectjrt:jar:1.5.3
[DEBUG]   aspectj:aspectjweaver:jar:1.5.3

The jars are in my local repo.  However, these jars are not added to
the .classpath file, nor do they show up in Reference Libraries under
eclipse.

I have verified that this happens on multiple developer machines, so
it isn't localized to a single environment.

What is even stranger is that if you run the same project with mvn
idea:idea, the aspectj jars show up in the classpath for Intellij.

I am at a loss.  We have no exclusions in the pom.  Where should I look next?

Thanks in advance,
Davis

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



org.apache.maven.plugins:maven-eclipse-plugin:2.7-SNAPSHOT ignores maven-compiler-plugin

2009-04-23 Thread Davis Ford
Hi, I just enabled all snapshots for plugins, and a side effect of
this was to pull down
org.apache.maven.plugins:maven-eclipse-plugin:2.7-SNAPSHOT version of
eclipse plugin.

Now, my project breaks in eclipse b/c it sets the JDK to be (I think)
the system default (which is JDK 1.5), but my maven-compiler-plugin
settings in the pom specify 1.6.  So maven compiles the sources, and
when I launch the project in eclipse, it throws an error saying the
class version is wrong.

Nothing very interesting in the config below.  This problem did not
exist for me until I just opened up plugin snapshots -- which I think
I'll turn off.  This is on:
$ mvn -version
Maven version: 2.0.9
Java version: 1.6.0_07
OS name: mac os x version: 10.5.6 arch: x86_64 Family: mac



plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-eclipse-plugin/artifactId
configuration
downloadSourcestrue/downloadSources

downloadJavadocstrue/downloadJavadocs
/configuration
/plugin

plugin
artifactIdmaven-compiler-plugin/artifactId
configuration
source1.6/source
target1.6/target
/configuration
/plugin

-- 
Zeno Consulting, Inc.
home: http://www.zenoconsulting.biz
blog: http://zenoconsulting.wikidot.com
p: 248.894.4922
f: 313.884.2977

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



How to share resources across projects in Maven

2009-04-23 Thread Davis Ford
Hi Brian -- I'm trying to emulate your blog:
http://www.sonatype.com/people/2008/04/how-to-share-resources-across-projects-in-maven/

for sharing resources across a multi-module project.  It is a grand
trick, but one that doesn't seem to be working for me.

I have the config project setup just fine.  It generates a .zip
archive.  I have done mvn install on it.

So, another project depends on it:

dependencies
dependency
groupId${project.groupId}/groupId
artifactIdelibrary-config/artifactId
version${project.version}/version
classifierresources/classifier
typezip/type
scopeprovided/scope
/dependency

And I have set this up:

build
resources
resource

directory${basedir}/src/main/resources/directory
/resource
resource

directory${project.build.directory}/generated-resources/directory
filteringtrue/filtering
/resource
/resources
plugins
plugin
artifactIdmaven-dependency-plugin/artifactId
executions
execution
idunpack-config/id
goals

goalunpack-dependencies/goal
/goals

phasegenerate-resources/phase
configuration

outputDirectory${project.build.directory}/generated-resources/outputDirectory

includeGroupIds${project.groupId}/includeGroupIds

includeArtifacIdselibrary-config/includeArtifacIds

includeTypeszip/includeTypes
/configuration
/execution
/executions
/plugin

If I run mvn package or mvn process-resources or mvn
process-test-resources, it never creates the outputDirectory and
copies the files inside that zip there.  What am I missing?

Regards,
Davis

-- 
Zeno Consulting, Inc.
home: http://www.zenoconsulting.biz
blog: http://zenoconsulting.wikidot.com
p: 248.894.4922
f: 313.884.2977

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: org.apache.maven.plugins:maven-eclipse-plugin:2.7-SNAPSHOT ignores maven-compiler-plugin

2009-04-23 Thread Davis Ford
My apologies Barrie...this is the con entry:

classpathentry kind=con path=org.eclipse.jdt.launching.JRE_CONTAINER/

User error.  Somehow my eclipse default JDK/JRE setting got switched
back to JDK 5.  When I refreshed using mvn eclipse:eclipse it resets
the JDK back to default JRE_CONTAINER -- whereas only the project was
set previously on 6.  Its the IDE setting that changed for me, and
this was the root of my problem.  I reset this globally in Eclipse and
all is well.

--davis

On Thu, Apr 23, 2009 at 10:56 PM, Barrie Treloar baerr...@gmail.com wrote:
 On Fri, Apr 24, 2009 at 11:41 AM, Davis Ford
 davisf...@zenoconsulting.biz wrote:
 Hi, I just enabled all snapshots for plugins, and a side effect of
 this was to pull down
 org.apache.maven.plugins:maven-eclipse-plugin:2.7-SNAPSHOT version of
 eclipse plugin.

 Now, my project breaks in eclipse b/c it sets the JDK to be (I think)
 the system default (which is JDK 1.5), but my maven-compiler-plugin
 settings in the pom specify 1.6.  So maven compiles the sources, and
 when I launch the project in eclipse, it throws an error saying the
 class version is wrong.

 Nothing very interesting in the config below.  This problem did not
 exist for me until I just opened up plugin snapshots -- which I think
 I'll turn off.  This is on:
 $ mvn -version
 Maven version: 2.0.9
 Java version: 1.6.0_07

 It should be setting it to 1.6.

 Can you check the .classpath file that gets created and look at what
 kind=con is defined? (It should be the last entry)

 It should either be
  classpathentry kind=con path=org.eclipse.jdt.launching.JRE_CONTAINER/
 which takes the default JRE defined in eclipse.
 Check what version that is in the eclipse preferences Java  Installed JREs.

 or
 classpathentry kind=con
 path=org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6/

 Which will use the Execution Environment bound to JavaSE-1.6 in your
 eclipse preferences Java  Installed JREs  Execution Environment.

 I can't find any integration tests for 1.6 specifically but we have
 ones for J2SE-1.4.

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org





-- 
Zeno Consulting, Inc.
home: http://www.zenoconsulting.biz
blog: http://zenoconsulting.wikidot.com
p: 248.894.4922
f: 313.884.2977

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: How to share resources across projects in Maven

2009-04-23 Thread Davis Ford
I think it had something to do with my recent plugin snapshot issues.
I wiped out my local repo.  Turned off plugin snapshots on my
settings.xml, and rebuilt -- and now it is working.  Very nice tip,
btw!

On Thu, Apr 23, 2009 at 11:08 PM, Brian Fox bri...@infinity.nu wrote:
 I don't see anything obvious. Can you attach some build logs? The dep plugin
 is pretty verbose about what it's doing so it should hopefully be obvious.

 On 4/23/2009 10:54 PM, Davis Ford wrote:

 Hi Brian -- I'm trying to emulate your blog:

 http://www.sonatype.com/people/2008/04/how-to-share-resources-across-projects-in-maven/

 for sharing resources across a multi-module project.  It is a grand
 trick, but one that doesn't seem to be working for me.

 I have the config project setup just fine.  It generates a .zip
 archive.  I have done mvn install on it.

 So, another project depends on it:

 dependencies
                dependency
                        groupId${project.groupId}/groupId
                        artifactIdelibrary-config/artifactId
                        version${project.version}/version
                        classifierresources/classifier
                        typezip/type
                        scopeprovided/scope
                /dependency

 And I have set this up:

 build
                resources
                        resource

  directory${basedir}/src/main/resources/directory
                        /resource
                        resource

  directory${project.build.directory}/generated-resources/directory
                                filteringtrue/filtering
                        /resource
                /resources
                plugins
                        plugin

  artifactIdmaven-dependency-plugin/artifactId
                                executions
                                        execution
                                                idunpack-config/id
                                                goals

  goalunpack-dependencies/goal
                                                /goals

  phasegenerate-resources/phase
                                                configuration

  outputDirectory${project.build.directory}/generated-resources/outputDirectory

  includeGroupIds${project.groupId}/includeGroupIds

  includeArtifacIdselibrary-config/includeArtifacIds

  includeTypeszip/includeTypes
                                                /configuration
                                        /execution
                                /executions
                        /plugin

 If I run mvn package or mvn process-resources or mvn
 process-test-resources, it never creates theoutputDirectory  and
 copies the files inside that zip there.  What am I missing?

 Regards,
 Davis



 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org





-- 
Zeno Consulting, Inc.
home: http://www.zenoconsulting.biz
blog: http://zenoconsulting.wikidot.com
p: 248.894.4922
f: 313.884.2977

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



maven-war-plugin: War Manifest Customization

2009-03-11 Thread Davis Ford
Hi, the war plugin explains how to customize the manifest here:

http://maven.apache.org/plugins/maven-war-plugin/examples/war-manifest-guide.html

I can't seem to repeat this.  I'm wondering what I'm doing wrong.
Here's a quick example with two projects: one jar project (foo-bar),
and one webapp project.  The foo-bar project depends on commons-cli,
and the webapp project depends on foo-bar.  If I configure the pom.xml
as follows, and run 'mvn package' on the webapp project, it includes
commons-cli in the WEB-INF/lib folder.  I don't want this. I want it
to include it in the META-INF/Manifest classpath, but not in
WEB-INF/lib -- any ideas?

Thanks in advance!

$ mvn archetype:create -DgroupId=com.example -DartifactId=foo-bar

project xmlns=http://maven.apache.org/POM/4.0.0;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd;
 modelVersion4.0.0/modelVersion
 groupIdcom.example/groupId
 artifactIdfoo-bar/artifactId
 packagingjar/packaging
 version1.0-SNAPSHOT/version
 namefoo-bar/name
 urlhttp://maven.apache.org/url
 dependencies
   dependency
 groupIdcommons-cli/groupId
 artifactIdcommons-cli/artifactId
 version1.0/version
   /dependency
 /dependencies
/project

$ mvn archetype:create -DgroupId=com.example -DartifactId=webapp
-DarchetypeArtifactId=maven-archetype-webapp

project xmlns=http://maven.apache.org/POM/4.0.0;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd;
 modelVersion4.0.0/modelVersion
 groupIdcom.example/groupId
 artifactIdwebapp/artifactId
 packagingwar/packaging
 version1.0-SNAPSHOT/version
 namewebapp Maven Webapp/name
 urlhttp://maven.apache.org/url
 dependencies
   dependency
 groupIdcom.example/groupId
 artifactIdfoo-bar/artifactId
 version1.0-SNAPSHOT/version
 optionaltrue/optional
   /dependency
 /dependencies
 build
   finalNamewebapp/finalName
   plugins
 plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-war-plugin/artifactId
  version2.0/version
  configuration
archive
  manifest
addClasspathtrue/addClasspath
  /manifest
/archive
  /configuration
/plugin
   /plugins
 /build
/project

-- 
Zeno Consulting, Inc.
home: http://www.zenoconsulting.biz
blog: http://zenoconsulting.wikidot.com
p: 248.894.4922
f: 313.884.2977

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



mvn package exclude transitive deps from war archive

2009-03-05 Thread Davis Ford
Hi, so I have a packagingwar/packaging project, with some
dependencies, and I made all the deps be scopeprovided/scope, but
when I run:

$ mvn package

It still creates a war file with all the deps and transitive deps
under WEB-INF/lib/ - what am I doing wrong?  Do I need to use the
maven war plugin?

Thanks in advance,
Davis

-- 
Zeno Consulting, Inc.
home: http://www.zenoconsulting.biz
blog: http://zenoconsulting.wikidot.com
p: 248.894.4922
f: 313.884.2977

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: mvn package exclude transitive deps from war archive

2009-03-05 Thread Davis Ford
I managed to exclude direct dependencies and add them to the manifest
classpath as per
http://maven.apache.org/plugins/maven-war-plugin/examples/war-manifest-guide.html

--but it still puts all transitive dependencies in WEB-INF/lib.

For example. Project A is packagingjar/packaging

Project A artifact is jar, and it has a bunch of dependencies.

Project B is packagingwar/packaging and depends on project A like this:

dependency
   groupIdblah/groupId
   artifactIdA/artifactId
   versionblah/version
   optionaltrue/optional
/dependency

Then I configure maven war plugin like this:

plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-war-plugin/artifactId
version2.0/version
configuration
  archive
manifest
  addClasspathtrue/addClasspath
/manifest
  /archive
/configuration
  /plugin

What I want is that project A and all its transitive dependencies end
up in the Manifest classpath, but are not included in WEB-INF/lib.
What ends up happening with this configuration is that project-A.jar
is excluded from WEB-INF/lib, but it is in the Manifest classpath.
However, all project A's transitive dependencies are included in
WEB-INF/lib and they are in the Manifest classpath.  I want the latter
but not the former.  What am I missing?

Thanks in advance,
Davis

On Thu, Mar 5, 2009 at 7:27 PM, Davis Ford davisf...@zenoconsulting.biz wrote:
 Hi, so I have a packagingwar/packaging project, with some
 dependencies, and I made all the deps be scopeprovided/scope, but
 when I run:

 $ mvn package

 It still creates a war file with all the deps and transitive deps
 under WEB-INF/lib/ - what am I doing wrong?  Do I need to use the
 maven war plugin?

 Thanks in advance,
 Davis

 --
 Zeno Consulting, Inc.
 home: http://www.zenoconsulting.biz
 blog: http://zenoconsulting.wikidot.com
 p: 248.894.4922
 f: 313.884.2977




-- 
Zeno Consulting, Inc.
home: http://www.zenoconsulting.biz
blog: http://zenoconsulting.wikidot.com
p: 248.894.4922
f: 313.884.2977

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: mvn package exclude transitive deps from war archive

2009-03-05 Thread Davis Ford
Hi Wayne, thanks for the reply -- no luck on the clean.  I still get
all the jars.  See my reply to my post.  I configured the war plugin
as per the webpage, but still no luck.

On Thu, Mar 5, 2009 at 8:58 PM, Wayne Fay wayne...@gmail.com wrote:
 $ mvn package

 It still creates a war file with all the deps and transitive deps
 under WEB-INF/lib/ - what am I doing wrong?  Do I need to use the
 maven war plugin?

 Try mvn clean package. The jars are still sitting in /target, and
 therefore landing in your war.

 Wayne

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org





-- 
Zeno Consulting, Inc.
home: http://www.zenoconsulting.biz
blog: http://zenoconsulting.wikidot.com
p: 248.894.4922
f: 313.884.2977

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: mvn package exclude transitive deps from war archive

2009-03-05 Thread Davis Ford
Hi Wayne, here's a more concrete example.  I'm sure I'm just doing
something stupid, but I hope this makes it easier to see the
stupid-ness.

Create a new jar project:

mvn archetype:create -DgroupId=com.example -DartifactId=foo-bar

Make the pom.xml look like this:

project xmlns=http://maven.apache.org/POM/4.0.0;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd;
  modelVersion4.0.0/modelVersion
  groupIdcom.example/groupId
  artifactIdfoo-bar/artifactId
  packagingjar/packaging
  version1.0-SNAPSHOT/version
  namefoo-bar/name
  urlhttp://maven.apache.org/url
  dependencies
dependency
  groupIdcommons-cli/groupId
  artifactIdcommons-cli/artifactId
  version1.0/version
/dependency
  /dependencies
/project

Create a new war project:

mvn archetype:create -DgroupId=com.example -DartifactId=webapp
-DarchetypeArtifactId=maven-archetype-webapp

Make the pom.xml look like this:

project xmlns=http://maven.apache.org/POM/4.0.0;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd;
  modelVersion4.0.0/modelVersion
  groupIdcom.example/groupId
  artifactIdwebapp/artifactId
  packagingwar/packaging
  version1.0-SNAPSHOT/version
  namewebapp Maven Webapp/name
  urlhttp://maven.apache.org/url
  dependencies
dependency
  groupIdcom.example/groupId
  artifactIdfoo-bar/artifactId
  version1.0-SNAPSHOT/version
  optionaltrue/optional
/dependency
  /dependencies
  build
finalNamewebapp/finalName
plugins
  plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-war-plugin/artifactId
   version2.0/version
   configuration
 archive
   manifest
 addClasspathtrue/addClasspath
   /manifest
 /archive
   /configuration
 /plugin
/plugins
  /build
/project

Do mvn install on the foo-bar project.
Do mvn package on the webapp project.  See that all the commons-cli
dependencies are included inside the war WEB-INF/lib directory?  How
to only add this to the manifest classpath and not include in
WEB-INF/lib ?

Regards,
Davis

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



resource filtering in pom.xml

2009-03-04 Thread Davis Ford
Is it possible to have maven do resource filtering on the fly inside
the pom.xml -- albeit without writing to the file (i.e. in-memory
only)

For example, I might be using maven-sql-plugin:

configuration
  driver${db.driver}/driver
  url${db.url}/url
  username${db.username}/username
  password${db.password}/password
/configuration

I don't want to hard-code these values in the pom.xml.  I want them to
be read from an external properties file.  Is this possible?

Thanks in advance,
Davis
-- 
Zeno Consulting, Inc.
home: http://www.zenoconsulting.biz
blog: http://zenoconsulting.wikidot.com
p: 248.894.4922
f: 313.884.2977

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: resource filtering in pom.xml

2009-03-04 Thread Davis Ford
Awesome -- exactly what I was looking for Thomas.  Thank you.

On Wed, Mar 4, 2009 at 11:53 AM, Thomas Marti thx...@schweiz.org wrote:
 Hello Davis

 You can use the Maven Properties Plugin
 = http://haroon.sis.utoronto.ca/zarar/properties-maven-plugin/


 Greetings, Thomas

 Davis Ford wrote:

 Is it possible to have maven do resource filtering on the fly inside
 the pom.xml -- albeit without writing to the file (i.e. in-memory
 only)

 For example, I might be using maven-sql-plugin:

 configuration
          driver${db.driver}/driver
          url${db.url}/url
          username${db.username}/username
          password${db.password}/password
 /configuration

 I don't want to hard-code these values in the pom.xml.  I want them to
 be read from an external properties file.  Is this possible?

 Thanks in advance,
 Davis

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org





-- 
Zeno Consulting, Inc.
home: http://www.zenoconsulting.biz
blog: http://zenoconsulting.wikidot.com
p: 248.894.4922
f: 313.884.2977

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



how to stop pom downloads

2009-03-04 Thread Davis Ford
Hi, we have an internal repo here (using Archiva), and I manually
deployed some jars to it.  However, whenever I run a maven command it
is constantly trying to check the pom against the server version.
Example:


Downloading: 
http://internal-maven-repo:8080/archiva/repository/internal//weblogic/webservices/9.2/webservices-9.2.pom

This keeps repeating and it is really slow.  I noticed that jars that
I pulled from the Internet and cached in Archiva it does not do this
for.  Is there some way to stop it from doing this?  Why does it
appear to do it only for the jars I manually deployed?

Thanks in advance,
Davis

-- 
Zeno Consulting, Inc.
home: http://www.zenoconsulting.biz
blog: http://zenoconsulting.wikidot.com
p: 248.894.4922
f: 313.884.2977

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: how to stop pom downloads

2009-03-04 Thread Davis Ford
slaps-forehead  -- I did mvn install:install-file -- can you make
the install command generate a pom.xml?

On Wed, Mar 4, 2009 at 5:51 PM, Wendy Smoak wsm...@gmail.com wrote:
 On Wed, Mar 4, 2009 at 3:48 PM, Davis Ford davisf...@zenoconsulting.biz 
 wrote:
 Hi, we have an internal repo here (using Archiva), and I manually
 deployed some jars to it.  However, whenever I run a maven command it
 is constantly trying to check the pom against the server version.
 Example:

 Downloading: 
 http://internal-maven-repo:8080/archiva/repository/internal//weblogic/webservices/9.2/webservices-9.2.pom

 Does that file exist?

 This keeps repeating and it is really slow.  I noticed that jars that
 I pulled from the Internet and cached in Archiva it does not do this
 for.  Is there some way to stop it from doing this?  Why does it
 appear to do it only for the jars I manually deployed?

  My guess is that when you deployed the artifacts, you did not deploy
 a pom or have one generated.  Exactly how did you deploy the jars?

 --
 Wendy

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org





-- 
Zeno Consulting, Inc.
home: http://www.zenoconsulting.biz
blog: http://zenoconsulting.wikidot.com
p: 248.894.4922
f: 313.884.2977

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: how to stop pom downloads

2009-03-04 Thread Davis Ford
Yes, archiva has a way to deploy through the web interface with
generate pom option.

I'm trying to use the weblogic-maven-plugin which requires all these
silly jars from the weblogic install.  I just did a manual
install:install-file to my local repo to try to get it working.
However, whenever I run a command like:

mvn weblogic:deploy

I have to wait a couple minutes while it hits the server to check for
pom files.  I know how to fix it now.  I will deploy the jars to
archiva, or else use the generatePom option for installing locally.

The only annoying thing is that weblogic.jar is 53MB.  I tried
deploying that to archiva and it just times out.

soapboxI did not pick weblogic/soapbox

On Wed, Mar 4, 2009 at 6:02 PM, David C. Hicks dhi...@i-hicks.org wrote:


 Wendy Smoak wrote:

 On Wed, Mar 4, 2009 at 3:56 PM, Davis Ford davisf...@zenoconsulting.biz
 wrote:


 slaps-forehead  -- I did mvn install:install-file -- can you make
 the install command generate a pom.xml?


 Install is for your _local_ repo.  You need deploy:deploy-file, and
 yes, there's a parameter -DgeneratePom=true (if that's not the default
 already...)


 Does Archiva not have some kind of web interface from which you can do an
 install?  I know Nexus does.  It handles building the POM for you.

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org





-- 
Zeno Consulting, Inc.
home: http://www.zenoconsulting.biz
blog: http://zenoconsulting.wikidot.com
p: 248.894.4922
f: 313.884.2977

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: how to stop pom downloads

2009-03-04 Thread Davis Ford
True - although that would take me a long time.  In any event, I ended
up getting the 53MB weblogic.jar deployed to archiva - yay!

On Wed, Mar 4, 2009 at 7:50 PM, Wayne Fay wayne...@gmail.com wrote:
 The only annoying thing is that weblogic.jar is 53MB.  I tried
 deploying that to archiva and it just times out.

 There's no rule that says you can't break up a massive jar file like
 this into a series of jar files, and use dependencies to pull them
 all down and use them as needed...

 Wayne

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org





-- 
Zeno Consulting, Inc.
home: http://www.zenoconsulting.biz
blog: http://zenoconsulting.wikidot.com
p: 248.894.4922
f: 313.884.2977

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: how to stop pom downloads

2009-03-04 Thread Davis Ford
Bruce -- thanks a lot for this.  I am just trying to use the plugin
with 9.2, but I am hitting this issue:

http://www.mail-archive.com/u...@mojo.codehaus.org/msg00503.html

Is this issue one that you encountered also when trying the plugin
with 10.x?  I wouldn't mind having 10.x working, also.

On Wed, Mar 4, 2009 at 8:58 PM, Barrie Treloar baerr...@gmail.com wrote:
 On Thu, Mar 5, 2009 at 12:09 PM, Davis Ford
 davisf...@zenoconsulting.biz wrote:
 True - although that would take me a long time.  In any event, I ended
 up getting the 53MB weblogic.jar deployed to archiva - yay!

 BEWARE

 If you are using Weblogic 10 then you need to chase the dragons tail.
 As the jar defines a Class-Path in its Manifest using relative file 
 definitions.

 You need to add EACH one of these files into your maven repository AND
 then define each artifact as a dependency in your pom.

 We ended up creating an internal dependency project just for weblogic
 so you can depend upon that instead of having to cut-and-paste for
 every project.  However all the scopes are compile when some should be
 runtime)

 On my todo list is to extend the deploy plugin to also deploy
 artifacts defined in the Manfiest Class-Path...

 Here is the dependency pom (it may be useful to others)

 project xmlns=http://maven.apache.org/POM/4.0.0;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
 http://maven.apache.org/maven-v4_0_0.xsd;
  modelVersion4.0.0/modelVersion
  groupIdweblogic/groupId
  artifactIdweblogic-dependencies/artifactId
  packagingpom/packaging
  version10.0.0/version
  dependencies
    dependency
      groupIdweblogic/groupId
      artifactIdweblogic/artifactId
      version10.0.0/version
    /dependency
    dependency
      groupIdweblogic/groupId
      artifactIdjavax.jms_1.1/artifactId
      version10.0.0/version
      optionalfalse/optional
    /dependency
    dependency
      groupIdweblogic/groupId
      artifactIdjavax.servlet_2.5/artifactId
      version10.0.0/version
      optionalfalse/optional
    /dependency
    dependency
      groupIdweblogic/groupId
      artifactIdcom.bea.core.repackaged.asm_1.5.2/artifactId
      version10.0.0/version
      optionalfalse/optional
    /dependency
    dependency
      groupIdweblogic/groupId
      artifactIdcom.bea.core.diagnostics.instrumentor_1.0.0.0/artifactId
      version10.0.0/version
      optionalfalse/optional
    /dependency
    dependency
      groupIdweblogic/groupId
      artifactIdxbean/artifactId
      version9.2.1/version
      optionalfalse/optional
    /dependency
    dependency
      groupIdweblogic/groupId
      artifactIdwljmsclient/artifactId
      version10.0.0/version
      optionalfalse/optional
    /dependency
    dependency
      groupIdweblogic/groupId
      artifactIdcom.bea.core.descriptor_1.0.0.0/artifactId
      version10.0.0/version
      optionalfalse/optional
    /dependency
    dependency
      groupIdweblogic/groupId
      artifactIdcom.bea.core.utils_1.0.0.0/artifactId
      version10.0.0/version
      optionalfalse/optional
    /dependency
    dependency
      groupIdweblogic/groupId
      artifactIdcom.bea.core.utils.classloaders_1.0.0.0/artifactId
      version10.0.0/version
      optionalfalse/optional
    /dependency
    dependency
      groupIdweblogic/groupId
      artifactIdcom.bea.core.weblogic.workmanager_1.0.0.0/artifactId
      version10.0.0/version
      optionaltrue/optional
    /dependency
    dependency
      groupIdweblogic/groupId
      artifactIdcom.bea.core.weblogic.rmi.client_1.0.0.0/artifactId
      version10.0.0/version
      optionalfalse/optional
    /dependency
    dependency
      groupIdweblogic/groupId
      artifactIdcom.bea.core.transaction_2.0.0.0/artifactId
      version10.0.0/version
      optionalfalse/optional
    /dependency
    dependency
      groupIdweblogic/groupId
      artifactIdcom.bea.core.weblogic.security.wls_2.0.0.0/artifactId
      version10.0.0/version
      optionalfalse/optional
    /dependency
    dependency
      groupIdweblogic/groupId
      artifactIdcom.bea.core.weblogic.security_2.0.0.0/artifactId
      version10.0.0/version
      optionalfalse/optional
    /dependency
    dependency
      groupIdweblogic/groupId
      artifactIdcom.bea.core.logging_1.0.0.0/artifactId
      version10.0.0/version
      optionalfalse/optional
    /dependency
    dependency
      groupIdweblogic/groupId
      artifactIdcom.bea.core.management.core_1.0.0.0/artifactId
      version10.0.0/version
      optionaltrue/optional
    /dependency
    dependency
      groupIdweblogic/groupId
      artifactIdcom.bea.core.utils.full_1.0.0.0/artifactId
      version10.0.0/version
      optionalfalse/optional
    /dependency
    dependency
      groupIdweblogic/groupId
      artifactIdjavax.transaction_1.1/artifactId
      version10.0.0/version
      optionalfalse/optional
    /dependency
    dependency
      groupIdweblogic/groupId

how to get eclipse plugin to process-test-resources?

2009-03-02 Thread Davis Ford
Hi, when I run the eclipse goal like this: mvn eclipse:eclipse I also
want it to execute resources:testResources.

I tried something like this:

build
plugins
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-eclipse-plugin/artifactId
executions
execution
ideclipse/id

phaseprocess-test-resources/phase
goals
goaleclipse/goal
/goals
/execution
/executions
/plugin

But it doesn't work.  If I put it in a profile like this, it does
work, but I don't want to have to have a profile for it.  Is there a
way to accomplish this?

profiles
profile
ideclipse/id
build

defaultGoalprocess-test-resources/defaultGoal
plugins
plugin

artifactIdmaven-eclipse-plugin/artifactId
executions
execution
ideclipse/id

phaseprocess-test-resources/phase
goals

goaleclipse/goal
/goals
/execution
/executions
/plugin
/plugins
/build
/profile



-- 
Zeno Consulting, Inc.
home: http://www.zenoconsulting.biz
blog: http://zenoconsulting.wikidot.com
p: 248.894.4922
f: 313.884.2977

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: how to get eclipse plugin to process-test-resources?

2009-03-02 Thread Davis Ford
Yea, I know I can do that.  It would just be nice to not force
developers to have to remember both commands -- which is why I wanted
to configure the plugin to also run process-test-resources.  I looked
at the solution at the very bottom of the comments on this blog:
http://cmaki.blogspot.com/2007/10/getting-maven-and-eclipse-to-work.html
but that doesn't work for me.

We don't use the m2eclipse plugin for eclipse -- just the maven
command line eclipse plugin.

On Mon, Mar 2, 2009 at 2:56 PM, Carlos Sanchez carlo...@gmail.com wrote:
 mvn process-test-resources eclipse:eclipse

 or in your first example just do
 mvn process-test-resources


 On Mon, Mar 2, 2009 at 11:48 AM, Davis Ford
 davisf...@zenoconsulting.biz wrote:
 Hi, when I run the eclipse goal like this: mvn eclipse:eclipse I also
 want it to execute resources:testResources.

 I tried something like this:

 build
                plugins
                        plugin
                                groupIdorg.apache.maven.plugins/groupId
                                artifactIdmaven-eclipse-plugin/artifactId
                                executions
                                        execution
                                                ideclipse/id
                                                
 phaseprocess-test-resources/phase
                                                goals
                                                        goaleclipse/goal
                                                /goals
                                        /execution
                                /executions
                        /plugin

 But it doesn't work.  If I put it in a profile like this, it does
 work, but I don't want to have to have a profile for it.  Is there a
 way to accomplish this?

        profiles
                profile
                        ideclipse/id
                        build
                                
 defaultGoalprocess-test-resources/defaultGoal
                                plugins
                                        plugin
                                                
 artifactIdmaven-eclipse-plugin/artifactId
                                                executions
                                                        execution
                                                                
 ideclipse/id
                                                                
 phaseprocess-test-resources/phase
                                                                goals
                                                                        
 goaleclipse/goal
                                                                /goals
                                                        /execution
                                                /executions
                                        /plugin
                                /plugins
                        /build
                /profile



 --
 Zeno Consulting, Inc.
 home: http://www.zenoconsulting.biz
 blog: http://zenoconsulting.wikidot.com
 p: 248.894.4922
 f: 313.884.2977

 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org






-- 
Zeno Consulting, Inc.
home: http://www.zenoconsulting.biz
blog: http://zenoconsulting.wikidot.com
p: 248.894.4922
f: 313.884.2977


Re: maven-dependency-plugin

2008-03-25 Thread Davis Ford
Brian,

Maybe a dumb question, but is there a way I can just use the
maven-dependency-plugin programatically to accomplish what I'm trying
to do?

Can I just pull the plugin jar in so it is on the classpath like any
other dependency and use its API to get project.getArtifacts() ?

On Wed, Mar 19, 2008 at 6:02 PM, Brian E. Fox [EMAIL PROTECTED] wrote:
 Actually getting the list via a plugin is trivial. Just set a parameter
  like this:

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

  And then project.getArtifacts() will be all (including transitive)
  dependencies. You'll also need to specify @requiresDependencyResolution
  [scope] in the mojo annotations.

  There is also a tree component that you could use to get the output used
  to generate dependency:tree


  -Original Message-
  From: Davis Ford [mailto:[EMAIL PROTECTED]

 Sent: Wednesday, March 19, 2008 5:57 PM
  To: Maven Users List


 Subject: Re: maven-dependency-plugin

  Hi Brian,

  Indeed -- total goof-up on my part.  I had multiple project pom.xml
  files and was editing the wrong one.  It works like a charm.

  Quick related question...the whole purpose of me dumping this to a
  text file was because I could not see an easy way to programmatically
  get a list of all project dependenciesso I figured I'd create the
  .txt file and parse it myself.

  The reason I want this list is as part of reporting framework we have.
   We run a long-running set of quality checks on some data, and I need
  to be able to store with the final report the list of all things like
  .jar versions, database versions, etc., etc.

  Is there somewhere an API that would let me retrieve this same
  information in the code?

  Regards,
  Davis

  On Wed, Mar 19, 2008 at 4:50 PM, Brian E. Fox [EMAIL PROTECTED]
  wrote:
   I just double checked the code and this should work. Is it displaying
the list to the output? If not, then it's going to a file somewhere.
  It
would be better to use ${project.build.directory}/output.txt instead
  so
it goes to /target/output.txt
  
  
  
-Original Message-
From: Davis Ford [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2008 4:46 PM
To: Maven Users List
Subject: maven-dependency-plugin
  
Hi, I'm trying to use the maven-dependency-plugin to dump a list of
the project's dependencies out to a text file, but I can not seem to
get it to do anything.
  
relevant configuration:
  
 plugin
  
groupIdorg.apache.maven.plugins/groupId
  
artifactIdmaven-dependency-plugin/artifactId
   version2.0/version
   executions
   execution
  
idwrite-dependencies/id
   phasecompile/phase
   goals
  
goallist/goal
   /goals
   configuration
  
outputFiledependencies.txt/outputFile
   /configuration
   /execution
   /executions
   /plugin
   /plugins
   /build
  
I would expect that if I do mvn compile it would create
dependencies.txt but it does not.  Anyone have an idea what I'm doing
wrong here?
  
Thanks in advance,
Davis
  
-
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: maven-dependency-plugin

2008-03-25 Thread Davis Ford
Quick follow-up.  Consider if I have this use case:

For project A, do mvn assembly:assembly to make uber-jar, and deploy
it so someone can use it.  For each execution that they run it, I want
it to log programmatically the list of jars it used for that
execution.  If I developed a plugin to get this info, then it would
also require maven being installed where the assembly jar is
installed, since the plugin would try to resolve each jar.  I'm
assuming that it does not resolve from the classpath but only from the
mvn remote or local repos.

Thus, perhaps it is better to use the dependency plugin to dump a text
file list of dependencies that gets deployed with the assembly jar,
since this won't require any other maven dependencies to get at the
same information?

Any thoughts?

Thanks in advance,
Davis

On Tue, Mar 25, 2008 at 10:40 AM, Brian E. Fox [EMAIL PROTECTED] wrote:
 Generally bad things happen when you use plugins as dependencies. The
  project.getArtifacts() is part of the plugin api, not just the
  dependency plugin. If you use the M2Eclipse plugin for eclipse, you can
  quickly create a plugin by using the maven-archetype-mojo archetype.


  -Original Message-
  From: Davis Ford [mailto:[EMAIL PROTECTED]


 Sent: Tuesday, March 25, 2008 10:31 AM
  To: Maven Users List
  Subject: Re: maven-dependency-plugin

  Brian,

  Maybe a dumb question, but is there a way I can just use the
  maven-dependency-plugin programatically to accomplish what I'm trying
  to do?

  Can I just pull the plugin jar in so it is on the classpath like any
  other dependency and use its API to get project.getArtifacts() ?

  On Wed, Mar 19, 2008 at 6:02 PM, Brian E. Fox [EMAIL PROTECTED]
  wrote:
   Actually getting the list via a plugin is trivial. Just set a
  parameter
like this:
  
   /**
* POM
*
* @parameter expression=${project}
* @readonly
* @required
*/
   protected MavenProject project;
  
And then project.getArtifacts() will be all (including transitive)
dependencies. You'll also need to specify
  @requiresDependencyResolution
[scope] in the mojo annotations.
  
There is also a tree component that you could use to get the output
  used
to generate dependency:tree
  
  
-Original Message-
From: Davis Ford [mailto:[EMAIL PROTECTED]
  
   Sent: Wednesday, March 19, 2008 5:57 PM
To: Maven Users List
  
  
   Subject: Re: maven-dependency-plugin
  
Hi Brian,
  
Indeed -- total goof-up on my part.  I had multiple project pom.xml
files and was editing the wrong one.  It works like a charm.
  
Quick related question...the whole purpose of me dumping this to a
text file was because I could not see an easy way to programmatically
get a list of all project dependenciesso I figured I'd create the
.txt file and parse it myself.
  
The reason I want this list is as part of reporting framework we
  have.
 We run a long-running set of quality checks on some data, and I need
to be able to store with the final report the list of all things like
.jar versions, database versions, etc., etc.
  
Is there somewhere an API that would let me retrieve this same
information in the code?
  
Regards,
Davis
  
On Wed, Mar 19, 2008 at 4:50 PM, Brian E. Fox
  [EMAIL PROTECTED]
wrote:
 I just double checked the code and this should work. Is it
  displaying
  the list to the output? If not, then it's going to a file
  somewhere.
It
  would be better to use ${project.build.directory}/output.txt
  instead
so
  it goes to /target/output.txt



  -Original Message-
  From: Davis Ford [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, March 19, 2008 4:46 PM
  To: Maven Users List
  Subject: maven-dependency-plugin

  Hi, I'm trying to use the maven-dependency-plugin to dump a list
  of
  the project's dependencies out to a text file, but I can not seem
  to
  get it to do anything.

  relevant configuration:

   plugin

  groupIdorg.apache.maven.plugins/groupId

  artifactIdmaven-dependency-plugin/artifactId
 version2.0/version
 executions
 execution

  idwrite-dependencies/id

  phasecompile/phase
 goals

  goallist/goal
 /goals
 configuration

  outputFiledependencies.txt/outputFile
 /configuration
 /execution
 /executions
 /plugin
 /plugins
 /build

  I

Re: maven-dependency-plugin

2008-03-25 Thread Davis Ford
It is slightly more complex.

The assembly jar's purpose loads geodata from a database, and then
does quality checks on that data, and stores any violations it found
in a separate repository.

Every time I run the jar, I want to store with the list of violations
the list of all versions of jars it usedfor analysis (if number of
violations changes, I want to understand why...perhaps a new jar was
released that caused it).

I could scan this info at runtime by looking in the lib dir inside the
assembly jar, true.  This doesn't help me, though when I'm developing
/ testing, since I run tests either via mvn or w/in eclipse, and I
want to know the same info during that phase.

So, I guess what I'm looking for is a universal solution to always
being able to obtain this information at runtime despite what phase
I'm in (as a deployed assembly jar, or running in eclipse).  I'm
coming to the conclusion that the best way to do this is probably to
just get the classpath system property, and parse that.

Regards,
Davis

On Tue, Mar 25, 2008 at 11:25 AM, Brian E. Fox [EMAIL PROTECTED] wrote:
 So it sounds like you might be trying to do a form of code coverage for
  your dependencies?

  To answer your question, yes I would dump the file when you are making
  the assembly and then use that at runtime. Just curious though, if the
  dependencies are in the assembly, why do you need a list of them?
  Couldn't you just enumerate the lib folder?


  -Original Message-
  From: Davis Ford [mailto:[EMAIL PROTECTED]


 Sent: Tuesday, March 25, 2008 11:17 AM
  To: Maven Users List
  Subject: Re: maven-dependency-plugin

  Quick follow-up.  Consider if I have this use case:

  For project A, do mvn assembly:assembly to make uber-jar, and deploy
  it so someone can use it.  For each execution that they run it, I want
  it to log programmatically the list of jars it used for that
  execution.  If I developed a plugin to get this info, then it would
  also require maven being installed where the assembly jar is
  installed, since the plugin would try to resolve each jar.  I'm
  assuming that it does not resolve from the classpath but only from the
  mvn remote or local repos.

  Thus, perhaps it is better to use the dependency plugin to dump a text
  file list of dependencies that gets deployed with the assembly jar,
  since this won't require any other maven dependencies to get at the
  same information?

  Any thoughts?

  Thanks in advance,
  Davis

  On Tue, Mar 25, 2008 at 10:40 AM, Brian E. Fox
  [EMAIL PROTECTED] wrote:
   Generally bad things happen when you use plugins as dependencies. The
project.getArtifacts() is part of the plugin api, not just the
dependency plugin. If you use the M2Eclipse plugin for eclipse, you
  can
quickly create a plugin by using the maven-archetype-mojo archetype.
  
  
-Original Message-
From: Davis Ford [mailto:[EMAIL PROTECTED]
  
  
   Sent: Tuesday, March 25, 2008 10:31 AM
To: Maven Users List
Subject: Re: maven-dependency-plugin
  
Brian,
  
Maybe a dumb question, but is there a way I can just use the
maven-dependency-plugin programatically to accomplish what I'm trying
to do?
  
Can I just pull the plugin jar in so it is on the classpath like any
other dependency and use its API to get project.getArtifacts() ?
  
On Wed, Mar 19, 2008 at 6:02 PM, Brian E. Fox
  [EMAIL PROTECTED]
wrote:
 Actually getting the list via a plugin is trivial. Just set a
parameter
  like this:

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

  And then project.getArtifacts() will be all (including transitive)
  dependencies. You'll also need to specify
@requiresDependencyResolution
  [scope] in the mojo annotations.

  There is also a tree component that you could use to get the
  output
used
  to generate dependency:tree


  -Original Message-
  From: Davis Ford [mailto:[EMAIL PROTECTED]

 Sent: Wednesday, March 19, 2008 5:57 PM
  To: Maven Users List


 Subject: Re: maven-dependency-plugin

  Hi Brian,

  Indeed -- total goof-up on my part.  I had multiple project
  pom.xml
  files and was editing the wrong one.  It works like a charm.

  Quick related question...the whole purpose of me dumping this to a
  text file was because I could not see an easy way to
  programmatically
  get a list of all project dependenciesso I figured I'd create
  the
  .txt file and parse it myself.

  The reason I want this list is as part of reporting framework we
have.
   We run a long-running set of quality checks on some data, and I
  need
  to be able to store with the final report the list of all things
  like
  .jar versions, database versions, etc

maven-dependency-plugin

2008-03-19 Thread Davis Ford
Hi, I'm trying to use the maven-dependency-plugin to dump a list of
the project's dependencies out to a text file, but I can not seem to
get it to do anything.

relevant configuration:

  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-dependency-plugin/artifactId
version2.0/version
executions
execution
idwrite-dependencies/id
phasecompile/phase
goals
goallist/goal
/goals
configuration

outputFiledependencies.txt/outputFile
/configuration
/execution
/executions   
/plugin
/plugins
/build

I would expect that if I do mvn compile it would create
dependencies.txt but it does not.  Anyone have an idea what I'm doing
wrong here?

Thanks in advance,
Davis

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



Re: maven-dependency-plugin

2008-03-19 Thread Davis Ford
Hi Brian,

Indeed -- total goof-up on my part.  I had multiple project pom.xml
files and was editing the wrong one.  It works like a charm.

Quick related question...the whole purpose of me dumping this to a
text file was because I could not see an easy way to programmatically
get a list of all project dependenciesso I figured I'd create the
.txt file and parse it myself.

The reason I want this list is as part of reporting framework we have.
 We run a long-running set of quality checks on some data, and I need
to be able to store with the final report the list of all things like
.jar versions, database versions, etc., etc.

Is there somewhere an API that would let me retrieve this same
information in the code?

Regards,
Davis

On Wed, Mar 19, 2008 at 4:50 PM, Brian E. Fox [EMAIL PROTECTED] wrote:
 I just double checked the code and this should work. Is it displaying
  the list to the output? If not, then it's going to a file somewhere. It
  would be better to use ${project.build.directory}/output.txt instead so
  it goes to /target/output.txt



  -Original Message-
  From: Davis Ford [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, March 19, 2008 4:46 PM
  To: Maven Users List
  Subject: maven-dependency-plugin

  Hi, I'm trying to use the maven-dependency-plugin to dump a list of
  the project's dependencies out to a text file, but I can not seem to
  get it to do anything.

  relevant configuration:

   plugin

  groupIdorg.apache.maven.plugins/groupId

  artifactIdmaven-dependency-plugin/artifactId
 version2.0/version
 executions
 execution

  idwrite-dependencies/id
 phasecompile/phase
 goals

  goallist/goal
 /goals
 configuration

  outputFiledependencies.txt/outputFile
 /configuration
 /execution
 /executions
 /plugin
 /plugins
 /build

  I would expect that if I do mvn compile it would create
  dependencies.txt but it does not.  Anyone have an idea what I'm doing
  wrong here?

  Thanks in advance,
  Davis

  -
  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]





-- 
Zeno Consulting, Inc.
http://www.zenoconsulting.biz
248.894.4922 phone
313.884.2977 fax

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



resources plugin question

2007-12-03 Thread Davis Ford
Hi, if I have the general maven project layout with the following:

src/main/resources/mydirectory/file.xml

and general pom.xml with this:

version1.1/version

Is it possible somehow using the resources plugin (or some other
plugin) to cause it to deploy as a jar-file with the following
directory structure inside the jar -

my-project-1.1.jar:/mydirectory/1.1/file.xml

Said another way, I want to dynamically take the maven ${version}
value from the pom, and insert it dynamically into the resources path
in the jar when it is deployed.

Is there an easy way to accomplish this?

Thanks in advance,
Davis

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



Re: maven-eclipse-plugin has problem with muli-project resources

2007-04-17 Thread Davis Ford

Hi Barrie, I understand about create a separate resource module that
can be shared.

Let me ask a quick question though.  You mention you don't use a flat
structure.  This isn't a flat structure as far as i can tell...it is
hierarchical.

It's my understanding that a flat structure puts both parent and child
at the same directory level, but this is not the case.

I wish there were some way around this.

Thanks for looking.

Davis

On 4/17/07, Barrie Treloar [EMAIL PROTECTED] wrote:

On 4/17/07, Davis Ford [EMAIL PROTECTED] wrote:
 Hi, it appears that in order for eclipse to see relative path links
 like this, an entry needs to be made to the .project file with the
 linkeResources tag.  If you manually add a src folder in eclipse, this
 is the change it makes in .project.

 Is there some way to cause the maven-eclipse-plugin to do this via the 
pom.xml?

 linkedResources
 link
 nameconf/name
 type2/type
 locationD:/temp/parent/conf/location
 /link
 /linkedResources

Looking at 
http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html
I can't see how to do this.

However I do know that eclipse:pde does write linkedResources.

I personally do not use a flat structure, I use the hierarchical one.

You might need to describe in more detail what ../conf contains.
If this is a shared configuration, then the usual way to do this is to
create another module project for conf and have your projects depend
on conf in the pom.xml file.

Then there is no need for eclipse linked resource trickery, everything
is on the classpath.

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





--
Zeno Consulting, Inc.
http://www.zenoconsulting.biz
248.894.4922 phone
313.884.2977 fax

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



problem with dependency version ranges?

2007-04-17 Thread Davis Ford

Hi, I recently switched to 2.0.6 from 2.0.5.  We use dependency
version ranges in our jars, but today I am seeing a problem with them.
mvn complains that it can no longer find the version range specified.
Has anyone else seen this problem, and how to work around it?

I have checked the our internal repository (192.168.1.10), and there
are several jars in the range that is specified.  Example:

dependency
   artifactIdthing/artifactId
   groupIdcom.whatever/groupId
   version[0.6.,0.7)/version
/dependency

[ERROR] BUILD ERROR
[INFO] 
[INFO] Failed to resolve artifact.
No versions are present in the repository for the artifact with a
range [0.6,0.7)
 com.whatever:thing:jar:null
from the specified remote repositories:
 snapshot-doc-http-repository
(http://192.168.1.10/share/maven-diamond-snapshot),
 central (http://repo1.maven.org/maven2),
 doc-http-repository (http://192.168.1.10/share/maven),
 maven-fast-repo (http://repo1.maven.org/maven2)

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



Re: problem with dependency version ranges?

2007-04-17 Thread Davis Ford

Cleaning out the local repo resolves this problem.

On 4/17/07, Davis Ford [EMAIL PROTECTED] wrote:

Hi, I recently switched to 2.0.6 from 2.0.5.  We use dependency
version ranges in our jars, but today I am seeing a problem with them.
 mvn complains that it can no longer find the version range specified.
 Has anyone else seen this problem, and how to work around it?

I have checked the our internal repository (192.168.1.10), and there
are several jars in the range that is specified.  Example:

 dependency
artifactIdthing/artifactId
groupIdcom.whatever/groupId
version[0.6.,0.7)/version
 /dependency

[ERROR] BUILD ERROR
[INFO] 
[INFO] Failed to resolve artifact.
No versions are present in the repository for the artifact with a
range [0.6,0.7)
  com.whatever:thing:jar:null
from the specified remote repositories:
  snapshot-doc-http-repository
(http://192.168.1.10/share/maven-diamond-snapshot),
  central (http://repo1.maven.org/maven2),
  doc-http-repository (http://192.168.1.10/share/maven),
  maven-fast-repo (http://repo1.maven.org/maven2)




--
Zeno Consulting, Inc.
http://www.zenoconsulting.biz
248.894.4922 phone
313.884.2977 fax

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



mvn eclipse plugin missing required source folder

2007-04-16 Thread Davis Ford

Hello, I have a problem getting the mvn eclipse plugin recognizing a
relative path resource directory.   Using mvn 2.0.6.  The project structure
looks like this:

editor
 subprojecta
  -pom.xml
  -src
-subprojectb
  -pom.xml
  -src
-conf
 -some.config.xml
-pom.xml

editor is a pom only project that has:

modules
  modulesubprojecta/module
  modulesubprojectb/module
/modules

The pom in each subproject has this:

build
resources
   resource
   directory../conf/directory
   includes
   include**/*/include
   /includes
   /resource
   /resources
/build

This actually seems to work fine at runtime, b/c the code can load the xml
files it needs in each sub-project.  However, if I execute mvn
eclipse:eclipse, I get the build path error Project subprojecta is missing
required source folder: 'D:\svn\editor\conf'.

Any idea on what I'm doing wrong here?

Regards,
Davis


Re: Is there a mvn command to clean the local repo?

2007-04-16 Thread Davis Ford

http://maven.apache.org/plugins/maven-dependency-plugin/index.html

see purge-local-repository goal



On 4/16/07, Baz [EMAIL PROTECTED] wrote:


All,

Is there a mvn command that clean the local repo?

Thanks.

B.

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





--
Zeno Consulting, Inc.
http://www.zenoconsulting.biz
248.894.4922 phone
313.884.2977 fax


Re: Is there a mvn command to clean the local repo?

2007-04-16 Thread Davis Ford

well...you can do it the quick-n-dirty way, and just manually delete
everything under .m2/repository/com/* (or subdirs that you want to refresh)

--davis


On 4/16/07, Baz [EMAIL PROTECTED] wrote:


Davis,

Thanks for replying.

After I reviewed the webpage, I wonder how i can delete/refresh one
single directory... for example, com directory under the local repo.
There is only exclude but no include.

B.

On 4/16/07, Davis Ford [EMAIL PROTECTED] wrote:
 http://maven.apache.org/plugins/maven-dependency-plugin/index.html

 see purge-local-repository goal



 On 4/16/07, Baz [EMAIL PROTECTED] wrote:
 
  All,
 
  Is there a mvn command that clean the local repo?
 
  Thanks.
 
  B.
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Zeno Consulting, Inc.
 http://www.zenoconsulting.biz
 248.894.4922 phone
 313.884.2977 fax


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





--
Zeno Consulting, Inc.
http://www.zenoconsulting.biz
248.894.4922 phone
313.884.2977 fax


Re: Maven : Automate the import of generated eclipse project to the eclipse ?

2007-04-16 Thread Davis Ford

marouane - try the following:

mvn eclipse:clean eclipse:eclipse

then right-click the project in eclipse and choose refresh (or F5).  running
the mvn commands re-generates the .classpath, .project, and .settings files
in the project dir, but eclipse does not scan for changes, so you have to
force a refresh each time in the IDE.


On 4/16/07, Marouane Amraoui [EMAIL PROTECTED] wrote:


Thx for reply.

I generate project in the current workspace but it does'not refresh
himself.

-Message d'origine-
De: Phill Moran [mailto:[EMAIL PROTECTED]
Envoyé: lundi 16 avril 2007 19:09
À: 'Maven Users List'
Objet: RE: Maven : Automate the import of generated eclipse project to the
eclipse ?

You could execute the eclipse:eclipse using external tools but I think
(not
sure) you would have to do this in your current workspace to have it
refresh

-Original Message-
From: Marouane Amraoui [mailto:[EMAIL PROTECTED]
Sent: April 16, 2007 3:03 PM
To: Maven Users List
Subject: Maven : Automate the import of generated eclipse project to the
eclipse
?



I generate my structure of eclipse project from maven.



I make a  .bat file for that purpose. And I used it as an external tools
in
eclipse.



When I execute this bat it generate me in  the workspace of eclipse my
multiproject structure . after that I must to go to the  File -- Import
in
order to make there visible

In the eclipse. So my question there is something that can help me to
automate
this step too. ie : I execute my external tools , it generate me my
structure
project and  appear immediately

In the eclipse, don't need to import them manually  :-) ???



Maven can give me this features or I need to explore eclipse api ?



Thx



---

Merouane AMRAOUI
Consultant Expert
Division Développement
Email.: [EMAIL PROTECTED]

Gsm  .: 065 19 60 99
Tél. | Tel.: 022 98 70 70Téléc | Fax: 022 98 70 70 OMNIDATA , 74 Bv
AbdelMoumen





-
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]





--
Zeno Consulting, Inc.
http://www.zenoconsulting.biz
248.894.4922 phone
313.884.2977 fax


maven-eclipse-plugin has problem with muli-project resources

2007-04-16 Thread Davis Ford

Hi, I posted on this earlier, but it fell on deaf ears, I guess.
Here's a concrete example of the problem I'm experiencing.  I followed
the directions for the maven-eclipse-plugin on generating a multiple
module project, as described here -
http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html

[I tried attaching a .zip of this simple example, but it bounced]

This problem is easily reproduced.  I really welcome any clue on how
to workaround it.  How to reproduce:

1. D:\tempmvn archetype:create -DgroupId=guide.ide.eclipse
-DartifactId=guide-ide-eclipse
2. D:\tempcd guide-ide-eclipse
3. edit pom.xml, change packagingjar/packaging to packagingpom/packaging
3. D:\temp\guide-ide-eclipsemvn archetype:create
-DgroupId=guide.ide.eclipse -DartifactId=guide-ide-eclipse-site
4. If you have the latest maven-eclipse-plugin, this should
auto-magically add the parent - module reference between parent
child projects in each respective pom.xml
5. D:\temp\guide-ide-eclipsemkdir conf
6. D:\temp\guide-ide-eclipsecd guide-ide-eclipse-site
7. edit the pom.xml of guide-ide-eclipse-site and add the following
between project/project:
 build
resources
   resource
  directory../conf/directory
   /resource
/resources
 /build
8. D:\temp\guide-ide-eclipsecd guide-ide-eclipse-site
9. D:\temp\guide-ide-eclipsemvn eclipse:eclipse
10. Try to import either the guide-ide-eclipse or the
guide-ide-eclipse-site project into eclipse.  You will get a build
path error regarding the conf directory.

The .classpath file for the guide-ide-eclipse-site project contains this:

classpathentry kind=src path=D:/temp/guide-ide-eclipse/conf
excluding=**/*.java/

This seems completely reasonable, and the directory does exist, but
eclipse cannot build the projectwhy?

Thanks in advance,

Davis

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



Re: maven-eclipse-plugin has problem with muli-project resources

2007-04-16 Thread Davis Ford

It says: Project child is missing required source folder: 'D:/temp/parent/conf'

Try the steps to reproduce it..easy to reproduce.

I think perhaps it has more to do with the eclipse jdt core.  Can it
handle absolute paths?  I've tried editing the .classpath file
manually to make it a relative path -- I really can't seem to make it
work.  BTW: using eclipse 3.2.2.

Any ideas?

Regards,
davis

On 4/16/07, Haim Ashkenazi [EMAIL PROTECTED] wrote:

Davis Ford wrote:
[ .. ]
 The .classpath file for the guide-ide-eclipse-site project contains this:

 classpathentry kind=src path=D:/temp/guide-ide-eclipse/conf
 excluding=**/*.java/

 This seems completely reasonable, and the directory does exist, but
 eclipse cannot build the projectwhy?
Hi

I don't work on eclipse usually but when you open a project in eclipse and
it can't build it it usually show you what's the problem in the Problems
view (I'm not sure it's called like that). when I imported maven project
into eclipse for the first time it showed an error that the project could
not be built because I don't have an environment variables
called M2_REPOS. what is the error when you open your project?

Bye
--
Haim



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



Re: maven-eclipse-plugin has problem with muli-project resources

2007-04-16 Thread Davis Ford

Hi, it appears that in order for eclipse to see relative path links
like this, an entry needs to be made to the .project file with the
linkeResources tag.  If you manually add a src folder in eclipse, this
is the change it makes in .project.

Is there some way to cause the maven-eclipse-plugin to do this via the pom.xml?

linkedResources
link
nameconf/name
type2/type
locationD:/temp/parent/conf/location
/link
/linkedResources

On 4/17/07, Davis Ford [EMAIL PROTECTED] wrote:

It says: Project child is missing required source folder: 'D:/temp/parent/conf'

Try the steps to reproduce it..easy to reproduce.

I think perhaps it has more to do with the eclipse jdt core.  Can it
handle absolute paths?  I've tried editing the .classpath file
manually to make it a relative path -- I really can't seem to make it
work.  BTW: using eclipse 3.2.2.

Any ideas?

Regards,
davis

On 4/16/07, Haim Ashkenazi [EMAIL PROTECTED] wrote:
 Davis Ford wrote:
 [ .. ]
  The .classpath file for the guide-ide-eclipse-site project contains this:
 
  classpathentry kind=src path=D:/temp/guide-ide-eclipse/conf
  excluding=**/*.java/
 
  This seems completely reasonable, and the directory does exist, but
  eclipse cannot build the projectwhy?
 Hi

 I don't work on eclipse usually but when you open a project in eclipse and
 it can't build it it usually show you what's the problem in the Problems
 view (I'm not sure it's called like that). when I imported maven project
 into eclipse for the first time it showed an error that the project could
 not be built because I don't have an environment variables
 called M2_REPOS. what is the error when you open your project?

 Bye
 --
 Haim





--
Zeno Consulting, Inc.
http://www.zenoconsulting.biz
248.894.4922 phone
313.884.2977 fax

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



Re: relativePath not working

2007-04-13 Thread Davis Ford

Hi Franz, that seems strange.  The jira indicates the problem when groupId
differs, but in the project I sent you, the groupId is all the same (as far
as I can tell).

Thanks for looking!

Davis


On 4/13/07, franz see [EMAIL PROTECTED] wrote:



Good day,

I got your email and I think I saw the bug ( see [1] ).

As for a workaround, I can't think of anything right now.

Cheers,
Franz

[1] http://jira.codehaus.org/browse/MNG-2068


franz see wrote:

 Good day,

 I just tried creating a simple project with inheritance and I cannot
 duplicate your problem. I ran mvn validate, mvn package, mvn
 compiler:compile and it builds just fine with my Maven 2.0.6, and Java
 1.5.0_11, running under Windows XP.

 I've attached here that simple project, kindly check if it works in your
 machine. If it does not, then I guess it has something to do with your
 machine ( maven setup perhaps? ). If it does, then maybe there's
something
 maybe something in your maven project is causing the failure.

 Thanks http://www.nabble.com/file/7847/relative-path-of-parent.zip
 relative-path-of-parent.zip ,
 Franz


 Davis Ford-2 wrote:

 Hi Adrian,

 I've tried nearly everything.  Note, I'm using 2.0.6.  I tried

   1 removing the relativePath setting altogether
   2 relativePath../pom.xml/relativePath
   3 relativePath../../parent_project/relativePath
   4 relativePath../../parent_project/pom.xml/relativePath
   5 relativePath [absolute path here] /relativePath

 I've double-checked the artifactId, groupId, and version in all pom's
 like
 100 times to make sure they match.  I've double-checked the directory
 structure the same number of times to make sure it is right.

 If I sit in parent_project dir and execute: mvn -N install

 Then, yes, I can go into sub-dirs and run commands just fine, b/c it
 pulls
 the parent pom from the local repo.  This is not desired, b/c I will
have
 to
 tell users to execute this command everytime.  They will find it
 confusing,
 and it is yet another step that is easily forgotten.

 Is there *any* way to get the relativePath to work?  I've seen other
 posts
 in the mailing list about it...people having problems, JIRA's
filed.  Is
 this still a known issue in 2.0.6?

 Thanks in advance,
 Davis


 On 4/12/07, Adrian Shum [EMAIL PROTECTED] wrote:

 If I remember correctly, if your parent POM is located at the parent
 directory, you don't need to declare the relative path, as mvn2 should
 be
 able to find it.

 that is, (hope I remember correctly :P ), mvn2 will find the parent
POM
 in
 the following order:
 1) parent directory
 2) modules in the same multi-module build
 3) repository

 (However, in 2.0.4, there seems to be a bug prohibiting 1 from working
 in
 some scenerioes)

 Adrian

 

 From: Davis Ford [mailto:[EMAIL PROTECTED]
 Sent: Fri 4/13/2007 8:51 AM
 To: Maven Users List
 Subject: relativePath not working



 Hi, I'm using mvn 2.0.6

 I have a simple structure

 parent_project
sub_project
   pom.xml
pom.xml

 parent_project has this:

groupIdmy.org/groupId
artifactIdparent/artifactId
version1.0-SNAPSHOT/version
packagingpom/packaging

 sub_project has this:

parent
groupIdmy.org/groupId
artifactIdparent/artifactId
version1.0-SNAPSHOT/version
relativePath../pom.xml/relativePath
/parent
groupIdmy.org/groupId
artifactIdsub/artifactId
packagingpom/packaging
version1.0-SNAPSHOT/version

 anytime i issue any mvn command in the sub_project dir, i get:
 org.apache.maven.reactor.MavenExecutionException: Cannot find parent:
 etc...

 how can i get relativePath to work?

 thx,
 davis




 This email is confidential. If you are not the intended recipient,
 please
 delete it from your system and notify the sender immediately. Any
 unauthorized use, disclosure, dissemination or copying of this email
is
 prohibited. Taifook Securities Group, its group companies and their
 content
 providers (Parties) shall not be responsible for the accuracy or
 completeness of this email or its attachment, if any, which could
 contain
 virus, be corrupted, destroyed, incomplete, intercepted, lost or
arrive
 late.   The Parties do not accept liability for any damage caused by
 this
 email.



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




 --
 Zeno Consulting, Inc.
 http://www.zenoconsulting.biz
 248.894.4922 phone
 313.884.2977 fax





--
View this message in context:
http://www.nabble.com/relativePath-not-working-tf3569116s177.html#a9973251
Sent from the Maven - Users mailing list archive at Nabble.com.


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





--
Zeno Consulting, Inc.
http://www.zenoconsulting.biz
248.894.4922 phone
313.884.2977 fax


relativePath not working

2007-04-12 Thread Davis Ford

Hi, I'm using mvn 2.0.6

I have a simple structure

parent_project
   sub_project
  pom.xml
   pom.xml

parent_project has this:

   groupIdmy.org/groupId
   artifactIdparent/artifactId
   version1.0-SNAPSHOT/version
   packagingpom/packaging

sub_project has this:

   parent
   groupIdmy.org/groupId
   artifactIdparent/artifactId
   version1.0-SNAPSHOT/version
   relativePath../pom.xml/relativePath
   /parent
   groupIdmy.org/groupId
   artifactIdsub/artifactId
   packagingpom/packaging
   version1.0-SNAPSHOT/version

anytime i issue any mvn command in the sub_project dir, i get:
org.apache.maven.reactor.MavenExecutionException: Cannot find parent: etc...

how can i get relativePath to work?

thx,
davis


Re: relativePath not working

2007-04-12 Thread Davis Ford

Hi Adrian,

I've tried nearly everything.  Note, I'm using 2.0.6.  I tried

 1 removing the relativePath setting altogether
 2 relativePath../pom.xml/relativePath
 3 relativePath../../parent_project/relativePath
 4 relativePath../../parent_project/pom.xml/relativePath
 5 relativePath [absolute path here] /relativePath

I've double-checked the artifactId, groupId, and version in all pom's like
100 times to make sure they match.  I've double-checked the directory
structure the same number of times to make sure it is right.

If I sit in parent_project dir and execute: mvn -N install

Then, yes, I can go into sub-dirs and run commands just fine, b/c it pulls
the parent pom from the local repo.  This is not desired, b/c I will have to
tell users to execute this command everytime.  They will find it confusing,
and it is yet another step that is easily forgotten.

Is there *any* way to get the relativePath to work?  I've seen other posts
in the mailing list about it...people having problems, JIRA's filed.  Is
this still a known issue in 2.0.6?

Thanks in advance,
Davis


On 4/12/07, Adrian Shum [EMAIL PROTECTED] wrote:


If I remember correctly, if your parent POM is located at the parent
directory, you don't need to declare the relative path, as mvn2 should be
able to find it.

that is, (hope I remember correctly :P ), mvn2 will find the parent POM in
the following order:
1) parent directory
2) modules in the same multi-module build
3) repository

(However, in 2.0.4, there seems to be a bug prohibiting 1 from working in
some scenerioes)

Adrian



From: Davis Ford [mailto:[EMAIL PROTECTED]
Sent: Fri 4/13/2007 8:51 AM
To: Maven Users List
Subject: relativePath not working



Hi, I'm using mvn 2.0.6

I have a simple structure

parent_project
   sub_project
  pom.xml
   pom.xml

parent_project has this:

   groupIdmy.org/groupId
   artifactIdparent/artifactId
   version1.0-SNAPSHOT/version
   packagingpom/packaging

sub_project has this:

   parent
   groupIdmy.org/groupId
   artifactIdparent/artifactId
   version1.0-SNAPSHOT/version
   relativePath../pom.xml/relativePath
   /parent
   groupIdmy.org/groupId
   artifactIdsub/artifactId
   packagingpom/packaging
   version1.0-SNAPSHOT/version

anytime i issue any mvn command in the sub_project dir, i get:
org.apache.maven.reactor.MavenExecutionException: Cannot find parent:
etc...

how can i get relativePath to work?

thx,
davis




This email is confidential. If you are not the intended recipient, please
delete it from your system and notify the sender immediately. Any
unauthorized use, disclosure, dissemination or copying of this email is
prohibited. Taifook Securities Group, its group companies and their content
providers (Parties) shall not be responsible for the accuracy or
completeness of this email or its attachment, if any, which could contain
virus, be corrupted, destroyed, incomplete, intercepted, lost or arrive
late.   The Parties do not accept liability for any damage caused by this
email.



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





--
Zeno Consulting, Inc.
http://www.zenoconsulting.biz
248.894.4922 phone
313.884.2977 fax


q on mvn dependency plugin

2007-04-12 Thread Davis Ford

hi, i know that mvn depenendency:resolve depdendency:build-classpath will
dump a classpath list of all transitive/non-transitive jars.

i was wondering if there was some other way, either with the dependency
plugin, or with any other plugin, to generate the same output but in nicely
formatted xml:

/artifactId
/groupId
/version

?

Thanks,
Davis


IsolatedClassLoader - URL with spaces %20 problem

2007-02-19 Thread Davis Ford

He, we're using maven 2.0.4 (although I just tried 2.0.5 and the same
problem exists), and we're using Hibernate Entity Manager 3.2.1-ga, and
we're on a Windows Platform.  These 3 things don't seem to work together.

The problem is the default repo for maven jars contains spaces on windows
C:\Documents and Settings\etc.

Hibernate Entity Manager expects to find META-INF\persistence.xml on the
classpath.  The general idea is to bury this in a jar that is loaded as a
dependency on our maven repo classpath, right?

Hibernate has code similar to this in
org.hibernate.ejb.EjbConfiguration.java (I added logger and assertions):

try {
   EnumerationURL xmls = Thread.currentThread()
   .getContextClassLoader()
   .getResources( META-INF/persistence.xml );

   if ( ! xmls.hasMoreElements() ) {
   fail( Could not find any META-INF/persistence.xml file in the
classpath);
   }
   while ( xmls.hasMoreElements() ) {
   URL url = xmls.nextElement();
   LOGGER.debug( Analyse of persistence.xml:  + url );
   URL jarURL = getJarURLFromURLEntry( url, /META-INF/persistence.xml
);
   assertFalse(Jar URL should not contain spaces, +jarURL,
jarURL.toString().contains( ));
   }

1. Create a jar-file, install it in local maven repo.
2. Add META-INF\persistence.xml to the jar file
3. Add a dependency to a new maven test project
4. Paste in code like above -- test case will always fail when it tests for
whitespace in the url.

System.out.println(Thread.currentThread
().getContextClassLoader().getClass().getCanonicalName());

prints

org.apache.maven.surefire.booter.IsolatedClassLoader

If I run from Eclipse, I have no problems, and the above println prints
instead:

sun.misc.Launcher.AppClassLoader

I am *desperate* for any kind of solution to this problem that does not
require me to change the local maven repo to a url without spaces.

I need the URLClassLoader (IsolatedClassLoader) to correctly deal with
whitespace and replace it with %20.  If there is some other workaround --
please let me know.  Hibernate ends up throwing an exception and returning
null for the EntityManager which is an absolute show-stopper for us.

Thank you in advance,

Davis


Re: IsolatedClassLoader - URL with spaces %20 problem

2007-02-19 Thread Davis Ford

Almost forgot...not that this is too interesting, but the test case below
calls a method getJarURLFromURLEntry( ) -- this method is from
org.hibernate.ejb.packaging.JarVisitor.java, and it looks like this:

public static final URL getJarURLFromURLEntry(URL url, String entry) throws
IllegalArgumentException {
   URL jarUrl;
   String file = url.getFile();
   if ( ! entry.startsWith( / ) ) entry = / + entry;
   file = file.substring( 0, file.length() - entry.length() );
   if ( file.endsWith( ! ) ) file = file.substring( 0, file.length() - 1
);
   try {
   String protocol = url.getProtocol();

   if ( jar.equals( protocol )
   || wsjar.equals( protocol ) ) { //Websphere has it's own
way
   jarUrl = new URL( file );
   }
   else if ( zip.equals( protocol ) ) { //Weblogic has it's own way
   //we have extracted the zip file, so it should be read as a file
   jarUrl = new URL( file, null, file );
   }
   else if (code-source.equals( url.getProtocol() ) ) {
   //OC4J prevent ejb.jar access (ie everything without path
   //fix contributed by the community
   jarUrl = new File(file).toURL();
   }
   else {
   jarUrl = new URL( protocol, url.getHost(), url.getPort(), file
);
   }
   }
   catch (MalformedURLException e) {
   throw new IllegalArgumentException(
   Unable to determine JAR Url from  + url + . Cause:  +
e.getMessage()
   );
   }
   return jarUrl;
}

On 2/19/07, Davis Ford [EMAIL PROTECTED] wrote:


He, we're using maven 2.0.4 (although I just tried 2.0.5 and the same
problem exists), and we're using Hibernate Entity Manager 3.2.1-ga, and
we're on a Windows Platform.  These 3 things don't seem to work together.

The problem is the default repo for maven jars contains spaces on windows
C:\Documents and Settings\etc.

Hibernate Entity Manager expects to find META-INF\persistence.xml on the
classpath.  The general idea is to bury this in a jar that is loaded as a
dependency on our maven repo classpath, right?

Hibernate has code similar to this in
org.hibernate.ejb.EjbConfiguration.java (I added logger and assertions):

try {
EnumerationURL xmls = Thread.currentThread()
.getContextClassLoader()
.getResources( META-INF/persistence.xml );

if ( ! xmls.hasMoreElements() ) {
fail( Could not find any META-INF/persistence.xml file in the
classpath);
}
while ( xmls.hasMoreElements() ) {
URL url = xmls.nextElement();
LOGGER.debug( Analyse of persistence.xml:  + url );
URL jarURL = getJarURLFromURLEntry( url,
/META-INF/persistence.xml );
assertFalse(Jar URL should not contain spaces, +jarURL,
jarURL.toString().contains( ));
}

1. Create a jar-file, install it in local maven repo.
2. Add META-INF\persistence.xml to the jar file
3. Add a dependency to a new maven test project
4. Paste in code like above -- test case will always fail when it tests
for whitespace in the url.

System.out.println(Thread.currentThread().getContextClassLoader().getClass().getCanonicalName());


prints

org.apache.maven.surefire.booter.IsolatedClassLoader

If I run from Eclipse, I have no problems, and the above println prints
instead:

sun.misc.Launcher.AppClassLoader

I am *desperate* for any kind of solution to this problem that does not
require me to change the local maven repo to a url without spaces.

I need the URLClassLoader (IsolatedClassLoader) to correctly deal with
whitespace and replace it with %20.  If there is some other workaround --
please let me know.  Hibernate ends up throwing an exception and returning
null for the EntityManager which is an absolute show-stopper for us.

Thank you in advance,

Davis








--
Zeno Consulting, Inc.
http://www.zenoconsulting.biz
248.894.4922 phone
313.884.2977 fax


mvn and JUnit 4.1

2006-12-07 Thread Davis Ford

Hi, we use JUnit 4.1 in eclipse, but when we run the tests from the
cmd line with mvn, it seems to fail and not use JUnit 4.1 but it uses
the old 3.8.1.

Is there some way to force mvn to use JUnit 4.1?

The mvn release is 2.0.4 we are using.

Thanks in advance,
Davis

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



m2 javadoc report plugin?

2006-06-15 Thread Davis Ford

Hi, with maven 1.x I used to be able to create javadoc reports (i.e.
tag violation warnings, etc.)

Now that we have moved to maven 2.0.4, I can't seem to figure out how
to do that.

The maven javadoc plugin
http://maven.apache.org/plugins/maven-javadoc-plugin for m2 does not
describe this capability.

Anyone know how it can be done?

Thx,
Davis

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



surefire 2.2

2006-05-18 Thread Davis Ford

Hi just wondering if the group has experimented with the new surefire
2.2 plugin release, and if it does indeed solve the GC issue Brett
indicates below.  We are seeing this issue, and looking to update the
plugin, but getting by with feeding arguments to the jvm for now.

Regards,
Davis



FYI, the upcoming 2.2 release of surefire will reduce the memory used
by allowing the test cases to be garbage collected after they've run
instead of at the end. It also enables assertions by default, whether
you are forking or not, by setting the flag on the classloader running
the tests.

- Brett


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



Re: mvn eclipse:plugin and project inheritance

2006-05-17 Thread Davis Ford

yes, that is the way it is currently set up

On 5/17/06, Taavi Sildeberg [EMAIL PROTECTED] wrote:

Hello David,

Do you have inside a module A and s module B parent defined?
Something like this:

parent
 groupIdyour parent groupid/groupId
 artifactIdyour parent artifact id /artifactId
 versionyour parent version/version
   /parent

Taavi

Davis Ford wrote:
 Hi, I have a parent pom.xml project in C:\someplace\pom.xml that has

 modulemoduleA/module
 modulemoduleB/module

 Then I have

 C:\someplace\moduleA\pom.xml
 C:\someplace\moduleB\pom.xml

 If I execute:

 C:\someplace\mvn clean
 C:\someplace\mvn compile
 C:\someplace\mvn test

 That works great for moduleA, moduleB

 If I execute:

 C:\someplace\moduleA\mvn eclipse:eclipse
 C:\someplace\moduleB\mvn eclipse:eclipse

 That works great to create eclipse projects for moduleA, moduleB

 If I execute:

 C:\someplace\mvn eclipse:eclipse

 This causes a problem.  If I refresh moduleA, moduleB projects in
 eclipse after doing so, they complain about not finding the other
 subprojects.

 What is the best-practice here?  Is there a workaround for this?

 Thanks in advance,
 Davis

 -
 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]





--
Zeno Consulting, Inc.
(248) 894-4922 (p)
(206) 202-4077 (f)

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



Central repo slow -- hangs often

2006-05-17 Thread Davis Ford

Hi, it seems getting to the central repo and downloading dependencies
often hangs for me, and i have to restart the process again and again.

I understand the intermittency of network issues, but is there any
recommended solution for this?

I added:

mirrors
 mirroretc./mirror
/mirrors

a whole bunch of mirrors to my settings.xml, but that does not seem to
alleviate the problem.

Concrete example.  I've tried to d/l

http://www.ibiblio.net/pub/packages/maven2/pcj/pcj/1.2/pcj-1.2.jar

about 5 times now.  Each time it gets to 480/2699K and hangs -- I've
left it hanging for about 10 min. now.

Any ideas?

Thanks in advance,
Davis

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



wagon-ftp cannot be downloaded

2006-05-17 Thread Davis Ford

Hi, we use ftp to deploy to our local repo.  As a litmus test for the
environment, I completely wiped out my .m2/repository/*

Then I tried to do a mvn test on one of my projects.  This project has
a parent pom.xml which has:

build
extensions
extension
groupIdorg.apache.maven.wagon/groupId
artifactIdwagon-ftp/artifactId
version1.0-alpha-6/version
/extension
/extensions
etc...

But I get the error

Project ID: org.apache.maven.wagon:wagon-ftp

Reason: Error getting POM for 'org.apache.maven.wagon:wagon-ftp' from
the repository: Error transferring file
 org.apache.maven.wagon:wagon-ftp:pom:1.0-alpha-6

from the specified remote repositories:
 central (http://repo1.maven.org/maven2),
 maven-fast-repo (http://repo1.maven.org),

If I do a deploy first, then this seems to work.  But if I try a
compile or test, this always fails?  How to fix this?

Regards,
Davis

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



mvn eclipse:plugin and project inheritance

2006-05-16 Thread Davis Ford

Hi, I have a parent pom.xml project in C:\someplace\pom.xml that has

modulemoduleA/module
modulemoduleB/module

Then I have

C:\someplace\moduleA\pom.xml
C:\someplace\moduleB\pom.xml

If I execute:

C:\someplace\mvn clean
C:\someplace\mvn compile
C:\someplace\mvn test

That works great for moduleA, moduleB

If I execute:

C:\someplace\moduleA\mvn eclipse:eclipse
C:\someplace\moduleB\mvn eclipse:eclipse

That works great to create eclipse projects for moduleA, moduleB

If I execute:

C:\someplace\mvn eclipse:eclipse

This causes a problem.  If I refresh moduleA, moduleB projects in
eclipse after doing so, they complain about not finding the other
subprojects.

What is the best-practice here?  Is there a workaround for this?

Thanks in advance,
Davis

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



SNAPSHOT question

2006-05-16 Thread Davis Ford

Hi, if I have pom.xml for a project that has

version1.0-SNAPSHOT/version

and I do:

mvn deploy

It sends up a release with the timestamp in the 1.0-SNAPSHOT/ dir.

However, what if a developer wants to do a release, not a snapshot?

If I try

mvn -Dversion=1.2 deploy

It uploads a new SNAPSHOT with a timestamp into the 1.0-SNAPSHOT dir.

Is there some way to override this?

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



Re: SNAPSHOT question

2006-05-16 Thread Davis Ford

Hi Wayne,

I looked at mvn release, but it seems tied to SCM system.
Unfortunately, we don't use svn or cvs -- and I have no clue how to
integrate it with the thing we are using (I really wish we were using
svn).

Is there a simple example of using mvn release that does not depend
on the scm system?

Thx,
Davis

On 5/16/06, Wayne Fay [EMAIL PROTECTED] wrote:

You're looking for mvn release not deploy. Release will update the
version tags and install the artifact properly in the specified
repositories.

However its a little more complex than simply mvn release so check
out the m2 book (better builds with maven), the user list archive, the
maven website, etc for details.

Wayne

On 5/16/06, Davis Ford [EMAIL PROTECTED] wrote:
 Hi, if I have pom.xml for a project that has

 version1.0-SNAPSHOT/version

 and I do:

 mvn deploy

 It sends up a release with the timestamp in the 1.0-SNAPSHOT/ dir.

 However, what if a developer wants to do a release, not a snapshot?

 If I try

 mvn -Dversion=1.2 deploy

 It uploads a new SNAPSHOT with a timestamp into the 1.0-SNAPSHOT dir.

 Is there some way to override this?

 -
 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]





--
Zeno Consulting, Inc.
(248) 894-4922 (p)
(206) 202-4077 (f)

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



Re: SNAPSHOT question

2006-05-16 Thread Davis Ford

We are using a horrible tool called MKS Source Integrity.  Believe you
me -- I have opined for SVN many times.

Building an SCM plugin is not gonna happen soon enough to solve our needs.

So, unless someone on the list has any other insight, it appears the
only way for a team/developer to do a release of a module is to
manually edit version

FROM: version1.0-SNAPSHOT/version
TO: version1.3/version

C:\myprojectmvn deploy

Then, manually change it back or ensure that the pom.xml does not get
checked in with 1.3.  I want to have 1.0-SNAPSHOT checked into version
control, so our nightly build will do the following:

1) suck out the latest from this MKS thing
2) do a deploy (to the snapshot repo)
3) run all integration tests



On 5/16/06, Wayne Fay [EMAIL PROTECTED] wrote:

I'd install SVN. ;-)

No really, I'm not aware of any way to utilize the release plugin
without an SCM. So you'll probably need to build an SCM plugin for
your specific SCM tool and integrate it into M2 to properly use the
release plugin. Or write a new plugin that works similar to release
but does not do the SCM steps first.

What are you using, if not CVS or SVN? Starteam? Clear something?

Wayne

On 5/16/06, Davis Ford [EMAIL PROTECTED] wrote:
 Hi Wayne,

 I looked at mvn release, but it seems tied to SCM system.
 Unfortunately, we don't use svn or cvs -- and I have no clue how to
 integrate it with the thing we are using (I really wish we were using
 svn).

 Is there a simple example of using mvn release that does not depend
 on the scm system?

 Thx,
 Davis

 On 5/16/06, Wayne Fay [EMAIL PROTECTED] wrote:
  You're looking for mvn release not deploy. Release will update the
  version tags and install the artifact properly in the specified
  repositories.
 
  However its a little more complex than simply mvn release so check
  out the m2 book (better builds with maven), the user list archive, the
  maven website, etc for details.
 
  Wayne
 
  On 5/16/06, Davis Ford [EMAIL PROTECTED] wrote:
   Hi, if I have pom.xml for a project that has
  
   version1.0-SNAPSHOT/version
  
   and I do:
  
   mvn deploy
  
   It sends up a release with the timestamp in the 1.0-SNAPSHOT/ dir.
  
   However, what if a developer wants to do a release, not a snapshot?
  
   If I try
  
   mvn -Dversion=1.2 deploy
  
   It uploads a new SNAPSHOT with a timestamp into the 1.0-SNAPSHOT dir.
  
   Is there some way to override this?
  
   -
   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]
 
 


 --
 Zeno Consulting, Inc.
 (248) 894-4922 (p)
 (206) 202-4077 (f)

 -
 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]





--
Zeno Consulting, Inc.
(248) 894-4922 (p)
(206) 202-4077 (f)

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



Re: SNAPSHOT question

2006-05-16 Thread Davis Ford

Wayne - as a matter of principle, I totally agree with you there.
Thanks...it has been a long day.  I was trying to illustrate an
example -- albeit not very wellbut what you say makes total sense.

On 5/16/06, Wayne Fay [EMAIL PROTECTED] wrote:

I (personally) think you might want to review your building and
tagging approach...

1.0-SNAPSHOT is before 1.0
1.3 is never built until after 1.0 is final
Once we build 1.3, the next build would be 1.4-SNAPSHOT
My deploy process would be: check out code, change from 1.3-SNAPSHOT
to 1.3, check in, tag with build-1.3, then build and deploy

If you have some grand plan that you're working towards, and this does
not apply or make sense for your organization or your SCM, then you
can safely ignore it. But it just sounds like your SNAPSHOT versioning
plan etc might be a little off from the traditional approach...

Wayne

On 5/16/06, Davis Ford [EMAIL PROTECTED] wrote:
 We are using a horrible tool called MKS Source Integrity.  Believe you
 me -- I have opined for SVN many times.

 Building an SCM plugin is not gonna happen soon enough to solve our needs.

 So, unless someone on the list has any other insight, it appears the
 only way for a team/developer to do a release of a module is to
 manually edit version

 FROM: version1.0-SNAPSHOT/version
 TO: version1.3/version

 C:\myprojectmvn deploy

 Then, manually change it back or ensure that the pom.xml does not get
 checked in with 1.3.  I want to have 1.0-SNAPSHOT checked into version
 control, so our nightly build will do the following:

 1) suck out the latest from this MKS thing
 2) do a deploy (to the snapshot repo)
 3) run all integration tests



 On 5/16/06, Wayne Fay [EMAIL PROTECTED] wrote:
  I'd install SVN. ;-)
 
  No really, I'm not aware of any way to utilize the release plugin
  without an SCM. So you'll probably need to build an SCM plugin for
  your specific SCM tool and integrate it into M2 to properly use the
  release plugin. Or write a new plugin that works similar to release
  but does not do the SCM steps first.
 
  What are you using, if not CVS or SVN? Starteam? Clear something?
 
  Wayne
 
  On 5/16/06, Davis Ford [EMAIL PROTECTED] wrote:
   Hi Wayne,
  
   I looked at mvn release, but it seems tied to SCM system.
   Unfortunately, we don't use svn or cvs -- and I have no clue how to
   integrate it with the thing we are using (I really wish we were using
   svn).
  
   Is there a simple example of using mvn release that does not depend
   on the scm system?
  
   Thx,
   Davis
  
   On 5/16/06, Wayne Fay [EMAIL PROTECTED] wrote:
You're looking for mvn release not deploy. Release will update the
version tags and install the artifact properly in the specified
repositories.
   
However its a little more complex than simply mvn release so check
out the m2 book (better builds with maven), the user list archive, the
maven website, etc for details.
   
Wayne
   
On 5/16/06, Davis Ford [EMAIL PROTECTED] wrote:
 Hi, if I have pom.xml for a project that has

 version1.0-SNAPSHOT/version

 and I do:

 mvn deploy

 It sends up a release with the timestamp in the 1.0-SNAPSHOT/ dir.

 However, what if a developer wants to do a release, not a snapshot?

 If I try

 mvn -Dversion=1.2 deploy

 It uploads a new SNAPSHOT with a timestamp into the 1.0-SNAPSHOT dir.

 Is there some way to override this?

 -
 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]
   
   
  
  
   --
   Zeno Consulting, Inc.
   (248) 894-4922 (p)
   (206) 202-4077 (f)
  
   -
   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]
 
 


 --
 Zeno Consulting, Inc.
 (248) 894-4922 (p)
 (206) 202-4077 (f)

 -
 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]





--
Zeno Consulting, Inc.
(248) 894-4922 (p)
(206) 202-4077 (f)

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



Maven 2 Emma Plugin?

2006-05-15 Thread Davis Ford

Hi, we used to use the maven-emma plugin and maven 1.* but have just
upgraded to maven 2.0.4.

If I put a dependency on emma like this:

dependency
groupIdemma/groupId
artifactIdmaven-emma-plugin/artifactId
version0.5/version
/dependency

I get this:

Downloading: 
http://www.ibiblio.org/maven2//emma/maven-emma-plugin/0.5/maven-emma-plugin-0.5.pom
993b downloaded
[WARNING] POM for 'emma:maven-emma-plugin:pom:0.5:compile' is invalid.
It will be ignored for artifact resolution. Reason: Not a v4.0.0 POM.

I see that there is also an artifactId just called emma with a
couple versions.

1) What's the difference between emma and maven-emma-plugin?
2) Can I somehow get one or the other to work with maven 2.0.4?
3) If not, is there any other code coverage plugin people know of that
works with maven 2.0.4?

Thx in advance,
Davis

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



log4j config file and mvn

2006-05-11 Thread Davis Ford

Hi, I was wondering if someone might be able to describe how to solve
the following problem:

We have one master project pom.xml that has module/module in it.

A team can check out a module that has its own pom.xml and build it
independently.  At the end of the day, the master pom.xml builds all
subprojects and runs integration tests.

There is one subproject called logging that controls logging for the
project using log4j.  It has a logging.xml file as a resource.
However, each developer will want to tweak the logging.xml file to
his/her tastes while developing.

What I would like to do is set the logging.xml file as a resource of
the master project, and then have the logging subproject use that file
(if it exists), or if it does not exist, default to its own
logging.xml resource file.

This would allow a developer to edit the master project logging.xml
for their local builds, and have the logging.jar reference that.

How can I accomplish this in mvn, or is there a better way to achieve
the end goal?

Thx,
Davis

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



Re: maven + java.class.path

2006-02-10 Thread Davis Ford
No, they run in the same JVM.

This is a pretty simple test that anyone can do.  Write a quick main
program that does the following:

System.out.println(System.getProperty(java.class.path));

You'll get something like this:

..\Apache Software Foundation\Maven 1.0.2\lib\forehead-1.0-beta-5.jar

It seems to me, unless something is specifcally wrong with my
environment, that you can't write code that navigates through the
classpath if you want to build with maven.  This seems like a big
limitation.  Am I the only one that has this problem?

--davis
On 2/9/06, Dion Gillard [EMAIL PROTECTED] wrote:
 So, are the tests being forked?

 On 2/10/06, Davis Ford [EMAIL PROTECTED] wrote:
  Hello Dion,
 
  Thanks for responding.  I should clarify -- the unit tests I am
  running are testing some code that use
  System.getProperty(java.class.path) -- and this code depends on the
  fact that the call to System.getProperty(java.class.path) will
  include . which is the current directory - wherever that may be.
  So, when maven overrides that system property, my tests fail.
 
  Regards,
  Davis
 
  On 2/9/06, Dion Gillard [EMAIL PROTECTED] wrote:
   Why does your test need the classpath of the app that is running it?
  
   The java.class.path property is set by the JVM when it's launched.
  
   Are you forking your tests?
  
   On 2/10/06, Davis Ford [EMAIL PROTECTED] wrote:
Hi, I searched high and low on google, etc. and the mailing list
archives.  This means either my problem is unique, or I'm just doing
something very dumb.  I know maven is supposed to handle dependencies
like jar files with the xml, but this is a case where:
   
A unit test is run that introspects the current classpath.  The test
fails b/c maven seems to override the classpath...at least through
System.getProperty(java.class.path)
   
I tried adding the following to project.properties
   
maven.junit.jvmargs=-classpath C:\some\dir\path
   
but that had no effect.  My guess is that I can maybe fix this via
over-riding the right property, but the number of property key/value
pairs for all the plugins is a bit over-whelming.  Can someone provide
a hint?
   
Thanks,
Davis
   
 Hi, I wrote some code that uses the class path string from:

 System.getProperty(java.class.path);

 When I build with Maven on the command line it, this code:

 System.out.println(System.getProperty (java.class.path);

 produces this output:

 C:\Program Files\Apache Software Foundation\Maven
 1.0.2\lib\forehead-1.0-beta-5.jar

 When I run the same code from inside Eclipse, it produces the output I
 expect which is a long string of file directories separated by ';' -- 
 this
 is what I need.

 Why doesn't it work with maven cmd line build?
 Why does maven seem to override that system property?
 Is there some easy fix?

 Regards,
 Davis


   
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
  
  
   --
   http://www.multitask.com.au/people/dion/
   If I close my eyes it doesn't seem so dark. - SpongeBob SquarePants
  
   -
   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]
 
 


 --
 http://www.multitask.com.au/people/dion/
 If I close my eyes it doesn't seem so dark. - SpongeBob SquarePants

 -
 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: maven + java.class.path

2006-02-10 Thread Davis Ford
On 2/10/06, Dion Gillard [EMAIL PROTECTED] wrote:
 On 2/10/06, Davis Ford [EMAIL PROTECTED] wrote:
  No, they run in the same JVM.
 
  This is a pretty simple test that anyone can do.  Write a quick main
  program that does the following:
 
  System.out.println(System.getProperty(java.class.path));
 
  You'll get something like this:
 
  ..\Apache Software Foundation\Maven 1.0.2\lib\forehead-1.0-beta-5.jar

 Yep, that's exactly what we would expect. When you run maven.bat/sh it
 launches a JVM with a specific classpath, as you've got it above.


 
  It seems to me, unless something is specifcally wrong with my
  environment, that you can't write code that navigates through the
  classpath if you want to build with maven.  This seems like a big
  limitation.  Am I the only one that has this problem?

 The problem here is that you're after the classpath as if you mean
 the environment variable, $CLASSPATH or %CLASSPATH%.  The batch
 file/shell script that launches maven creates it's own classpath. If
 you need the variable as it exists BEFORE maven runs, you'll need to
 get it some other way.

 Mostly tests don't navigate through the class path. What is it that
 you need from it?

Hi Dion, any suggestion on how to get it before maven erases it?  My
unit test doesn't need the classpath, but the code it is testing does
expect to be able to navigate into the '.' current directory that is
part of the classpath, and look at the class files that are in the
package hierarchy.  When my unit test runs on this code, it fails. 
For example, this is part of the code that is being tested:

private static final String CLASS_PATH = System.getProperty(java.class.path);
private static final String PATH_SEPARATOR =
System.getProperty(path.separator);
...
StringTokenizer tokens = new StringTokenizer(CLASS_PATH, PATH_SEPARATOR);
while (tokens.hasMoreTokens()) {
...

The while loop quits right away, b/c the claspath only contains one
item, whereas within eclipse the classpath is like:

C:\some\dir; C:\some\other\dir ; C:\yet\another\dir ; etc..

I want to navigate into the package hierarchy that is

...\target\classes\my\package\hierarchy

This works in eclipse with the approach above, but it fails with
maven.  I'm not saying this is the only/best way to do this.  If you
have another suggestion, please let me know.

Regards,
Davis

PS: Is there a plugin.properties somewhere that I can override so this
will work with Maven?

 
  --davis
  On 2/9/06, Dion Gillard [EMAIL PROTECTED] wrote:
   So, are the tests being forked?
  
   On 2/10/06, Davis Ford [EMAIL PROTECTED] wrote:
Hello Dion,
   
Thanks for responding.  I should clarify -- the unit tests I am
running are testing some code that use
System.getProperty(java.class.path) -- and this code depends on the
fact that the call to System.getProperty(java.class.path) will
include . which is the current directory - wherever that may be.
So, when maven overrides that system property, my tests fail.
   
Regards,
Davis
   
On 2/9/06, Dion Gillard [EMAIL PROTECTED] wrote:
 Why does your test need the classpath of the app that is running it?

 The java.class.path property is set by the JVM when it's launched.

 Are you forking your tests?

 On 2/10/06, Davis Ford [EMAIL PROTECTED] wrote:
  Hi, I searched high and low on google, etc. and the mailing list
  archives.  This means either my problem is unique, or I'm just doing
  something very dumb.  I know maven is supposed to handle 
  dependencies
  like jar files with the xml, but this is a case where:
 
  A unit test is run that introspects the current classpath.  The test
  fails b/c maven seems to override the classpath...at least through
  System.getProperty(java.class.path)
 
  I tried adding the following to project.properties
 
  maven.junit.jvmargs=-classpath C:\some\dir\path
 
  but that had no effect.  My guess is that I can maybe fix this via
  over-riding the right property, but the number of property key/value
  pairs for all the plugins is a bit over-whelming.  Can someone 
  provide
  a hint?
 
  Thanks,
  Davis
 
   Hi, I wrote some code that uses the class path string from:
  
   System.getProperty(java.class.path);
  
   When I build with Maven on the command line it, this code:
  
   System.out.println(System.getProperty (java.class.path);
  
   produces this output:
  
   C:\Program Files\Apache Software Foundation\Maven
   1.0.2\lib\forehead-1.0-beta-5.jar
  
   When I run the same code from inside Eclipse, it produces the 
   output I
   expect which is a long string of file directories separated by 
   ';' -- this
   is what I need.
  
   Why doesn't it work with maven cmd line build?
   Why does maven seem to override that system property?
   Is there some easy fix

maven + java.class.path

2006-02-09 Thread Davis Ford
Hi, I wrote some code that uses the class path string from:

System.getProperty(java.class.path);

When I build with Maven on the command line it, this code:

System.out.println(System.getProperty(java.class.path);

produces this output:

C:\Program Files\Apache Software Foundation\Maven
1.0.2\lib\forehead-1.0-beta-5.jar

When I run the same code from inside Eclipse, it produces the output I
expect which is a long string of file directories separated by ';' -- this
is what I need.

Why doesn't it work with maven cmd line build?
Why does maven seem to override that system property?
Is there some easy fix?

Regards,
Davis


Re: maven + java.class.path

2006-02-09 Thread Davis Ford
Hi, I searched high and low on google, etc. and the mailing list
archives.  This means either my problem is unique, or I'm just doing
something very dumb.  I know maven is supposed to handle dependencies
like jar files with the xml, but this is a case where:

A unit test is run that introspects the current classpath.  The test
fails b/c maven seems to override the classpath...at least through
System.getProperty(java.class.path)

I tried adding the following to project.properties

maven.junit.jvmargs=-classpath C:\some\dir\path

but that had no effect.  My guess is that I can maybe fix this via
over-riding the right property, but the number of property key/value
pairs for all the plugins is a bit over-whelming.  Can someone provide
a hint?

Thanks,
Davis

 Hi, I wrote some code that uses the class path string from:

 System.getProperty(java.class.path);

 When I build with Maven on the command line it, this code:

 System.out.println(System.getProperty (java.class.path);

 produces this output:

 C:\Program Files\Apache Software Foundation\Maven
 1.0.2\lib\forehead-1.0-beta-5.jar

 When I run the same code from inside Eclipse, it produces the output I
 expect which is a long string of file directories separated by ';' -- this
 is what I need.

 Why doesn't it work with maven cmd line build?
 Why does maven seem to override that system property?
 Is there some easy fix?

 Regards,
 Davis



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



Re: maven + java.class.path

2006-02-09 Thread Davis Ford
Hello Dion,

Thanks for responding.  I should clarify -- the unit tests I am
running are testing some code that use
System.getProperty(java.class.path) -- and this code depends on the
fact that the call to System.getProperty(java.class.path) will
include . which is the current directory - wherever that may be. 
So, when maven overrides that system property, my tests fail.

Regards,
Davis

On 2/9/06, Dion Gillard [EMAIL PROTECTED] wrote:
 Why does your test need the classpath of the app that is running it?

 The java.class.path property is set by the JVM when it's launched.

 Are you forking your tests?

 On 2/10/06, Davis Ford [EMAIL PROTECTED] wrote:
  Hi, I searched high and low on google, etc. and the mailing list
  archives.  This means either my problem is unique, or I'm just doing
  something very dumb.  I know maven is supposed to handle dependencies
  like jar files with the xml, but this is a case where:
 
  A unit test is run that introspects the current classpath.  The test
  fails b/c maven seems to override the classpath...at least through
  System.getProperty(java.class.path)
 
  I tried adding the following to project.properties
 
  maven.junit.jvmargs=-classpath C:\some\dir\path
 
  but that had no effect.  My guess is that I can maybe fix this via
  over-riding the right property, but the number of property key/value
  pairs for all the plugins is a bit over-whelming.  Can someone provide
  a hint?
 
  Thanks,
  Davis
 
   Hi, I wrote some code that uses the class path string from:
  
   System.getProperty(java.class.path);
  
   When I build with Maven on the command line it, this code:
  
   System.out.println(System.getProperty (java.class.path);
  
   produces this output:
  
   C:\Program Files\Apache Software Foundation\Maven
   1.0.2\lib\forehead-1.0-beta-5.jar
  
   When I run the same code from inside Eclipse, it produces the output I
   expect which is a long string of file directories separated by ';' -- this
   is what I need.
  
   Why doesn't it work with maven cmd line build?
   Why does maven seem to override that system property?
   Is there some easy fix?
  
   Regards,
   Davis
  
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 http://www.multitask.com.au/people/dion/
 If I close my eyes it doesn't seem so dark. - SpongeBob SquarePants

 -
 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]



Copy Jar?

2006-01-02 Thread Davis Ford
Hi, I'm using Maven 1.0.2 to build my jar.  The jar is used as part of
a different project called GeoServer that uses Jetty.

Every time I build my jar, I need to manually copy it to
$someDir$/geoserver/server/WEB-INF/lib/ in order to test my changes. 
I don't rebuild GeoServer software everytime...I only rebuild my jar
that I run inside GeoServer.  What is the best way for me to add a
target or over-ride a plugin property to copy my jar to this
directory?

I looked at jar:install, but if I think if I over-ride that, then my
jar dependencies will get screwed up as it won't point to my
.maven/repository anymore.

I looked at distribution plugin, but it doesn't seem to have any documentation.

I'm not that swift yet with Jelly, but is there a maven.xml example
somewhere that does this?  Also, different developers have installed
GeoServer in different directories on their machines.  This means
somehow, whatever solution I create has to be able to accomodate this
discrepancy.  Environment variable?

Regards,
Davis

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



Re: Copy Jar?

2006-01-02 Thread Davis Ford
Thanks Brian,

I will check into dependency-maven-plugin.  In the meantime, I had
solved it.  This seems to be anti-Maven, b/c it uses an environment
variable, but it seems to work.  I added these two goals to maven.xml

goal name=check-props
j:if test=${context.getVariable('geoserver.home') == null}
j:if test=${context.getVariable('env.GEOSERVER_HOME') 
== null}
failPlease set either env-var GEOSERVER_HOME 
or Maven var
geoserver.home/fail
/j:if
echoSetting geoserver.home to 
${env.GEOSERVER_HOME}/echo
j:set var=geoserver.home 
value=${env.GEOSERVER_HOME}/
/j:if
/goal
goal name=geoserver prereqs=jar, check-props description=Copy
the Diamond Jar to GeoServer
echoGeoServer Home is = ${geoserver.home}/echo
ant:copy file=${maven.build.dir}/${maven.final.name}.jar
todir=${geoserver.home}\server\geoserver\WEB-INF\lib/
/goal

On 1/2/06, Brian E. Fox [EMAIL PROTECTED] wrote:
 Take a look at the dependency-maven-plugin at mojo
 http://mojo.codehaus.org/dependency-maven-plugin. After building and
 installing, this plugin could execute and copy it where ever you like.
 It expects the artifact to be in the local or remote repository but if
 you execute it in the install phase, it should already be in your local
 repo by the time the plugin executes.

 -Original Message-
 From: Davis Ford [mailto:[EMAIL PROTECTED]
 Sent: Monday, January 02, 2006 9:53 AM
 To: users@maven.apache.org
 Subject: Copy Jar?

 Hi, I'm using Maven 1.0.2 to build my jar.  The jar is used as part of a
 different project called GeoServer that uses Jetty.

 Every time I build my jar, I need to manually copy it to
 $someDir$/geoserver/server/WEB-INF/lib/ in order to test my changes.
 I don't rebuild GeoServer software everytime...I only rebuild my jar
 that I run inside GeoServer.  What is the best way for me to add a
 target or over-ride a plugin property to copy my jar to this directory?

 I looked at jar:install, but if I think if I over-ride that, then my jar
 dependencies will get screwed up as it won't point to my
 .maven/repository anymore.

 I looked at distribution plugin, but it doesn't seem to have any
 documentation.

 I'm not that swift yet with Jelly, but is there a maven.xml example
 somewhere that does this?  Also, different developers have installed
 GeoServer in different directories on their machines.  This means
 somehow, whatever solution I create has to be able to accomodate this
 discrepancy.  Environment variable?

 Regards,
 Davis

 -
 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]