Problem with site phase in ASP projects

Jan 7, 2010 at 4:30 PM

Hello everybody,

we would like to know if someone can help us with a problem we’re having when launching “mvn site” with ASP projects.

We've been trying to build and get some metrics reports with NPanday against two projects (hosted here in CodePlex: iTracker and Boleto.Net). We are not working with the Visual Studio addin, as we are trying to integrate it into an automated framework we're developing.

We are able to build all dependencies and generate the compiled web site. It works perfectly.

But, while with "exe" or "library" projects the site and reports are generated correctly, we're getting an error when we launch "mvn site" with ASP projects..

For example, with iTracker we get the next error:

 

 

C:\work\dfs.ITracker\dfs.ITracker>mvn site

[INFO] Scanning for projects...

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

[INFO] Building Unnamed - ITracker:dfs.ITracker:asp:1.0

[INFO]    task-segment: [site]

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

Downloading: http://repo1.maven.org/maven2/ITracker/dfs.ITracker.Data/1.0/dfs.ITracker.Data-1.0.library

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

[ERROR] BUILD ERROR

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

[INFO] Failed to resolve artifact.

 

Missing:

----------

1) ITracker:dfs.ITracker.Data:library:1.0

 

  Try downloading the file manually from the project website.

 

  Then, install it using the command:

      mvn install:install-file -DgroupId=ITracker -DartifactId=dfs.ITracker.Data -Dversion=1.0 -Dpackaging=library

-Dfile=/path/to/file

 

  Alternatively, if you host your own repository you can deploy the file there:

      mvn deploy:deploy-file -DgroupId=ITracker -DartifactId=dfs.ITracker.Data -Dversion=1.0 -Dpackaging=library -D

file=/path/to/file -Durl=[url] -DrepositoryId=[id]

 

  Path to dependency:

        1) ITracker:dfs.ITracker:asp:1.0

        2) ITracker:dfs.ITracker.Data:library:1.0

 

----------

1 required artifact is missing.

 

for artifact:

  ITracker:dfs.ITracker:asp:1.0

 

from the specified remote repositories:

  central (http://repo1.maven.org/maven2)

 

 

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

[INFO] For more information, run Maven with the -e switch

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

[INFO] Total time: 4 seconds

[INFO] Finished at: Wed Dec 23 17:34:42 CET 2009

[INFO] Final Memory: 15M/508M

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

 

 

Looks like before executing the site:site goal, it is trying to download the dependency "ITracker/dfs.ITracker.Data/1.0/dfs.ITracker.Data-1.0.library" instead of "ITracker/dfs.ITracker.Data/1.0/dfs.ITracker.Data-1.0.dll", which is correctly installed in the local repository.

We think that the type of the dependency specified in the POM is not being translated correctly from "library" to "dll", as we've noticed that when we change the type of the dependency to "dll" the site builds correctly (though it wouldn’t work when compiling or installing the application).

Another thing we noticed is that the site builds correctly if the project doesn’t have dependencies.

A fragment of the POM defined for this project is the following:

 

<project 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>ITracker</groupId>

  <artifactId>dfs.ITracker</artifactId>

  <version>1.0</version>

  <packaging>asp</packaging>

  <dependencies>

    <dependency>

      <groupId>ITracker</groupId>

      <artifactId>dfs.ITracker.Data</artifactId>

      <version>1.0</version>

      <type>library</type>

    </dependency>

    <dependency>

      <groupId>ITracker</groupId>

      <artifactId>dfs.ITracker.Business</artifactId>

      <version>1.0</version>

      <type>library</type>

    </dependency>

  </dependencies>

  <build>

    <sourceDirectory>${basedir}</sourceDirectory>

   <plugins>

      <plugin>

        <groupId>npanday.plugin</groupId>

        <artifactId>maven-aspx-plugin</artifactId>

        <extensions>true</extensions>

        <configuration>

            <frameworkVersion>3.5</frameworkVersion>

      </plugin>

      <plugin>

        <groupId>org.codehaus.mojo</groupId>

        <artifactId>exec-maven-plugin</artifactId>

        <executions>

          <execution>

            <id>ndepend</id>

            <phase>site</phase>

            <goals>

              <goal>exec</goal>

            </goals>

            <configuration>

              <executable>NDepend.Console.exe</executable>

              <arguments>

                <argument>${basedir}\${ndependProject}</argument>

              </arguments>

            </configuration>

          </execution>

        </executions>

      </plugin>

      <plugin>

        <groupId>org.apache.maven.plugins</groupId>

        <artifactId>maven-antrun-plugin</artifactId>

        <executions>

          <execution>

            <id>Simian_execution</id>

            <phase>site</phase>

            <goals>

              <goal>run</goal>

            </goals>

          </execution>

        </executions>

      </plugin>

    </plugins>

  </build>

</project>

 

 

This same issue happens with the other ASP project we've tried.

We would like to know if anybody else has this problem, if it is a bug or if it is something we're doing wrong.

Thanks, regards and sorry for the long post!

Developer
Jan 8, 2010 at 3:46 PM

Sounds like a possible bug... can you please open an issue and attach a simple project that demonstrates the problem?

(Or if you're willing to dive into the integration tests, one of those would be even more useful!)

Thanks, 
Wendy