Are you expecting this to run as part of the default packaging phase?

If so, I believe you are missing an <executions> section for the assembly 
plugin that binds the 'single' goal to the packaging phase.

<project>
  [...]
  <build>
    [...]
    <plugins>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.2.1</version>
        <configuration>
          <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
          </descriptorRefs>
        </configuration>
        <executions>
          <execution>
            <id>make-assembly</id> <!-- this is used for inheritance 
merges -->
            <phase>package</phase> <!-- bind to the packaging phase -->
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      [...]
</project>


See the "Execution: Building An Assembly" section of this page 
http://maven.apache.org/plugins/maven-assembly-plugin/usage.html


Tim McGinnis
717 720-1962
Web Development
AES/PHEAA



From:
Chris24300 <chris24...@hotmail.com>
To:
users@maven.apache.org
Date:
04/20/2011 08:25 AM
Subject:
Re: Packaged jar cannot access class of a dependency??



Thanks for replying with the link, I've already included the main class in 
my
pom

Majority of my pom

<build>
                                 <finalName>Db4oServer</finalName>

                                 <plugins>
                                                 <plugin>
 <artifactId>maven-compiler-plugin</artifactId>
 <configuration>
  <source>1.5</source>
  <target>1.5</target>
 </configuration>
                                                 </plugin>

                                                 <plugin>
 <groupId>org.apache.maven.plugins</groupId>
 <artifactId>maven-jar-plugin</artifactId>
 <configuration>
  <archive>
                 <manifest>
  <mainClass>${groupId}.TestClient</mainClass>
                                 <packageName>${groupId}</packageName>
                 </manifest>
                 <manifestEntries>
                                 <mode>development</mode>
                                 <url>${pom.url}</url>
                 </manifestEntries>
  </archive>
 </configuration>
                                                 </plugin>
                                                 <plugin>
 <artifactId>maven-assembly-plugin</artifactId>
 <configuration>
  <archive>
                 <manifest>
  <mainClass>${groupId}.TestClient</mainClass>
                 </manifest>
  </archive>
  <descriptorRefs>
                 <descriptorRef>jar-with-dependencies</descriptorRef>
  </descriptorRefs>
 </configuration>
                                                 </plugin>

                                 </plugins>
                 </build>

--
View this message in context: 
http://maven.40175.n5.nabble.com/Packaged-jar-cannot-access-class-of-a-dependency-tp4315587p4315651.html

Sent from the Maven - Users mailing list archive at Nabble.com.

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





==============================================================================
This message contains privileged and confidential information intended for the 
above addressees only.  If you
receive this message in error please delete or destroy this message and/or 
attachments.  

The sender of this message will fully cooperate in the civil and criminal 
prosecution of any individual engaging
in the unauthorized use of this message.
==============================================================================

Reply via email to