Kenney Westerhof wrote:
On Tue, 19 Apr 2005, Ilyevsky, Leonid (Equity Trading) wrote:


use this:

    <build>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <addClasspath>true</addClasspath>
            </manifest>
          </archive>
        </configuration>
      </plugin>
    </build>

But beware, only dependencies with <scope>runtime</scope> get included
in the classpath.


When I want to do this I get this:

rg.apache.maven.reactor.ReactorException: Error processing projects for the reactor:
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:117)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:233)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:303)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:243)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:416)
at org.codehaus.classworlds.Launcher.main(Launcher.java:363)
Caused by: org.apache.maven.project.ProjectBuildingException: Error while reading model from file '/Users/pieterlaeremans/eclipse/workspace/vitessa/pom.xml'.
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:470)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFile(DefaultMavenProjectBuilder.java:124)
at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:117)
at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:266)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:170)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:102)
... 9 more
Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: TEXT must be immediately followed by END_TAG and not START_TAG (position: START_TAG seen ...<plugin>\n <groupId>... @21:16)
at org.codehaus.plexus.util.xml.pull.MXParser.nextText(MXParser.java:1059)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseBuild(MavenXpp3Reader.java:175)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseModel(MavenXpp3Reader.java:886)
at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read(MavenXpp3Reader.java:1660)
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:461)
... 14 more




Here is my config section:


<project> ... <build> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> <manifest> <addClasspath>true</addClasspath> </manifest> </archive> </configuration> </plugin> <sourceDirectory>src/main/java</sourceDirectory> <resources> <resource> <directory>src/main/resources</directory> </resource> </resources> </build>

</project>


When I omit the <plugin> </plugin> section the build works ok.

Any explanation ? I use: maven version: 2.0-alpha-1

kind regards,

thx in advance.

Pieter



Greetings,

        Kenney Westerhof


As my dependency list grows, I would like maven 2 to automatically
generage class path in the manifest from dependency information.
How should I specify it in pom.xml?
--------------------------------------------------------

If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Click here for important additional terms relating to this 
e-mail.     http://www.ml.com/email_terms/
--------------------------------------------------------



--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key


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



Reply via email to