You need the jar and the pom in your local repo. If the pom is missing,
Maven will try to load it remotely so it can tell if there are any secondary
dependencies that are also needed.

If you installed the jars with mvn install:install-file, you could have used
the option that generates default poms. That only works if these jars don't
require other jars to work (or if you make those other jars explicit
dependencies). You can make a default pom yourself and add it to the repo
after the fact as well. Just put the minimal tags in it:

<project>
<modelVersion>4.0.0</modelVersion>
 <groupId>the-group-id</groupId>
 <artifactId>the-artifact-id</artifactId>
 <version>the-version</version>
</project>

And, of course, fill in the right group, artifact and version.

-- Lee


On 1/17/07, Alok Jindal <[EMAIL PROTECTED]> wrote:


Hi,



I'm facing problems some problems building an EJB project with maven
2.0.4. i.e.



1)       I'm getting following error while packaging the EJB project.

2)       Also, in pom.xml, i have mentioned dependencies xml-apis and
xerces, but maven is mapping to the wrong version of these dependencies
i.e. xml-apis-1.0.b2 and xercerImpl-2.3.0 respectively whereas version
mentioned in pom.xml i.e. xml-apis 2.0.2 and xerces-2.3.0 is different
(find the bold items in the stack trace). I have both the version of
jars in my local repository

3)       Also, I would like to know why maven is looking for pom files
of some dependencies when I have jar files of them in  the local
repository



Please find the pom.xml and stack trace of the error below.



Kindly help me to resolve this issue, and let me know what the problem
is.





Stack Trace



C:\pnv\edsejb>mvn install -e

+ Error stacktraces are turned on.

[INFO] Scanning for projects...

[INFO]
------------------------------------------------------------------------
-

---

[INFO] Building eds ejb module

[INFO]    task-segment: [install]

[INFO]
------------------------------------------------------------------------
-

---

[INFO] [resources:resources]

[INFO] Using default encoding to copy filtered resources.

[WARNING] While downloading xerces:xerces:2.3.0

  This artifact has been relocated to xerces:xercesImpl:2.3.0.



Downloading:
http://repo1.maven.org/maven2/jai_codec/jai_codec/1.1.2/jai_codec-1

.1.2.pom

[WARNING] Unable to get resource from repository central
(http://repo1.maven.org

/maven2)

Downloading:
http://repo1.maven.org/maven2/jaxrpc/jaxrpc/1.0/jaxrpc-1.0.pom

[WARNING] Unable to get resource from repository central
(http://repo1.maven.org

/maven2)

Downloading:
http://repo1.maven.org/maven2/mlibwrapper_jai/mlibwrapper_jai/1.1.2

/mlibwrapper_jai-1.1.2.pom

[WARNING] Unable to get resource from repository central
(http://repo1.maven.org

/maven2)

Downloading: http://repo1.maven.org/maven2/aws/aws/2.3/aws-2.3.pom

[WARNING] Unable to get resource from repository central
(http://repo1.maven.org

/maven2)

Downloading: http://repo1.maven.org/maven2/j2ee/j2ee/1.0/j2ee-1.0.pom

[WARNING] Unable to get resource from repository central
(http://repo1.maven.org

/maven2)

[WARNING] While downloading xml-apis:xml-apis:2.0.2

  This artifact has been relocated to xml-apis:xml-apis:1.0.b2.

Downloading:
http://repo1.maven.org/maven2/commons-net/commons-net/1.0.1/commons

-net-1.0.1.pom

[WARNING] Unable to get resource from repository central
(http://repo1.maven.org

/maven2)

Downloading:
http://repo1.maven.org/maven2/db2java/db2java/1.2/db2java-1.2.pom

[WARNING] Unable to get resource from repository central
(http://repo1.maven.org

/maven2)

Downloading:
http://repo1.maven.org/maven2/jsr94/jsr94/1.0-pr/jsr94-1.0-pr.pom

[WARNING] Unable to get resource from repository central
(http://repo1.maven.org

/maven2)

Downloading:
http://repo1.maven.org/maven2/jai_core/jai_core/1.1.2/jai_core-1.1.

2.pom

[WARNING] Unable to get resource from repository central
(http://repo1.maven.org

/maven2)

Downloading:
http://repo1.maven.org/maven2/Acme/Acme/1.3.1/Acme-1.3.1.pom

[WARNING] Unable to get resource from repository central
(http://repo1.maven.org

/maven2)

Downloading: http://repo1.maven.org/maven2/saaj/saaj/1.0/saaj-1.0.pom

[WARNING] Unable to get resource from repository central
(http://repo1.maven.org

/maven2)

Downloading:
http://repo1.maven.org/maven2/jython/jython/20020827-no-oro/jython-

20020827-no-oro.pom

[WARNING] Unable to get resource from repository central
(http://repo1.maven.org

/maven2)

[INFO] [compiler:compile]

Compiling 80 source files to C:\Documents and
Settings\alok_jindal\pnv\edsejb\ta

rget\classes

[INFO] [resources:testResources]

[INFO] Using default encoding to copy filtered resources.

[INFO] [compiler:testCompile]

Compiling 1 source file to C:\Documents and
Settings\alok_jindal\pnv\edsejb\targ

et\classes

[INFO] [surefire:test]

[INFO] Surefire report directory: C:\Documents and
Settings\alok_jindal\pnv\edse

jb\target\surefire-reports



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

T E S T S

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

There are no tests to run.



Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0



[INFO] [ejb:ejb]

[INFO] Building ejb edsejb-rc

[INFO]
------------------------------------------------------------------------

[ERROR] BUILD ERROR

[INFO]
------------------------------------------------------------------------

[INFO] Error assembling EJB



[INFO]
------------------------------------------------------------------------

[INFO] Trace

org.apache.maven.lifecycle.LifecycleExecutionException: Error assembling
EJB

        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa

ultLifecycleExecutor.java:559)

        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi

fecycle(DefaultLifecycleExecutor.java:475)

        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau

ltLifecycleExecutor.java:454)

        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan

dleFailures(DefaultLifecycleExecutor.java:306)

        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen

ts(DefaultLifecycleExecutor.java:273)

        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi

fecycleExecutor.java:140)

        at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)

        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)

        at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:39)

        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:585)

        at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)

        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)

        at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)



        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

Caused by: org.apache.maven.plugin.MojoExecutionException: Error
assembling EJB

        at org.apache.maven.plugin.ejb.EjbMojo.execute(EjbMojo.java:180)

        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi

nManager.java:412)

        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa

ultLifecycleExecutor.java:534)

        ... 16 more

Caused by: java.lang.NullPointerException

        at
com.trend.iwss.jscan.appscan.runtime.PolicyRuntime.getB64StrProp(Poli

cyRuntime.java:188)

        at
com.trend.iwss.jscan.appscan.runtime.PolicyRuntime.<init>(PolicyRunti

me.java:91)

        at
com.trend.iwss.jscan.appscan.runtime.FileIOPolicyRuntime.<init>(FileI

OPolicyRuntime.java:159)

        at
com.trend.iwss.jscan.appscan.runtime.FileIOPolicyRuntime$Factory.make

(FileIOPolicyRuntime.java:449)

        at
com.trend.iwss.jscan.appscan.runtime.PolicyRuntime.accessInstance(Pol

icyRuntime.java:225)

        at
com.trend.iwss.jscan.appscan.runtime.PolicyRuntime.preFilter(PolicyRu

ntime.java:127)

        at
com.trend.iwss.jscan.appscan.runtime.FileIOPolicyRuntime.preFilter(Fi

leIOPolicyRuntime.java:166)

        at
org.apache.maven.archiver.MavenArchiver.writeExportReadyPom(MavenArch

iver.java:346)

        at
org.apache.maven.archiver.MavenArchiver.createArchive(MavenArchiver.j

ava:243)

        at org.apache.maven.plugin.ejb.EjbMojo.execute(EjbMojo.java:151)

        ... 18 more

[INFO]
------------------------------------------------------------------------

[INFO] Total time: 48 seconds

[INFO] Finished at: Thu Jan 18 10:03:20 GMT+05:30 2007

[INFO] Final Memory: 5M/19M

[INFO]
------------------------------------------------------------------------





pom.xml



<project xmlns="http://maven.apache.org/POM/4.0.0";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";

  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd";>

  <parent>

    <groupId>pnv-rc</groupId>

    <artifactId>pnv</artifactId>

    <version>1.0</version>

  </parent>



  <modelVersion>4.0.0</modelVersion>

   <groupId>pnv-rc</groupId>

   <artifactId>edsejb</artifactId>

   <packaging>ejb</packaging>

   <version>rc</version>

   <name>eds ejb module</name>

   <url>http://maven.apache.org</url>



   <description> EJB Classes for PNV</description>

   <dependencies>



           <dependency>

           <groupId>db2java</groupId>

                        <artifactId>db2java</artifactId>

                        <version>1.2</version>

                        <type>jar</type>

                        <scope>provided</scope>

           </dependency>

           <dependency>

                    <groupId>drools</groupId>

                    <artifactId>drools</artifactId>

                    <version>2.0-beta-11</version>

                    <type>jar</type>

                    <scope>provided</scope>

           </dependency>

           <dependency>

                    <groupId>commons-betwixt</groupId>

                    <artifactId>commons-betwixt</artifactId>

                    <version>1.0-alpha-1</version>

                    <type>jar</type>

                    <scope>provided</scope>

           </dependency>

           <dependency>

                    <groupId>commons-digester</groupId>

                    <artifactId>commons-digester</artifactId>

                    <version>1.5</version>

                    <type>jar</type>

                    <scope>provided</scope>

           </dependency>

           <dependency>

                    <groupId>commons-discovery</groupId>

                    <artifactId>commons-discovery</artifactId>

                    <version>20030211.213356</version>

                    <type>jar</type>

                    <scope>provided</scope>

           </dependency>

           <dependency>

                    <groupId>commons-jelly</groupId>

                    <artifactId>commons-jelly</artifactId>

                    <version>20030609.133047</version>

                    <type>jar</type>

                    <scope>provided</scope>

           </dependency>

           <dependency>

                    <groupId>commons-jexl</groupId>

                    <artifactId>commons-jexl</artifactId>

                    <version>1.0-beta-2</version>

                    <type>jar</type>

                    <scope>provided</scope>

           </dependency>

           <dependency>

                    <groupId>commons-logging</groupId>

                    <artifactId>commons-logging</artifactId>

                    <version>1.0.3</version>

                    <type>jar</type>

                    <scope>provided</scope>

           </dependency>

           <dependency>

                    <groupId>commons-net</groupId>

                    <artifactId>commons-net</artifactId>

                    <version>1.0.1</version>

                    <type>jar</type>

                    <scope>provided</scope>

           </dependency>

           <dependency>

                    <groupId>jaxrpc</groupId>

                    <artifactId>jaxrpc</artifactId>

                    <version>1.0</version>

                    <type>jar</type>

                    <scope>provided</scope>

           </dependency>

           <dependency>

                    <groupId>jython</groupId>

                    <artifactId>jython</artifactId>

                    <version>20020827-no-oro</version>

                    <type>jar</type>

                    <scope>provided</scope>

           </dependency>

          <dependency>

                    <groupId>log4j</groupId>

                    <artifactId>log4j</artifactId>

                    <version>1.2.8</version>

                    <type>jar</type>

                    <scope>provided</scope>

           </dependency>

           <dependency>

                    <groupId>saaj</groupId>

                    <artifactId>saaj</artifactId>

                    <version>1.0</version>

                    <scope>provided</scope>

                    <type>jar</type>

           </dependency>

           <dependency>

                    <groupId>soap</groupId>

                    <artifactId>soap</artifactId>

                    <version>2.3.1</version>

                    <scope>provided</scope>

                    <type>jar</type>

           </dependency>

           <dependency>

                    <groupId>struts</groupId>

                    <artifactId>struts</artifactId>

                    <version>1.1</version>

                    <scope>provided</scope>

                    <type>jar</type>

           </dependency>

           <dependency>

                    <groupId>xerces</groupId>

                    <artifactId>xerces</artifactId>

                    <version>2.3.0</version>

                    <scope>provided</scope>

                    <type>jar</type>

           </dependency>

           <dependency>

                    <groupId>xml-apis</groupId>

                    <artifactId>xml-apis</artifactId>

                    <version>2.0.2</version>

                    <scope>provided</scope>

                    <type>jar</type>

           </dependency>

        </dependencies>



    <build>

        <sourceDirectory>${basedir}/src/java</sourceDirectory>

            <outputDirectory>target\classes</outputDirectory>


<testSourceDirectory>${basedir}/src/test</testSourceDirectory>

        <testOutputDirectory>target/classes</testOutputDirectory>



            <resources>

                  <resource>

                    <directory>src/resources</directory>

                  </resource>

                  <resource>

                    <directory>src</directory>

                    <includes>

                        <include>**/*.properties</include>

                        <include>**/*.xml</include>

                        <include>**/*.xmi</include>

                        <include>**/*.qab</include>

                    </includes>

                  </resource>

            </resources>

            <testResources>

                 <testResource>

                                <directory>src/test</directory>

                  </testResource>

                        <testResource>

                                <directory>src/test</directory>

                                <includes>

                                    <include>**/*.properties</include>

                                </includes>

                        </testResource>

       </testResources>

    </build>

</project>





Thanks and Regards

Alok Jindal



**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended
solely for the use of the addressee(s). If you are not the intended
recipient, please notify the sender by e-mail and delete the original
message. Further, you are not to copy, disclose, or distribute this e-mail
or its contents to any other person and any such actions are unlawful. This
e-mail may contain viruses. Infosys has taken every reasonable precaution to
minimize this risk, but is not liable for any damage you may sustain as a
result of any virus in this e-mail. You should carry out your own virus
checks before opening the e-mail or attachment. Infosys reserves the right
to monitor and review the content of all messages sent to or from this
e-mail address. Messages sent to or from this e-mail address may be stored
on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***




--
-- Lee Meador
Sent from gmail. My real email address is lee AT leemeador.com

Reply via email to