You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by al...@dsl.ab.ca on 2002/03/27 19:01:04 UTC

Maven - installation, xref, feature suggestion

Hi,

  I downloaded Maven yesterday.  Maven provides great generated
documentation.


--------------------------------------------------
feature suggestion for dependencies

add 'home page' and/or 'documentation' links to the dependencies list.

for example:

    <dependency>
      <name>jakarta-log4j</name>
      <type>required</type>
      <version>1.1.3</version>
      <jar>log4j-1.1.3.jar</jar>
-->   <homepage>http://jakarta.apache.org/log4j/</homepage>
-->   <documentation>file:/my/local/copy/of/docs/</documentataion>
    </dependency>

then in the dependencies table, the name column can link to the home
page, and possibly add another column (or reuse a column) to point to
the documentation.

This will be most useful for pointing to non-jakarta libraries since
jakarta already has easy to find documentation and is one of my
bookmarks.


--------------------------------------------------
suggestion for unit tests report

Summary report has headings: tests failures errors success rate times
...................................^^^^^^^^^^^^^^^

package list has headings:   name tests errors failures times
........................................^^^^^^^^^^^^^^^

Consistency in ordering errors/failues is nice.




--------------------------------------------------
Question about testing:

My unit tests currently reference external data file through the
classpath (Classloader.getResource), but the maven test does not copy
the test files into the class path directories.

What is the maven way of accessing external data files in test cases?


--------------------------------------------------
xref

I prefer the cross-reference documentation created by javasrc at
http://javasrc.sourceforge.net/

I used the following patch to build-docs.xml

--- build-docs.xml.orig Tue Mar 26 09:34:40 2002
+++ build-docs.xml      Wed Mar 27 10:35:03 2002
@@ -26,6 +26,9 @@
     <pathelement location="${lib.repo}/velocity-1.3-dev.jar"/>
     <pathelement location="${lib.repo}/log4j-1.1.3.jar"/>
     <pathelement location="${lib.repo}/jdepend.jar"/>
+
+    <pathelement location="${lib.repo}/antlrall.jar"/>
+    <pathelement location="${lib.repo}/javasrc.jar"/>
   </path>
 
   <!-- ================================================================== -->
@@ -106,16 +109,49 @@
   <target
     name="cross-ref"
     depends="init">
-    
+
+<!--    
     <jxr
       startDir="src"
       destDir="${docs.dest}/xref"
       imageFolder="${maven.home}/images/folder.gif"
       imageFile="${maven.home}/images/file.gif">
     </jxr>
-  
+  -->
+
     <!-- The last two parameters don't really matter but the
          task craps out if they aren't there. -->
+
+
+      <mkdir dir="${docs.dest}/xref"/>
+      <java classname="javasrc.app.Pass1" 
+            output="${docs.dest}/xref/javasrc_pass1.log"
+             >
+
+        <classpath refid="maven-classpath"/>
+
+        <sysproperty key="title" value="${Name}"/>
+        <sysproperty key="outdir" value="${docs.dest}/xref"/>
+        <sysproperty key="verbose" value="true"/>
+        <sysproperty key="recurse" value="yes"/>
+
+        <arg value="src"/>
+      </java>
+
+
+      <java classname="javasrc.app.Pass2" 
+            output="${docs.dest}/xref/javasrc_pass2.log"
+             >
+
+        <classpath refid="maven-classpath"/>
+
+        <sysproperty key="title" value="${Name}"/>
+        <sysproperty key="outdir" value="${docs.dest}/xref"/>
+        <sysproperty key="verbose" value="true"/>
+        <sysproperty key="recurse" value="yes"/>
+
+        <arg value="src"/>
+      </java>
   
   </target>



--------------------------------------------------
Installation:

  I used maven-install.bin on Solaris 5.8, ant 1.4.1, and jdk 1.3.

  The ~/build.properties file was not populated with lib.repo and
maven.home.  The online 'getting started' documentation is great and
helped sort out what happened.

  Integration with our directory structure and build system was good.

  Note: removing the first '<' of the project.xml file
[eg: ?xml version="1.0"?>] caused the following error:

BUILD FAILED

/path/to/maven/build-maven.xml:68: java.lang.reflect.InvocationTargetException


 Running ant with -debug shows the nested exception (which is more
informative):

BUILD FAILED

/dslmnt/dslsun3/diskb/programmer/alvins/maven/build-maven.xml:68: java.lang.reflect.InvocationTargetException
        at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:101)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:104)
        at org.apache.tools.ant.Task.perform(Task.java:217)
        at org.apache.tools.ant.Target.execute(Target.java:164)
        at org.apache.tools.ant.Target.performTasks(Target.java:182)
        at org.apache.tools.ant.Project.executeTarget(Project.java:601)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:256)
        at org.apache.tools.ant.Task.perform(Task.java:217)
        at org.apache.tools.ant.Target.execute(Target.java:164)
        at org.apache.tools.ant.Target.performTasks(Target.java:182)
        at org.apache.tools.ant.Project.executeTarget(Project.java:601)
        at org.apache.tools.ant.Project.executeTargets(Project.java:560)
        at org.apache.tools.ant.Main.runBuild(Main.java:454)
        at org.apache.tools.ant.Main.start(Main.java:153)
        at org.apache.tools.ant.Main.main(Main.java:176)
--- Nested Exception ---
java.lang.reflect.InvocationTargetException: org.dom4j.DocumentException: Error on line 1 of document  : The markup in the document preceding the root element must be well-formed. Nested exception: The markup in the document preceding the root element must be well-formed.
        at org.dom4j.io.SAXReader.read(SAXReader.java:339)
        at org.dom4j.io.SAXReader.read(SAXReader.java:246)
        at org.apache.stratum.xo.Mapper.map(Mapper.java:378)
        at org.apache.stratum.xo.Mapper.map(Mapper.java:358)
        at org.apache.stratum.xo.Mapper.map(Mapper.java:247)
        at org.apache.maven.MavenUtils.getProject(MavenUtils.java:91)
        [snip]




  Did anyone read this far?
:)


Thanks.

Alvin.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Maven - installation, xref, feature suggestion

Posted by Pete Kazmier <pe...@kazmier.com>.
On Wed, Mar 27, 2002 at 11:01:04AM -0700, alvins@dsl.ab.ca wrote:
> suggestion for unit tests report
> 
> Summary report has headings: tests failures errors success rate times
> ...................................^^^^^^^^^^^^^^^
> 
> package list has headings:   name tests errors failures times
> ........................................^^^^^^^^^^^^^^^
> 
> Consistency in ordering errors/failues is nice.

Agreed and fixed.  Thanks!!


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Maven - installation, xref, feature suggestion

Posted by Pete Kazmier <pe...@kazmier.com>.
On Wed, Mar 27, 2002 at 11:01:04AM -0700, alvins@dsl.ab.ca wrote:
> --------------------------------------------------
> feature suggestion for dependencies
> 
> add 'home page' and/or 'documentation' links to the dependencies list.
> 
> for example:
> 
>     <dependency>
>       <name>jakarta-log4j</name>
>       <type>required</type>
>       <version>1.1.3</version>
>       <jar>log4j-1.1.3.jar</jar>
> -->   <homepage>http://jakarta.apache.org/log4j/</homepage>
> -->   <documentation>file:/my/local/copy/of/docs/</documentataion>
>     </dependency>
> 
> then in the dependencies table, the name column can link to the home
> page, and possibly add another column (or reuse a column) to point to
> the documentation.
> 
> This will be most useful for pointing to non-jakarta libraries since
> jakarta already has easy to find documentation and is one of my
> bookmarks.

Good idea.  I have added the <homepage> element to the <dependency>
element per your suggestion.  Thanks!!  I've also updated the
documentation to reflect the change.

The dependency table now includes a link if this element has been
specified.  You can see the new links that have been added to the
dependency table here:

http://jakarta.apache.org/turbine/maven/dependencies.html

Thanks!
Pete

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>