You need to make sure those files are in your local repo cache by
using "mvn install" on the project directory if its a Maven project,
or by using "mvn install:install-file ..." on the Jar file if it is
not.

This is documented pretty well on the Maven website, so I won't go
into details here.

Wayne

On 4/21/08, neo anderson <[EMAIL PROTECTED]> wrote:
>
> I change to use different groupId - ejb for net.sf.middleware and web for
> net.sf.web; but the problem still remains. From the context looks like it is
> looking for the remote repository
>
> [code]
> Downloading:
> http://repo1.maven.org/maven2/net/sf/sample/middleware/sample-middle/0.1/sample-middle-0.1.pom
> Downloading:
> http://repo1.maven.org/maven2/net/sf/sample/middleware/sample-middle/0.1/sample-middle-0.1.jar
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Failed to resolve artifact.
>
> Missing:
> ----------
> 1) net.sf.sample.middleware:sample-middle:ejb:0.1
> ...
> [/code]
>
> How can I use the local one (where target folder existed) instead of
> downloading from remote repository?
>
> Thanks in advice.
>
>
> VUB Stefan Seidel wrote:
> >
> > You have the same group and artifact id for your ejb and your war file.
> > This cannot work, because the one will overwrite the other.
> >
> > Stefan
> >
> > neo anderson wrote:
> >> Env: jboss 4.2.2GA/ Debian lenny testing/ jdk 1.6.0_01/maven 2.0.7
> >>
> >> I try to create an ear  file via maven, but it issues error reporting
> >> that
> >> it requires to download sub porjects (web and ejb, etc.) first. The
> >> message
> >> is as below. It looks like repository problem. Though I can download it
> >> manually, I prefer to get it done automatically because last time I
> >> create
> >> ear file maven successfully except the target application server is
> >> geronimo, not jboss (but i can't remember exactly what i did to get it
> >> work). So hope someone can give me advice.
> >>
> >> [code]
> >> ...
> >> [INFO]
> >> ----------------------------------------------------------------------------
> >> Downloading:
> >> http://repo1.maven.org/maven2/net/sf/sample/sample-web/0.1/sample-web-0.1.jar
> >> [INFO]
> >> ------------------------------------------------------------------------
> >> [ERROR] BUILD ERROR
> >> [INFO]
> >> ------------------------------------------------------------------------
> >> [INFO] Failed to resolve artifact.
> >>
> >> Missing:
> >> ----------
> >> 1) net.sf.sample:sample-web:ejb:0.1
> >>
> >>   Try downloading the file manually from the project website.
> >> ...
> >> [/code]
> >>
> >> The way how I create ear project is through executing command 'mvn
> >> arcetype:create -DgropuId=net.sf.sample -DartifactId=sample -Dversion1.0'
> >>
> >> Then modifing the pom.xml (in ear folder)
> >> [code]
> >> <?xml version="1.0"?>
> >> <project>
> >>      <modelVersion>4.0.0</modelVersion>
> >>      <parent>
> >>              <artifactId>sample</artifactId>
> >>              <groupId>net.sf.sample</groupId>
> >>              <version>0.1</version>
> >>      </parent>
> >>      <artifactId>sample-ear</artifactId>
> >>      <name>sample-ear</name>
> >>      <packaging>ear</packaging>
> >>      <version>0.1</version>
> >>      <url>http://maven.apache.org</url>
> >>      <dependencies>
> >>              <dependency>
> >>                      <groupId>junit</groupId>
> >>                      <artifactId>junit</artifactId>
> >>                      <version>3.8.1</version>
> >>                      <scope>test</scope>
> >>              </dependency>
> >>              <dependency>
> >>                      <groupId>net.sample</groupId>
> >>                      <artifactId>sample-web</artifactId>
> >>                      <version>0.1</version>
> >>                      <type>war</type>
> >>              </dependency>
> >>              <dependency>
> >>                      <groupId>net.sample</groupId>
> >>                      <artifactId>sample-web</artifactId>
> >>                      <version>0.1</version>
> >>                      <type>ejb</type>
> >>              </dependency>
> >>      </dependencies>
> >>      <build>
> >>              <plugins>
> >>                      <plugin>
> >>                              <artifactId>maven-ear-plugin</artifactId>
> >>                              <configuration>
> >>                                      <displayName>Sample 
> >> Project</displayName>
> >>                                      <description>Sample EAR 
> >> artifact</description>
> >>                                      <version>5</version>
> >>                                      <modules>
> >>                                              <ejbModule>
> >>                                                      
> >> <groupId>net.sf.sample</groupId>
> >>                                                      
> >> <artifactId>sample-middleware</artifactId>
> >>                                                      
> >> <bundleFileName>sample-middleware-0.1.jar</bundleFileName>
> >>                                              </ejbModule>
> >>                                              <webModule>
> >>                                                      
> >> <groupId>net.sf.sample</groupId>
> >>                                                      
> >> <artifactId>sample-web</artifactId>
> >>                                                      
> >> <bundleFileName>sample-web-0.1.jar</bundleFileName>
> >>                                              </webModule>
> >>                                      </modules>
> >>                              </configuration>
> >>                      </plugin>
> >>              </plugins>
> >>      </build>
> >> <project>
> >> [/code]
> >>
> >> I can build ejb3 and web sub-projects successfully (execute 'mvn package'
> >> command and they work in jboss env).
> >>
> >> What part I may miss in ear pom.xml file?
> >>
> >> Thank you very much.
> >>
> >
> > --
> > best regards,
> >
> > Stefan Seidel
> > software developer
> > ________________________
> > VUB Printmedia GmbH
> > Chopinstraße 4
> > D-04103 Leipzig
> > Germany
> > tel.    +49 (341) 9 60 50 07
> > fax.    +49 (341) 9 60 50 92
> > mail.   [EMAIL PROTECTED]
> > web.    www.vub.de
> >
> > HRB Köln 24015
> > UStID DE 122 649 251
> > GF Dr. Achim Preuss Neudorf,
> > Dr. Christian Preuss Neudorf
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/build-ear-problem-tp16791088s177p16812655.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to