Grokbase Groups Maven users May 2003
FAQ
Thanx!

Will this work?

<resources>
<directory>java/src</directory>
<includes>
<include>**/*.*</include>
<exclude>**/*.java</exclude>
<exclude>**/.nbattrs</exclude>
<exclude>**/*.java~</exclude>
<exclude>**/CVS/**</exclude>
</includes>
</resources>

What about tests?

-----Original Message-----
From: Paulo Silveira
Sent: Monday, May 26, 2003 9:07 PM
To: 'Maven Users List'
Subject: RE: How to copy files to target/classes and target/test-classes
dirs


You can use the resources tag in your project.xml:

<resources>
<resource>

<directory>src/yourDirectoryWithConfigFilesAndXMLandAnything</directory>
<includes>
<include>*.xml</include>
<include>*.txt</include>
</includes>
</resource>
</resources>


------------------------
Paulo Silveira
http://www.paulo.com.br/
http://www.guj.com.br/

-----Original Message-----
From: Verma, Nitin (GECP, OTHER, 529706)

Sent: segunda-feira, 26 de maio de 2003 12:34
To: Maven Users List
Subject: How to copy files to target/classes and target/test-classes
dirs




Can someone translate these two target to maven's project.xml. My tests
fail without *.txt *.properies and *.xml files!
<target depends="test.source.archive" name="compile">
<!-- Compile all classes first -->
<javac classpath="${classpath}" debug="on" deprecation="true"
destdir="${classes}" srcdir="${source}" verbose="false"/>

<copy filtering="true" flatten="true" todir="${build}"
verbose="true">
<fileset defaultexcludes="false" dir="${source}"
id="file.properties">
<patternset id="file.to.build">
<exclude name="**/*.java"/>
<exclude name="**/.nbattrs"/>
<exclude name="**/*.java~"/>
<exclude name="**/CVS/**"/>
</patternset>
</fileset>
<mapper from="*" to="*" type="glob"/>
</copy>
</target>
<target depends="apidocs" name="test.compile">
<!-- Compile all classes first -->
<javac classpath="${classpath}" debug="on" deprecation="true"
destdir="${test.classes}" srcdir="${test.source}" verbose="false"/>

<copy filtering="true" flatten="true" todir="${build}"
verbose="true">
<fileset defaultexcludes="false" dir="${test.source}"
id="file.properties">
<patternset id="test.file.to.build">
<exclude name="**/*.java"/>
<exclude name="**/.nbattrs"/>
<exclude name="**/*.java~"/>
<exclude name="**/CVS/**"/>
</patternset>
</fileset>
<mapper from="*" to="*" type="glob"/>
</copy>
</target>





Ant file:
<project basedir="." default="run" name="ProjectName">
<property name="project" value="projectname"/>
<property name="version" value="1.1"/>
<property name="src" value="java/src"/>
<property name="test.src" value="java/test"/>
<property name="source" value="${src}"/>
<property name="test.source" value="${test.src}"/>
<property name="target" value="target"/>
<property name="dist" value="${target}"/>
<property name="docs" value="${target}/docs"/>
<property name="apidocs" value="${docs}/apidocs"/>
<property name="build" value="${target}/classes"/>
<property name="classes" value="${build}"/>
<property name="test.classes" value="${target}/test-classes"/>
<property name="test.reports" value="${target}/test-reports"/>
<property name="maven.home" value="/opt/maven/maven-1.0-beta-9"/>
<property name="maven.home.repository"
value="${maven.home}/repository"/>
<property name="lib" value="${maven.home.repository}"/>
<property name="build.compiler" value="modern"/>
<property name="archive" value="${project}-${version}"/>
<!-- classpath formation -->
<property name="classpath" value="someclasspath"/>
<target name="clean">
<delete dir="${target}"/>
</target>

<target name="init">
<delete dir="${build}"/>
<delete dir="${classes}"/>
<delete dir="${test.classes}"/>
<delete dir="${docs}"/>
<mkdir dir="${target}"/>
<mkdir dir="${build}"/>
<mkdir dir="${classes}"/>
<mkdir dir="${test.classes}"/>
<mkdir dir="${test.reports}"/>
<mkdir dir="${dist}"/>
<mkdir dir="${docs}"/>
<mkdir dir="${apidocs}"/>
</target>

<target depends="init" name="source.archive">
<tstamp/>
<jar basedir="${source}"
jarfile="${dist}/${archive}-src-${DSTAMP}.jar">
<patternset>
<exclude name="**/.nbattrs"/>
<exclude name="**/*.java~"/>
</patternset>
</jar>
</target>

<target depends="source.archive" name="test.source.archive">
<tstamp/>
<jar basedir="${test.source}"
jarfile="${dist}/${archive}-test-src-${DSTAMP}.jar">
<patternset>
<exclude name="**/.nbattrs"/>
<exclude name="**/*.java~"/>
</patternset>
</jar>
</target>

<target depends="test.source.archive" name="compile">
<!-- Compile all classes first -->
<javac classpath="${classpath}" debug="on" deprecation="true"
destdir="${classes}" srcdir="${source}" verbose="false"/>

<copy filtering="true" flatten="true" todir="${build}"
verbose="true">
<fileset defaultexcludes="false" dir="${source}"
id="file.properties">
<patternset id="file.to.build">
<exclude name="**/*.java"/>
<exclude name="**/.nbattrs"/>
<exclude name="**/*.java~"/>
<exclude name="**/CVS/**"/>
</patternset>
</fileset>
<mapper from="*" to="*" type="glob"/>
</copy>
</target>
<target depends="compile" name="binary.archive">
<tstamp/>
<jar basedir="${classes}"
jarfile="${dist}/${archive}-${DSTAMP}.jar">
</jar>
<jar basedir="${classes}" jarfile="${dist}/${project}.jar">
</jar>
</target>

<target depends="binary.archive" name="apidocs">
<javadoc author="true" classpath="${classpath}"
destdir="${apidocs}" packagenames="serverconfig.*"
sourcepath="${source}" version="true" windowtitle="Server Configuration
APIs">
</javadoc>
</target>

<target depends="apidocs" name="test.compile">
<!-- Compile all classes first -->
<javac classpath="${classpath}" debug="on" deprecation="true"
destdir="${test.classes}" srcdir="${test.source}" verbose="false"/>

<copy filtering="true" flatten="true" todir="${build}"
verbose="true">
<fileset defaultexcludes="false" dir="${test.source}"
id="file.properties">
<patternset id="test.file.to.build">
<exclude name="**/*.java"/>
<exclude name="**/.nbattrs"/>
<exclude name="**/*.java~"/>
<exclude name="**/CVS/**"/>
</patternset>
</fileset>
<mapper from="*" to="*" type="glob"/>
</copy>
</target>

<target depends="test.compile" name="test.binary.archive">
<tstamp/>
<jar basedir="${classes}"
jarfile="${dist}/${archive}-test-${DSTAMP}.jar">
</jar>
</target>
<target depends="test.binary.archive" name="run">
<junit printsummary="yes" haltonfailure="yes">
<classpath>
<pathelement location="${test.classes}"/>
<pathelement path="${classpath}"/>
</classpath>
<formatter type="plain"/>
<batchtest fork="yes" todir="${test.reports}">
<fileset dir="${test.source}">
<include name="**/*Test*.java"/>
<exclude name="**/*ThreadPool*.java"/>
</fileset>
</batchtest>
</junit>
</target>
</project>



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

Search Discussions

  • Verma, Nitin (GECP, OTHER, 529706) at May 26, 2003 at 4:04 pm
    This didn't work!

    -----Original Message-----
    From: Verma, Nitin (GECP, OTHER, 529706)
    Sent: Monday, May 26, 2003 9:32 PM
    To: Maven Users List
    Subject: RE: How to copy files to target/classes and target/test-classes d
    irs



    Thanx!

    Will this work?

    <resources>
    <directory>java/src</directory>
    <includes>
    <include>**/*.*</include>
    <exclude>**/*.java</exclude>
    <exclude>**/.nbattrs</exclude>
    <exclude>**/*.java~</exclude>
    <exclude>**/CVS/**</exclude>
    </includes>
    </resources>

    What about tests?

    -----Original Message-----
    From: Paulo Silveira
    Sent: Monday, May 26, 2003 9:07 PM
    To: 'Maven Users List'
    Subject: RE: How to copy files to target/classes and target/test-classes
    dirs


    You can use the resources tag in your project.xml:

    <resources>
    <resource>

    <directory>src/yourDirectoryWithConfigFilesAndXMLandAnything</directory>
    <includes>
    <include>*.xml</include>
    <include>*.txt</include>
    </includes>
    </resource>
    </resources>


    ------------------------
    Paulo Silveira
    http://www.paulo.com.br/ <http://www.paulo.com.br/>
    http://www.guj.com.br/ <http://www.guj.com.br/>

    -----Original Message-----
    From: Verma, Nitin (GECP, OTHER, 529706)

    Sent: segunda-feira, 26 de maio de 2003 12:34
    To: Maven Users List
    Subject: How to copy files to target/classes and target/test-classes
    dirs




    Can someone translate these two target to maven's project.xml. My tests
    fail without *.txt *.properies and *.xml files!
    <target depends="test.source.archive" name="compile">
    <!-- Compile all classes first -->
    <javac classpath="${classpath}" debug="on" deprecation="true"
    destdir="${classes}" srcdir="${source}" verbose="false"/>

    <copy filtering="true" flatten="true" todir="${build}"
    verbose="true">
    <fileset defaultexcludes="false" dir="${source}"
    id="file.properties">
    <patternset id="file.to.build">
    <exclude name="**/*.java"/>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    <exclude name="**/CVS/**"/>
    </patternset>
    </fileset>
    <mapper from="*" to="*" type="glob"/>
    </copy>
    </target>
    <target depends="apidocs" name="test.compile">
    <!-- Compile all classes first -->
    <javac classpath="${classpath}" debug="on" deprecation="true"
    destdir="${test.classes}" srcdir="${test.source}" verbose="false"/>

    <copy filtering="true" flatten="true" todir="${build}"
    verbose="true">
    <fileset defaultexcludes="false" dir="${test.source}"
    id="file.properties">
    <patternset id="test.file.to.build">
    <exclude name="**/*.java"/>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    <exclude name="**/CVS/**"/>
    </patternset>
    </fileset>
    <mapper from="*" to="*" type="glob"/>
    </copy>
    </target>





    Ant file:
    <project basedir="." default="run" name="ProjectName">
    <property name="project" value="projectname"/>
    <property name="version" value="1.1"/>
    <property name="src" value="java/src"/>
    <property name="test.src" value="java/test"/>
    <property name="source" value="${src}"/>
    <property name="test.source" value="${test.src}"/>
    <property name="target" value="target"/>
    <property name="dist" value="${target}"/>
    <property name="docs" value="${target}/docs"/>
    <property name="apidocs" value="${docs}/apidocs"/>
    <property name="build" value="${target}/classes"/>
    <property name="classes" value="${build}"/>
    <property name="test.classes" value="${target}/test-classes"/>
    <property name="test.reports" value="${target}/test-reports"/>
    <property name="maven.home" value="/opt/maven/maven-1.0-beta-9"/>
    <property name="maven.home.repository"
    value="${maven.home}/repository"/>
    <property name="lib" value="${maven.home.repository}"/>
    <property name="build.compiler" value="modern"/>
    <property name="archive" value="${project}-${version}"/>
    <!-- classpath formation -->
    <property name="classpath" value="someclasspath"/>
    <target name="clean">
    <delete dir="${target}"/>
    </target>

    <target name="init">
    <delete dir="${build}"/>
    <delete dir="${classes}"/>
    <delete dir="${test.classes}"/>
    <delete dir="${docs}"/>
    <mkdir dir="${target}"/>
    <mkdir dir="${build}"/>
    <mkdir dir="${classes}"/>
    <mkdir dir="${test.classes}"/>
    <mkdir dir="${test.reports}"/>
    <mkdir dir="${dist}"/>
    <mkdir dir="${docs}"/>
    <mkdir dir="${apidocs}"/>
    </target>

    <target depends="init" name="source.archive">
    <tstamp/>
    <jar basedir="${source}"
    jarfile="${dist}/${archive}-src-${DSTAMP}.jar">
    <patternset>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    </patternset>
    </jar>
    </target>

    <target depends="source.archive" name="test.source.archive">
    <tstamp/>
    <jar basedir="${test.source}"
    jarfile="${dist}/${archive}-test-src-${DSTAMP}.jar">
    <patternset>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    </patternset>
    </jar>
    </target>

    <target depends="test.source.archive" name="compile">
    <!-- Compile all classes first -->
    <javac classpath="${classpath}" debug="on" deprecation="true"
    destdir="${classes}" srcdir="${source}" verbose="false"/>

    <copy filtering="true" flatten="true" todir="${build}"
    verbose="true">
    <fileset defaultexcludes="false" dir="${source}"
    id="file.properties">
    <patternset id="file.to.build">
    <exclude name="**/*.java"/>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    <exclude name="**/CVS/**"/>
    </patternset>
    </fileset>
    <mapper from="*" to="*" type="glob"/>
    </copy>
    </target>
    <target depends="compile" name="binary.archive">
    <tstamp/>
    <jar basedir="${classes}"
    jarfile="${dist}/${archive}-${DSTAMP}.jar">
    </jar>
    <jar basedir="${classes}" jarfile="${dist}/${project}.jar">
    </jar>
    </target>

    <target depends="binary.archive" name="apidocs">
    <javadoc author="true" classpath="${classpath}"
    destdir="${apidocs}" packagenames="serverconfig.*"
    sourcepath="${source}" version="true" windowtitle="Server Configuration
    APIs">
    </javadoc>
    </target>

    <target depends="apidocs" name="test.compile">
    <!-- Compile all classes first -->
    <javac classpath="${classpath}" debug="on" deprecation="true"
    destdir="${test.classes}" srcdir="${test.source}" verbose="false"/>

    <copy filtering="true" flatten="true" todir="${build}"
    verbose="true">
    <fileset defaultexcludes="false" dir="${test.source}"
    id="file.properties">
    <patternset id="test.file.to.build">
    <exclude name="**/*.java"/>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    <exclude name="**/CVS/**"/>
    </patternset>
    </fileset>
    <mapper from="*" to="*" type="glob"/>
    </copy>
    </target>

    <target depends="test.compile" name="test.binary.archive">
    <tstamp/>
    <jar basedir="${classes}"
    jarfile="${dist}/${archive}-test-${DSTAMP}.jar">
    </jar>
    </target>
    <target depends="test.binary.archive" name="run">
    <junit printsummary="yes" haltonfailure="yes">
    <classpath>
    <pathelement location="${test.classes}"/>
    <pathelement path="${classpath}"/>
    </classpath>
    <formatter type="plain"/>
    <batchtest fork="yes" todir="${test.reports}">
    <fileset dir="${test.source}">
    <include name="**/*Test*.java"/>
    <exclude name="**/*ThreadPool*.java"/>
    </fileset>
    </batchtest>
    </junit>
    </target>
    </project>



    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
  • Verma, Nitin (GECP, OTHER, 529706) at May 26, 2003 at 4:04 pm
    I use in my code Class.getResource() ... same is use in tests to made those
    configurable!
    I have many many resources like these!

    -----Original Message-----
    From: Paulo Silveira
    Sent: Monday, May 26, 2003 9:07 PM
    To: 'Maven Users List'
    Subject: RE: How to copy files to target/classes and target/test-classes
    dirs


    You can use the resources tag in your project.xml:

    <resources>
    <resource>

    <directory>src/yourDirectoryWithConfigFilesAndXMLandAnything</directory>
    <includes>
    <include>*.xml</include>
    <include>*.txt</include>
    </includes>
    </resource>
    </resources>


    ------------------------
    Paulo Silveira
    http://www.paulo.com.br/
    http://www.guj.com.br/

    -----Original Message-----
    From: Verma, Nitin (GECP, OTHER, 529706)

    Sent: segunda-feira, 26 de maio de 2003 12:34
    To: Maven Users List
    Subject: How to copy files to target/classes and target/test-classes
    dirs




    Can someone translate these two target to maven's project.xml. My tests
    fail without *.txt *.properies and *.xml files!
    <target depends="test.source.archive" name="compile">
    <!-- Compile all classes first -->
    <javac classpath="${classpath}" debug="on" deprecation="true"
    destdir="${classes}" srcdir="${source}" verbose="false"/>

    <copy filtering="true" flatten="true" todir="${build}"
    verbose="true">
    <fileset defaultexcludes="false" dir="${source}"
    id="file.properties">
    <patternset id="file.to.build">
    <exclude name="**/*.java"/>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    <exclude name="**/CVS/**"/>
    </patternset>
    </fileset>
    <mapper from="*" to="*" type="glob"/>
    </copy>
    </target>
    <target depends="apidocs" name="test.compile">
    <!-- Compile all classes first -->
    <javac classpath="${classpath}" debug="on" deprecation="true"
    destdir="${test.classes}" srcdir="${test.source}" verbose="false"/>

    <copy filtering="true" flatten="true" todir="${build}"
    verbose="true">
    <fileset defaultexcludes="false" dir="${test.source}"
    id="file.properties">
    <patternset id="test.file.to.build">
    <exclude name="**/*.java"/>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    <exclude name="**/CVS/**"/>
    </patternset>
    </fileset>
    <mapper from="*" to="*" type="glob"/>
    </copy>
    </target>





    Ant file:
    <project basedir="." default="run" name="ProjectName">
    <property name="project" value="projectname"/>
    <property name="version" value="1.1"/>
    <property name="src" value="java/src"/>
    <property name="test.src" value="java/test"/>
    <property name="source" value="${src}"/>
    <property name="test.source" value="${test.src}"/>
    <property name="target" value="target"/>
    <property name="dist" value="${target}"/>
    <property name="docs" value="${target}/docs"/>
    <property name="apidocs" value="${docs}/apidocs"/>
    <property name="build" value="${target}/classes"/>
    <property name="classes" value="${build}"/>
    <property name="test.classes" value="${target}/test-classes"/>
    <property name="test.reports" value="${target}/test-reports"/>
    <property name="maven.home" value="/opt/maven/maven-1.0-beta-9"/>
    <property name="maven.home.repository"
    value="${maven.home}/repository"/>
    <property name="lib" value="${maven.home.repository}"/>
    <property name="build.compiler" value="modern"/>
    <property name="archive" value="${project}-${version}"/>
    <!-- classpath formation -->
    <property name="classpath" value="someclasspath"/>
    <target name="clean">
    <delete dir="${target}"/>
    </target>

    <target name="init">
    <delete dir="${build}"/>
    <delete dir="${classes}"/>
    <delete dir="${test.classes}"/>
    <delete dir="${docs}"/>
    <mkdir dir="${target}"/>
    <mkdir dir="${build}"/>
    <mkdir dir="${classes}"/>
    <mkdir dir="${test.classes}"/>
    <mkdir dir="${test.reports}"/>
    <mkdir dir="${dist}"/>
    <mkdir dir="${docs}"/>
    <mkdir dir="${apidocs}"/>
    </target>

    <target depends="init" name="source.archive">
    <tstamp/>
    <jar basedir="${source}"
    jarfile="${dist}/${archive}-src-${DSTAMP}.jar">
    <patternset>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    </patternset>
    </jar>
    </target>

    <target depends="source.archive" name="test.source.archive">
    <tstamp/>
    <jar basedir="${test.source}"
    jarfile="${dist}/${archive}-test-src-${DSTAMP}.jar">
    <patternset>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    </patternset>
    </jar>
    </target>

    <target depends="test.source.archive" name="compile">
    <!-- Compile all classes first -->
    <javac classpath="${classpath}" debug="on" deprecation="true"
    destdir="${classes}" srcdir="${source}" verbose="false"/>

    <copy filtering="true" flatten="true" todir="${build}"
    verbose="true">
    <fileset defaultexcludes="false" dir="${source}"
    id="file.properties">
    <patternset id="file.to.build">
    <exclude name="**/*.java"/>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    <exclude name="**/CVS/**"/>
    </patternset>
    </fileset>
    <mapper from="*" to="*" type="glob"/>
    </copy>
    </target>
    <target depends="compile" name="binary.archive">
    <tstamp/>
    <jar basedir="${classes}"
    jarfile="${dist}/${archive}-${DSTAMP}.jar">
    </jar>
    <jar basedir="${classes}" jarfile="${dist}/${project}.jar">
    </jar>
    </target>

    <target depends="binary.archive" name="apidocs">
    <javadoc author="true" classpath="${classpath}"
    destdir="${apidocs}" packagenames="serverconfig.*"
    sourcepath="${source}" version="true" windowtitle="Server Configuration
    APIs">
    </javadoc>
    </target>

    <target depends="apidocs" name="test.compile">
    <!-- Compile all classes first -->
    <javac classpath="${classpath}" debug="on" deprecation="true"
    destdir="${test.classes}" srcdir="${test.source}" verbose="false"/>

    <copy filtering="true" flatten="true" todir="${build}"
    verbose="true">
    <fileset defaultexcludes="false" dir="${test.source}"
    id="file.properties">
    <patternset id="test.file.to.build">
    <exclude name="**/*.java"/>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    <exclude name="**/CVS/**"/>
    </patternset>
    </fileset>
    <mapper from="*" to="*" type="glob"/>
    </copy>
    </target>

    <target depends="test.compile" name="test.binary.archive">
    <tstamp/>
    <jar basedir="${classes}"
    jarfile="${dist}/${archive}-test-${DSTAMP}.jar">
    </jar>
    </target>
    <target depends="test.binary.archive" name="run">
    <junit printsummary="yes" haltonfailure="yes">
    <classpath>
    <pathelement location="${test.classes}"/>
    <pathelement path="${classpath}"/>
    </classpath>
    <formatter type="plain"/>
    <batchtest fork="yes" todir="${test.reports}">
    <fileset dir="${test.source}">
    <include name="**/*Test*.java"/>
    <exclude name="**/*ThreadPool*.java"/>
    </fileset>
    </batchtest>
    </junit>
    </target>
    </project>



    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
  • Incze Lajos at May 26, 2003 at 5:32 pm
    There is a resource element under resources if my memory serves.

    Try:

    <resources>
    <resource>
    <directory>java/src</directory>
    <includes>
    ... etc
    </resource>
    </resources>

    incze

    n Mon, May 26, 2003 at 12:06:36PM -0400, Verma, Nitin (GECP, OTHER, 529706) wrote:
    This didn't work!

    -----Original Message-----
    From: Verma, Nitin (GECP, OTHER, 529706)
    Sent: Monday, May 26, 2003 9:32 PM
    To: Maven Users List
    Subject: RE: How to copy files to target/classes and target/test-classes d
    irs



    Thanx!

    Will this work?

    <resources>
    <directory>java/src</directory>
    <includes>
    <include>**/*.*</include>
    <exclude>**/*.java</exclude>
    <exclude>**/.nbattrs</exclude>
    <exclude>**/*.java~</exclude>
    <exclude>**/CVS/**</exclude>
    </includes>
    </resources>

    What about tests?

    -----Original Message-----
    From: Paulo Silveira
    Sent: Monday, May 26, 2003 9:07 PM
    To: 'Maven Users List'
    Subject: RE: How to copy files to target/classes and target/test-classes
    dirs


    You can use the resources tag in your project.xml:

    <resources>
    <resource>

    <directory>src/yourDirectoryWithConfigFilesAndXMLandAnything</directory>
    <includes>
    <include>*.xml</include>
    <include>*.txt</include>
    </includes>
    </resource>
    </resources>


    ------------------------
    Paulo Silveira
    http://www.paulo.com.br/ <http://www.paulo.com.br/>
    http://www.guj.com.br/ <http://www.guj.com.br/>

    -----Original Message-----
    From: Verma, Nitin (GECP, OTHER, 529706)

    Sent: segunda-feira, 26 de maio de 2003 12:34
    To: Maven Users List
    Subject: How to copy files to target/classes and target/test-classes
    dirs




    Can someone translate these two target to maven's project.xml. My tests
    fail without *.txt *.properies and *.xml files!
    <target depends="test.source.archive" name="compile">
    <!-- Compile all classes first -->
    <javac classpath="${classpath}" debug="on" deprecation="true"
    destdir="${classes}" srcdir="${source}" verbose="false"/>

    <copy filtering="true" flatten="true" todir="${build}"
    verbose="true">
    <fileset defaultexcludes="false" dir="${source}"
    id="file.properties">
    <patternset id="file.to.build">
    <exclude name="**/*.java"/>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    <exclude name="**/CVS/**"/>
    </patternset>
    </fileset>
    <mapper from="*" to="*" type="glob"/>
    </copy>
    </target>
    <target depends="apidocs" name="test.compile">
    <!-- Compile all classes first -->
    <javac classpath="${classpath}" debug="on" deprecation="true"
    destdir="${test.classes}" srcdir="${test.source}" verbose="false"/>

    <copy filtering="true" flatten="true" todir="${build}"
    verbose="true">
    <fileset defaultexcludes="false" dir="${test.source}"
    id="file.properties">
    <patternset id="test.file.to.build">
    <exclude name="**/*.java"/>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    <exclude name="**/CVS/**"/>
    </patternset>
    </fileset>
    <mapper from="*" to="*" type="glob"/>
    </copy>
    </target>





    Ant file:
    <project basedir="." default="run" name="ProjectName">
    <property name="project" value="projectname"/>
    <property name="version" value="1.1"/>
    <property name="src" value="java/src"/>
    <property name="test.src" value="java/test"/>
    <property name="source" value="${src}"/>
    <property name="test.source" value="${test.src}"/>
    <property name="target" value="target"/>
    <property name="dist" value="${target}"/>
    <property name="docs" value="${target}/docs"/>
    <property name="apidocs" value="${docs}/apidocs"/>
    <property name="build" value="${target}/classes"/>
    <property name="classes" value="${build}"/>
    <property name="test.classes" value="${target}/test-classes"/>
    <property name="test.reports" value="${target}/test-reports"/>
    <property name="maven.home" value="/opt/maven/maven-1.0-beta-9"/>
    <property name="maven.home.repository"
    value="${maven.home}/repository"/>
    <property name="lib" value="${maven.home.repository}"/>
    <property name="build.compiler" value="modern"/>
    <property name="archive" value="${project}-${version}"/>
    <!-- classpath formation -->
    <property name="classpath" value="someclasspath"/>
    <target name="clean">
    <delete dir="${target}"/>
    </target>

    <target name="init">
    <delete dir="${build}"/>
    <delete dir="${classes}"/>
    <delete dir="${test.classes}"/>
    <delete dir="${docs}"/>
    <mkdir dir="${target}"/>
    <mkdir dir="${build}"/>
    <mkdir dir="${classes}"/>
    <mkdir dir="${test.classes}"/>
    <mkdir dir="${test.reports}"/>
    <mkdir dir="${dist}"/>
    <mkdir dir="${docs}"/>
    <mkdir dir="${apidocs}"/>
    </target>

    <target depends="init" name="source.archive">
    <tstamp/>
    <jar basedir="${source}"
    jarfile="${dist}/${archive}-src-${DSTAMP}.jar">
    <patternset>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    </patternset>
    </jar>
    </target>

    <target depends="source.archive" name="test.source.archive">
    <tstamp/>
    <jar basedir="${test.source}"
    jarfile="${dist}/${archive}-test-src-${DSTAMP}.jar">
    <patternset>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    </patternset>
    </jar>
    </target>

    <target depends="test.source.archive" name="compile">
    <!-- Compile all classes first -->
    <javac classpath="${classpath}" debug="on" deprecation="true"
    destdir="${classes}" srcdir="${source}" verbose="false"/>

    <copy filtering="true" flatten="true" todir="${build}"
    verbose="true">
    <fileset defaultexcludes="false" dir="${source}"
    id="file.properties">
    <patternset id="file.to.build">
    <exclude name="**/*.java"/>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    <exclude name="**/CVS/**"/>
    </patternset>
    </fileset>
    <mapper from="*" to="*" type="glob"/>
    </copy>
    </target>
    <target depends="compile" name="binary.archive">
    <tstamp/>
    <jar basedir="${classes}"
    jarfile="${dist}/${archive}-${DSTAMP}.jar">
    </jar>
    <jar basedir="${classes}" jarfile="${dist}/${project}.jar">
    </jar>
    </target>

    <target depends="binary.archive" name="apidocs">
    <javadoc author="true" classpath="${classpath}"
    destdir="${apidocs}" packagenames="serverconfig.*"
    sourcepath="${source}" version="true" windowtitle="Server Configuration
    APIs">
    </javadoc>
    </target>

    <target depends="apidocs" name="test.compile">
    <!-- Compile all classes first -->
    <javac classpath="${classpath}" debug="on" deprecation="true"
    destdir="${test.classes}" srcdir="${test.source}" verbose="false"/>

    <copy filtering="true" flatten="true" todir="${build}"
    verbose="true">
    <fileset defaultexcludes="false" dir="${test.source}"
    id="file.properties">
    <patternset id="test.file.to.build">
    <exclude name="**/*.java"/>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    <exclude name="**/CVS/**"/>
    </patternset>
    </fileset>
    <mapper from="*" to="*" type="glob"/>
    </copy>
    </target>

    <target depends="test.compile" name="test.binary.archive">
    <tstamp/>
    <jar basedir="${classes}"
    jarfile="${dist}/${archive}-test-${DSTAMP}.jar">
    </jar>
    </target>
    <target depends="test.binary.archive" name="run">
    <junit printsummary="yes" haltonfailure="yes">
    <classpath>
    <pathelement location="${test.classes}"/>
    <pathelement path="${classpath}"/>
    </classpath>
    <formatter type="plain"/>
    <batchtest fork="yes" todir="${test.reports}">
    <fileset dir="${test.source}">
    <include name="**/*Test*.java"/>
    <exclude name="**/*ThreadPool*.java"/>
    </fileset>
    </batchtest>
    </junit>
    </target>
    </project>



    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
  • Verma, Nitin (GECP, OTHER, 529706) at May 26, 2003 at 5:28 pm
    Any Idea? Anyone?

    -----Original Message-----
    From: Verma, Nitin (GECP, OTHER, 529706)
    Sent: Monday, May 26, 2003 9:36 PM
    To: Maven Users List
    Subject: RE: How to copy files to target/classes and target/test-classes d
    irs




    I use in my code Class.getResource() ... same is use in tests to made those
    configurable!
    I have many many resources like these!

    -----Original Message-----
    From: Paulo Silveira
    Sent: Monday, May 26, 2003 9:07 PM
    To: 'Maven Users List'
    Subject: RE: How to copy files to target/classes and target/test-classes
    dirs


    You can use the resources tag in your project.xml:

    <resources>
    <resource>

    <directory>src/yourDirectoryWithConfigFilesAndXMLandAnything</directory>
    <includes>
    <include>*.xml</include>
    <include>*.txt</include>
    </includes>
    </resource>
    </resources>


    ------------------------
    Paulo Silveira
    http://www.paulo.com.br/ <http://www.paulo.com.br/>
    http://www.guj.com.br/ <http://www.guj.com.br/>

    -----Original Message-----
    From: Verma, Nitin (GECP, OTHER, 529706)

    Sent: segunda-feira, 26 de maio de 2003 12:34
    To: Maven Users List
    Subject: How to copy files to target/classes and target/test-classes
    dirs




    Can someone translate these two target to maven's project.xml. My tests
    fail without *.txt *.properies and *.xml files!
    <target depends="test.source.archive" name="compile">
    <!-- Compile all classes first -->
    <javac classpath="${classpath}" debug="on" deprecation="true"
    destdir="${classes}" srcdir="${source}" verbose="false"/>

    <copy filtering="true" flatten="true" todir="${build}"
    verbose="true">
    <fileset defaultexcludes="false" dir="${source}"
    id="file.properties">
    <patternset id="file.to.build">
    <exclude name="**/*.java"/>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    <exclude name="**/CVS/**"/>
    </patternset>
    </fileset>
    <mapper from="*" to="*" type="glob"/>
    </copy>
    </target>
    <target depends="apidocs" name="test.compile">
    <!-- Compile all classes first -->
    <javac classpath="${classpath}" debug="on" deprecation="true"
    destdir="${test.classes}" srcdir="${test.source}" verbose="false"/>

    <copy filtering="true" flatten="true" todir="${build}"
    verbose="true">
    <fileset defaultexcludes="false" dir="${test.source}"
    id="file.properties">
    <patternset id="test.file.to.build">
    <exclude name="**/*.java"/>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    <exclude name="**/CVS/**"/>
    </patternset>
    </fileset>
    <mapper from="*" to="*" type="glob"/>
    </copy>
    </target>





    Ant file:
    <project basedir="." default="run" name="ProjectName">
    <property name="project" value="projectname"/>
    <property name="version" value="1.1"/>
    <property name="src" value="java/src"/>
    <property name="test.src" value="java/test"/>
    <property name="source" value="${src}"/>
    <property name="test.source" value="${test.src}"/>
    <property name="target" value="target"/>
    <property name="dist" value="${target}"/>
    <property name="docs" value="${target}/docs"/>
    <property name="apidocs" value="${docs}/apidocs"/>
    <property name="build" value="${target}/classes"/>
    <property name="classes" value="${build}"/>
    <property name="test.classes" value="${target}/test-classes"/>
    <property name="test.reports" value="${target}/test-reports"/>
    <property name="maven.home" value="/opt/maven/maven-1.0-beta-9"/>
    <property name="maven.home.repository"
    value="${maven.home}/repository"/>
    <property name="lib" value="${maven.home.repository}"/>
    <property name="build.compiler" value="modern"/>
    <property name="archive" value="${project}-${version}"/>
    <!-- classpath formation -->
    <property name="classpath" value="someclasspath"/>
    <target name="clean">
    <delete dir="${target}"/>
    </target>

    <target name="init">
    <delete dir="${build}"/>
    <delete dir="${classes}"/>
    <delete dir="${test.classes}"/>
    <delete dir="${docs}"/>
    <mkdir dir="${target}"/>
    <mkdir dir="${build}"/>
    <mkdir dir="${classes}"/>
    <mkdir dir="${test.classes}"/>
    <mkdir dir="${test.reports}"/>
    <mkdir dir="${dist}"/>
    <mkdir dir="${docs}"/>
    <mkdir dir="${apidocs}"/>
    </target>

    <target depends="init" name="source.archive">
    <tstamp/>
    <jar basedir="${source}"
    jarfile="${dist}/${archive}-src-${DSTAMP}.jar">
    <patternset>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    </patternset>
    </jar>
    </target>

    <target depends="source.archive" name="test.source.archive">
    <tstamp/>
    <jar basedir="${test.source}"
    jarfile="${dist}/${archive}-test-src-${DSTAMP}.jar">
    <patternset>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    </patternset>
    </jar>
    </target>

    <target depends="test.source.archive" name="compile">
    <!-- Compile all classes first -->
    <javac classpath="${classpath}" debug="on" deprecation="true"
    destdir="${classes}" srcdir="${source}" verbose="false"/>

    <copy filtering="true" flatten="true" todir="${build}"
    verbose="true">
    <fileset defaultexcludes="false" dir="${source}"
    id="file.properties">
    <patternset id="file.to.build">
    <exclude name="**/*.java"/>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    <exclude name="**/CVS/**"/>
    </patternset>
    </fileset>
    <mapper from="*" to="*" type="glob"/>
    </copy>
    </target>
    <target depends="compile" name="binary.archive">
    <tstamp/>
    <jar basedir="${classes}"
    jarfile="${dist}/${archive}-${DSTAMP}.jar">
    </jar>
    <jar basedir="${classes}" jarfile="${dist}/${project}.jar">
    </jar>
    </target>

    <target depends="binary.archive" name="apidocs">
    <javadoc author="true" classpath="${classpath}"
    destdir="${apidocs}" packagenames="serverconfig.*"
    sourcepath="${source}" version="true" windowtitle="Server Configuration
    APIs">
    </javadoc>
    </target>

    <target depends="apidocs" name="test.compile">
    <!-- Compile all classes first -->
    <javac classpath="${classpath}" debug="on" deprecation="true"
    destdir="${test.classes}" srcdir="${test.source}" verbose="false"/>

    <copy filtering="true" flatten="true" todir="${build}"
    verbose="true">
    <fileset defaultexcludes="false" dir="${test.source}"
    id="file.properties">
    <patternset id="test.file.to.build">
    <exclude name="**/*.java"/>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    <exclude name="**/CVS/**"/>
    </patternset>
    </fileset>
    <mapper from="*" to="*" type="glob"/>
    </copy>
    </target>

    <target depends="test.compile" name="test.binary.archive">
    <tstamp/>
    <jar basedir="${classes}"
    jarfile="${dist}/${archive}-test-${DSTAMP}.jar">
    </jar>
    </target>
    <target depends="test.binary.archive" name="run">
    <junit printsummary="yes" haltonfailure="yes">
    <classpath>
    <pathelement location="${test.classes}"/>
    <pathelement path="${classpath}"/>
    </classpath>
    <formatter type="plain"/>
    <batchtest fork="yes" todir="${test.reports}">
    <fileset dir="${test.source}">
    <include name="**/*Test*.java"/>
    <exclude name="**/*ThreadPool*.java"/>
    </fileset>
    </batchtest>
    </junit>
    </target>
    </project>



    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
  • Verma, Nitin (GECP, OTHER, 529706) at May 26, 2003 at 5:40 pm
    This also did not work!

    <resources>
    <resource>
    <includes>
    <directory>java/src</directory>
    <include>**/*.*</include>
    <exclude>**/*.java</exclude>
    <exclude>**/.nbattrs</exclude>
    <exclude>**/*.java~</exclude>
    <exclude>**/CVS/**</exclude>
    </includes>
    </resource>
    </resources>

    -----Original Message-----
    From: Incze Lajos
    Sent: Monday, May 26, 2003 11:02 PM
    To: Maven Users List
    Subject: Re: How to copy files to target/classes and target/test-classes
    d irs


    There is a resource element under resources if my memory serves.

    Try:

    <resources>
    <resource>
    <directory>java/src</directory>
    <includes>
    ... etc
    </resource>
    </resources>

    incze

    n Mon, May 26, 2003 at 12:06:36PM -0400, Verma, Nitin (GECP, OTHER, 529706)
    wrote:
    This didn't work!

    -----Original Message-----
    From: Verma, Nitin (GECP, OTHER, 529706)
    Sent: Monday, May 26, 2003 9:32 PM
    To: Maven Users List
    Subject: RE: How to copy files to target/classes and target/test-classes d
    irs



    Thanx!

    Will this work?

    <resources>
    <directory>java/src</directory>
    <includes>
    <include>**/*.*</include>
    <exclude>**/*.java</exclude>
    <exclude>**/.nbattrs</exclude>
    <exclude>**/*.java~</exclude>
    <exclude>**/CVS/**</exclude>
    </includes>
    </resources>

    What about tests?

    -----Original Message-----
    From: Paulo Silveira
    Sent: Monday, May 26, 2003 9:07 PM
    To: 'Maven Users List'
    Subject: RE: How to copy files to target/classes and target/test-classes
    dirs


    You can use the resources tag in your project.xml:

    <resources>
    <resource>

    <directory>src/yourDirectoryWithConfigFilesAndXMLandAnything</directory>
    <includes>
    <include>*.xml</include>
    <include>*.txt</include>
    </includes>
    </resource>
    </resources>


    ------------------------
    Paulo Silveira
    http://www.paulo.com.br/ <http://www.paulo.com.br/>
    http://www.guj.com.br/ <http://www.guj.com.br/>

    -----Original Message-----
    From: Verma, Nitin (GECP, OTHER, 529706)

    Sent: segunda-feira, 26 de maio de 2003 12:34
    To: Maven Users List
    Subject: How to copy files to target/classes and target/test-classes
    dirs




    Can someone translate these two target to maven's project.xml. My tests
    fail without *.txt *.properies and *.xml files!
    <target depends="test.source.archive" name="compile">
    <!-- Compile all classes first -->
    <javac classpath="${classpath}" debug="on" deprecation="true"
    destdir="${classes}" srcdir="${source}" verbose="false"/>

    <copy filtering="true" flatten="true" todir="${build}"
    verbose="true">
    <fileset defaultexcludes="false" dir="${source}"
    id="file.properties">
    <patternset id="file.to.build">
    <exclude name="**/*.java"/>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    <exclude name="**/CVS/**"/>
    </patternset>
    </fileset>
    <mapper from="*" to="*" type="glob"/>
    </copy>
    </target>
    <target depends="apidocs" name="test.compile">
    <!-- Compile all classes first -->
    <javac classpath="${classpath}" debug="on" deprecation="true"
    destdir="${test.classes}" srcdir="${test.source}" verbose="false"/>

    <copy filtering="true" flatten="true" todir="${build}"
    verbose="true">
    <fileset defaultexcludes="false" dir="${test.source}"
    id="file.properties">
    <patternset id="test.file.to.build">
    <exclude name="**/*.java"/>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    <exclude name="**/CVS/**"/>
    </patternset>
    </fileset>
    <mapper from="*" to="*" type="glob"/>
    </copy>
    </target>





    Ant file:
    <project basedir="." default="run" name="ProjectName">
    <property name="project" value="projectname"/>
    <property name="version" value="1.1"/>
    <property name="src" value="java/src"/>
    <property name="test.src" value="java/test"/>
    <property name="source" value="${src}"/>
    <property name="test.source" value="${test.src}"/>
    <property name="target" value="target"/>
    <property name="dist" value="${target}"/>
    <property name="docs" value="${target}/docs"/>
    <property name="apidocs" value="${docs}/apidocs"/>
    <property name="build" value="${target}/classes"/>
    <property name="classes" value="${build}"/>
    <property name="test.classes" value="${target}/test-classes"/>
    <property name="test.reports" value="${target}/test-reports"/>
    <property name="maven.home" value="/opt/maven/maven-1.0-beta-9"/>
    <property name="maven.home.repository"
    value="${maven.home}/repository"/>
    <property name="lib" value="${maven.home.repository}"/>
    <property name="build.compiler" value="modern"/>
    <property name="archive" value="${project}-${version}"/>
    <!-- classpath formation -->
    <property name="classpath" value="someclasspath"/>
    <target name="clean">
    <delete dir="${target}"/>
    </target>

    <target name="init">
    <delete dir="${build}"/>
    <delete dir="${classes}"/>
    <delete dir="${test.classes}"/>
    <delete dir="${docs}"/>
    <mkdir dir="${target}"/>
    <mkdir dir="${build}"/>
    <mkdir dir="${classes}"/>
    <mkdir dir="${test.classes}"/>
    <mkdir dir="${test.reports}"/>
    <mkdir dir="${dist}"/>
    <mkdir dir="${docs}"/>
    <mkdir dir="${apidocs}"/>
    </target>

    <target depends="init" name="source.archive">
    <tstamp/>
    <jar basedir="${source}"
    jarfile="${dist}/${archive}-src-${DSTAMP}.jar">
    <patternset>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    </patternset>
    </jar>
    </target>

    <target depends="source.archive" name="test.source.archive">
    <tstamp/>
    <jar basedir="${test.source}"
    jarfile="${dist}/${archive}-test-src-${DSTAMP}.jar">
    <patternset>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    </patternset>
    </jar>
    </target>

    <target depends="test.source.archive" name="compile">
    <!-- Compile all classes first -->
    <javac classpath="${classpath}" debug="on" deprecation="true"
    destdir="${classes}" srcdir="${source}" verbose="false"/>

    <copy filtering="true" flatten="true" todir="${build}"
    verbose="true">
    <fileset defaultexcludes="false" dir="${source}"
    id="file.properties">
    <patternset id="file.to.build">
    <exclude name="**/*.java"/>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    <exclude name="**/CVS/**"/>
    </patternset>
    </fileset>
    <mapper from="*" to="*" type="glob"/>
    </copy>
    </target>
    <target depends="compile" name="binary.archive">
    <tstamp/>
    <jar basedir="${classes}"
    jarfile="${dist}/${archive}-${DSTAMP}.jar">
    </jar>
    <jar basedir="${classes}" jarfile="${dist}/${project}.jar">
    </jar>
    </target>

    <target depends="binary.archive" name="apidocs">
    <javadoc author="true" classpath="${classpath}"
    destdir="${apidocs}" packagenames="serverconfig.*"
    sourcepath="${source}" version="true" windowtitle="Server Configuration
    APIs">
    </javadoc>
    </target>

    <target depends="apidocs" name="test.compile">
    <!-- Compile all classes first -->
    <javac classpath="${classpath}" debug="on" deprecation="true"
    destdir="${test.classes}" srcdir="${test.source}" verbose="false"/>

    <copy filtering="true" flatten="true" todir="${build}"
    verbose="true">
    <fileset defaultexcludes="false" dir="${test.source}"
    id="file.properties">
    <patternset id="test.file.to.build">
    <exclude name="**/*.java"/>
    <exclude name="**/.nbattrs"/>
    <exclude name="**/*.java~"/>
    <exclude name="**/CVS/**"/>
    </patternset>
    </fileset>
    <mapper from="*" to="*" type="glob"/>
    </copy>
    </target>

    <target depends="test.compile" name="test.binary.archive">
    <tstamp/>
    <jar basedir="${classes}"
    jarfile="${dist}/${archive}-test-${DSTAMP}.jar">
    </jar>
    </target>
    <target depends="test.binary.archive" name="run">
    <junit printsummary="yes" haltonfailure="yes">
    <classpath>
    <pathelement location="${test.classes}"/>
    <pathelement path="${classpath}"/>
    </classpath>
    <formatter type="plain"/>
    <batchtest fork="yes" todir="${test.reports}">
    <fileset dir="${test.source}">
    <include name="**/*Test*.java"/>
    <exclude name="**/*ThreadPool*.java"/>
    </fileset>
    </batchtest>
    </junit>
    </target>
    </project>



    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
  • Jason van Zyl at May 26, 2003 at 6:06 pm

    On Mon, 2003-05-26 at 13:42, Verma, Nitin (GECP, OTHER, 529706) wrote:
    This also did not work!

    <resources>
    <resource>
    <includes>
    <directory>java/src</directory>
    <include>**/*.*</include>
    <exclude>**/*.java</exclude>
    <exclude>**/.nbattrs</exclude>
    <exclude>**/*.java~</exclude>
    <exclude>**/CVS/**</exclude>
    </includes>
    </resource>
    </resources>
    Why don't you:

    1) look at the user guide

    http://maven.apache.org/reference/user-guide.html#Test%20Resources

    2) Look at Maven's own project.xml

    http://cvs.apache.org/viewcvs.cgi/maven/project.xml?rev=1.274&content-type=text/vnd.viewcvs-markup

    3) Look at any of the projects listed on the powered by page:

    http://maven.apache.org/powered.html

    If you want some help you have to make _some_ effort. Don't just try
    something and then ask why it doesn't work, and then try something else
    and ask why that doesn't work. Make the effort to look at resources
    provided. I know they aren't bountiful but what you are asking is.
    --
    jvz.

    Jason van Zyl
    jason@zenplex.com
    http://tambora.zenplex.org

    In short, man creates for himself a new religion of a rational
    and technical order to justify his work and to be justified in it.

    -- Jacques Ellul, The Technological Society

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
  • Verma, Nitin (GECP, OTHER, 529706) at May 26, 2003 at 6:11 pm
    Thanx for the links!

    -----Original Message-----
    From: Jason van Zyl
    Sent: Monday, May 26, 2003 11:37 PM
    To: Maven Users List
    Subject: RE: How to copy files to target/classes and target/test-classes
    d irs

    On Mon, 2003-05-26 at 13:42, Verma, Nitin (GECP, OTHER, 529706) wrote:
    This also did not work!

    <resources>
    <resource>
    <includes>
    <directory>java/src</directory>
    <include>**/*.*</include>
    <exclude>**/*.java</exclude>
    <exclude>**/.nbattrs</exclude>
    <exclude>**/*.java~</exclude>
    <exclude>**/CVS/**</exclude>
    </includes>
    </resource>
    </resources>
    Why don't you:

    1) look at the user guide

    http://maven.apache.org/reference/user-guide.html#Test%20Resources

    2) Look at Maven's own project.xml

    http://cvs.apache.org/viewcvs.cgi/maven/project.xml?rev=1.274&content-type=t
    ext/vnd.viewcvs-markup

    3) Look at any of the projects listed on the powered by page:

    http://maven.apache.org/powered.html

    If you want some help you have to make _some_ effort. Don't just try
    something and then ask why it doesn't work, and then try something else
    and ask why that doesn't work. Make the effort to look at resources
    provided. I know they aren't bountiful but what you are asking is.
    --
    jvz.

    Jason van Zyl
    jason@zenplex.com
    http://tambora.zenplex.org

    In short, man creates for himself a new religion of a rational
    and technical order to justify his work and to be justified in it.

    -- Jacques Ellul, The Technological Society

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
  • Verma, Nitin (GECP, OTHER, 529706) at May 26, 2003 at 6:28 pm
    Thanx it worked for target/classes

    <resources>
    <resource>
    <directory>java/src</directory>
    <includes>
    <include>**/*.*</include>
    </includes>
    <excludes>
    <exclude>**/*.java</exclude>
    <exclude>**/.nbattrs</exclude>
    <exclude>**/*.java~</exclude>
    <exclude>**/CVS/**</exclude>
    </excludes>
    </resource>
    </resources>

    But still working on target/test-classes

    -----Original Message-----
    From: Verma, Nitin (GECP, OTHER, 529706)
    Sent: Monday, May 26, 2003 11:43 PM
    To: Maven Users List
    Subject: RE: How to copy files to target/classes and target/test-classes d
    irs



    Thanx for the links!

    -----Original Message-----
    From: Jason van Zyl
    Sent: Monday, May 26, 2003 11:37 PM
    To: Maven Users List
    Subject: RE: How to copy files to target/classes and target/test-classes
    d irs

    On Mon, 2003-05-26 at 13:42, Verma, Nitin (GECP, OTHER, 529706) wrote:
    This also did not work!

    <resources>
    <resource>
    <includes>
    <directory>java/src</directory>
    <include>**/*.*</include>
    <exclude>**/*.java</exclude>
    <exclude>**/.nbattrs</exclude>
    <exclude>**/*.java~</exclude>
    <exclude>**/CVS/**</exclude>
    </includes>
    </resource>
    </resources>
    Why don't you:

    1) look at the user guide

    http://maven.apache.org/reference/user-guide.html#Test%20Resources
    <http://maven.apache.org/reference/user-guide.html#Test%20Resources>

    2) Look at Maven's own project.xml

    http://cvs.apache.org/viewcvs.cgi/maven/project.xml?rev=1.274
    <http://cvs.apache.org/viewcvs.cgi/maven/project.xml?rev=1.274&content-type=
    text/vnd.viewcvs-markup> &content-type=text/vnd.viewcvs-markup

    3) Look at any of the projects listed on the powered by page:

    http://maven.apache.org/powered.html <http://maven.apache.org/powered.html>


    If you want some help you have to make _some_ effort. Don't just try
    something and then ask why it doesn't work, and then try something else
    and ask why that doesn't work. Make the effort to look at resources
    provided. I know they aren't bountiful but what you are asking is.
    --
    jvz.

    Jason van Zyl
    jason@zenplex.com
    http://tambora.zenplex.org <http://tambora.zenplex.org>

    In short, man creates for himself a new religion of a rational
    and technical order to justify his work and to be justified in it.

    -- Jacques Ellul, The Technological Society

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
    For additional commands, e-mail: users-help@maven.apache.org
  • Verma, Nitin (GECP, OTHER, 529706) at May 26, 2003 at 6:57 pm
    Thanx so much ... test are even working!

    <!-- Unit test cases -->
    <unitTest>
    <includes>
    <include>**/*Test*.java</include>
    </includes>
    <excludes>
    <exclude>**/*ThreadPool*.java</exclude>

    <exclude>serverconfig/microkernel/worker/config/TestData.java</exclude>

    <exclude>serverconfig/microkernel/worker/config/TestDataCollection.java</exc
    lude>
    </excludes>
    <resources>
    <resource>
    <directory>java/test</directory>
    <excludes>
    <exclude>**/*.java</exclude>
    <exclude>**/.nbattrs</exclude>
    <exclude>**/*.java~</exclude>
    <exclude>**/CVS/**</exclude>
    </excludes>
    </resource>
    </resources>
    </unitTest>

    -----Original Message-----
    From: Jason van Zyl
    Sent: Monday, May 26, 2003 11:37 PM
    To: Maven Users List
    Subject: RE: How to copy files to target/classes and target/test-classes
    d irs

    On Mon, 2003-05-26 at 13:42, Verma, Nitin (GECP, OTHER, 529706) wrote:
    This also did not work!

    <resources>
    <resource>
    <includes>
    <directory>java/src</directory>
    <include>**/*.*</include>
    <exclude>**/*.java</exclude>
    <exclude>**/.nbattrs</exclude>
    <exclude>**/*.java~</exclude>
    <exclude>**/CVS/**</exclude>
    </includes>
    </resource>
    </resources>
    Why don't you:

    1) look at the user guide

    http://maven.apache.org/reference/user-guide.html#Test%20Resources

    2) Look at Maven's own project.xml

    http://cvs.apache.org/viewcvs.cgi/maven/project.xml?rev=1.274&content-type=t
    ext/vnd.viewcvs-markup

    3) Look at any of the projects listed on the powered by page:

    http://maven.apache.org/powered.html

    If you want some help you have to make _some_ effort. Don't just try
    something and then ask why it doesn't work, and then try something else
    and ask why that doesn't work. Make the effort to look at resources
    provided. I know they aren't bountiful but what you are asking is.
    --
    jvz.

    Jason van Zyl
    jason@zenplex.com
    http://tambora.zenplex.org

    In short, man creates for himself a new religion of a rational
    and technical order to justify his work and to be justified in it.

    -- Jacques Ellul, The Technological Society

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriesmaven
postedMay 26, '03 at 4:00p
activeMay 26, '03 at 6:57p
posts10
users3
websitemaven.apache.org
irc#maven

People

Translate

site design / logo © 2019 Grokbase