summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-common/src
diff options
context:
space:
mode:
authorMaria Odea B. Ching <oching@apache.org>2011-06-15 09:36:05 +0000
committerMaria Odea B. Ching <oching@apache.org>2011-06-15 09:36:05 +0000
commitdab1e929905186a20423260d0f1ce275eef4add2 (patch)
treec5d077042334c5db89c6492d22f68908ae534579 /archiva-modules/archiva-base/archiva-common/src
parent90df2242acd0eb69d7fcc31e0513cef0e42b1a25 (diff)
downloadarchiva-dab1e929905186a20423260d0f1ce275eef4add2.tar.gz
archiva-dab1e929905186a20423260d0f1ce275eef4add2.zip
[MRM-1411] project information is missing if a POM could not be read correctly
o proxy parent POM if not found in the repo when building the effective POM when creating metadata (also applied the same in dependency tree builder) o added unit tests o moved out wagonfactory classes into separate module so it can be used by maven2-repository w/o depending on archiva-proxy module (as it inroduces cyclic dependency) git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1135978 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-base/archiva-common/src')
-rw-r--r--archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/maven/archiva/common/utils/FileUtil.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/maven/archiva/common/utils/FileUtil.java b/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/maven/archiva/common/utils/FileUtil.java
new file mode 100644
index 000000000..8c451dc28
--- /dev/null
+++ b/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/maven/archiva/common/utils/FileUtil.java
@@ -0,0 +1,36 @@
+package org.apache.maven.archiva.common.utils;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+
+public class FileUtil
+{
+ public static String getBasedir()
+ {
+ String basedir = System.getProperty( "basedir" );
+ if ( basedir == null )
+ {
+ basedir = new File( "" ).getAbsolutePath();
+ }
+
+ return basedir;
+ }
+} \ No newline at end of file