You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Chris Jobling <cp...@ntlworld.com> on 2005/07/07 19:18:58 UTC

m2 beta-3: Error in "Getting Started Example"

Hi
 
I have just installed m2-beta-3 and was working through the getting started
exercise. When I tried the multiproject, m2 seems to want to download
app-1.0-SNAPSHOT.pom from the remote repository rather than the local
repository and build fails. Running m2 -o doesn't make any difference. As
far as I can tell the top level, webapp and app pom files are ok. I have run
"m2 clean:clean install" on both my-webapp and my-app.
 
==top level pmm.xml==
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>uk.ac.swan.testm2</groupId>
  <version>1.0-SNAPSHOT</version>
  <artifactId>app</artifactId>
  <packaging>pom</packaging>
  <modules>
    <module>my-app</module>
    <module>my-webapp</module>
  </modules>
</project>
 
 
 
==my-app pom.xml==
<project>
  <parent>
    <groupId>uk.swan.ac.swan.testm2</groupId>
    <artifactId>app</artifactId>
    <version>1.0-SNAPSHOT</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>uk.ac.swan.testm2</groupId>
  <artifactId>my-app</artifactId>
  <packaging>jar</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>Maven Quick Start Archetype</name>
  <url>http://www.swan.ac.uk</url>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
   <plugins>
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
   <source>1.5</source>
   <target>1.5</target>
    </configuration>
  </plugin>
   </plugins>
 </build>
</project>

 
==my-webapp.xml==
<project>
  <parent>
    <groupId>uk.swan.ac.swan.testm2</groupId>
    <artifactId>app</artifactId>
    <version>1.0-SNAPSHOT</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>uk.ac.swan.testm2</groupId>
  <artifactId>my-webapp</artifactId>
  <packaging>war</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>Maven Webapp Archetype</name>
  <url>www.swan.ac.uk</url>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>uk.ac.swan.testm2</groupId>
      <artifactId>my-app</artifactId>
      <version>1.0-SNAPSHOT</version>
    </dependency>
  </dependencies>
  <build>
    <finalName>my-webapp</finalName>
  </build>
</project>

my-app and my-webapp generated using "m2 archetype:create" as documented in
the "Getting Started" doc. My project layout is:
 
 
multiproject
 |
 +- pom.xml
 +- my-app
 |  +- pom.xml
 +- my-webapp
 |  +- pom.xml
 
 
The message is:
 
multiproject> m2 -o clean:clean install
[INFO] Maven is running in offline mode.
Downloading:
http://repo1.maven.org/maven2/uk/swan/ac/swan/testm2/app/1.0-SNAPSHOT/app-1.
0-SNAPSHOT.pom
[WARNING] Unable to get resource from repository
http://repo1.maven.org/maven2
[INFO]
----------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
----------------------------------------------------------------------------
[INFO] Reason: Unable to find the POM in the repository
[INFO]
----------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Thu Jul 07 18:13:45 BST 2005
[INFO] Final Memory: 1M/2M
[INFO]
----------------------------------------------------------------------------

 
Chris Jobling (Chris.Jobling@ntlworld.com)


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: m2 beta-3: Error in "Getting Started Example"

Posted by Chris Jobling <cp...@ntlworld.com>.
Johnny

Thanks for the feedback ... You where right ... In fact I had two errors in
the groupId! 

Chris 

-----Original Message-----
From: Johnny Ruiz [mailto:jruiz@exist.com] 
Sent: 08 July 2005 00:53
To: Maven Users List
Subject: Re: m2 beta-3: Error in "Getting Started Example"

Hi Chris,

I think you have mistyped the groupId of your top level pom.xml.

==top level pmm.xml==
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>uk.ac.swan.testm2</groupId>    ---->>>>>  IT's uk.ac.swan.testm2
  <version>1.0-SNAPSHOT</version>
  <artifactId>app</artifactId>
   ..... and so forth


But in  your <parent> declaration in  ==my-app pom.xml==  and ==my-webapp
pom.xml you specified it differently.

  <parent>
    <groupId>uk.swan.ac.swan.testm2</groupId>   ---->>>>>  IT's
uk.swan.ac.swan.testm2
    <artifactId>app</artifactId>
    <version>1.0-SNAPSHOT</version>
  </parent>

I't might be the problem. Please try making them the same (use
uk.ac.swan.testm2 instead)  then command  >>>> m2 clean:clean install again
and check if this works. 

Regards,
Johnny Ruiz

--
Chris Jobling (cp.jobling@ntlworld.com)
Working from home... 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: m2 beta-3: Error in "Getting Started Example"

Posted by Johnny Ruiz <jr...@exist.com>.
Hi Chris,

I think you have mistyped the groupId of your top level pom.xml.

==top level pmm.xml==
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>uk.ac.swan.testm2</groupId>    ---->>>>>  IT's uk.ac.swan.testm2
  <version>1.0-SNAPSHOT</version>
  <artifactId>app</artifactId>
   ..... and so forth


But in  your <parent> declaration in  ==my-app pom.xml==  and 
==my-webapp  pom.xml you specified it differently.

  <parent>
    <groupId>uk.swan.ac.swan.testm2</groupId>   ---->>>>>  IT's uk.swan.ac.swan.testm2
    <artifactId>app</artifactId>
    <version>1.0-SNAPSHOT</version>
  </parent>

I't might be the problem. Please try making them the same (use 
uk.ac.swan.testm2 instead)  then command  >>>> m2 clean:clean install 
again and check if this works. 

Regards,
Johnny Ruiz

Chris Jobling wrote:

>Hi
> 
>I have just installed m2-beta-3 and was working through the getting started
>exercise. When I tried the multiproject, m2 seems to want to download
>app-1.0-SNAPSHOT.pom from the remote repository rather than the local
>repository and build fails. Running m2 -o doesn't make any difference. As
>far as I can tell the top level, webapp and app pom files are ok. I have run
>"m2 clean:clean install" on both my-webapp and my-app.
> 
>==top level pmm.xml==
><project>
>  <modelVersion>4.0.0</modelVersion>
>  <groupId>uk.ac.swan.testm2</groupId>
>  <version>1.0-SNAPSHOT</version>
>  <artifactId>app</artifactId>
>  <packaging>pom</packaging>
>  <modules>
>    <module>my-app</module>
>    <module>my-webapp</module>
>  </modules>
></project>
> 
> 
> 
>==my-app pom.xml==
><project>
>  <parent>
>    <groupId>uk.swan.ac.swan.testm2</groupId>
>    <artifactId>app</artifactId>
>    <version>1.0-SNAPSHOT</version>
>  </parent>
>  <modelVersion>4.0.0</modelVersion>
>  <groupId>uk.ac.swan.testm2</groupId>
>  <artifactId>my-app</artifactId>
>  <packaging>jar</packaging>
>  <version>1.0-SNAPSHOT</version>
>  <name>Maven Quick Start Archetype</name>
>  <url>http://www.swan.ac.uk</url>
>  <dependencies>
>    <dependency>
>      <groupId>junit</groupId>
>      <artifactId>junit</artifactId>
>      <version>3.8.1</version>
>      <scope>test</scope>
>    </dependency>
>  </dependencies>
>  <build>
>   <plugins>
>  <plugin>
>    <groupId>org.apache.maven.plugins</groupId>
>    <artifactId>maven-compiler-plugin</artifactId>
>    <configuration>
>   <source>1.5</source>
>   <target>1.5</target>
>    </configuration>
>  </plugin>
>   </plugins>
> </build>
></project>
>
> 
>==my-webapp.xml==
><project>
>  <parent>
>    <groupId>uk.swan.ac.swan.testm2</groupId>
>    <artifactId>app</artifactId>
>    <version>1.0-SNAPSHOT</version>
>  </parent>
>  <modelVersion>4.0.0</modelVersion>
>  <groupId>uk.ac.swan.testm2</groupId>
>  <artifactId>my-webapp</artifactId>
>  <packaging>war</packaging>
>  <version>1.0-SNAPSHOT</version>
>  <name>Maven Webapp Archetype</name>
>  <url>www.swan.ac.uk</url>
>  <dependencies>
>    <dependency>
>      <groupId>junit</groupId>
>      <artifactId>junit</artifactId>
>      <version>3.8.1</version>
>      <scope>test</scope>
>    </dependency>
>    <dependency>
>      <groupId>uk.ac.swan.testm2</groupId>
>      <artifactId>my-app</artifactId>
>      <version>1.0-SNAPSHOT</version>
>    </dependency>
>  </dependencies>
>  <build>
>    <finalName>my-webapp</finalName>
>  </build>
></project>
>
>my-app and my-webapp generated using "m2 archetype:create" as documented in
>the "Getting Started" doc. My project layout is:
> 
> 
>multiproject
> |
> +- pom.xml
> +- my-app
> |  +- pom.xml
> +- my-webapp
> |  +- pom.xml
> 
> 
>The message is:
> 
>multiproject> m2 -o clean:clean install
>[INFO] Maven is running in offline mode.
>Downloading:
>http://repo1.maven.org/maven2/uk/swan/ac/swan/testm2/app/1.0-SNAPSHOT/app-1.
>0-SNAPSHOT.pom
>[WARNING] Unable to get resource from repository
>http://repo1.maven.org/maven2
>[INFO]
>----------------------------------------------------------------------------
>[INFO] BUILD FAILURE
>[INFO]
>----------------------------------------------------------------------------
>[INFO] Reason: Unable to find the POM in the repository
>[INFO]
>----------------------------------------------------------------------------
>[INFO] Total time: < 1 second
>[INFO] Finished at: Thu Jul 07 18:13:45 BST 2005
>[INFO] Final Memory: 1M/2M
>[INFO]
>----------------------------------------------------------------------------
>
> 
>Chris Jobling (Chris.Jobling@ntlworld.com)
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>For additional commands, e-mail: users-help@maven.apache.org
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org