mirror of https://github.com/apache/maven.git
crappy temporary build stuff for the maven 1.1 model
should be replaced really soon with: - correction of properties bug in modello - addition of a --package command to modello - maven plugin for modello git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163129 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
425d44a54b
commit
1f36126287
|
@ -0,0 +1,55 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
rm -rf target
|
||||||
|
|
||||||
|
model=maven.mdo
|
||||||
|
repoLocal=`egrep '^maven.repo.local=' $HOME/build.properties | sed 's/maven.repo.local=//'`
|
||||||
|
packageWithVersion=false
|
||||||
|
dir=target/generated-sources
|
||||||
|
model_version=3.0.0
|
||||||
|
classesDir=target/classes
|
||||||
|
|
||||||
|
echo Repository: $repoLocal
|
||||||
|
|
||||||
|
mkdir -p $dir
|
||||||
|
|
||||||
|
if $cygwin; then
|
||||||
|
repoLocal=`cygpath -pu "$repoLocal"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
CP=$repoLocal/modello/jars/modello-1.0-SNAPSHOT.jar:$repoLocal/xstream/jars/xstream-1.0-SNAPSHOT.jar:$repoLocal/xpp3/jars/xpp3-1.1.3.3.jar
|
||||||
|
|
||||||
|
if $cygwin; then
|
||||||
|
CP=`cygpath -pw "$CP"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
java -classpath "$CP" org.codehaus.modello.Modello $model java "$dir" "$model_version" "$package_with_version"
|
||||||
|
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
|
||||||
|
java -classpath "$CP" org.codehaus.modello.Modello $model xpp3 "$dir" "$model_version" "$package_with_version"
|
||||||
|
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
|
||||||
|
|
||||||
|
# TODO: remove after I can fix modello
|
||||||
|
patch target/generated-sources/org/apache/maven/model/io/xpp3/MavenXpp3Writer.java <properties-patch.diff
|
||||||
|
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
|
||||||
|
|
||||||
|
# TODO: remove after can specify package name to modello
|
||||||
|
mv target/generated-sources/org/apache/maven/model target/generated-sources/org/apache/maven/project
|
||||||
|
for i in `find target/generated-sources -name '*.java' -type f`
|
||||||
|
do
|
||||||
|
echo Repackaging $i...
|
||||||
|
cat $i | sed 's/org.apache.maven.model/org.apache.maven.project/g' >tmp
|
||||||
|
mv tmp $i
|
||||||
|
done
|
||||||
|
|
||||||
|
mkdir -p $classesDir
|
||||||
|
javac -classpath $CP -d $classesDir -sourcepath $dir `find . -name '*.java' -type f`
|
||||||
|
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
|
||||||
|
|
||||||
|
(
|
||||||
|
cd $classesDir
|
||||||
|
jar cf ../maven-model-1.1-SNAPSHOT.jar *
|
||||||
|
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
|
||||||
|
)
|
||||||
|
ret=$?; if [ $ret != 0 ]; then exit $ret; fi
|
||||||
|
|
||||||
|
cp target/maven-model-1.1-SNAPSHOT.jar $repoLocal/maven/jars
|
|
@ -0,0 +1,18 @@
|
||||||
|
--- target/generated-sources/org/apache/maven/model/v300/io/xpp3/MavenXpp3Writer.java 2004-09-20 18:09:09.228374400 +1000
|
||||||
|
+++ target-prev/generated-sources/org/apache/maven/model/v300/io/xpp3/MavenXpp3Writer.java 2004-09-20 18:07:53.439395200 +1000
|
||||||
|
@@ -286,6 +286,15 @@
|
||||||
|
{
|
||||||
|
serializer.startTag( NAMESPACE, "type" ).text( dependency.getType() ).endTag( NAMESPACE, "type" );
|
||||||
|
}
|
||||||
|
+ if (dependency.getProperties() != null) {
|
||||||
|
+ serializer.startTag( NAMESPACE, "properties" );
|
||||||
|
+ for (java.util.Iterator i = dependency.getProperties().keySet().iterator(); i.hasNext(); )
|
||||||
|
+ {
|
||||||
|
+ String key = ( String ) i.next();
|
||||||
|
+ serializer.startTag( NAMESPACE, key ).text( dependency.getProperty(key) ).endTag( NAMESPACE, key );
|
||||||
|
+ }
|
||||||
|
+ serializer.endTag( NAMESPACE, "properties" );
|
||||||
|
+ }
|
||||||
|
serializer.endTag( NAMESPACE, "dependency" );
|
||||||
|
}
|
||||||
|
serializer.endTag( NAMESPACE, "dependencies" );
|
Loading…
Reference in New Issue