Re: maven + java.class.path

2006-02-10 Thread Anthony Vito

 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?

The java.class.path property isn't useful, and shouldn't be used, or
relied on, at all. The only thing it shows are what class paths were
available to the original parent classloader when the VM was created.
Nothing more.

These particular tests break under several conditions. If you use a
reflective launch, (which is what happened here.) or even if your
classes are packaged in a jar. The classpath would show the path to the
jar, not a path to a directory. Whatever you need the classes hierarchy
for, you should be able to design it to accomplish it with the
ClassLoader object, and other bits of java.lang.reflect. It will end up
being much more tool friendly. :)

-vito


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



Re: Deploy JNLP

2004-05-06 Thread Anthony Vito
In that example ant in ant:mkdir in a namespace. I didn't include
the top of my maven.xml file which goes like this.

project default=java:compile
  xmlns:ant=jelly:ant
  xmlns:j=jelly:core
  xmlns:util=jelly:util

What those xmlns lines do are bind libraries to specific namespaces.
jelly:ant is the library that has all the ant tags, and it's bound to
ant so now ant:mkdir should work just fine. I could have put
xmlnx:fred=jelly:ant then fred:mkdir would have made the cut. I didn't
include the bindings I used in my example. So that one was my fault.

-vito

On Tue, 2004-05-04 at 10:59, Daniel Frey wrote:
  To accomplish jnlp deployment I added a pregoal to site:deploy, which 
  copies the jnlp folder to the docs directory. Then I have a link in 
  the html to the .jnlp file to launch it, works great.
 
 Smart guy! Thanks a lot.
 
 Do you have a hint where to put that (as a new maven user)? I tried it in
 maven.xml, however recive an error about The prefix ant for element
 ant:mkdir is not bound.
 
 Thanks again.
 Daniel
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



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



Re: Deploy JNLP

2004-05-04 Thread Anthony Vito
To accomplish jnlp deployment I added a pregoal to site:deploy, which
copies the jnlp folder to the docs directory. Then I have a link in the
html to the .jnlp file to launch it, works great.

  preGoal name=site:deploy

j:set var=docsDest
value=${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.docs.dest')}/

ant:mkdir dir=${docsDest}/jnlp/
ant:copy todir=${docsDest}/jnlp
  ant:fileset dir=${maven.build.dir}/jnlp/
/ant:copy
  /preGoal

-vito

On Mon, 2004-04-26 at 07:56, Emmanuel Venisse wrote:
 
 - Original Message - 
 From: Daniel Frey [EMAIL PROTECTED]
 To: 'Maven Users List' [EMAIL PROTECTED]
 Sent: Sunday, April 25, 2004 10:31 AM
 Subject: Deploy JNLP
 
 
  Hi there,
 
  Is there a way to deploy the JNLP artifacts generated by maven jnlp to a
  server?
 
 No, you can write a postGoal for the jnlp generation, or add a new goal in
 the jnlp plugin and send us the patch.
 
 Emmanuel
 
 
 -
 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: New User Question

2003-12-01 Thread Anthony Vito
Don't redirect to maven.log as log4j is set up to use that file...
choose a different file name :)

-Anthony

On Mon, 2003-12-01 at 11:54, [EMAIL PROTECTED] wrote:
 
 I'm in the windows world.  when I try to redirect I get the following:
 C:
 \ccviews\PP08920_klltp1g_shareware_view\PNC_Shareware\PNCJavaLoggingWrappermaven
 
 jar  maven.log
 log4j:ERROR setFile(null,false) call failed.
 java.io.FileNotFoundException: maven.log (The process cannot access the
 file because it is being used by another process)
 at java.io.FileOutputStream.open(Native Method)
 at java.io.FileOutputStream.init(FileOutputStream.java:176)
 at java.io.FileOutputStream.init(FileOutputStream.java:102)
 at org.apache.log4j.FileAppender.setFile(FileAppender.java:272)
 at
 org.apache.log4j.FileAppender.activateOptions(FileAppender.java:151)
 at
 org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:247)
 at
 org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:123)
 at
 org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:87)
 at
 org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:645)
 at
 org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:603)
 at
 org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:500)
 at
 org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:406)
 at
 org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:432)
 at
 org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:460)
 at org.apache.log4j.LogManager.clinit(LogManager.java:113)
 at org.apache.log4j.Category.getInstance(Category.java:530)
 at
 org.apache.commons.logging.impl.Log4jFactory.getInstance(Log4jFactory.java:140)
 at
 org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:253)
 at
 org.apache.commons.logging.LogFactory.getLog(LogFactory.java:382)
 at org.apache.maven.cli.App.init(App.java:218)
 at org.apache.maven.cli.App.main(App.java:1108)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at com.werken.forehead.Forehead.run(Forehead.java:551)
 at com.werken.forehead.Forehead.main(Forehead.java:581)
 
 Mark Russell
 PNC
 412-768-9603
 
 
 |-+---
 | |   khote |
 | |   [EMAIL PROTECTED]|
 | |   t.com  |
 | |   |
 | |   12/01/2003 11:00|
 | |   AM  |
 | |   Please respond  |
 | |   to Maven Users |
 | |   List   |
 | |   |
 |-+---
   
 ---|
   |  
  |
   |To:  Maven Users List [EMAIL PROTECTED]   
 |
   |cc:   
  |
   |Subject: Re: New User Question
  |
   
 ---|
 
 
 
 maven goal | less
 works for me.  At the end of less, hit an 's', and save the log file
 
 - Original Message -
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, December 01, 2003 7:40 AM
 Subject: New User Question
 
 
  I thought I would be able to find this in the FAQ or the mail List
 archives
  but I could not come up with the correct query.
 
  In ant I can redirect all of my output to a file with the -l parameter.
  Can I do something similar in Maven?
 
  Mark Russell
  PNC
  412-768-9603
 
 
 
  -
  The contents of this email are the property of PNC. If it was not
 addressed to you, you have no legal right to read it. If you think you
 received it in error, please notify the sender. Do not forward or copy
 without permission of the sender.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

Re: My Scripts Are Your Scripts

2003-09-23 Thread Anthony Vito
I have cut out my one page of documentation on these helper scripts and
placed it here http://www.cs.oswego.edu/~vito/commandLineTools.html  It
reads pretty easy. Let me know what you think.

-Anthony Vito

 snip all


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



Re: access violation when executing multiproject:site on win XP machine

2003-09-23 Thread Anthony Vito
Hi,
  Like it says, it's a VM error, not really a Maven issue. Try upgrading
to Java version 1.4.1_03 or whatever the latest and greatest is for
1.4.1. If that doesn't fix it, try to isolate the javadoc command which
is causing the error, and then submit a bug report to Sun.

-Anthony Vito

On Tue, 2003-09-23 at 16:04, Stefan Hedtfeld wrote:
   Hi,
 
 I have a problem executing the multiproject:site goal. Since more than 
 ten days I tried it, always taking a fresh snapshot from CVS, but I 
 always get the same result (see snipplet below).
 
 As you can see from the error message I am using jdk 1.4.2_01, I use a 
 XP machine with the latest available patches installed (see systeminfo 
 result below snipplet; I removed german umlauts and some personal 
 information).
 
 I am using MAVEN_OPTS=-Xmx512m to have enough memory (there is 640MB 
 real memory installed).
 
 Has anyone experienced the same?
 
 Regards,
 
 Stefan Hedtfeld.
 
 =
 == Begin Snipplet ===
 =
 
 +
 | Generating site for  Maven Artifact Plug-in
 | Memory: 60M/73M
 +
 
 
 
 
 xdoc:
 
 
 site:
 xdoc:register-reports:
 maven-jdepend-plugin:register:
 
 maven-checkstyle-plugin:register:
 
 maven-changes-plugin:register:
 
 maven-changelog-plugin:register:
 
 maven-developer-activity-plugin:register:
 
 maven-file-activity-plugin:register:
 
 maven-license-plugin:register:
 
 maven-javadoc-plugin:register:
 
 maven-jxr-plugin:register:
 
 maven-junit-report-plugin:register:
 
 maven-linkcheck-plugin:register:
 
 maven-tasklist-plugin:register:
 
 
 site:run-reports:
 [echo] Generating the Metrics...
 maven-jdepend-plugin:report:
 java:prepare-filesystem:
 
 java:compile:
 [echo] Compiling to 
 E:\home\maven\src\plugins-build\artifact/target/classes
 
 [mkdir] Created dir: 
 E:\home\maven\src\plugins-build\artifact\target\generated-xdocs
 
 [echo] Generating the Checkstyle...
 checkstyle:init:
 
 checkstyle:license:
 
 checkstyle:report:
 [echo] Using E:\home\maven\src\plugins-build\artifact/checkstyle.xml 
 for checkstyle ...
 
 [echo] Generating the Changes...
 changes:report:
 
 [echo] Generating the Change Log...
 maven-changelog-plugin:report:
 [echo] Generating the changelog report
 SCM Working Directory: E:\home\maven\src\plugins-build\artifact
 SCM Command Line[0]: cvs
 SCM Command Line[1]: -d
 SCM Command Line[2]: :pserver:[EMAIL PROTECTED]:/home/cvspublic
 SCM Command Line[3]: log
 SCM Command Line[4]: -d 2003-08-232003-09-23
 ChangeLog found: 5 entries
 
 [echo] Generating the Developer Activity...
 maven-developer-activity-plugin:report:
 [echo] Generating the developer activity report
 
 [echo] Generating the File Activity...
 maven-file-activity-plugin:report:
 [echo] Generating the file activity report
 
 [echo] Generating the Project License...
 maven-license-plugin:report:
 xdoc:init:
 [mkdir] Created dir: 
 E:\home\maven\src\plugins-build\artifact\target\docs
 
 license:transfer:
 
 license:
 
 
 [echo] Generating the JavaDocs...
 xdoc:init:
 
 maven-javadoc-plugin:report:
 [mkdir] Created dir: 
 E:\home\maven\src\plugins-build\artifact\target\docs\apidocs
 [echo] Linking with API information from 
 http://jakarta.apache.org/commons/jelly/apidocs/ ...
 [echo] Linking with API information from 
 http://jakarta.apache.org/commons/betwixt/apidocs/ ...
 [echo] Linking with API information from 
 http://werkz.werken.com/apidocs/ ...
 [mkdir] Created dir: 
 E:\home\maven\src\plugins-build\artifact\target\javadoc
 [javadoc] Generating Javadoc
 [javadoc] Javadoc execution
 
 An unexpected exception has been detected in native code outside the VM.
 Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc005) occurred at 
 PC=0x6C706544
 Function=[Unknown.]
 Library=(N/A)
 
 NOTE: We are unable to locate the function name symbol for the error
   just occurred. Please refer to release documentation for possible
   reason and solutions.
 
 
 Current Java thread:
 at java.lang.Win32Process.create(Native Method)
 at java.lang.Win32Process.init(Win32Process.java:66)
 at java.lang.Runtime.execInternal(Native Method)
 at java.lang.Runtime.exec(Runtime.java:566)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at 
 org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:646)
 at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:416)
 at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:427)
 at org.apache.tools.ant.taskdefs.Javadoc.execute

Re: Noob question: how to deal with non maven jars?

2003-08-15 Thread Anthony Vito
Well that's great and all, but no one mentioned Maven's jar override
feature, which is in the user docs. It sounds like that should be used
here.  Look for the section titled.. Overriding Stated Dependencies

-Anthony Vito



On Thu, 2003-08-14 at 18:54, Ben Walding wrote:
 Now Mike, once you've gathered together all the responses, your 
 challenge is to put it all into the wiki in a human digestible form!
 
 For this, you will be rewarded with many riches (or perhaps just a 
 feeling of oneness with the Maven documentation).
 
 Start this process at http://wiki.codehaus.org/maven/MailingListSupport
 
 
 Cheers,
 
 Ben
 
 Colin Sampaleanu wrote:
 
  You can do something like this in maven.xml:
   !-- install the xmltypes jar to the local repo, since people using 
  our main
jar will also need that one --
   postGoal name=jar:install
 ant:property name=jardir__ 
  value=${maven.repo.local}/${pom.artifactDirectory}/jars/
 ant:mkdir dir=${jardir__}/  ant:copy
   file=${basedir}/lib/core/xmltypes.jar
   
  tofile=${jardir__}/${pom.artifactId}-xmltypes-${pom.currentVersion}.jar
   overwrite=true
 /
   /postGoal
 
  However, whether this is a good idea is another question. In this 
  case, the jar in question is manually generated from stuff in this 
  project, so it makes some sense. But if it is just another jar that is 
  in the local lib dir which is really standalone, and it is not on 
  ibiblio, then you are probably better off defining another remote repo 
  which is actually local (alongside ibiblio), and put the jar there. 
  E.g. in the project.properties:
 
  # override remote repo since we want to also point to a cvs based 
  remote repo
  # to get some jars not found at ibiblio
  maven.repo.remote=\
 file:${basedir}/../../shared/repository,\
 http://www.ibiblio.com/maven
 
  Regards,
  Colin
 
 
  Michael Mills wrote:
 
  After spending a lot of time looking at (what little) documentation
  there is and trying out various maven command lines I was wondering how
  (other than manually creating the dir in the maven.local.repository) you
  get any old jar that is required for a build into your local repository.
 
  If I have a jar: bob.jar that is currently in the 'lib' folder of my
  project, which is currently using ant to build with that path added to
  my project.classpath, how do I get bob.jar into my local repository so
  that I can add the following to my maven project.xml file and get it to
  compile:
 
 dependency
   idbob/id
   artifactIdbob/artifactId
   version1.0/version
   typejar/type
 /dependency
 
  I have tried to use the maven jar:xxx goals but they don't seem to
  work, also maven repository:xxx don't work (I have got a local
  webserver running and maven.repo.remote=http://localhost stored in
  build.properties in the user.profile directory).
 
  I would have thought that you could cd to the lib folder and execute a
  maven command to register bob in the local repository as version 1.0?
  This does not seem possible.
 
  In general I guess I am asking: what process is intended for files that
  A, are not open source (i.e. in the standard maven remote repo) or B, do
  not have the associated src files (and hence can not be built by a maven
  project where you can use maven jar:install).
 
  -Mike
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
   
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



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



Re: Canoo WebTest Plugin 0.7 problems

2003-08-14 Thread Anthony Vito
Not sure if you figured this out yet. I don't see any build past .8 so I
don't believe you can get it fixed from a download. The problem is that
the plugin depends on a webtest-277.jar, because that's the latest one
on ibiblio. Take the webtest.jar from the Canoo Webtest install, rename
it to webtest-362.jar (cause that's the build number, seems
appropriate.) place it in your local repository. Change the plugin's
project.xml to depend on it, reinstall the plugin. ( or just delete the
caches and the .processed file )

Let me know if it works for you.

-Anthony Vito

On Mon, 2003-07-21 at 16:23, Leandro Rodrigo Saad Cruz wrote:
 Hi Siegfried.
 
 env
   Debian/Linux
   Apache Ant version 1.5.3
   java version 1.4.1_02
   maven 1.0-beta-10
 /env
 
 
 I'm trying to use the canoo plugin but keep getting this error :
 
 stdout
 webtest:info:
 [echo] 
   maven.webtest.file= *.xml
   maven.webtest.target  = 
   maven.webtest.src = src/webtest  
   maven.webtest.config.host = localhost
   maven.webtest.config.port = 8080
   maven.webtest.config.protocol = http  
   maven.webtest.config.basepath = /multirc
   maven.webtest.config.summary  = true
   maven.webtest.config.verbose  = true
   maven.webtest.config.saveresponse = true
   maven.webtest.config.resultpath   =
 /home/leandro/workspace/multirc/target/webtest  
   maven.webtest.config.resultfile   = 
   maven.webtest.jar.fileset.dir = 
   maven.webtest.jar.fileset.include = 
   maven.webtest.jar.fileset.exclude =
 
 
 webtest:test:
 [echo] Starting Canoo Webtest ...
 [echo] Processing simpletest.xml
 [java] Buildfile:
 /home/leandro/workspace/multirc/src/webtest/simpletest.xml
 [java] No public execute() in class
 com.canoo.webtest.steps.verify.VerifyLinks
 [java] 
 [java] BUILD FAILED
 [java] No public execute() in class
 com.canoo.webtest.steps.verify.VerifyLinks
 [java] 
 [java] Total time: 2 seconds
 [java] [ERROR] Java Result: 1
 [echo] Finished running Canoo Webtest Plugin
 
 webtest:generate-test-report:
 
 webtest:generate-summary-report:
 [echo] Summary
 BUILD SUCCESSFUL
 Total time:  10 seconds
 
 /stdout
 
 The simpltest.xml file works when I use ant -f simpletest.xml and all
 required jars are on my $CLASSPATH
 
 Do you have any clue why ?
 
 -- 
 Leandro Rodrigo Saad Cruz
 IT - Inter Business Tecnologia e Servicos (IB)
 http://www.ibnetwork.com.br
 http://db.apache.org/ojb
 http://xingu.sourceforge.net
 
 
 -
 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: Inheriting Goals in master maven.xml file...

2003-06-19 Thread Anthony Vito
Projects inheriting the global project.xml will also inherit the goals
in the maven.xml next to it. In my setup I have a CVS module called
master and then all the mavenized projects as separate modules.
Checking out all the modules of interest, and master, gives all the
functionality I need. I have also written productivity command line
scripts, like an incremental compile script that uses the dependencies
of maven for it's class path, and a run any class's main method script
which uses the same dependencies. They are very helpful. I suppose I
should publish a link later... I will.

Anthony Vito


On Thu, 2003-06-19 at 13:27, James Carman wrote:
 Is this possible?  I have one main project with a global project.xml file.
 If I put a maven.xml file in the same directory as the global project.xml
 file, how do I get the subprojects to inherit the goals in the maven.xml
 file?  Or, can I?
 
 James Carman, President
 Carman Consulting, Inc.
 1218 Bob White Ct.
 Edgewood, KY 41018
 (513) 325-7977



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