You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Andres Almiray (JIRA)" <ji...@apache.org> on 2018/07/27 07:52:00 UTC

[jira] [Updated] (MJDEPS-16) Include project dependencies in scan

     [ https://issues.apache.org/jira/browse/MJDEPS-16?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andres Almiray updated MJDEPS-16:
---------------------------------
    Description: 
 

Version 3.1.1 executes jdeps on production (goal: jdkinternals) and test (goal: test-jdkinternals) sources but does not consider dependencies. This means the report will tell you if product sources are complaint or not but does not tell you if the packaged/deployed project would encounter problems or not.

At the very least Compile/Runtime dependencies should be scanned. Please make this the default behavior. Perhaps it would be good to have a flag to skip this behavior if anyone would like to have the previous behavior.

For reference, this issue was discussed with Robert Scholte during JCrete 2018.

*Minimum POM example:*
{code:java}
<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.acme</groupId>
    <artifactId>sample</artifactId>
    <packaging>jar</packaging>
    <version>0.0.0-SNAPSHOT</version>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jdeps-plugin</artifactId>
                <version>3.1.1</version>
                <executions>
                  <execution>
                    <goals>
                      <goal>jdkinternals</goal>
                    </goals>
                  </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
            <version>4.2.0</version>
        </dependency>        
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>25.1-jre</version>
        </dependency>
    </dependencies>
</project>   
{code}
Output
{code:java}
$ mvn jdeps:jdkinternals
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------------< com.acme:sample >---------------------------
[INFO] Building sample 0.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-jdeps-plugin:3.1.1:jdkinternals (default-cli) @ sample ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.506 s
[INFO] Finished at: 2018-07-27T09:50:39+02:00
[INFO] ------------------------------------------------------------------------
{code}

  was:
 

Version 3.1.1 executes jdeps on production (goal: jdkinternals) and test (goal: test-jdkinternals) sources but does not consider dependencies. This means the report will tell you if product sources are complaint or not but does not tell you if the packaged/deployed project would encounter problems or not.

At the very least Compile/Runtime dependencies should be scanned. Please make this the default behavior. Perhaps it would be good to have a flag to skip this behavior if anyone would like to have the previous behavior.

For reference, this issue was discussed with Robert Scholte during JCrete 2018.

*Minimum POM example:*
{code:java}
<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.acme</groupId>
    <artifactId>sample</artifactId>
    <packaging>jar</packaging>
    <version>0.0.0-SNAPSHOT</version>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jdeps-plugin</artifactId>
                <version>3.1.1</version>
                <executions>
                  <execution>
                    <goals>
                      <goal>jdkinternals</goal>
                    </goals>
                  </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
            <version>4.2.0</version>
        </dependency>
    </dependencies>
</project>   
{code}


> Include project dependencies in scan
> ------------------------------------
>
>                 Key: MJDEPS-16
>                 URL: https://issues.apache.org/jira/browse/MJDEPS-16
>             Project: Maven JDeps Plugin
>          Issue Type: New Feature
>    Affects Versions: 3.1.1
>         Environment: Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T20:49:05+01:00)
> Maven home: /Users/aalmiray/.sdkman/candidates/maven/current
> Java version: 1.8.0_171, vendor: Oracle Corporation
> Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/jre
> Default locale: en_CH, platform encoding: UTF-8
> OS name: "mac os x", version: "10.12.5", arch: "x86_64", family: "mac"
>            Reporter: Andres Almiray
>            Priority: Major
>
>  
> Version 3.1.1 executes jdeps on production (goal: jdkinternals) and test (goal: test-jdkinternals) sources but does not consider dependencies. This means the report will tell you if product sources are complaint or not but does not tell you if the packaged/deployed project would encounter problems or not.
> At the very least Compile/Runtime dependencies should be scanned. Please make this the default behavior. Perhaps it would be good to have a flag to skip this behavior if anyone would like to have the previous behavior.
> For reference, this issue was discussed with Robert Scholte during JCrete 2018.
> *Minimum POM example:*
> {code:java}
> <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.acme</groupId>
>     <artifactId>sample</artifactId>
>     <packaging>jar</packaging>
>     <version>0.0.0-SNAPSHOT</version>
>     <build>
>         <plugins>
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-jdeps-plugin</artifactId>
>                 <version>3.1.1</version>
>                 <executions>
>                   <execution>
>                     <goals>
>                       <goal>jdkinternals</goal>
>                     </goals>
>                   </execution>
>                 </executions>
>             </plugin>
>         </plugins>
>     </build>
>     <dependencies>
>         <dependency>
>             <groupId>com.google.inject</groupId>
>             <artifactId>guice</artifactId>
>             <version>4.2.0</version>
>         </dependency>        
>         <dependency>
>             <groupId>com.google.guava</groupId>
>             <artifactId>guava</artifactId>
>             <version>25.1-jre</version>
>         </dependency>
>     </dependencies>
> </project>   
> {code}
> Output
> {code:java}
> $ mvn jdeps:jdkinternals
> [INFO] Scanning for projects...
> [INFO]
> [INFO] --------------------------< com.acme:sample >---------------------------
> [INFO] Building sample 0.0.0-SNAPSHOT
> [INFO] --------------------------------[ jar ]---------------------------------
> [INFO]
> [INFO] --- maven-jdeps-plugin:3.1.1:jdkinternals (default-cli) @ sample ---
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 0.506 s
> [INFO] Finished at: 2018-07-27T09:50:39+02:00
> [INFO] ------------------------------------------------------------------------
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)