You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2003/12/09 12:51:33 UTC
cvs commit: avalon/merlin maven.xml
mcconnell 2003/12/09 03:51:33
Modified: merlin/kernel/cli/src/java/org/apache/avalon/merlin/cli
Main.java
merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl
DefaultFactory.java
merlin maven.xml
Log:
Tweaking url handling.
Revision Changes Path
1.3 +21 -5 avalon/merlin/kernel/cli/src/java/org/apache/avalon/merlin/cli/Main.java
Index: Main.java
===================================================================
RCS file: /home/cvs/avalon/merlin/kernel/cli/src/java/org/apache/avalon/merlin/cli/Main.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Main.java 9 Dec 2003 09:18:44 -0000 1.2
+++ Main.java 9 Dec 2003 11:51:33 -0000 1.3
@@ -106,9 +106,6 @@
private static final File USER_HOME =
new File( System.getProperty( "user.home" ) );
- private static final File USER_DIR =
- getBaseDirectory();
-
private static final String MERLIN = "merlin.properties";
private static Options CL_OPTIONS = buildCommandLineOptions();
@@ -155,6 +152,12 @@
.withDescription( REZ.getString( "cli-home-description" ) )
.create( "home" );
+ Option context = OptionBuilder
+ .hasArg()
+ .withArgName( REZ.getString( "directory" ) )
+ .withDescription( REZ.getString( "cli-context-description" ) )
+ .create( "context" );
+
Option system = OptionBuilder
.hasArg()
.withArgName( REZ.getString( "directory" ) )
@@ -199,6 +202,7 @@
options.addOption( debug );
options.addOption( install );
options.addOption( home );
+ options.addOption( context );
options.addOption( system );
options.addOption( repository );
options.addOption( library );
@@ -256,6 +260,7 @@
setDebugPolicy( criteria, line );
setServerPolicy( criteria, line );
setAnchorDirectory( criteria, line );
+ setContextDirectory( criteria, line );
setRepositoryDirectory( criteria, line );
setKernelURL( criteria, line );
setOverridePath( criteria, line );
@@ -307,6 +312,15 @@
}
}
+ private void setContextDirectory( Map criteria, CommandLine line )
+ {
+ if( line.hasOption( "context" ) )
+ {
+ String context = line.getOptionValue( "context" );
+ criteria.put( "merlin.context", context );
+ }
+ }
+
private void setRepositoryDirectory( Map criteria, CommandLine line )
{
if( line.hasOption( "repository" ) )
@@ -538,7 +552,9 @@
catch( Throwable e )
{
System.out.println( "\nImplementation: "
- + artifact.getGroup() + ":" + artifact.getName() + ";" + artifact.getVersion() );
+ + artifact.getGroup()
+ + ":" + artifact.getName()
+ + ";" + artifact.getVersion() );
}
}
1.3 +4 -2 avalon/merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl/DefaultFactory.java
Index: DefaultFactory.java
===================================================================
RCS file: /home/cvs/avalon/merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl/DefaultFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DefaultFactory.java 9 Dec 2003 09:18:44 -0000 1.2
+++ DefaultFactory.java 9 Dec 2003 11:51:33 -0000 1.3
@@ -840,13 +840,15 @@
{
try
{
- if( path.indexOf( ":" ) > 0 )
+ if( path.indexOf( ":/" ) > 0 )
{
return new URL( path );
}
else
{
- return new File( base, path ).toURL();
+ return
+ new File(
+ base, path ).getCanonicalFile().toURL();
}
}
catch( Throwable e )
1.14 +6 -2 avalon/merlin/maven.xml
Index: maven.xml
===================================================================
RCS file: /home/cvs/avalon/merlin/maven.xml,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- maven.xml 8 Dec 2003 15:37:12 -0000 1.13
+++ maven.xml 9 Dec 2003 11:51:33 -0000 1.14
@@ -67,11 +67,15 @@
ignoreFailures="false" />
</goal>
-
<goal name="merlin:build" description="Build Merlin.">
<maven:reactor basedir="${basedir}"
includes="**/project.xml"
- excludes="target/**,platform/**,kernel/plugin/**,project.xml,merlin-extensions/**"
+ excludes="target/**,platform/**,kernel/plugin/**,project.xml,merlin-extensions/**,kernel/cli/**,kernel/unit/**"
+ goals="jar:install"
+ banner="Installing:"
+ ignoreFailures="false" />
+ <maven:reactor basedir="${basedir}"
+ includes="kernel/unit/project.xml,kernel/cli/project.xml"
goals="jar:install"
banner="Installing:"
ignoreFailures="false" />
---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org