[
https://issues.jboss.org/browse/FORGE-1030?page=com.atlassian.jira.plugin...
]
George Gastaldi commented on FORGE-1030:
----------------------------------------
[~lennartj],
Your plugin is not totally converted, I just ran a _forge install-plugin nazgul" now
and the following error occurs:
{code}
[INFO] ------------------------------------------------------------------------
[INFO] Building nazgul-forge-analyzer-api 1.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ nazgul-forge-analyzer-api ---
[INFO]
[INFO] --- cobertura-maven-plugin:2.5.2:clean (default) @ nazgul-forge-analyzer-api ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ nazgul-forge-analyzer-api
---
[INFO]
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-imports) @ nazgul-forge-analyzer-api
---
[INFO]
[INFO] --- license-maven-plugin:1.5:update-project-license (add-license) @
nazgul-forge-analyzer-api ---
[INFO] adding extra resolver classpath://codestyle/license
[INFO] Will create or update license file [jguru_apl_v2] to
/tmp/forgetemp9048317139828465612/analyzer/analyzer-api/target/LICENSE.TXT
[INFO]
[INFO] --- license-maven-plugin:1.5:update-file-header (check-file-header) @
nazgul-forge-analyzer-api ---
[WARNING] The failOnMissingHeader has no effect if the property dryRun is not setted.
[INFO] adding extra resolver classpath://codestyle/license
[INFO] Will search files to update from root
/tmp/forgetemp9048317139828465612/analyzer/analyzer-api/src/main
[INFO] Will search files to update from root
/tmp/forgetemp9048317139828465612/analyzer/analyzer-api/src/test
[INFO] Scan 10 files header done in 51.906ms.
[INFO] All files are up-to-date.
[INFO]
[INFO] --- license-maven-plugin:1.5:update-project-license (check-file-header) @
nazgul-forge-analyzer-api ---
[INFO] adding extra resolver classpath://codestyle/license
[INFO]
[INFO] --- license-maven-plugin:1.5:check-file-header (check-file-header) @
nazgul-forge-analyzer-api ---
[INFO] adding extra resolver classpath://codestyle/license
[INFO] Will search files to update from root
/tmp/forgetemp9048317139828465612/analyzer/analyzer-api/src/main
[INFO] Will search files to update from root
/tmp/forgetemp9048317139828465612/analyzer/analyzer-api/src/test
[INFO] Scan 10 files header done in 14.072ms.
[INFO] All files are up-to-date.
[INFO]
[INFO] --- depends-maven-plugin:1.2:generate-depends-file (generate-depends-file) @
nazgul-forge-analyzer-api ---
[INFO] Created:
/tmp/forgetemp9048317139828465612/analyzer/analyzer-api/target/classes/META-INF/maven/dependencies.properties
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @
nazgul-forge-analyzer-api ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory
/tmp/forgetemp9048317139828465612/analyzer/analyzer-api/src/main/resources
[INFO] skip non existing resourceDirectory
/tmp/forgetemp9048317139828465612/analyzer/analyzer-api/target/jaxb2/transformed
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-dependency-plugin:2.8:copy (copy) @ nazgul-forge-analyzer-api ---
[INFO] Configured Artifact: org.apache.openjpa:openjpa:2.2.2:jar
[INFO] Copying openjpa-2.2.2.jar to
/tmp/forgetemp9048317139828465612/analyzer/analyzer-api/target/openjpa.jar
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @
nazgul-forge-analyzer-api ---
[INFO] Compiling 6 source files to
/tmp/forgetemp9048317139828465612/analyzer/analyzer-api/target/classes
[INFO]
[INFO] --- aspectj-maven-plugin:1.4:compile (compile_with_aspectj) @
nazgul-forge-analyzer-api ---
[WARNING] advice defined in se.jguru.nazgul.tools.validation.aspect.ValidationAspect has
not been applied [Xlint:adviceDidNotMatch]
[INFO]
[INFO] --- maven-bundle-plugin:2.3.7:manifest (bundle-manifest) @
nazgul-forge-analyzer-api ---
[WARNING] Unable to merge Maven manifest: Specify the section name using the
"name" attribute of the <section> element rather than using a
"Name" manifest attribute
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @
nazgul-forge-analyzer-api ---
[INFO] Not copying test resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @
nazgul-forge-analyzer-api ---
[INFO] Not compiling test sources
[INFO]
[INFO] --- aspectj-maven-plugin:1.4:test-compile (test-compile_with_aspectj) @
nazgul-forge-analyzer-api ---
[WARNING] advice defined in se.jguru.nazgul.tools.validation.aspect.ValidationAspect has
not been applied [Xlint:adviceDidNotMatch]
[INFO]
[INFO] --- maven-surefire-plugin:2.15:test (default-test) @ nazgul-forge-analyzer-api ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ nazgul-forge-analyzer-api ---
[INFO] Building jar:
/tmp/forgetemp9048317139828465612/analyzer/analyzer-api/target/nazgul-forge-analyzer-api-1.0.1-SNAPSHOT.jar
[INFO]
[INFO] --- maven-checkstyle-plugin:2.10:check (verify) @ nazgul-forge-analyzer-api ---
[INFO]
[INFO]
[INFO] --- maven-site-plugin:3.3:attach-descriptor (attach-descriptor) @
nazgul-forge-analyzer-api ---
[INFO]
[INFO] >>> maven-source-plugin:2.2.1:jar (attach-sources) @
nazgul-forge-analyzer-api >>>
[INFO]
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ nazgul-forge-analyzer-api
---
[INFO]
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-imports) @ nazgul-forge-analyzer-api
---
[INFO]
[INFO] --- license-maven-plugin:1.5:update-project-license (add-license) @
nazgul-forge-analyzer-api ---
[INFO] adding extra resolver classpath://codestyle/license
[INFO]
[INFO] <<< maven-source-plugin:2.2.1:jar (attach-sources) @
nazgul-forge-analyzer-api <<<
[INFO]
[INFO] --- maven-source-plugin:2.2.1:jar (attach-sources) @ nazgul-forge-analyzer-api ---
[INFO] Building jar:
/tmp/forgetemp9048317139828465612/analyzer/analyzer-api/target/nazgul-forge-analyzer-api-1.0.1-SNAPSHOT-sources.jar
[INFO]
[INFO] >>> maven-pmd-plugin:3.0.1:check (default) @ nazgul-forge-analyzer-api
>>>
[INFO]
[INFO] --- maven-pmd-plugin:3.0.1:pmd (pmd) @ nazgul-forge-analyzer-api ---
log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See
http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
[INFO]
[INFO] <<< maven-pmd-plugin:3.0.1:check (default) @ nazgul-forge-analyzer-api
<<<
[INFO]
[INFO] --- maven-pmd-plugin:3.0.1:check (default) @ nazgul-forge-analyzer-api ---
[INFO]
[INFO]
[INFO] >>> maven-pmd-plugin:3.0.1:cpd-check (default) @ nazgul-forge-analyzer-api
>>>
[INFO]
[INFO] --- maven-pmd-plugin:3.0.1:cpd (cpd) @ nazgul-forge-analyzer-api ---
[INFO]
[INFO] <<< maven-pmd-plugin:3.0.1:cpd-check (default) @ nazgul-forge-analyzer-api
<<<
[INFO]
[INFO] --- maven-pmd-plugin:3.0.1:cpd-check (default) @ nazgul-forge-analyzer-api ---
[INFO]
[INFO]
[INFO] >>> findbugs-maven-plugin:2.5.2:check (default) @
nazgul-forge-analyzer-api >>>
[INFO]
[INFO] --- findbugs-maven-plugin:2.5.2:findbugs (findbugs) @ nazgul-forge-analyzer-api
---
[INFO] Fork Value is true
[INFO] Done FindBugs Analysis....
[INFO]
[INFO] <<< findbugs-maven-plugin:2.5.2:check (default) @
nazgul-forge-analyzer-api <<<
[INFO]
[INFO] --- findbugs-maven-plugin:2.5.2:check (default) @ nazgul-forge-analyzer-api ---
[INFO] BugInstance size is 0
[INFO] Error size is 0
[INFO] No errors/warnings found
[INFO]
[INFO] --- maven-dependency-plugin:2.8:analyze-only (analyze) @ nazgul-forge-analyzer-api
---
[WARNING] Used undeclared dependencies found:
[WARNING] org.apache.commons:commons-lang3:jar:3.1:compile
[WARNING] Unused declared dependencies found:
[WARNING] org.aspectj:aspectjrt:jar:1.7.3:compile
[WARNING]
se.jguru.nazgul.tools.validation.aspect:nazgul-tools-validation-aspect:jar:2.0.9:compile
[INFO]
[INFO] >>> cobertura-maven-plugin:2.5.2:check (default) @
nazgul-forge-analyzer-api >>>
[INFO]
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ nazgul-forge-analyzer-api
---
[INFO]
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-imports) @ nazgul-forge-analyzer-api
---
[INFO]
[INFO] --- license-maven-plugin:1.5:update-project-license (add-license) @
nazgul-forge-analyzer-api ---
[INFO] adding extra resolver classpath://codestyle/license
[INFO]
[INFO] --- license-maven-plugin:1.5:update-file-header (check-file-header) @
nazgul-forge-analyzer-api ---
[WARNING] The failOnMissingHeader has no effect if the property dryRun is not setted.
[INFO] adding extra resolver classpath://codestyle/license
[INFO] Will search files to update from root
/tmp/forgetemp9048317139828465612/analyzer/analyzer-api/src/main
[INFO] Will search files to update from root
/tmp/forgetemp9048317139828465612/analyzer/analyzer-api/src/test
[INFO] Scan 10 files header done in 17.474ms.
[INFO] All files are up-to-date.
[INFO]
[INFO] --- license-maven-plugin:1.5:update-project-license (check-file-header) @
nazgul-forge-analyzer-api ---
[INFO] adding extra resolver classpath://codestyle/license
[INFO]
[INFO] --- license-maven-plugin:1.5:check-file-header (check-file-header) @
nazgul-forge-analyzer-api ---
[INFO] adding extra resolver classpath://codestyle/license
[INFO] Will search files to update from root
/tmp/forgetemp9048317139828465612/analyzer/analyzer-api/src/main
[INFO] Will search files to update from root
/tmp/forgetemp9048317139828465612/analyzer/analyzer-api/src/test
[INFO] Scan 10 files header done in 11.448ms.
[INFO] All files are up-to-date.
[INFO]
[INFO] --- depends-maven-plugin:1.2:generate-depends-file (generate-depends-file) @
nazgul-forge-analyzer-api ---
[INFO] Created:
/tmp/forgetemp9048317139828465612/analyzer/analyzer-api/target/classes/META-INF/maven/dependencies.properties
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @
nazgul-forge-analyzer-api ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory
/tmp/forgetemp9048317139828465612/analyzer/analyzer-api/src/main/resources
[INFO] skip non existing resourceDirectory
/tmp/forgetemp9048317139828465612/analyzer/analyzer-api/target/jaxb2/transformed
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-dependency-plugin:2.8:copy (copy) @ nazgul-forge-analyzer-api ---
[INFO] Configured Artifact: org.apache.openjpa:openjpa:2.2.2:jar
[INFO] org.apache.openjpa:openjpa:2.2.2:jar already exists in
/tmp/forgetemp9048317139828465612/analyzer/analyzer-api/target
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @
nazgul-forge-analyzer-api ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- aspectj-maven-plugin:1.4:compile (compile_with_aspectj) @
nazgul-forge-analyzer-api ---
[INFO] No modifications found skipping aspectJ compile
[INFO]
[INFO] --- maven-bundle-plugin:2.3.7:manifest (bundle-manifest) @
nazgul-forge-analyzer-api ---
[WARNING] Unable to merge Maven manifest: Specify the section name using the
"name" attribute of the <section> element rather than using a
"Name" manifest attribute
[INFO]
[INFO] --- cobertura-maven-plugin:2.5.2:instrument (default) @ nazgul-forge-analyzer-api
---
[INFO] Cobertura 1.9.4.1 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
Instrumenting 6 files to
/tmp/forgetemp9048317139828465612/analyzer/analyzer-api/target/generated-classes/cobertura
Cobertura: Saved information on 6 classes.
Instrument time: 71ms
[INFO] Instrumentation was successful.
[INFO] NOT adding cobertura ser file to attached artifacts list.
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @
nazgul-forge-analyzer-api ---
[INFO] Not copying test resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @
nazgul-forge-analyzer-api ---
[INFO] Not compiling test sources
[INFO]
[INFO] --- aspectj-maven-plugin:1.4:test-compile (test-compile_with_aspectj) @
nazgul-forge-analyzer-api ---
[WARNING] advice defined in se.jguru.nazgul.tools.validation.aspect.ValidationAspect has
not been applied [Xlint:adviceDidNotMatch]
[INFO]
[INFO] --- maven-surefire-plugin:2.15:test (default-test) @ nazgul-forge-analyzer-api ---
[INFO] Tests are skipped.
[INFO]
[INFO] <<< cobertura-maven-plugin:2.5.2:check (default) @
nazgul-forge-analyzer-api <<<
[INFO]
[INFO] --- cobertura-maven-plugin:2.5.2:check (default) @ nazgul-forge-analyzer-api ---
[INFO] Cobertura 1.9.4.1 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
Cobertura: Loaded information on 6 classes.
[ERROR] se.jguru.nazgul.forge.analyzer.api.patterns.AbstractMavenModelPatterns failed
check. Line coverage rate of 0.0% is below 80.0%
se.jguru.nazgul.forge.analyzer.api.AbstractPatternBasedProjectNamingStrategy failed check.
Branch coverage rate of 0.0% is below 65.0%
se.jguru.nazgul.forge.analyzer.api.AbstractPatternBasedProjectNamingStrategy failed check.
Line coverage rate of 0.0% is below 80.0%
se.jguru.nazgul.forge.analyzer.api.patterns.DefaultProjectParentPatterns failed check.
Line coverage rate of 0.0% is below 80.0%
se.jguru.nazgul.forge.analyzer.api.patterns.DefaultTopReactorPatterns failed check. Line
coverage rate of 0.0% is below 80.0%
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] nazgul-forge-parent ............................... SUCCESS [4.648s]
[INFO] nazgul-forge-api-parent ........................... SUCCESS [3.029s]
[INFO] nazgul-forge-model-parent ......................... SUCCESS [0.369s]
[INFO] nazgul-forge-reactor .............................. SUCCESS [0.529s]
[INFO] nazgul-forge-poms-reactor ......................... SUCCESS [0.011s]
[INFO] nazgul-forge-analyzer-api ......................... FAILURE [11.831s]
[INFO] nazgul-forge-analyzer-impl-nazgul ................. SKIPPED
[INFO] nazgul-forge-analyzer-reactor ..................... SKIPPED
[INFO] nazgul-forge-factory-model ........................ SKIPPED
[INFO] nazgul-forge-factory-api .......................... SKIPPED
[INFO] nazgul-forge-factory-impl-nazgul .................. SKIPPED
[INFO] nazgul-forge-factory-reactor ...................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.031s
[INFO] Finished at: Sat Aug 10 15:32:52 BRT 2013
[INFO] Final Memory: 74M/777M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:cobertura-maven-plugin:2.5.2:check
(default) on project nazgul-forge-analyzer-api: Coverage check failed. See messages above.
-> [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/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :nazgul-forge-analyzer-api
***INFO*** Cleaning up temp workspace [/tmp/forgetemp9048317139828465612]
Wrote
/home/ggastald/.forge/httpsrawgithubcomforgepluginrepositorymasterrepositoryyaml.yaml
Deleted /tmp/forgetemp9048317139828465612
***ERROR*** Exception encountered: Build failed. (type "set VERBOSE true" to
enable stack traces)
{code}
Support multi-module Forge plugins
----------------------------------
Key: FORGE-1030
URL:
https://issues.jboss.org/browse/FORGE-1030
Project: Forge
Issue Type: Bug
Components: Documentation, Plugin API, Plugin Repository
Affects Versions: 1.3.3.Final
Reporter: Lennart Jörelid
Assignee: George Gastaldi
Priority: Blocker
Fix For: 1.x Future
Attachments: forge_1030_codeAnalysis.png
It seems that Forge really needs better support for the default Maven
development process. In repository.yaml, Forge plugins are defined by giving
a Maven project GAV for the project holding the forge plugin definitions, as well as the
GitHub repository holding the plugin source.
Yet, Forge seems to ignore the Maven GAV information given in repository.yaml when
checking out and building the plugin locally.
This is a rather nasty bug, which in its current state effectively prevents anyone from
using a multi-module build for their plugins (and it is also undocumented).
An example is shown below:
{code}
[no project] Nazgul $ forge install-plugin nazgul
***INFO*** Preparing to install plugin: nazgul
***INFO*** Checking out plugin source files to
[/var/folders/6g/9n7r543d2bv9n2qjvnvf_hsh0000gn/T/forgetemp6186363544408555570] via
'git'
***INFO*** Switching to branch/tag [refs/heads/1.3.3.Final]
? The project does not appear to be a Forge Plugin Project, install anyway? [y/N]
{code}
While this analysis by Forge is incorrect (the Maven GAV given in the repository.yaml is
indeed a project which holds plugins), it gets worse after installation:
{code}
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] nazgul-forge-parent ............................... SUCCESS [7.921s]
[INFO] nazgul-forge-api-parent ........................... SUCCESS [4.345s]
[INFO] nazgul-forge-model-parent ......................... SUCCESS [1.274s]
[INFO] nazgul-forge-reactor .............................. SUCCESS [0.847s]
[INFO] nazgul-forge-poms-reactor ......................... SUCCESS [0.058s]
[INFO] nazgul-forge-analyzer-api ......................... SUCCESS [5.562s]
[INFO] nazgul-forge-analyzer-impl-nazgul ................. SUCCESS [1.666s]
[INFO] nazgul-forge-analyzer-reactor ..................... SUCCESS [0.020s]
[INFO] nazgul-forge-factory-model ........................ SUCCESS [2.434s]
[INFO] nazgul-forge-factory-api .......................... SUCCESS [7.634s]
[INFO] nazgul-forge-factory-impl-nazgul .................. SUCCESS [2.724s]
[INFO] nazgul-forge-factory-reactor ...................... SUCCESS [0.032s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 36.580s
[INFO] Finished at: Mon Jul 22 07:46:48 CEST 2013
[INFO] Final Memory: 49M/247M
[INFO] ------------------------------------------------------------------------
***INFO*** Cleaning up temp workspace
[/var/folders/6g/9n7r543d2bv9n2qjvnvf_hsh0000gn/T/forgetemp6186363544408555570]
Deleted /var/folders/6g/9n7r543d2bv9n2qjvnvf_hsh0000gn/T/forgetemp6186363544408555570
***ERROR*** Exception encountered: Build artifact
[nazgul-forge-reactor-1.0.1-SNAPSHOT.pom] is missing and cannot be installed. Please
resolve build errors and try again. (type "set VERBOSE true" to enable stack
traces)
{code}
So ...
# The repository.yaml includes a full Maven GAV to the project which holds Forge
plugins.
# Forge uses repository.yaml to download the source from GitHub and build it
# Forge ignores the Maven GAV given in repository.yaml, and simply uses the root reactor
project to inspect and attempt to install the plugins.
To fix this bug, Forge needs to find the project given within the repository.yaml within
the downloaded reactor and install the plugins from *that* project.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira