You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Matt Clarkson <ma...@gmail.com> on 2011/11/17 18:55:18 UTC

NAR archetype:generate

Hello,

I am brand new to Maven and am looking to get over the learning hump!

I am a C/C++ and web developer and we are about to start a large new
project - perfect for a modern build system.

I have been looking into the NAR plugin and would like to use it.  I have
been having some false starts trying to work out how to use it.

>From what I understand I should be able to do:

mvn archetype:generate

Select a archetype and run

mvn install

to build it.

This is fine for the central repos.

I have added the following to my settings.xml:

    <!--
    | Extra repositories we need at UDP
    -->
    <profile>
      <id>extra-repos</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
        <pluginRepository>
          <id>freehep</id>
          <name>FreeHEP</name>
          <url>http://java.freehep.org/maven2</url>
          <layout>default</layout>
          <releases>
              <enabled>true</enabled>
              <updatePolicy>daily</updatePolicy>
              <checksumPolicy>warn</checksumPolicy>
          </releases>
          <snapshots>
            <enabled>true</enabled>
            <updatePolicy>daily</updatePolicy>
          </snapshots>
        </pluginRepository>
    </profile>

But cannot see any of the freehep archetypes?

If I add the following into a pom.xml in a folder:

  <build>
    <plugins>
      <!--
       | We need the freehep Native ARchive plugin
      -->
      <plugin>
        <groupId>org.freehep</groupId>
        <artifactId>freehep-nar-plugin</artifactId>
        <version>2.0-alpha-11-SNAPSHOT</version>
        <extensions>true</extensions>
            <configuration>
               <cpp>
                  <includePaths>
                     <includePath>src/cpp</includePath>
                  </includePaths>
               </cpp>
            </configuration>
      </plugin>
    </plugins>
  </build>
  <repositories>
    <!-- Used to fetch Native Archive Plugin -->
    <repository>
      <id>freehep-maven</id>
      <name>Maven FreeHEP</name>
      <url>http://java.freehep.org/maven2</url>
    </repository>
  </repositories>

Maven downloads the correct stuff from the freehep location (I think!)

If anyone could help me get to this stage:

mvn archetype:generate [NAR-PLUGIN-ARGUMENT]
mvn install

I would be so appreciative!

I have been trawling the internet all day, trying to garner the right
information.  I've been finding it really tough, but I have lots of
persistence!  I'm almost there, I'm sure of it.

Matt Clarkson