I need to use Maven without direct access to any public Maven repositories.
For this reason I have installed Artifactory on a Tomcat instance
(responding on port 8081).

I have changed Marven settings.xml to the following:
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0";
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd";>
  <localRepository>/development/temp/maven/local/repo</localRepository>
  <proxies></proxies>
  <servers></servers>
  <mirrors>
    <mirror> 
        <id>lpk - plugin - repo1</id> 
        <mirrorOf>plugins-repo1</mirrorOf> 
        <url>http://localhost:8081/artifactory/repo1</url>
    </mirror> 
  </mirrors>
  <profiles>
        <profile>
                <id>lpk</id>
                <pluginRepositories>
                        <pluginRepository>
                                <id>plugins-repo1</id>
                                <url>http://central</url>
                                <releases>
                                        <enabled>true</enabled>
                                </releases>
                                <snapshots>
                                        <enabled>true</enabled>
                                </snapshots>
                        </pluginRepository>
                </pluginRepositories>
        </profile> 
  </profiles>
  <activeProfiles><activeProfile>lpk</activeProfile></activeProfiles> 
</settings>

As a test of Maven setup, I execute the following command:
mvn archetype:create -DgroupId=org.sonatype.mavenbook
-DartifactId=sample-project 

This leads to downloading of a bunch of plugins, but in the end Maven
returns the following message:
[INFO] [archetype:create] 
[WARNING] This goal is deprecated. Please use mvn archetype:generate instead 
[INFO] Defaulting package to group ID: org.sonatype.mavenbook 
[INFO] artifact org.apache.maven.archetypes:maven-archetype-quickstart:
checking for updates from central 
Downloading:
http://repo1.maven.org/maven2/org/apache/maven/archetypes/maven-archetype-quickstart/1.1/maven-archetype-quickstart-1.1.jar
 
[INFO]
---------------------------------------------------------------------------- 
[INFO] Using following parameters for creating OldArchetype:
maven-archetype-quickstart:RELEASE 
[INFO]
---------------------------------------------------------------------------- 
[INFO] Parameter: groupId, Value: org.sonatype.mavenbook 
[INFO] Parameter: packageName, Value: org.sonatype.mavenbook 
[INFO] Parameter: package, Value: org.sonatype.mavenbook 
[INFO] Parameter: artifactId, Value: sample-project 
[INFO] Parameter: basedir, Value: E:\src 
[INFO] Parameter: version, Value: 1.0-SNAPSHOT 
[INFO]
------------------------------------------------------------------------ 
[ERROR] BUILD ERROR 
[INFO]
------------------------------------------------------------------------ 
[INFO] Error creating from archetype 

Embedded error: Directory sample-project already exists - please run from a
clean directory 
[INFO]
------------------------------------------------------------------------ 
[INFO] For more information, run Maven with the -e switch 
[INFO]
------------------------------------------------------------------------ 
[INFO] Total time: 8 seconds 
[INFO] Finished at: Sat May 22 15:12:17 CEST 2010 
[INFO] Final Memory: 9M/21M 
[INFO]
------------------------------------------------------------------------ 

Information regarding why this error occurs and help resolvoing the problem
would be much appreciated.
-- 
View this message in context: 
http://old.nabble.com/Error-creating-from-archetype-tp28643720p28643720.html
Sent from the Artifactory-Users mailing list archive at Nabble.com.


------------------------------------------------------------------------------

_______________________________________________
Artifactory-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/artifactory-users

Reply via email to