We're still in process of converting from a strictly ant build to a
maven 2 build and we're relying on a few snippets ouf of our old ant
scripts.  Currently, one is really throwing us for a loop:
 
   <build>
      <resources>
         <resource>
            <directory>src/main/scripts</directory>
            <targetPath>../scripts</targetPath>
            <filtering>false</filtering>
         </resource>
         <resource>
            <directory>src/main/resources</directory>
         </resource>
      </resources>
      <plugins>
         <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <configuration>
               <descriptor>src/main/assembly/dep.xml</descriptor>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
               <execution>
                  <phase>generate-sources</phase>
                  <configuration>
                     <tasks>
                        <ant antfile="build.xml" inheritRefs="true">
                           <target name="generate-pdt-source"/>
                        </ant>
                     </tasks>
                  </configuration>
                  <goals>
                     <goal>run</goal>
                  </goals>
               </execution>
            </executions>
            <dependencies>
               <dependency>
                  <groupId>castor</groupId>
                  <artifactId>castor_xml</artifactId>
                  <version>0.9.4.3</version>
               </dependency>
               <dependency>
                  <groupId>xerces</groupId>
                  <artifactId>xercesImpl</artifactId>
                  <version>2.8.0</version>
               </dependency>
            </dependencies>
         </plugin>
      </plugins>
   </build>
 
   <target name="generate-pdt-source" depends="check-pdt-source"
unless="castor.generate.required">
      <delete dir="${pdt.source.dir}"/>
      <delete dir="${castor.target.dir}"/>
      <property name="coolcp" refid="maven.plugin.classpath"/>
      <echo message="${coolcp}"/>
            <property name="coolcp2"
refid="maven.dependency.classpath"/>
      <echo message="${coolcp2}"/>
      <java classname="org.exolab.castor.builder.SourceGenerator">
         <arg value="-dest"/>
         <arg value="${castor.target.dir}"/>
         <arg value="-types"/>
         <arg value="j2"/>
         <arg value="-i"/>
         <arg value="${castor.schemafile}"/>
         <arg value="-f"/>
         <arg value="-package"/>
         <arg value="com.upromise.pdt.castor"/>
         <classpath>
            <pathelement location="${castor.source.dir}"/>
         </classpath>
         <classpath refid="maven.plugin.classpath"/>
      </java>
      <copy todir="${pdt.target.dir}">
         <fileset dir="${pdt.source.dir}"/>
      </copy>
      <touch file="${castor.touchfile}"/>
   </target>
 
What's really nuts is on SOME people's machines this works, on others it
doesn't.  Does anyone see anything out of line?

Reply via email to