[ 
https://issues.apache.org/jira/browse/YETUS-823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16807837#comment-16807837
 ] 

Allen Wittenauer commented on YETUS-823:
----------------------------------------

This is interesting.  Your example, with a bit of massaging, doesn't work 
because maven isn't taking the project information when called on the command 
line like that.  Here's the massaged pom:

{code}
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd";>
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.apache.hbase</groupId>
    <artifactId>create-release</artifactId>
    <version>1.0.0-SNAPSHOT</version>

  <pluginRepositories>
    <pluginRepository>
      <id>apache.snapshots</id>
      <name>Apache Development Snapshot Repository</name>
      <url>https://repository.apache.org/content/repositories/snapshots/</url>
      <releases>
          <enabled>false</enabled>
      </releases>
      <snapshots>
          <enabled>true</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>

    <build>
      <plugins>
        <plugin>
          <groupId>org.apache.yetus</groupId>
          <artifactId>yetus-maven-plugin</artifactId>
          <version>0.10.0-SNAPSHOT</version>
          <executions>
            <execution>
              <goals>
                <goal>releasedocmaker</goal>
              </goals>
              <configuration>
                <projects>
                  <project>HBASE</project>
                </projects>
                <sortOrder>newer</sortOrder>
                <skipCredits>true</skipCredits>
                <license>true</license>
                <fileVersions>true</fileVersions>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </build>
</project>
{code}

Key differences are making the project version something closer to what HBase 
actually has in JIRA, enabling the snapshot repo, changing to yetus 0.10.0 
snapshot, and putting hbase into an array.

Running (with the custom maven repo to force a fresh download):
 
{code}
mvn org.apache.yetus:yetus-maven-plugin:0.10.0-SNAPSHOT:releasedocmaker 
-Dmaven.repo.local=/tmp/repo1
{code}

fails. But if I run:

{code}
mvn pre-site -f pom.xml -Dmaven.repo.local=/tmp/repo2
{code}

content is generated in target/generated-site-markdown as expected. (pre-site 
is the default phase for releasedocmaker)

Running both with -X  reveals that in the first run, the project gets set to 
${project.name} which ends up being the same as the artifactid. Since maven is 
providing bad data, there is nothing for the plugin to do here: garbage in, 
garbage out. Playing around with the other array'd field (versions), shows the 
same thing.  Thus explaining the weird behavior when I first started looking 
into this problem.

I do know that maven doesn't have a way to set arrays from the command line.  
So I wonder if this is related to that missing feature.  In any case, the 
plugin with this patch is working, but clearly needs another pass on 
documentation.  I'll open a new JIRA to handle that.



> releasedocmaker-jar-with-dependencies is missing dependencies
> -------------------------------------------------------------
>
>                 Key: YETUS-823
>                 URL: https://issues.apache.org/jira/browse/YETUS-823
>             Project: Yetus
>          Issue Type: Bug
>          Components: yetus-maven-plugin
>    Affects Versions: 0.9.0
>            Reporter: stack
>            Assignee: Allen Wittenauer
>            Priority: Blocker
>             Fix For: 0.10.0
>
>         Attachments: YETUS-823.00.patch, YETUS-823.addendum.00.patch
>
>
> I was trying to use the fancy new plugin but got stuck. Seems like I need to 
> specify a different jar, one w/ dependencies (the jython jars referred to in 
> doc?).
> Below are error and the pom I have. Not critical. Just messing. Thanks.
> {code}
> $ mvn org.apache.yetus:yetus-maven-plugin:0.9.0:releasedocmaker -f pom.xml
> [INFO] Scanning for projects...
> Downloading from central: 
> https://repo.maven.apache.org/maven2/org/apache/yetus/yetus-maven-plugin/0.9.0/yetus-maven-plugin-0.9.0.pom
> Downloaded from central: 
> https://repo.maven.apache.org/maven2/org/apache/yetus/yetus-maven-plugin/0.9.0/yetus-maven-plugin-0.9.0.pom
>  (4.8 kB at 10 kB/s)
> Downloading from central: 
> https://repo.maven.apache.org/maven2/org/apache/yetus/yetus-project/0.9.0/yetus-project-0.9.0.pom
> Downloaded from central: 
> https://repo.maven.apache.org/maven2/org/apache/yetus/yetus-project/0.9.0/yetus-project-0.9.0.pom
>  (12 kB at 119 kB/s)
> Downloading from central: 
> https://repo.maven.apache.org/maven2/org/apache/yetus/yetus-maven-plugin/0.9.0/yetus-maven-plugin-0.9.0.jar
> Downloaded from central: 
> https://repo.maven.apache.org/maven2/org/apache/yetus/yetus-maven-plugin/0.9.0/yetus-maven-plugin-0.9.0.jar
>  (36 kB at 275 kB/s)
> [INFO]
> [INFO] ------------------< org.apache.hbase:create-release 
> >-------------------
> [INFO] Building create-release 1.0-SNAPSHOT
> [INFO] --------------------------------[ jar 
> ]---------------------------------
> [INFO]
> [INFO] --- yetus-maven-plugin:0.9.0:releasedocmaker (default-cli) @ 
> create-release ---
> Downloading from central: 
> https://repo.maven.apache.org/maven2/org/apache/yetus/audience-annotations/0.9.0/audience-annotations-0.9.0.pom
> Downloaded from central: 
> https://repo.maven.apache.org/maven2/org/apache/yetus/audience-annotations/0.9.0/audience-annotations-0.9.0.pom
>  (3.1 kB at 34 kB/s)
> [WARNING] The POM for org.apache.yetus:audience-annotations:jar:0.9.0 is 
> invalid, transitive dependencies (if any) will not be available, enable debug 
> logging for more details
> Downloading from central: 
> https://repo.maven.apache.org/maven2/org/apache/yetus/releasedocmaker/0.9.0/releasedocmaker-0.9.0.pom
> [WARNING] The POM for 
> org.apache.yetus:releasedocmaker:jar:jar-with-dependencies:0.9.0 is missing, 
> no dependency information available
> Downloading from central: 
> https://repo.maven.apache.org/maven2/org/apache/yetus/audience-annotations/0.9.0/audience-annotations-0.9.0.jar
> Downloading from central: 
> https://repo.maven.apache.org/maven2/org/apache/yetus/releasedocmaker/0.9.0/releasedocmaker-0.9.0-jar-with-dependencies.jar
> Downloaded from central: 
> https://repo.maven.apache.org/maven2/org/apache/yetus/audience-annotations/0.9.0/audience-annotations-0.9.0.jar
>  (21 kB at 124 kB/s)
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time:  1.785 s
> [INFO] Finished at: 2019-03-20T23:22:06-07:00
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal 
> org.apache.yetus:yetus-maven-plugin:0.9.0:releasedocmaker (default-cli) on 
> project create-release: Execution default-cli of goal 
> org.apache.yetus:yetus-maven-plugin:0.9.0:releasedocmaker failed: Plugin 
> org.apache.yetus:yetus-maven-plugin:0.9.0 or one of its dependencies could 
> not be resolved: Could not find artifact 
> org.apache.yetus:releasedocmaker:jar:jar-with-dependencies:0.9.0 in central 
> (https://repo.maven.apache.org/maven2) -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
> [ERROR] [Help 1] 
> http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
> {code}
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <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/xsd/maven-4.0.0.xsd";>
>     <modelVersion>4.0.0</modelVersion>
>     <groupId>org.apache.hbase</groupId>
>     <artifactId>create-release</artifactId>
>     <version>1.0-SNAPSHOT</version>
>     <build>
>       <plugins>
>         <plugin>
>           <groupId>org.apache.yetus</groupId>
>           <artifactId>yetus-maven-plugin</artifactId>
>           <version>0.9.0</version>
>           <executions>
>             <execution>
>               <goals>
>                 <goal>releasedocmaker</goal>
>               </goals>
>               <configuration>
>                 <project>HBASE</project>
>                 <sortOrder>newer</sortOrder>
>                 <skipCredits>true</skipCredits>
>                 <license>true</license>
>                 <fileVersions>true</fileVersions>
>               </configuration>
>             </execution>
>           </executions>
>         </plugin>
>       </plugins>
>     </build>
> </project>
> {code}



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

Reply via email to