o adjustment for a project with purely generated source: maven-model

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@162729 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2004-05-30 16:55:19 +00:00
parent f4b9a6bf51
commit fac58f8047
2 changed files with 35 additions and 23 deletions

16
maven-mboot/project.xml Normal file
View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<parent>
<groupId>maven</groupId>
<artifactId>maven-component</artifactId>
<version>2.0-SNAPSHOT</version>
</parent>
<name>Maven MBoot</name>
<groupId>maven</groupId>
<id>maven-mboot</id>
<artifactId>maven-mboot</artifactId>
<version>2.0-SNAPSHOT</version>
<description>Tool used to bootstrap m2.</description>
<shortDescription>Tool used to bootstrap m2.</shortDescription>
</project>

View File

@ -112,9 +112,9 @@ compile()
# $1 == classpath
# $2 == destination for compiled classes
# $3 == source directory
# $4 == any extra sources
# $4 == generated source directory
if [ -d $3 ]
if [ -d $3 ] || [ -d $4 ]
then
if [ ! -d $2 ]
@ -122,7 +122,15 @@ compile()
mkdir -p $2
fi
SOURCES=`find $3 -name '*.java'`
if [ ! -z $3 ] && [ -d $3 ]
then
sources=`find $3 -name '*.java'`
fi
if [ ! -z $4 ] && [ -d $4 ]
then
generatedSources=`find $4 -name '*.java'`
fi
if $cygwin; then
CP=`cygpath -pw "$1"`
@ -130,7 +138,7 @@ compile()
CP=$1
fi
"${JAVAC}" -classpath "$CP" -d $2 ${SOURCES} $4
"${JAVAC}" -classpath "$CP" -d $2 ${sources} ${generatedSources}
fi
}
@ -216,22 +224,12 @@ buildMavenProject()
projectDependencyClassPath=$bootstrapClasspath:.
if [ ! -z $sourceDirectory ] && [ -d $sourceDirectory ]
then
generatedSourceDirectory=target/generated-sources
if [ -d $generatedSourceDirectory ]
then
generatedSources=`find $generatedSourceDirectory -name '*.java'`
fi
compile "$projectDependencyClassPath" $buildDest $sourceDirectory $generatedSources
compile "$projectDependencyClassPath" $buildDest $sourceDirectory $generatedSourceDirectory
isCommandSuccessful $? "Failed compiling classes!"
fi
echo "Building tests in `pwd`"
repoLocal=`cat bootstrap.repo`
@ -244,11 +242,9 @@ buildMavenProject()
if [ ! -z $unitTestSourceDirectory ] && [ -d $unitTestSourceDirectory ]
then
compile "$buildDest:$projectDependencyClassPath:${MBOOT_CP}" $buildTestDest $unitTestSourceDirectory
isCommandSuccessful $? "Failed compiling test classes!"
fi
copyResources bootstrap.resources target/classes