maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vanja Petreski" <vpetre...@gmail.com>
Subject Multi module project and maven-assembly-plugin
Date Mon, 20 Aug 2007 08:44:35 GMT
Hello,

I have problem with attached goal.

Parent POM:

<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">

  <modelVersion>4.0.0</modelVersion>

  <groupId>com.antegra.aims</groupId>
  <artifactId>aims-bot</artifactId>
  <packaging>pom</packaging>
  <version>0.1.0-alpha-SNAPSHOT</version>
  <name>aims-bot</name>
  <url>http://www.antegra.com</url>
  <description>AIMS Bot Library</description>

  <properties>
    <aimsBotVersion>0.1.0-alpha-SNAPSHOT</aimsBotVersion>
  </properties>

  <build>
    <plugins>

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

      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <configuration>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
            <descriptorSourceDirectory>
                src/main/assembly
            </descriptorSourceDirectory>
        </configuration>

        <executions>
          <execution>
            <id>lib-release</id>
            <phase>package</phase>
            <goals>
              <goal>attached</goal>
            </goals>
          </execution>
        </executions>

      </plugin>
    </plugins>
  </build>

  <modules>
      <module>aims-bot-api</module>
      <module>aims-bot-core</module>
  </modules>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.antegra.aims</groupId>
        <artifactId>aims-bot-api</artifactId>
        <version>${aimsBotVersion}</version>
      </dependency>
      <dependency>
        <groupId>com.antegra.aims</groupId>
        <artifactId>aims-bot-core</artifactId>
        <version>${aimsBotVersion}</version>
      </dependency>
      <dependency>
        <groupId>jivesoftware</groupId>
        <artifactId>smack</artifactId>
        <version>3.0.4</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>

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

When I fire mvn package, the following error occurs:

[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   aims-bot
[INFO]   aims-bot-api
[INFO]   aims-bot-core
[INFO]
----------------------------------------------------------------------------
[INFO] Building aims-bot
[INFO]    task-segment: [package]
[INFO]
----------------------------------------------------------------------------
[INFO] [site:attach-descriptor]
[INFO] [assembly:attached {execution: lib-release}]
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failed to create assembly: Artifact:
com.antegra.aims:aims-bot-api:jar:0.1.0-alpha-SNAPSHOT (included by module)
does not have an artifact with a file. Please ensure the package phase is
run before the assembly is generated.

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

If I dont bind attached goal to the package phase and fire mvn clean package
assembly:assembly, everything is ok.

What is the problem?

Thanx,
Vanja

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message