maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Herve Boutemy (JIRA)" <j...@codehaus.org>
Subject [jira] (MDEP-122) Analyze target does not work correctly when only using a constant defined in a different module
Date Thu, 18 Oct 2012 06:30:36 GMT

     [ https://jira.codehaus.org/browse/MDEP-122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Herve Boutemy updated MDEP-122:
-------------------------------

    Description: 
I have 2 projects as seen in the attached files.
My first project contains a single interface that defines a String constant.
My second project, uses the String constant from my first project.

When i try to use dependency:analyze to fail the build as seen below, i can't make the system
work.

If i add the dependency from project 2 to project 1, i get:
{noformat}[INFO] [dependency:analyze {execution: analyze}]
[INFO] Used declared dependencies:
[INFO]    None
[INFO] Used undeclared dependencies:
[WARNING]    None
[INFO] Unused declared dependencies:
[INFO]    test:project1:jar: 1.0-SNAPSHOT:compile
[WARNING] Potential problems discovered.{noformat}


But if i remove it, i get:
If i remove the supposedly unused dependency, then I get a compile error:
{noformat}[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
C:\ASSIA\development\maven_bug\project2\src\main\java\project2\NamesUser.java:[6
,24] package project1 does not exist{noformat}


Here is the build definition i have...
{code:xml}    <build>
    <plugins>
     <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>analyze</id>
            <phase>package</phase>
            <goals>
              <goal>analyze</goal>
            </goals>
            <configuration>
                <failBuild>true</failBuild>
                <ignoreDirect>false</ignoreDirect>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>{code}

  was:
I have 2 projects as seen in the attached files.
My first project contains a single interface that defines a String constant.
My second project, uses the String constant from my first project.

When i try to use dependency:analyze to fail the build as seen below, i can't make the system
work.

If i add the dependency from project 2 to project 1, i get:
[INFO] [dependency:analyze {execution: analyze}]
[INFO] Used declared dependencies:
[INFO]    None
[INFO] Used undeclared dependencies:
[WARNING]    None
[INFO] Unused declared dependencies:
[INFO]    test:project1:jar: 1.0-SNAPSHOT:compile
[WARNING] Potential problems discovered.


But if i remove it, i get:
If i remove the supposedly unused dependency, then I get a compile error:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
C:\ASSIA\development\maven_bug\project2\src\main\java\project2\NamesUser.java:[6
,24] package project1 does not exist


Here is the build definition i have...
    <build>
    <plugins>
     <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>analyze</id>
            <phase>package</phase>
            <goals>
              <goal>analyze</goal>
            </goals>
            <configuration>
                <failBuild>true</failBuild>
                <ignoreDirect>false</ignoreDirect>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>





    
> Analyze target does not work correctly when only using a constant defined in a different
module
> -----------------------------------------------------------------------------------------------
>
>                 Key: MDEP-122
>                 URL: https://jira.codehaus.org/browse/MDEP-122
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0-alpha-4
>         Environment: Windows.
> Maven 2.0.6
> Java 1.5 compiler
>            Reporter: Iker Almandoz
>            Assignee: Brian Fox
>            Priority: Minor
>         Attachments: analyze.zip, maven_bug.zip
>
>
> I have 2 projects as seen in the attached files.
> My first project contains a single interface that defines a String constant.
> My second project, uses the String constant from my first project.
> When i try to use dependency:analyze to fail the build as seen below, i can't make the
system work.
> If i add the dependency from project 2 to project 1, i get:
> {noformat}[INFO] [dependency:analyze {execution: analyze}]
> [INFO] Used declared dependencies:
> [INFO]    None
> [INFO] Used undeclared dependencies:
> [WARNING]    None
> [INFO] Unused declared dependencies:
> [INFO]    test:project1:jar: 1.0-SNAPSHOT:compile
> [WARNING] Potential problems discovered.{noformat}
> But if i remove it, i get:
> If i remove the supposedly unused dependency, then I get a compile error:
> {noformat}[INFO] ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Compilation failure
> C:\ASSIA\development\maven_bug\project2\src\main\java\project2\NamesUser.java:[6
> ,24] package project1 does not exist{noformat}
> Here is the build definition i have...
> {code:xml}    <build>
>     <plugins>
>      <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-dependency-plugin</artifactId>
>         <executions>
>           <execution>
>             <id>analyze</id>
>             <phase>package</phase>
>             <goals>
>               <goal>analyze</goal>
>             </goals>
>             <configuration>
>                 <failBuild>true</failBuild>
>                 <ignoreDirect>false</ignoreDirect>
>             </configuration>
>           </execution>
>         </executions>
>       </plugin>
>     </plugins>
>   </build>{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message