Skip to content

Commit

Permalink
Provided separation between fmvn and FRE
Browse files Browse the repository at this point in the history
  • Loading branch information
cafarm committed May 29, 2012
1 parent 4b93c82 commit f24bdac
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.Fedora
Expand Up @@ -4,4 +4,4 @@ To bootstrap:
$ mvn-rpmbuild -Dmaven.local.depmap.file=/usr/share/maven-fragments/maven package

To run (for the moment):
$ tmp/bin/fmvn -Dfmvn.useJPP=true -Dmaven.local.depmap.file=/usr/share/maven-fragments/maven package
$ tmp/bin/fmvn -Dfre.useJPP=true -Dfre.depmap.file=/usr/share/maven-fragments/maven package
4 changes: 2 additions & 2 deletions build.sh
@@ -1,3 +1,3 @@
#!/bin/sh
#exec tmp/bin/fmvn -Dmaven.local.depmap.file=fmvn-depmap.xml $*
exec tmp/bin/fmvn -Dmaven.local.depmap.file=/usr/share/maven-fragments/maven $*
#exec tmp/bin/fmvn -Dfre.depmap.file=fmvn-depmap.xml $*
exec tmp/bin/fmvn -Dfre.depmap.file=/usr/share/maven-fragments/maven $*
Expand Up @@ -105,9 +105,9 @@ public class FossRepositorySystem implements ArtifactDescriptorReader, ArtifactR
private final JPPLocalRepositoryManager jppRepositoryManager = new JPPLocalRepositoryManager();

public FossRepositorySystem() {
this.useJPP = Boolean.getBoolean("fmvn.useJPP");
this.useJPP = Boolean.getBoolean("fre.useJPP");
// we only want to use this repository
this.fossRepository = new RemoteRepository("foss", "default", System.getProperty("fmvn.repo", "file:/usr/share/maven/repository"));
this.fossRepository = new RemoteRepository("foss", "default", System.getProperty("fre.repo", "file:/usr/share/maven/repository"));
this.mirrorSelector = new MirrorSelector() {
@Override
public RemoteRepository getMirror(RemoteRepository repository) {
Expand Down
Expand Up @@ -191,7 +191,7 @@ private static void buildJppArtifactMap() {
processDepmapFile("/usr/share/maven-fragments/" + fragFilename);
}

String customFileName = System.getProperty("maven.local.depmap.file",
String customFileName = System.getProperty("fre.depmap.file",
null);
if (customFileName != null) {
debug("Processing file: " + customFileName);
Expand Down
10 changes: 5 additions & 5 deletions tmp/bin/fmvn
Expand Up @@ -11,11 +11,11 @@ then
export M2_HOME=/usr/share/maven
#export M2_HOME=/opt/apache/apache-maven-3.0.3
fi
FMVN_HOME=`dirname $0`/..
if [ -z "$FMVN_REPO" ]
FRE_HOME=`dirname $0`/..
if [ -z "$FRE_REPO" ]
then
# Must be a valid URL
FMVN_REPO=file:/usr/share/maven/repository
FRE_REPO=file:/usr/share/maven/repository
fi
export M2_CONF=`dirname $0`/m2.conf
echo $JAVA_HOME
Expand All @@ -25,8 +25,8 @@ exec /usr/bin/java \
-ea \
-classpath "${M2_HOME}"/boot/*classworlds*.jar \
"-Dclassworlds.conf=${M2_CONF}" \
"-Dfmvn.home=${FMVN_HOME}" \
"-Dfmvn.repo=${FMVN_REPO}" \
"-Dfre.home=${FRE_HOME}" \
"-Dfre.repo=${FRE_REPO}" \
"-Dmaven.home=${M2_HOME}" \
org.codehaus.plexus.classworlds.launcher.Launcher \
"-Dmaven.repo.local=.m2" $*
4 changes: 2 additions & 2 deletions tmp/bin/m2.conf
@@ -1,8 +1,8 @@
main is org.apache.maven.cli.MavenCli from plexus.core

set fmvn.home default ${user.home}/fmvn
set fre.home default ${user.home}/fre
set maven.home default ${user.home}/m2

[plexus.core]
load ${fmvn.home}/lib/ext/*.jar
load ${fre.home}/lib/ext/*.jar
load ${maven.home}/lib/*.jar

0 comments on commit f24bdac

Please sign in to comment.