One other comment... there are actually two separate source modules: 'core' and 'java5' (the latter contains annotation definitions, and targets java5 binary). Both need to be built. What I was doing to build/run all this was:

   cd core
   maven jar jar:install
   cd ../java5
   maven jar jar:install
   cd ../samples
   maven war

I don't really know maven well -- was learning as I went. But I *think* that separating the modules into separate source directories is the way to go. Ideally, if you did 'maven jar' from the root, it would build both 'core' and 'java5'. Not sure how to do that, though. Any thoughts?

Rich

Don Brown wrote:

I'm getting two failures and 6 errors running "maven jar" from sandbox/ti. Also, when running "maven jar" from core, it isn't finding any source files, java or test.

Don

James Mitchell wrote:

Before I committed this, the existing maven build would run without a single complaint. After this commit, there are test failures (on my system - Mac OS X on 1.5)

Maybe I should explain...
The old project.xml had the elements out of order and specified 'src/ java' and 'src/test' as is typically the default. Since the actual source was in 'core/src/java' and 'core/src/test', instead of passing 100% of no tests, we now pass 7 out of 15 tests.

Here's the odd part. If I run the junit test right from eclipse (3.1GA), they pass just fine. It's when I run Maven and it runs the tests that I get failure.

Can someone verify?




--
James Mitchell
Software Engineer / Open Source Evangelist
Consulting / Mentoring / Freelance
EdgeTech, Inc.
http://www.edgetechservices.net/
678.910.8017
AIM:   jmitchtx
Yahoo: jmitchtx
MSN:   [EMAIL PROTECTED]
Skype: callto://jmitchtx




On Aug 29, 2005, at 12:36 AM, [EMAIL PROTECTED] wrote:

Author: jmitchell
Date: Sun Aug 28 21:35:52 2005
New Revision: 264062

URL: http://svn.apache.org/viewcvs?rev=264062&view=rev
Log:
My first contribution to Ti.
 * Fix many issues with the current maven build file.
   * Add ASL 2.0 to project.properties
* fix changelog factory so that svn activity will be correctly reported * the build should not extend the current Struts version in current/build/ * fix id/currentVersion to correctly build a struts-ti-1.0- SNAPSHOT.jar artifact
   * began rearranging the dependencies into a somewhat logical order
   * remove duplicate jsp-api dependency

 * Remove a few unused imports
 * Add a few javadoc and fix me to satisfy compiler
warnings (i am tempted to remove the 'fix me' comments, I just think they are ugly)


Modified:
    struts/sandbox/trunk/ti/core/src/java/org/apache/ti/Globals.java
struts/sandbox/trunk/ti/core/src/java/org/apache/ti/config/ OutputType.java struts/sandbox/trunk/ti/core/src/java/org/apache/ti/config/ ProcessTags.java struts/sandbox/trunk/ti/core/src/test/org/apache/ti/config/ TestXDocletParser.java
    struts/sandbox/trunk/ti/project.properties
    struts/sandbox/trunk/ti/project.xml

Modified: struts/sandbox/trunk/ti/core/src/java/org/apache/ti/ Globals.java URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/core/src/ java/org/apache/ti/Globals.java? rev=264062&r1=264061&r2=264062&view=diff ====================================================================== ======== --- struts/sandbox/trunk/ti/core/src/java/org/apache/ti/ Globals.java (original) +++ struts/sandbox/trunk/ti/core/src/java/org/apache/ti/ Globals.java Sun Aug 28 21:35:52 2005
@@ -18,7 +18,6 @@

 package org.apache.ti;

-import org.apache.ti.pageflow.internal.InternalConstants;

 import java.io.Serializable;


Modified: struts/sandbox/trunk/ti/core/src/java/org/apache/ti/ config/OutputType.java URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/core/src/ java/org/apache/ti/config/OutputType.java? rev=264062&r1=264061&r2=264062&view=diff ====================================================================== ======== --- struts/sandbox/trunk/ti/core/src/java/org/apache/ti/config/ OutputType.java (original) +++ struts/sandbox/trunk/ti/core/src/java/org/apache/ti/config/ OutputType.java Sun Aug 28 21:35:52 2005
@@ -17,21 +17,13 @@
  */
 package org.apache.ti.config;

-import java.io.*;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;

 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.velocity.Template;
-import org.apache.velocity.VelocityContext;
-import org.apache.velocity.app.VelocityEngine;
-import org.apache.velocity.exception.ResourceNotFoundException;
-
-import xjavadoc.XClass;
-import xjavadoc.XJavaDoc;
-import xjavadoc.filesystem.ReaderFile;

 /**
* Processes xdoclet-style tags and uses a velocity template to generate
@@ -39,8 +31,19 @@
  */
 public class OutputType {

+    /**
+     * FIX ME
+     */
     public static final int PER_ACTION = 0;
+
+    /**
+     * FIX ME
+     */
     public static final int PER_CONTROLLER = 1;
+
+    /**
+     * FIX ME
+     */
     public static final int ONCE = 3;

     private String filePattern;
@@ -49,20 +52,41 @@

private static final Log log = LogFactory.getLog (OutputType.class);

+    /**
+     * FIX ME
+     * @param template
+     * @param filePattern
+     * @param frequency
+     */
public OutputType(String template, String filePattern, int frequency) {
         this.template = template;
         this.filePattern = filePattern;
         this.frequency = frequency;
     }

+    /**
+     * Get the frequency
+     * @return Return the frequency
+     */
     public int getFrequency() {
         return frequency;
     }

+    /**
+     * Get the template
+     * @return Return the template
+     */
     public String getTemplate() {
         return template;
     }

+    /**
+     * FIX ME
+     * @param dest
+     * @param path
+     * @param actionName
+     * @return FIX ME
+     */
public Writer getWriter(File dest, String path, String actionName) {

         FileWriter writer = null;

Modified: struts/sandbox/trunk/ti/core/src/java/org/apache/ti/ config/ProcessTags.java URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/core/src/ java/org/apache/ti/config/ProcessTags.java? rev=264062&r1=264061&r2=264062&view=diff ====================================================================== ======== --- struts/sandbox/trunk/ti/core/src/java/org/apache/ti/config/ ProcessTags.java (original) +++ struts/sandbox/trunk/ti/core/src/java/org/apache/ti/config/ ProcessTags.java Sun Aug 28 21:35:52 2005
@@ -18,13 +18,10 @@
 package org.apache.ti.config;

 import java.io.File;
-import java.io.FileReader;
-import java.io.FileWriter;
 import java.io.IOException;
+import java.net.URI;
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
-import java.net.URI;

 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -37,12 +34,26 @@
     private XDocletParser xdocletParser;

private static final Log log = LogFactory.getLog (ProcessTags.class);
+
+    // TODO where is this used?
     private static final String SEP = File.separator;

+    /**
+     * Set the parser
+     * @param parser
+     */
     public void setXdocletParser(XDocletParser parser) {
         this.xdocletParser = parser;
     }

+    /**
+     * Process tags
+     * @param src
+     * @param srcName
+     * @param dest
+     * @param outputs
+     * @throws IOException
+     */
public void process(File src, String srcName, File dest, List outputs) throws IOException {
         ArrayList sources = new ArrayList();
         crawl(src, srcName, src, outputs, sources);

Modified: struts/sandbox/trunk/ti/core/src/test/org/apache/ti/ config/TestXDocletParser.java URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/core/src/ test/org/apache/ti/config/TestXDocletParser.java? rev=264062&r1=264061&r2=264062&view=diff ====================================================================== ======== --- struts/sandbox/trunk/ti/core/src/test/org/apache/ti/config/ TestXDocletParser.java (original) +++ struts/sandbox/trunk/ti/core/src/test/org/apache/ti/config/ TestXDocletParser.java Sun Aug 28 21:35:52 2005
@@ -18,22 +18,14 @@

 package org.apache.ti.config;

-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.io.StringReader;
-import java.io.StringWriter;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;

 import junit.framework.Test;
-import junit.framework.TestCase;
 import junit.framework.TestSuite;
-import java.io.*;
-import java.util.*;
-import org.apache.velocity.*;
-import org.apache.ti.util.*;

-import org.jdom.Document;
-import org.jdom.input.SAXBuilder;
-import org.jdom.xpath.XPath;
+import org.apache.ti.util.VelocityTemplateProcessor;

 /**
* Unit tests for the <code>org.apache.ti.config.XDocletParser</ code> class.

Modified: struts/sandbox/trunk/ti/project.properties
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/ project.properties?rev=264062&r1=264061&r2=264062&view=diff ====================================================================== ========
--- struts/sandbox/trunk/ti/project.properties (original)
+++ struts/sandbox/trunk/ti/project.properties Sun Aug 28 21:35:52 2005
@@ -1,2 +1,21 @@
+# -------------------------------------------------------------------
+# Copyright 2001-2004 The Apache Software Foundation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# -------------------------------------------------------------------
+
+
maven.repo.remote=http://people.apache.org/~mrdon/ repository/,http://www.ibiblio.org/maven/,http://www.cppdoc.com/ repository/
 maven.compile.source=1.4
+
+maven.changelog.factory = org.apache.maven.svnlib.SvnChangeLogFactory

Modified: struts/sandbox/trunk/ti/project.xml
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/ project.xml?rev=264062&r1=264061&r2=264062&view=diff ====================================================================== ========
--- struts/sandbox/trunk/ti/project.xml (original)
+++ struts/sandbox/trunk/ti/project.xml Sun Aug 28 21:35:52 2005
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
 /*
  * Copyright 2001-2004 The Apache Software Foundation.
@@ -19,27 +19,22 @@


 <project>
-  <pomVersion>3</pomVersion>
-  <groupId>struts-ti</groupId>
-  <currentVersion>0.1-dev</currentVersion>
-

- <!-- ################################################################ --> - <!-- Project management section --> - <!-- ################################################################ -->
-
-
+  <pomVersion>3</pomVersion>
+  <id>struts-ti</id>
+  <name>Struts Ti</name>
+  <currentVersion>1.0-SNAPSHOT</currentVersion>
   <organization>
-    <name>The Apache Software Foundation</name>
+    <name>Apache Software Foundation</name>
     <url>http://www.apache.org/</url>
     <logo>http://www.apache.org/images/asf-logo.gif</logo>
   </organization>
-  <logo>http://struts.apache.org/images/struts.gif</logo>
-  <inceptionYear>2000</inceptionYear>
+
+  <inceptionYear>2005</inceptionYear>
   <package>org.apache.ti</package>
   <logo>http://struts.apache.org/images/struts.gif</logo>
   <gumpRepositoryId>struts-ti-svn</gumpRepositoryId>
-
+
   <description>
Struts Ti is a simplified Model 2 framework for developing webapps which allows the developer better access to the underlying servlet/portlet environment. It serves a niche of web applications that don.t want the additional
@@ -47,7 +42,7 @@
modern web framework. Struts Ti builds on the directions of Struts 1.x, yet re-implements the framework to provide a clean slate for the next generation of Struts Ti. It aims to combine the simplicity of Ruby on Rails and NanoWeb, the refinement of WebWork 2, the tool-friendly authoring of Beehive, and the history of Struts 1.x.</description>
-
+
   <shortDescription>MVC Web Application Framework</shortDescription>
   <url>http://struts.apache.org/index.html</url>
<issueTrackingUrl>http://issues.apache.org/bugzilla/</ issueTrackingUrl>
@@ -56,6 +51,12 @@
   <distributionSite>struts.apache.org</distributionSite>
<distributionDirectory>/www/www.apache.org/builds/</ distributionDirectory> <!-- <distributionDirectory>/www/www.apache.org/dist/java- repository/</distributionDirectory>-->
+
+  <repository>
+ <connection>scm|svn|http|//svn.apache.org/repos/asf/struts/ sandbox/trunk/ti</connection> + <developerConnection>scm|svn|https|//svn.apache.org/repos/asf/ struts/sandbox/trunk/ti</developerConnection> + <url>http://svn.apache.org/repos/asf/struts/sandbox/trunk/ti</ url>
+  </repository>

   <mailingLists>
     <mailingList>
@@ -108,6 +109,53 @@
   </licenses>

<!-- ################################################################ --> + <!-- Project build and reports section --> + <!-- ################################################################ -->
+
+  <build>
+    <nagEmailAddress>[EMAIL PROTECTED]</nagEmailAddress>
+    <sourceDirectory>core/src/java</sourceDirectory>
+    <unitTestSourceDirectory>core/src/test</unitTestSourceDirectory>
+
+    <unitTest>
+      <includes>
+        <include>**/Test*.java</include>
+      </includes>
+      <resources>
+        <resource>
+          <directory>${basedir}/src/test</directory>
+          <includes>
+            <exclude>**/*.java</exclude>
+          </includes>
+        </resource>
+      </resources>
+    </unitTest>
+    <resources>
+      <resource>
+        <directory>${basedir}/src/java</directory>
+        <excludes>
+          <exclude>**/*.java</exclude>
+        </excludes>
+      </resource>
+    </resources>
+
+    <!-- J A R  R E S O U R C E S -->
+    <!-- Resources that are packaged up inside the JAR file -->
+<!--
+    <resources>
+      <resource>
+        <directory>${basedir}/src/share</directory>
+        <includes>
+          <include>**/*.properties</include>
+        </includes>
+      </resource>
+    </resources>
+-->
+
+  </build>
+
+
+ <!-- ################################################################ --> <!-- Project dependency section --> <!-- ################################################################ -->

@@ -127,6 +175,17 @@
       <version>2.0</version>
       <url>http://java.sun.com/products/jsp/</url>
     </dependency>
+
+    <!--  commons-*  -->
+    <dependency>
+      <groupId>commons-beanutils</groupId>
+      <artifactId>commons-beanutils</artifactId>
+      <version>1.7.0</version>
+      <url>http://jakarta.apache.org/commons/beanutils/</url>
+      <properties>
+        <war.bundle>true</war.bundle>
+      </properties>
+    </dependency>

     <dependency>
       <groupId>commons-chain</groupId>
@@ -149,16 +208,6 @@
     </dependency>

     <dependency>
-      <groupId>commons-beanutils</groupId>
-      <artifactId>commons-beanutils</artifactId>
-      <version>1.7.0</version>
-      <url>http://jakarta.apache.org/commons/beanutils/</url>
-      <properties>
-        <war.bundle>true</war.bundle>
-      </properties>
-    </dependency>
-
-    <dependency>
       <groupId>commons-digester</groupId>
       <artifactId>commons-digester</artifactId>
       <version>1.7</version>
@@ -168,17 +217,6 @@
       </properties>
     </dependency>

-
-    <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging</artifactId>
-      <version>1.0.4</version>
-      <url>http://jakarta.apache.org/commons/logging/</url>
-      <properties>
-        <war.bundle>true</war.bundle>
-      </properties>
-    </dependency>
-
     <dependency>
       <groupId>commons-io</groupId>
       <artifactId>commons-io</artifactId>
@@ -200,6 +238,16 @@
     </dependency>

     <dependency>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+      <version>1.0.4</version>
+      <url>http://jakarta.apache.org/commons/logging/</url>
+      <properties>
+        <war.bundle>true</war.bundle>
+      </properties>
+    </dependency>
+
+    <dependency>
       <groupId>commons-jci</groupId>
       <artifactId>commons-jci</artifactId>
       <version>SNAPSHOT</version>
@@ -209,7 +257,34 @@
       </properties>
     </dependency>

-
+    <dependency>
+      <groupId>commons-codec</groupId>
+      <artifactId>commons-codec</artifactId>
+      <version>1.3</version>
+      <properties>
+        <war.bundle>true</war.bundle>
+      </properties>
+    </dependency>
+
+    <dependency>
+      <groupId>commons-el</groupId>
+      <artifactId>commons-el</artifactId>
+      <version>1.0</version>
+      <properties>
+        <war.bundle>true</war.bundle>
+      </properties>
+    </dependency>
+
+    <dependency>
+      <groupId>commons-validator</groupId>
+      <artifactId>commons-validator</artifactId>
+      <version>1.1.4</version>
+      <properties>
+        <war.bundle>true</war.bundle>
+      </properties>
+    </dependency>
+
+    <!-- OpenSymphony -->
     <dependency>
       <groupId>opensymphony</groupId>
       <artifactId>xwork</artifactId>
@@ -240,6 +315,7 @@
       </properties>
     </dependency>

+    <!-- ognl -->
     <dependency>
       <groupId>ognl</groupId>
       <artifactId>ognl</artifactId>
@@ -250,6 +326,7 @@
       </properties>
     </dependency>

+    <!-- Velocity -->
     <dependency>
       <groupId>velocity</groupId>
       <artifactId>velocity</artifactId>
@@ -384,42 +461,6 @@
     </dependency>

     <dependency>
-      <groupId>commons-codec</groupId>
-      <artifactId>commons-codec</artifactId>
-      <version>1.3</version>
-      <properties>
-        <war.bundle>true</war.bundle>
-      </properties>
-    </dependency>
-
-    <dependency>
-      <groupId>commons-el</groupId>
-      <artifactId>commons-el</artifactId>
-      <version>1.0</version>
-      <properties>
-        <war.bundle>true</war.bundle>
-      </properties>
-    </dependency>
-
-    <dependency>
-      <groupId>jspapi</groupId>
-      <artifactId>jsp-api</artifactId>
-      <version>2.0</version>
-      <properties>
-        <war.bundle>true</war.bundle>
-      </properties>
-    </dependency>
-
-    <dependency>
-      <groupId>commons-validator</groupId>
-      <artifactId>commons-validator</artifactId>
-      <version>1.1.4</version>
-      <properties>
-        <war.bundle>true</war.bundle>
-      </properties>
-    </dependency>
-
-    <dependency>
       <groupId>log4j</groupId>
       <artifactId>log4j</artifactId>
       <version>1.2.8</version>
@@ -458,63 +499,8 @@
   </dependencies>


- <!-- ################################################################ --> - <!-- Project build and reports section --> - <!-- ################################################################ -->
-
-  <build>
-    <nagEmailAddress>[EMAIL PROTECTED]</nagEmailAddress>
-    <sourceDirectory>src/java</sourceDirectory>
-    <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
-
-    <unitTest>
-      <includes>
-        <include>**/Test*.java</include>
-      </includes>
-      <resources>
-        <resource>
-          <directory>${basedir}/src/test</directory>
-          <includes>
-            <exclude>**/*.java</exclude>
-          </includes>
-        </resource>
-      </resources>
-    </unitTest>
-    <resources>
-      <resource>
-        <directory>${basedir}/src/java</directory>
-        <excludes>
-          <exclude>**/*.java</exclude>
-        </excludes>
-      </resource>
-    </resources>
-
-    <!-- J A R  R E S O U R C E S -->
-    <!-- Resources that are packaged up inside the JAR file -->
-<!--
-    <resources>
-      <resource>
-        <directory>${basedir}/src/share</directory>
-        <includes>
-          <include>**/*.properties</include>
-        </includes>
-      </resource>
-    </resources>
--->
-
-  </build>

   <reports>
-    <!--
-     |
- | These should all be completely self contained. You should be able - | to generate each of them individually without needing the final
-     | xdoc transformation.
-     |
-     | Each report plugin with it's POM and plugin.jelly logic should
-     | contain everything needed to produced the report.
-     |
-    -->

     <report>maven-checkstyle-plugin</report>
     <report>maven-changelog-plugin</report>



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

Reply via email to