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

ASF GitHub Bot commented on METRON-777:
---------------------------------------

Github user mmiklavc commented on the issue:

    https://github.com/apache/metron/pull/530
  
    I think I've figured out what's going on with the plugin versions. I was 
under the impression that Maven updated its local metadata on at least a daily 
basis. It would appear that this is not true. I cleaned the archetype libs from 
my local repo multiple times and ran the generate command with subsequent 
output:
    ```
    mvn archetype:generate -DarchetypeCatalog=local
    [INFO] Scanning for projects...
    Downloading: 
https://repo.maven.apache.org/maven2/org/apache/maven/archetype/maven-archetype/2.4/maven-archetype-2.4.pom
    Downloaded: 
https://repo.maven.apache.org/maven2/org/apache/maven/archetype/maven-archetype/2.4/maven-archetype-2.4.pom
 (13 kB at 18 kB/s)
    [INFO]
    [INFO] 
------------------------------------------------------------------------
    [INFO] Building Maven Stub Project (No POM) 1
    [INFO] 
------------------------------------------------------------------------
    [INFO]
    [INFO] >>> maven-archetype-plugin:2.4:generate (default-cli) > 
generate-sources @ standalone-pom >>>
    [INFO]
    [INFO] <<< maven-archetype-plugin:2.4:generate (default-cli) < 
generate-sources @ standalone-pom <<<
    [INFO]
    [INFO]
    [INFO] --- maven-archetype-plugin:2.4:generate (default-cli) @ 
standalone-pom ---
    Downloading: 
https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-catalog/2.4/archetype-catalog-2.4.pom
    Downloaded: 
https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-catalog/2.4/archetype-catalog-2.4.pom
 (1.9 kB at 25 kB/s)
    Downloading: 
https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-models/2.4/archetype-models-2.4.pom
    Downloaded: 
https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-models/2.4/archetype-models-2.4.pom
 (2.8 kB at 35 kB/s)
    Downloading: 
https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-descriptor/2.4/archetype-descriptor-2.4.pom
    Downloaded: 
https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-descriptor/2.4/archetype-descriptor-2.4.pom
 (1.9 kB at 25 kB/s)
    Downloading: 
https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-registry/2.4/archetype-registry-2.4.pom
    Downloaded: 
https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-registry/2.4/archetype-registry-2.4.pom
 (1.9 kB at 25 kB/s)
    Downloading: 
https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-common/2.4/archetype-common-2.4.pom
    Downloaded: 
https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-common/2.4/archetype-common-2.4.pom
 (16 kB at 161 kB/s)
    Downloading: 
https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-catalog/2.4/archetype-catalog-2.4.jar
    Downloading: 
https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-descriptor/2.4/archetype-descriptor-2.4.jar
    Downloading: 
https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-registry/2.4/archetype-registry-2.4.jar
    Downloading: 
https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-common/2.4/archetype-common-2.4.jar
    Downloaded: 
https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-catalog/2.4/archetype-catalog-2.4.jar
 (19 kB at 214 kB/s)
    Downloaded: 
https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-registry/2.4/archetype-registry-2.4.jar
 (17 kB at 84 kB/s)
    Downloaded: 
https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-descriptor/2.4/archetype-descriptor-2.4.jar
 (23 kB at 113 kB/s)
    Downloaded: 
https://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-common/2.4/archetype-common-2.4.jar
 (173 kB at 584 kB/s)
    [INFO] Generating project in Interactive mode
    [INFO] No archetype defined. Using maven-archetype-quickstart 
(org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
    Choose archetype:
       Your filter doesn't match any archetype (hint: enter to return to 
initial list)
    Choose a number or apply filter (format: [groupId:]artifactId, case 
sensitive contains):
    ```
    No matter how many times I ran it, it would always return 2.4. Also, the 
Metron archetype wouldn't show up. I would run it in the full dev CentOS vm and 
get 3.0.1 every time. I thought it might be some MacPorts or ZShell weirdness, 
so I tried with Bash and still the same. Then I downloaded a fresh version of 
Maven and ran the binary directly - again, same result. Next, I ran the same 
command while adding the "-U" option for updating snapshots. Per the name, 
you'd think this would only affect snapshots, however here are the results.
    ```
    mvn archetype:generate -DarchetypeCatalog=local                             
                                                                               
<<<
    [INFO] Scanning for projects...
    [INFO]
    [INFO] 
------------------------------------------------------------------------
    [INFO] Building Maven Stub Project (No POM) 1
    [INFO] 
------------------------------------------------------------------------
    [INFO]
    [INFO] >>> maven-archetype-plugin:3.0.1:generate (default-cli) > 
generate-sources @ standalone-pom >>>
    [INFO]
    [INFO] <<< maven-archetype-plugin:3.0.1:generate (default-cli) < 
generate-sources @ standalone-pom <<<
    [INFO]
    [INFO]
    [INFO] --- maven-archetype-plugin:3.0.1:generate (default-cli) @ 
standalone-pom ---
    [INFO] Generating project in Interactive mode
    [INFO] No archetype defined. Using maven-archetype-quickstart 
(org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
    Choose archetype:
    1: local -> org.apache.metron:metron-maven-parser-extension-archetype 
(Apache Maven Parser Extension Archetype for Metron)
    Choose a number or apply filter (format: [groupId:]artifactId, case 
sensitive contains): :
    ```
    The plugin version now resolves to 3.0.1 and our Metron archetype now shows 
up as expected in the list.
    
    @ottobackwards per these findings, we should probably add a note in the 
docs when using the archetype plugin that tells users to pass the "-U" flag. 
Mismatched plugin versions (across the 3.x line) will invariably cause trouble 
due to the changes outlined in the following links:
    
    - 
https://lists.apache.org/thread.html/7f4d65fe71b412afd07eb82dc44aa5b65ba0125ddbc28ad279cd110b@%3Cdev.maven.apache.org%3E
    - https://issues.apache.org/jira/browse/ARCHETYPE-519
    - https://issues.apache.org/jira/browse/ARCHETYPE-438
    
    In summary, the Maven archetype plugin introduced some 
non-backwards-compatible changes in 3.0.0.


> Create a plugin system for Metron based on 'NAR'
> ------------------------------------------------
>
>                 Key: METRON-777
>                 URL: https://issues.apache.org/jira/browse/METRON-777
>             Project: Metron
>          Issue Type: New Feature
>            Reporter: Otto Fowler
>            Assignee: Otto Fowler
>
> The success of the Metron project will be greatly dependent on community 
> participation, and with that the ability to adapt and extend Metron without 
> having to maintain a fork of the project.
> As organizations and individuals look to extend the Metron system with custom 
> parsers, enrichments, and stellar functions that may be proprietary in 
> nature, the ability to develop and deploy these extensions outside the Metron 
> code base is critically important.
> To that end, and after community discussion and proposal we create or 
> formalize the 'plugin' development story in Metron.  
> The proposal is to adapt the Apache Nifi NAR system for use in Metron.  This 
> will provide the system with:
> * archetype(s) for developer projects and independent development
> * defined packaging and metadata for 'plugin' products
> * loading and instantiation with classloader isolation capabilities
> * removing the necessity for shading plugin jars
> These capabilities will also enable other features, such as plugin lifecycle, 
> plugin configuration+redeployment, and other things.
> The plugin archetypes and their installation will be a followon



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to