You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Francisco Olarte (Created) (JIRA)" <ji...@apache.org> on 2011/11/18 12:40:51 UTC
[jira] [Created] (FELIX-3234) maven SCR plugin @Property annotation
raises exceptions on longValue use
maven SCR plugin @Property annotation raises exceptions on longValue use
------------------------------------------------------------------------
Key: FELIX-3234
URL: https://issues.apache.org/jira/browse/FELIX-3234
Project: Felix
Issue Type: Bug
Components: Maven SCR Plugin
Affects Versions: scr annotations 1.6.0
Environment: $ mvn -V
Apache Maven 2.2.1 (rdebian-6)
Java version: 1.6.0_26
Java home: /usr/lib/jvm/java-6-sun-1.6.0.26/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "3.0.0-12-generic" arch: "amd64" Family: "unix"
Reporter: Francisco Olarte
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (FELIX-3234) maven SCR plugin @Property
annotation raises exceptions on longValue=0L use
Posted by "Carsten Ziegeler (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13152907#comment-13152907 ]
Carsten Ziegeler commented on FELIX-3234:
-----------------------------------------
Looks like a bug in the qdox parser to me; I think we're already using the latest released qdox :(
> maven SCR plugin @Property annotation raises exceptions on longValue=0L use
> ----------------------------------------------------------------------------
>
> Key: FELIX-3234
> URL: https://issues.apache.org/jira/browse/FELIX-3234
> Project: Felix
> Issue Type: Bug
> Components: Maven SCR Plugin
> Affects Versions: maven-scr-plugin-1.7.2, maven-scr-plugin-1.7.4, scr annotations 1.6.0
> Environment: $ mvn -V
> Apache Maven 2.2.1 (rdebian-6)
> Java version: 1.6.0_26
> Java home: /usr/lib/jvm/java-6-sun-1.6.0.26/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux" version: "3.0.0-12-generic" arch: "amd64" Family: "unix"
> Reporter: Francisco Olarte
> Priority: Minor
>
> When putting longValue =0L I get an exception on build, note it MUST be '0L'. Exceptions does not hapen when using '0' ( without the long modifier ) or 1234567 or 1234567L
> It seems problem occurs only with the '0L' value, as '00L' and '00000L' work fine ( I have tested the values '0', '0L', '00L','00000L', '1234567' and '1234567L' , and, after that, '0l', 00l' ( one and two zeroes, lowercase L ) and the only ones which do not work are '0L' and '0l', all the other ones build flawlessly ).
> The contens of metatype.xml for the property are correct: ( with 00l ):
> <AD id="reload.period" type="Long" default="0" name="Auto reload period" description="Sleep interval between reloading scans."/>
> Included below are captures for 0L and 0, results for the other ones are the same.
> If needed I can try to strip the build to a minimum and send it.
> ----- with L modifier, raises exceptions: ------------
> @Property(label = "Auto reload period",
> description = "Sleep interval between reloading scans.",longValue=0L)
> public final static String RELOAD_PERIOD = "reload.period";
> leads to:
> $ mvn clean install
> [INFO] Scanning for projects...
> [WARNING] POM for 'biz.aQute:bndlib:pom:1.43.0:runtime' is invalid.
> Its dependencies (if any) will NOT be available to the current build.
> [INFO] ------------------------------------------------------------------------
> [INFO] Building numclass-cmtport
> [INFO] task-segment: [clean, install]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] Deleting file set: /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target (included: [**], excluded: [])
> [INFO] [resources:resources {execution: default-resources}]
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 0 resource
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Compiling 6 source files to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/classes
> [INFO] [scr:scr {execution: generate-scr-scrdescriptor}]
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] For input string: ""
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NumberFormatException: For input string: ""
> at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
> at java.lang.Long.parseLong(Long.java:431)
> at com.thoughtworks.qdox.parser.impl.Parser.toLong(Parser.java:1180)
> at com.thoughtworks.qdox.parser.impl.Parser.yyparse(Parser.java:1784)
> at com.thoughtworks.qdox.parser.impl.Parser.parse(Parser.java:999)
> at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:353)
> at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:381)
> at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:377)
> at org.apache.felix.scrplugin.JavaClassDescriptorManager.getSources(JavaClassDescriptorManager.java:115)
> at org.apache.felix.scrplugin.JavaClassDescriptorManager.getJavaClassesFromSources(JavaClassDescriptorManager.java:459)
> at org.apache.felix.scrplugin.JavaClassDescriptorManager.getSourceDescriptions(JavaClassDescriptorManager.java:361)
> at org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:234)
> at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:184)
> at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
> at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 2 seconds
> [INFO] Finished at: Fri Nov 18 13:00:44 CET 2011
> [INFO] Final Memory: 23M/296M
> [INFO] ------------------------------------------------------------------------
> ---------
> --------- without the L modifer ( no problems )--------------
> @Property(label = "Auto reload period",
> description = "Sleep interval between reloading scans.",longValue=0)
> public final static String RELOAD_PERIOD = "reload.period";
> leads to:
> $ mvn clean install
> [INFO] Scanning for projects...
> [WARNING] POM for 'biz.aQute:bndlib:pom:1.43.0:runtime' is invalid.
> Its dependencies (if any) will NOT be available to the current build.
> [INFO] ------------------------------------------------------------------------
> [INFO] Building numclass-cmtport
> [INFO] task-segment: [clean, install]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] Deleting file set: /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target (included: [**], excluded: [])
> [INFO] [resources:resources {execution: default-resources}]
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 0 resource
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Compiling 6 source files to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/classes
> [INFO] [scr:scr {execution: generate-scr-scrdescriptor}]
> [INFO] Generating 2 MetaType Descriptors to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/scr-plugin-generated/OSGI-INF/metatype/metatype.xml
> [INFO] Writing abstract service descriptor /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/scr-plugin-generated/OSGI-INF/scr-plugin/scrinfo.xml with 1 entries.
> [INFO] Generating 1 Service Component Descriptors to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/scr-plugin-generated/OSGI-INF/serviceComponents.xml
> [INFO] [resources:testResources {execution: default-testResources}]
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 3 resources
> [INFO] [compiler:testCompile {execution: default-testCompile}]
> [INFO] Compiling 6 source files to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/test-classes
> [INFO] [surefire:test {execution: default-test}]
> [INFO] Surefire report directory: /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/surefire-reports
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Running TestSuite
> Nov 18, 2011 1:02:22 PM com.peoplecall.numclass.cmtport.CmtPortClassifier loadCmtData
> WARNING: Error loading cmt data from ESTO NO EXISTE NI PATRAS previous contents kept.
> Nov 18, 2011 1:02:22 PM com.peoplecall.numclass.cmtport.CmtPortClassifier loadPortData
> WARNING: Error loading porting data from ESTO NO EXISTE NI PATRAS previous contents kept.
> Tests run: 27, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.558 sec
> Results :
> Tests run: 27, Failures: 0, Errors: 0, Skipped: 0
> [INFO] [bundle:bundle {execution: default-bundle}]
> [INFO] [install:install {execution: default-install}]
> [INFO] Installing /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/numclass-cmtport-1.0-SNAPSHOT.jar to /home/folarte/.m2/repository/com/peoplecall/numclass-cmtport/1.0-SNAPSHOT/numclass-cmtport-1.0-SNAPSHOT.jar
> [INFO] [bundle:install {execution: default-install}]
> [INFO] Installing com/peoplecall/numclass-cmtport/1.0-SNAPSHOT/numclass-cmtport-1.0-SNAPSHOT.jar
> [INFO] Writing OBR metadata
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 4 seconds
> [INFO] Finished at: Fri Nov 18 13:02:23 CET 2011
> [INFO] Final Memory: 28M/247M
> [INFO] ------------------------------------------------------------------------
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (FELIX-3234) @Property annotation raises
exceptions on longValue=0L use
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler updated FELIX-3234:
------------------------------------
Fix Version/s: scr ant task 1.2.0
> @Property annotation raises exceptions on longValue=0L use
> -----------------------------------------------------------
>
> Key: FELIX-3234
> URL: https://issues.apache.org/jira/browse/FELIX-3234
> Project: Felix
> Issue Type: Bug
> Components: Maven SCR Plugin
> Affects Versions: maven-scr-plugin-1.7.2, maven-scr-plugin-1.7.4, scr annotations 1.6.0
> Environment: $ mvn -V
> Apache Maven 2.2.1 (rdebian-6)
> Java version: 1.6.0_26
> Java home: /usr/lib/jvm/java-6-sun-1.6.0.26/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux" version: "3.0.0-12-generic" arch: "amd64" Family: "unix"
> Reporter: Francisco Olarte
> Priority: Minor
> Fix For: maven-scr-plugin-1.8.0, scr ant task 1.2.0, scr generator 1.2.0
>
>
> When putting longValue =0L I get an exception on build, note it MUST be '0L'. Exceptions does not hapen when using '0' ( without the long modifier ) or 1234567 or 1234567L
> It seems problem occurs only with the '0L' value, as '00L' and '00000L' work fine ( I have tested the values '0', '0L', '00L','00000L', '1234567' and '1234567L' , and, after that, '0l', 00l' ( one and two zeroes, lowercase L ) and the only ones which do not work are '0L' and '0l', all the other ones build flawlessly ).
> The contens of metatype.xml for the property are correct: ( with 00l ):
> <AD id="reload.period" type="Long" default="0" name="Auto reload period" description="Sleep interval between reloading scans."/>
> Included below are captures for 0L and 0, results for the other ones are the same.
> If needed I can try to strip the build to a minimum and send it.
> ----- with L modifier, raises exceptions: ------------
> @Property(label = "Auto reload period",
> description = "Sleep interval between reloading scans.",longValue=0L)
> public final static String RELOAD_PERIOD = "reload.period";
> leads to:
> $ mvn clean install
> [INFO] Scanning for projects...
> [WARNING] POM for 'biz.aQute:bndlib:pom:1.43.0:runtime' is invalid.
> Its dependencies (if any) will NOT be available to the current build.
> [INFO] ------------------------------------------------------------------------
> [INFO] Building numclass-cmtport
> [INFO] task-segment: [clean, install]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] Deleting file set: /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target (included: [**], excluded: [])
> [INFO] [resources:resources {execution: default-resources}]
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 0 resource
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Compiling 6 source files to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/classes
> [INFO] [scr:scr {execution: generate-scr-scrdescriptor}]
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] For input string: ""
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NumberFormatException: For input string: ""
> at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
> at java.lang.Long.parseLong(Long.java:431)
> at com.thoughtworks.qdox.parser.impl.Parser.toLong(Parser.java:1180)
> at com.thoughtworks.qdox.parser.impl.Parser.yyparse(Parser.java:1784)
> at com.thoughtworks.qdox.parser.impl.Parser.parse(Parser.java:999)
> at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:353)
> at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:381)
> at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:377)
> at org.apache.felix.scrplugin.JavaClassDescriptorManager.getSources(JavaClassDescriptorManager.java:115)
> at org.apache.felix.scrplugin.JavaClassDescriptorManager.getJavaClassesFromSources(JavaClassDescriptorManager.java:459)
> at org.apache.felix.scrplugin.JavaClassDescriptorManager.getSourceDescriptions(JavaClassDescriptorManager.java:361)
> at org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:234)
> at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:184)
> at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
> at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 2 seconds
> [INFO] Finished at: Fri Nov 18 13:00:44 CET 2011
> [INFO] Final Memory: 23M/296M
> [INFO] ------------------------------------------------------------------------
> ---------
> --------- without the L modifer ( no problems )--------------
> @Property(label = "Auto reload period",
> description = "Sleep interval between reloading scans.",longValue=0)
> public final static String RELOAD_PERIOD = "reload.period";
> leads to:
> $ mvn clean install
> [INFO] Scanning for projects...
> [WARNING] POM for 'biz.aQute:bndlib:pom:1.43.0:runtime' is invalid.
> Its dependencies (if any) will NOT be available to the current build.
> [INFO] ------------------------------------------------------------------------
> [INFO] Building numclass-cmtport
> [INFO] task-segment: [clean, install]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] Deleting file set: /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target (included: [**], excluded: [])
> [INFO] [resources:resources {execution: default-resources}]
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 0 resource
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Compiling 6 source files to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/classes
> [INFO] [scr:scr {execution: generate-scr-scrdescriptor}]
> [INFO] Generating 2 MetaType Descriptors to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/scr-plugin-generated/OSGI-INF/metatype/metatype.xml
> [INFO] Writing abstract service descriptor /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/scr-plugin-generated/OSGI-INF/scr-plugin/scrinfo.xml with 1 entries.
> [INFO] Generating 1 Service Component Descriptors to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/scr-plugin-generated/OSGI-INF/serviceComponents.xml
> [INFO] [resources:testResources {execution: default-testResources}]
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 3 resources
> [INFO] [compiler:testCompile {execution: default-testCompile}]
> [INFO] Compiling 6 source files to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/test-classes
> [INFO] [surefire:test {execution: default-test}]
> [INFO] Surefire report directory: /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/surefire-reports
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Running TestSuite
> Nov 18, 2011 1:02:22 PM com.peoplecall.numclass.cmtport.CmtPortClassifier loadCmtData
> WARNING: Error loading cmt data from ESTO NO EXISTE NI PATRAS previous contents kept.
> Nov 18, 2011 1:02:22 PM com.peoplecall.numclass.cmtport.CmtPortClassifier loadPortData
> WARNING: Error loading porting data from ESTO NO EXISTE NI PATRAS previous contents kept.
> Tests run: 27, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.558 sec
> Results :
> Tests run: 27, Failures: 0, Errors: 0, Skipped: 0
> [INFO] [bundle:bundle {execution: default-bundle}]
> [INFO] [install:install {execution: default-install}]
> [INFO] Installing /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/numclass-cmtport-1.0-SNAPSHOT.jar to /home/folarte/.m2/repository/com/peoplecall/numclass-cmtport/1.0-SNAPSHOT/numclass-cmtport-1.0-SNAPSHOT.jar
> [INFO] [bundle:install {execution: default-install}]
> [INFO] Installing com/peoplecall/numclass-cmtport/1.0-SNAPSHOT/numclass-cmtport-1.0-SNAPSHOT.jar
> [INFO] Writing OBR metadata
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 4 seconds
> [INFO] Finished at: Fri Nov 18 13:02:23 CET 2011
> [INFO] Final Memory: 28M/247M
> [INFO] ------------------------------------------------------------------------
--
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
[jira] [Commented] (FELIX-3234) maven SCR plugin @Property
annotation raises exceptions on longValue=0L use
Posted by "Francisco Olarte (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13152955#comment-13152955 ]
Francisco Olarte commented on FELIX-3234:
-----------------------------------------
I'm really a novice maven-scr user, and I do not know qdox, but it seems as if the plugin is somehow scanning the source when it shouldn't.
I mean, no matter wether you write 0L, 0, 00L the java compiler should turn this into 0L into the class file. To test this I've made two runs, one failed with 0L, one successful with 0 and compared the .class files from both runs, are they are in fact identical.
In the version which failed with the 0L I have this exception trace ( pruned and commented ):
java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Long.parseLong(Long.java:431)
** this is the error
at com.thoughtworks.qdox.parser.impl.Parser.toLong(Parser.java:1180)
at com.thoughtworks.qdox.parser.impl.Parser.yyparse(Parser.java:1784)
at com.thoughtworks.qdox.parser.impl.Parser.parse(Parser.java:999)
at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:353)
at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:381)
at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:377)
** this is qdox parsing sources
at org.apache.felix.scrplugin.JavaClassDescriptorManager.getSources(JavaClassDescriptorManager.java:115)
at org.apache.felix.scrplugin.JavaClassDescriptorManager.getJavaClassesFromSources(JavaClassDescriptorManager.java:459)
at org.apache.felix.scrplugin.JavaClassDescriptorManager.getSourceDescriptions(JavaClassDescriptorManager.java:361)
** this is the plugin parsing.
at org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:234)
at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:184)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
I'm not an expert in maven, qdox and scr. The problem seems to be the plugin needs to scan the sources looking for javadoc annotations, calls qdox for it and qdox barfs when it tries to compile the sources. (more on next comment)
> maven SCR plugin @Property annotation raises exceptions on longValue=0L use
> ----------------------------------------------------------------------------
>
> Key: FELIX-3234
> URL: https://issues.apache.org/jira/browse/FELIX-3234
> Project: Felix
> Issue Type: Bug
> Components: Maven SCR Plugin
> Affects Versions: maven-scr-plugin-1.7.2, maven-scr-plugin-1.7.4, scr annotations 1.6.0
> Environment: $ mvn -V
> Apache Maven 2.2.1 (rdebian-6)
> Java version: 1.6.0_26
> Java home: /usr/lib/jvm/java-6-sun-1.6.0.26/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux" version: "3.0.0-12-generic" arch: "amd64" Family: "unix"
> Reporter: Francisco Olarte
> Priority: Minor
>
> When putting longValue =0L I get an exception on build, note it MUST be '0L'. Exceptions does not hapen when using '0' ( without the long modifier ) or 1234567 or 1234567L
> It seems problem occurs only with the '0L' value, as '00L' and '00000L' work fine ( I have tested the values '0', '0L', '00L','00000L', '1234567' and '1234567L' , and, after that, '0l', 00l' ( one and two zeroes, lowercase L ) and the only ones which do not work are '0L' and '0l', all the other ones build flawlessly ).
> The contens of metatype.xml for the property are correct: ( with 00l ):
> <AD id="reload.period" type="Long" default="0" name="Auto reload period" description="Sleep interval between reloading scans."/>
> Included below are captures for 0L and 0, results for the other ones are the same.
> If needed I can try to strip the build to a minimum and send it.
> ----- with L modifier, raises exceptions: ------------
> @Property(label = "Auto reload period",
> description = "Sleep interval between reloading scans.",longValue=0L)
> public final static String RELOAD_PERIOD = "reload.period";
> leads to:
> $ mvn clean install
> [INFO] Scanning for projects...
> [WARNING] POM for 'biz.aQute:bndlib:pom:1.43.0:runtime' is invalid.
> Its dependencies (if any) will NOT be available to the current build.
> [INFO] ------------------------------------------------------------------------
> [INFO] Building numclass-cmtport
> [INFO] task-segment: [clean, install]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] Deleting file set: /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target (included: [**], excluded: [])
> [INFO] [resources:resources {execution: default-resources}]
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 0 resource
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Compiling 6 source files to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/classes
> [INFO] [scr:scr {execution: generate-scr-scrdescriptor}]
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] For input string: ""
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NumberFormatException: For input string: ""
> at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
> at java.lang.Long.parseLong(Long.java:431)
> at com.thoughtworks.qdox.parser.impl.Parser.toLong(Parser.java:1180)
> at com.thoughtworks.qdox.parser.impl.Parser.yyparse(Parser.java:1784)
> at com.thoughtworks.qdox.parser.impl.Parser.parse(Parser.java:999)
> at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:353)
> at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:381)
> at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:377)
> at org.apache.felix.scrplugin.JavaClassDescriptorManager.getSources(JavaClassDescriptorManager.java:115)
> at org.apache.felix.scrplugin.JavaClassDescriptorManager.getJavaClassesFromSources(JavaClassDescriptorManager.java:459)
> at org.apache.felix.scrplugin.JavaClassDescriptorManager.getSourceDescriptions(JavaClassDescriptorManager.java:361)
> at org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:234)
> at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:184)
> at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
> at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 2 seconds
> [INFO] Finished at: Fri Nov 18 13:00:44 CET 2011
> [INFO] Final Memory: 23M/296M
> [INFO] ------------------------------------------------------------------------
> ---------
> --------- without the L modifer ( no problems )--------------
> @Property(label = "Auto reload period",
> description = "Sleep interval between reloading scans.",longValue=0)
> public final static String RELOAD_PERIOD = "reload.period";
> leads to:
> $ mvn clean install
> [INFO] Scanning for projects...
> [WARNING] POM for 'biz.aQute:bndlib:pom:1.43.0:runtime' is invalid.
> Its dependencies (if any) will NOT be available to the current build.
> [INFO] ------------------------------------------------------------------------
> [INFO] Building numclass-cmtport
> [INFO] task-segment: [clean, install]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] Deleting file set: /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target (included: [**], excluded: [])
> [INFO] [resources:resources {execution: default-resources}]
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 0 resource
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Compiling 6 source files to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/classes
> [INFO] [scr:scr {execution: generate-scr-scrdescriptor}]
> [INFO] Generating 2 MetaType Descriptors to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/scr-plugin-generated/OSGI-INF/metatype/metatype.xml
> [INFO] Writing abstract service descriptor /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/scr-plugin-generated/OSGI-INF/scr-plugin/scrinfo.xml with 1 entries.
> [INFO] Generating 1 Service Component Descriptors to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/scr-plugin-generated/OSGI-INF/serviceComponents.xml
> [INFO] [resources:testResources {execution: default-testResources}]
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 3 resources
> [INFO] [compiler:testCompile {execution: default-testCompile}]
> [INFO] Compiling 6 source files to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/test-classes
> [INFO] [surefire:test {execution: default-test}]
> [INFO] Surefire report directory: /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/surefire-reports
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Running TestSuite
> Nov 18, 2011 1:02:22 PM com.peoplecall.numclass.cmtport.CmtPortClassifier loadCmtData
> WARNING: Error loading cmt data from ESTO NO EXISTE NI PATRAS previous contents kept.
> Nov 18, 2011 1:02:22 PM com.peoplecall.numclass.cmtport.CmtPortClassifier loadPortData
> WARNING: Error loading porting data from ESTO NO EXISTE NI PATRAS previous contents kept.
> Tests run: 27, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.558 sec
> Results :
> Tests run: 27, Failures: 0, Errors: 0, Skipped: 0
> [INFO] [bundle:bundle {execution: default-bundle}]
> [INFO] [install:install {execution: default-install}]
> [INFO] Installing /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/numclass-cmtport-1.0-SNAPSHOT.jar to /home/folarte/.m2/repository/com/peoplecall/numclass-cmtport/1.0-SNAPSHOT/numclass-cmtport-1.0-SNAPSHOT.jar
> [INFO] [bundle:install {execution: default-install}]
> [INFO] Installing com/peoplecall/numclass-cmtport/1.0-SNAPSHOT/numclass-cmtport-1.0-SNAPSHOT.jar
> [INFO] Writing OBR metadata
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 4 seconds
> [INFO] Finished at: Fri Nov 18 13:02:23 CET 2011
> [INFO] Final Memory: 28M/247M
> [INFO] ------------------------------------------------------------------------
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (FELIX-3234) @Property annotation raises
exceptions on longValue=0L use
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler updated FELIX-3234:
------------------------------------
Summary: @Property annotation raises exceptions on longValue=0L use (was: maven SCR plugin @Property annotation raises exceptions on longValue=0L use )
> @Property annotation raises exceptions on longValue=0L use
> -----------------------------------------------------------
>
> Key: FELIX-3234
> URL: https://issues.apache.org/jira/browse/FELIX-3234
> Project: Felix
> Issue Type: Bug
> Components: Maven SCR Plugin
> Affects Versions: maven-scr-plugin-1.7.2, maven-scr-plugin-1.7.4, scr annotations 1.6.0
> Environment: $ mvn -V
> Apache Maven 2.2.1 (rdebian-6)
> Java version: 1.6.0_26
> Java home: /usr/lib/jvm/java-6-sun-1.6.0.26/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux" version: "3.0.0-12-generic" arch: "amd64" Family: "unix"
> Reporter: Francisco Olarte
> Priority: Minor
> Fix For: maven-scr-plugin-1.8.0, scr ant task 1.2.0, scr generator 1.2.0
>
>
> When putting longValue =0L I get an exception on build, note it MUST be '0L'. Exceptions does not hapen when using '0' ( without the long modifier ) or 1234567 or 1234567L
> It seems problem occurs only with the '0L' value, as '00L' and '00000L' work fine ( I have tested the values '0', '0L', '00L','00000L', '1234567' and '1234567L' , and, after that, '0l', 00l' ( one and two zeroes, lowercase L ) and the only ones which do not work are '0L' and '0l', all the other ones build flawlessly ).
> The contens of metatype.xml for the property are correct: ( with 00l ):
> <AD id="reload.period" type="Long" default="0" name="Auto reload period" description="Sleep interval between reloading scans."/>
> Included below are captures for 0L and 0, results for the other ones are the same.
> If needed I can try to strip the build to a minimum and send it.
> ----- with L modifier, raises exceptions: ------------
> @Property(label = "Auto reload period",
> description = "Sleep interval between reloading scans.",longValue=0L)
> public final static String RELOAD_PERIOD = "reload.period";
> leads to:
> $ mvn clean install
> [INFO] Scanning for projects...
> [WARNING] POM for 'biz.aQute:bndlib:pom:1.43.0:runtime' is invalid.
> Its dependencies (if any) will NOT be available to the current build.
> [INFO] ------------------------------------------------------------------------
> [INFO] Building numclass-cmtport
> [INFO] task-segment: [clean, install]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] Deleting file set: /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target (included: [**], excluded: [])
> [INFO] [resources:resources {execution: default-resources}]
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 0 resource
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Compiling 6 source files to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/classes
> [INFO] [scr:scr {execution: generate-scr-scrdescriptor}]
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] For input string: ""
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NumberFormatException: For input string: ""
> at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
> at java.lang.Long.parseLong(Long.java:431)
> at com.thoughtworks.qdox.parser.impl.Parser.toLong(Parser.java:1180)
> at com.thoughtworks.qdox.parser.impl.Parser.yyparse(Parser.java:1784)
> at com.thoughtworks.qdox.parser.impl.Parser.parse(Parser.java:999)
> at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:353)
> at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:381)
> at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:377)
> at org.apache.felix.scrplugin.JavaClassDescriptorManager.getSources(JavaClassDescriptorManager.java:115)
> at org.apache.felix.scrplugin.JavaClassDescriptorManager.getJavaClassesFromSources(JavaClassDescriptorManager.java:459)
> at org.apache.felix.scrplugin.JavaClassDescriptorManager.getSourceDescriptions(JavaClassDescriptorManager.java:361)
> at org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:234)
> at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:184)
> at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
> at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 2 seconds
> [INFO] Finished at: Fri Nov 18 13:00:44 CET 2011
> [INFO] Final Memory: 23M/296M
> [INFO] ------------------------------------------------------------------------
> ---------
> --------- without the L modifer ( no problems )--------------
> @Property(label = "Auto reload period",
> description = "Sleep interval between reloading scans.",longValue=0)
> public final static String RELOAD_PERIOD = "reload.period";
> leads to:
> $ mvn clean install
> [INFO] Scanning for projects...
> [WARNING] POM for 'biz.aQute:bndlib:pom:1.43.0:runtime' is invalid.
> Its dependencies (if any) will NOT be available to the current build.
> [INFO] ------------------------------------------------------------------------
> [INFO] Building numclass-cmtport
> [INFO] task-segment: [clean, install]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] Deleting file set: /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target (included: [**], excluded: [])
> [INFO] [resources:resources {execution: default-resources}]
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 0 resource
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Compiling 6 source files to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/classes
> [INFO] [scr:scr {execution: generate-scr-scrdescriptor}]
> [INFO] Generating 2 MetaType Descriptors to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/scr-plugin-generated/OSGI-INF/metatype/metatype.xml
> [INFO] Writing abstract service descriptor /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/scr-plugin-generated/OSGI-INF/scr-plugin/scrinfo.xml with 1 entries.
> [INFO] Generating 1 Service Component Descriptors to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/scr-plugin-generated/OSGI-INF/serviceComponents.xml
> [INFO] [resources:testResources {execution: default-testResources}]
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 3 resources
> [INFO] [compiler:testCompile {execution: default-testCompile}]
> [INFO] Compiling 6 source files to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/test-classes
> [INFO] [surefire:test {execution: default-test}]
> [INFO] Surefire report directory: /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/surefire-reports
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Running TestSuite
> Nov 18, 2011 1:02:22 PM com.peoplecall.numclass.cmtport.CmtPortClassifier loadCmtData
> WARNING: Error loading cmt data from ESTO NO EXISTE NI PATRAS previous contents kept.
> Nov 18, 2011 1:02:22 PM com.peoplecall.numclass.cmtport.CmtPortClassifier loadPortData
> WARNING: Error loading porting data from ESTO NO EXISTE NI PATRAS previous contents kept.
> Tests run: 27, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.558 sec
> Results :
> Tests run: 27, Failures: 0, Errors: 0, Skipped: 0
> [INFO] [bundle:bundle {execution: default-bundle}]
> [INFO] [install:install {execution: default-install}]
> [INFO] Installing /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/numclass-cmtport-1.0-SNAPSHOT.jar to /home/folarte/.m2/repository/com/peoplecall/numclass-cmtport/1.0-SNAPSHOT/numclass-cmtport-1.0-SNAPSHOT.jar
> [INFO] [bundle:install {execution: default-install}]
> [INFO] Installing com/peoplecall/numclass-cmtport/1.0-SNAPSHOT/numclass-cmtport-1.0-SNAPSHOT.jar
> [INFO] Writing OBR metadata
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 4 seconds
> [INFO] Finished at: Fri Nov 18 13:02:23 CET 2011
> [INFO] Final Memory: 28M/247M
> [INFO] ------------------------------------------------------------------------
--
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
[jira] [Resolved] (FELIX-3234) maven SCR plugin @Property
annotation raises exceptions on longValue=0L use
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler resolved FELIX-3234.
-------------------------------------
Resolution: Fixed
Fix Version/s: maven-scr-plugin-1.8.0
scr generator 1.2.0
This has been solved with the latest release
> maven SCR plugin @Property annotation raises exceptions on longValue=0L use
> ----------------------------------------------------------------------------
>
> Key: FELIX-3234
> URL: https://issues.apache.org/jira/browse/FELIX-3234
> Project: Felix
> Issue Type: Bug
> Components: Maven SCR Plugin
> Affects Versions: maven-scr-plugin-1.7.2, maven-scr-plugin-1.7.4, scr annotations 1.6.0
> Environment: $ mvn -V
> Apache Maven 2.2.1 (rdebian-6)
> Java version: 1.6.0_26
> Java home: /usr/lib/jvm/java-6-sun-1.6.0.26/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux" version: "3.0.0-12-generic" arch: "amd64" Family: "unix"
> Reporter: Francisco Olarte
> Priority: Minor
> Fix For: scr generator 1.2.0, maven-scr-plugin-1.8.0
>
>
> When putting longValue =0L I get an exception on build, note it MUST be '0L'. Exceptions does not hapen when using '0' ( without the long modifier ) or 1234567 or 1234567L
> It seems problem occurs only with the '0L' value, as '00L' and '00000L' work fine ( I have tested the values '0', '0L', '00L','00000L', '1234567' and '1234567L' , and, after that, '0l', 00l' ( one and two zeroes, lowercase L ) and the only ones which do not work are '0L' and '0l', all the other ones build flawlessly ).
> The contens of metatype.xml for the property are correct: ( with 00l ):
> <AD id="reload.period" type="Long" default="0" name="Auto reload period" description="Sleep interval between reloading scans."/>
> Included below are captures for 0L and 0, results for the other ones are the same.
> If needed I can try to strip the build to a minimum and send it.
> ----- with L modifier, raises exceptions: ------------
> @Property(label = "Auto reload period",
> description = "Sleep interval between reloading scans.",longValue=0L)
> public final static String RELOAD_PERIOD = "reload.period";
> leads to:
> $ mvn clean install
> [INFO] Scanning for projects...
> [WARNING] POM for 'biz.aQute:bndlib:pom:1.43.0:runtime' is invalid.
> Its dependencies (if any) will NOT be available to the current build.
> [INFO] ------------------------------------------------------------------------
> [INFO] Building numclass-cmtport
> [INFO] task-segment: [clean, install]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] Deleting file set: /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target (included: [**], excluded: [])
> [INFO] [resources:resources {execution: default-resources}]
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 0 resource
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Compiling 6 source files to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/classes
> [INFO] [scr:scr {execution: generate-scr-scrdescriptor}]
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] For input string: ""
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NumberFormatException: For input string: ""
> at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
> at java.lang.Long.parseLong(Long.java:431)
> at com.thoughtworks.qdox.parser.impl.Parser.toLong(Parser.java:1180)
> at com.thoughtworks.qdox.parser.impl.Parser.yyparse(Parser.java:1784)
> at com.thoughtworks.qdox.parser.impl.Parser.parse(Parser.java:999)
> at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:353)
> at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:381)
> at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:377)
> at org.apache.felix.scrplugin.JavaClassDescriptorManager.getSources(JavaClassDescriptorManager.java:115)
> at org.apache.felix.scrplugin.JavaClassDescriptorManager.getJavaClassesFromSources(JavaClassDescriptorManager.java:459)
> at org.apache.felix.scrplugin.JavaClassDescriptorManager.getSourceDescriptions(JavaClassDescriptorManager.java:361)
> at org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:234)
> at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:184)
> at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
> at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 2 seconds
> [INFO] Finished at: Fri Nov 18 13:00:44 CET 2011
> [INFO] Final Memory: 23M/296M
> [INFO] ------------------------------------------------------------------------
> ---------
> --------- without the L modifer ( no problems )--------------
> @Property(label = "Auto reload period",
> description = "Sleep interval between reloading scans.",longValue=0)
> public final static String RELOAD_PERIOD = "reload.period";
> leads to:
> $ mvn clean install
> [INFO] Scanning for projects...
> [WARNING] POM for 'biz.aQute:bndlib:pom:1.43.0:runtime' is invalid.
> Its dependencies (if any) will NOT be available to the current build.
> [INFO] ------------------------------------------------------------------------
> [INFO] Building numclass-cmtport
> [INFO] task-segment: [clean, install]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] Deleting file set: /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target (included: [**], excluded: [])
> [INFO] [resources:resources {execution: default-resources}]
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 0 resource
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Compiling 6 source files to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/classes
> [INFO] [scr:scr {execution: generate-scr-scrdescriptor}]
> [INFO] Generating 2 MetaType Descriptors to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/scr-plugin-generated/OSGI-INF/metatype/metatype.xml
> [INFO] Writing abstract service descriptor /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/scr-plugin-generated/OSGI-INF/scr-plugin/scrinfo.xml with 1 entries.
> [INFO] Generating 1 Service Component Descriptors to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/scr-plugin-generated/OSGI-INF/serviceComponents.xml
> [INFO] [resources:testResources {execution: default-testResources}]
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 3 resources
> [INFO] [compiler:testCompile {execution: default-testCompile}]
> [INFO] Compiling 6 source files to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/test-classes
> [INFO] [surefire:test {execution: default-test}]
> [INFO] Surefire report directory: /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/surefire-reports
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Running TestSuite
> Nov 18, 2011 1:02:22 PM com.peoplecall.numclass.cmtport.CmtPortClassifier loadCmtData
> WARNING: Error loading cmt data from ESTO NO EXISTE NI PATRAS previous contents kept.
> Nov 18, 2011 1:02:22 PM com.peoplecall.numclass.cmtport.CmtPortClassifier loadPortData
> WARNING: Error loading porting data from ESTO NO EXISTE NI PATRAS previous contents kept.
> Tests run: 27, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.558 sec
> Results :
> Tests run: 27, Failures: 0, Errors: 0, Skipped: 0
> [INFO] [bundle:bundle {execution: default-bundle}]
> [INFO] [install:install {execution: default-install}]
> [INFO] Installing /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/numclass-cmtport-1.0-SNAPSHOT.jar to /home/folarte/.m2/repository/com/peoplecall/numclass-cmtport/1.0-SNAPSHOT/numclass-cmtport-1.0-SNAPSHOT.jar
> [INFO] [bundle:install {execution: default-install}]
> [INFO] Installing com/peoplecall/numclass-cmtport/1.0-SNAPSHOT/numclass-cmtport-1.0-SNAPSHOT.jar
> [INFO] Writing OBR metadata
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 4 seconds
> [INFO] Finished at: Fri Nov 18 13:02:23 CET 2011
> [INFO] Final Memory: 28M/247M
> [INFO] ------------------------------------------------------------------------
--
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
[jira] [Closed] (FELIX-3234) @Property annotation raises exceptions
on longValue=0L use
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler closed FELIX-3234.
-----------------------------------
Assignee: Carsten Ziegeler
> @Property annotation raises exceptions on longValue=0L use
> -----------------------------------------------------------
>
> Key: FELIX-3234
> URL: https://issues.apache.org/jira/browse/FELIX-3234
> Project: Felix
> Issue Type: Bug
> Components: Maven SCR Plugin
> Affects Versions: maven-scr-plugin-1.7.2, maven-scr-plugin-1.7.4, scr annotations 1.6.0
> Environment: $ mvn -V
> Apache Maven 2.2.1 (rdebian-6)
> Java version: 1.6.0_26
> Java home: /usr/lib/jvm/java-6-sun-1.6.0.26/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux" version: "3.0.0-12-generic" arch: "amd64" Family: "unix"
> Reporter: Francisco Olarte
> Assignee: Carsten Ziegeler
> Priority: Minor
> Fix For: maven-scr-plugin-1.8.0, scr ant task 1.2.0, scr generator 1.2.0
>
>
> When putting longValue =0L I get an exception on build, note it MUST be '0L'. Exceptions does not hapen when using '0' ( without the long modifier ) or 1234567 or 1234567L
> It seems problem occurs only with the '0L' value, as '00L' and '00000L' work fine ( I have tested the values '0', '0L', '00L','00000L', '1234567' and '1234567L' , and, after that, '0l', 00l' ( one and two zeroes, lowercase L ) and the only ones which do not work are '0L' and '0l', all the other ones build flawlessly ).
> The contens of metatype.xml for the property are correct: ( with 00l ):
> <AD id="reload.period" type="Long" default="0" name="Auto reload period" description="Sleep interval between reloading scans."/>
> Included below are captures for 0L and 0, results for the other ones are the same.
> If needed I can try to strip the build to a minimum and send it.
> ----- with L modifier, raises exceptions: ------------
> @Property(label = "Auto reload period",
> description = "Sleep interval between reloading scans.",longValue=0L)
> public final static String RELOAD_PERIOD = "reload.period";
> leads to:
> $ mvn clean install
> [INFO] Scanning for projects...
> [WARNING] POM for 'biz.aQute:bndlib:pom:1.43.0:runtime' is invalid.
> Its dependencies (if any) will NOT be available to the current build.
> [INFO] ------------------------------------------------------------------------
> [INFO] Building numclass-cmtport
> [INFO] task-segment: [clean, install]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] Deleting file set: /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target (included: [**], excluded: [])
> [INFO] [resources:resources {execution: default-resources}]
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 0 resource
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Compiling 6 source files to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/classes
> [INFO] [scr:scr {execution: generate-scr-scrdescriptor}]
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] For input string: ""
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NumberFormatException: For input string: ""
> at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
> at java.lang.Long.parseLong(Long.java:431)
> at com.thoughtworks.qdox.parser.impl.Parser.toLong(Parser.java:1180)
> at com.thoughtworks.qdox.parser.impl.Parser.yyparse(Parser.java:1784)
> at com.thoughtworks.qdox.parser.impl.Parser.parse(Parser.java:999)
> at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:353)
> at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:381)
> at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:377)
> at org.apache.felix.scrplugin.JavaClassDescriptorManager.getSources(JavaClassDescriptorManager.java:115)
> at org.apache.felix.scrplugin.JavaClassDescriptorManager.getJavaClassesFromSources(JavaClassDescriptorManager.java:459)
> at org.apache.felix.scrplugin.JavaClassDescriptorManager.getSourceDescriptions(JavaClassDescriptorManager.java:361)
> at org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:234)
> at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:184)
> at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
> at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 2 seconds
> [INFO] Finished at: Fri Nov 18 13:00:44 CET 2011
> [INFO] Final Memory: 23M/296M
> [INFO] ------------------------------------------------------------------------
> ---------
> --------- without the L modifer ( no problems )--------------
> @Property(label = "Auto reload period",
> description = "Sleep interval between reloading scans.",longValue=0)
> public final static String RELOAD_PERIOD = "reload.period";
> leads to:
> $ mvn clean install
> [INFO] Scanning for projects...
> [WARNING] POM for 'biz.aQute:bndlib:pom:1.43.0:runtime' is invalid.
> Its dependencies (if any) will NOT be available to the current build.
> [INFO] ------------------------------------------------------------------------
> [INFO] Building numclass-cmtport
> [INFO] task-segment: [clean, install]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] Deleting file set: /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target (included: [**], excluded: [])
> [INFO] [resources:resources {execution: default-resources}]
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 0 resource
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Compiling 6 source files to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/classes
> [INFO] [scr:scr {execution: generate-scr-scrdescriptor}]
> [INFO] Generating 2 MetaType Descriptors to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/scr-plugin-generated/OSGI-INF/metatype/metatype.xml
> [INFO] Writing abstract service descriptor /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/scr-plugin-generated/OSGI-INF/scr-plugin/scrinfo.xml with 1 entries.
> [INFO] Generating 1 Service Component Descriptors to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/scr-plugin-generated/OSGI-INF/serviceComponents.xml
> [INFO] [resources:testResources {execution: default-testResources}]
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 3 resources
> [INFO] [compiler:testCompile {execution: default-testCompile}]
> [INFO] Compiling 6 source files to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/test-classes
> [INFO] [surefire:test {execution: default-test}]
> [INFO] Surefire report directory: /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/surefire-reports
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Running TestSuite
> Nov 18, 2011 1:02:22 PM com.peoplecall.numclass.cmtport.CmtPortClassifier loadCmtData
> WARNING: Error loading cmt data from ESTO NO EXISTE NI PATRAS previous contents kept.
> Nov 18, 2011 1:02:22 PM com.peoplecall.numclass.cmtport.CmtPortClassifier loadPortData
> WARNING: Error loading porting data from ESTO NO EXISTE NI PATRAS previous contents kept.
> Tests run: 27, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.558 sec
> Results :
> Tests run: 27, Failures: 0, Errors: 0, Skipped: 0
> [INFO] [bundle:bundle {execution: default-bundle}]
> [INFO] [install:install {execution: default-install}]
> [INFO] Installing /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/numclass-cmtport-1.0-SNAPSHOT.jar to /home/folarte/.m2/repository/com/peoplecall/numclass-cmtport/1.0-SNAPSHOT/numclass-cmtport-1.0-SNAPSHOT.jar
> [INFO] [bundle:install {execution: default-install}]
> [INFO] Installing com/peoplecall/numclass-cmtport/1.0-SNAPSHOT/numclass-cmtport-1.0-SNAPSHOT.jar
> [INFO] Writing OBR metadata
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 4 seconds
> [INFO] Finished at: Fri Nov 18 13:02:23 CET 2011
> [INFO] Final Memory: 28M/247M
> [INFO] ------------------------------------------------------------------------
--
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
[jira] [Updated] (FELIX-3234) maven SCR plugin @Property annotation
raises exceptions on longValue=0L use
Posted by "Francisco Olarte (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Francisco Olarte updated FELIX-3234:
------------------------------------
Priority: Minor (was: Major)
Description:
When putting longValue =0L I get an exception on build, note it MUST be '0L'. Exceptions does not hapen when using '0' ( without the long modifier ) or 1234567 or 1234567L
It seems problem occurs only with the '0L' value, as '00L' and '00000L' work fine ( I have tested the values '0', '0L', '00L','00000L', '1234567' and '1234567L' , and, after that, '0l', 00l' ( one and two zeroes, lowercase L ) and the only ones which do not work are '0L' and '0l', all the other ones build flawlessly ).
The contens of metatype.xml for the property are correct: ( with 00l ):
<AD id="reload.period" type="Long" default="0" name="Auto reload period" description="Sleep interval between reloading scans."/>
Included below are captures for 0L and 0, results for the other ones are the same.
If needed I can try to strip the build to a minimum and send it.
----- with L modifier, raises exceptions: ------------
@Property(label = "Auto reload period",
description = "Sleep interval between reloading scans.",longValue=0L)
public final static String RELOAD_PERIOD = "reload.period";
leads to:
$ mvn clean install
[INFO] Scanning for projects...
[WARNING] POM for 'biz.aQute:bndlib:pom:1.43.0:runtime' is invalid.
Its dependencies (if any) will NOT be available to the current build.
[INFO] ------------------------------------------------------------------------
[INFO] Building numclass-cmtport
[INFO] task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting file set: /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target (included: [**], excluded: [])
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 6 source files to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/classes
[INFO] [scr:scr {execution: generate-scr-scrdescriptor}]
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] For input string: ""
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Long.parseLong(Long.java:431)
at com.thoughtworks.qdox.parser.impl.Parser.toLong(Parser.java:1180)
at com.thoughtworks.qdox.parser.impl.Parser.yyparse(Parser.java:1784)
at com.thoughtworks.qdox.parser.impl.Parser.parse(Parser.java:999)
at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:353)
at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:381)
at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:377)
at org.apache.felix.scrplugin.JavaClassDescriptorManager.getSources(JavaClassDescriptorManager.java:115)
at org.apache.felix.scrplugin.JavaClassDescriptorManager.getJavaClassesFromSources(JavaClassDescriptorManager.java:459)
at org.apache.felix.scrplugin.JavaClassDescriptorManager.getSourceDescriptions(JavaClassDescriptorManager.java:361)
at org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:234)
at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:184)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Fri Nov 18 13:00:44 CET 2011
[INFO] Final Memory: 23M/296M
[INFO] ------------------------------------------------------------------------
---------
--------- without the L modifer ( no problems )--------------
@Property(label = "Auto reload period",
description = "Sleep interval between reloading scans.",longValue=0)
public final static String RELOAD_PERIOD = "reload.period";
leads to:
$ mvn clean install
[INFO] Scanning for projects...
[WARNING] POM for 'biz.aQute:bndlib:pom:1.43.0:runtime' is invalid.
Its dependencies (if any) will NOT be available to the current build.
[INFO] ------------------------------------------------------------------------
[INFO] Building numclass-cmtport
[INFO] task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting file set: /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target (included: [**], excluded: [])
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 6 source files to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/classes
[INFO] [scr:scr {execution: generate-scr-scrdescriptor}]
[INFO] Generating 2 MetaType Descriptors to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/scr-plugin-generated/OSGI-INF/metatype/metatype.xml
[INFO] Writing abstract service descriptor /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/scr-plugin-generated/OSGI-INF/scr-plugin/scrinfo.xml with 1 entries.
[INFO] Generating 1 Service Component Descriptors to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/scr-plugin-generated/OSGI-INF/serviceComponents.xml
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Compiling 6 source files to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/test-classes
[INFO] [surefire:test {execution: default-test}]
[INFO] Surefire report directory: /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running TestSuite
Nov 18, 2011 1:02:22 PM com.peoplecall.numclass.cmtport.CmtPortClassifier loadCmtData
WARNING: Error loading cmt data from ESTO NO EXISTE NI PATRAS previous contents kept.
Nov 18, 2011 1:02:22 PM com.peoplecall.numclass.cmtport.CmtPortClassifier loadPortData
WARNING: Error loading porting data from ESTO NO EXISTE NI PATRAS previous contents kept.
Tests run: 27, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.558 sec
Results :
Tests run: 27, Failures: 0, Errors: 0, Skipped: 0
[INFO] [bundle:bundle {execution: default-bundle}]
[INFO] [install:install {execution: default-install}]
[INFO] Installing /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/numclass-cmtport-1.0-SNAPSHOT.jar to /home/folarte/.m2/repository/com/peoplecall/numclass-cmtport/1.0-SNAPSHOT/numclass-cmtport-1.0-SNAPSHOT.jar
[INFO] [bundle:install {execution: default-install}]
[INFO] Installing com/peoplecall/numclass-cmtport/1.0-SNAPSHOT/numclass-cmtport-1.0-SNAPSHOT.jar
[INFO] Writing OBR metadata
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 seconds
[INFO] Finished at: Fri Nov 18 13:02:23 CET 2011
[INFO] Final Memory: 28M/247M
[INFO] ------------------------------------------------------------------------
Affects Version/s: maven-scr-plugin-1.7.2
maven-scr-plugin-1.7.4
Summary: maven SCR plugin @Property annotation raises exceptions on longValue=0L use (was: maven SCR plugin @Property annotation raises exceptions on longValue use)
> maven SCR plugin @Property annotation raises exceptions on longValue=0L use
> ----------------------------------------------------------------------------
>
> Key: FELIX-3234
> URL: https://issues.apache.org/jira/browse/FELIX-3234
> Project: Felix
> Issue Type: Bug
> Components: Maven SCR Plugin
> Affects Versions: maven-scr-plugin-1.7.2, maven-scr-plugin-1.7.4, scr annotations 1.6.0
> Environment: $ mvn -V
> Apache Maven 2.2.1 (rdebian-6)
> Java version: 1.6.0_26
> Java home: /usr/lib/jvm/java-6-sun-1.6.0.26/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux" version: "3.0.0-12-generic" arch: "amd64" Family: "unix"
> Reporter: Francisco Olarte
> Priority: Minor
>
> When putting longValue =0L I get an exception on build, note it MUST be '0L'. Exceptions does not hapen when using '0' ( without the long modifier ) or 1234567 or 1234567L
> It seems problem occurs only with the '0L' value, as '00L' and '00000L' work fine ( I have tested the values '0', '0L', '00L','00000L', '1234567' and '1234567L' , and, after that, '0l', 00l' ( one and two zeroes, lowercase L ) and the only ones which do not work are '0L' and '0l', all the other ones build flawlessly ).
> The contens of metatype.xml for the property are correct: ( with 00l ):
> <AD id="reload.period" type="Long" default="0" name="Auto reload period" description="Sleep interval between reloading scans."/>
> Included below are captures for 0L and 0, results for the other ones are the same.
> If needed I can try to strip the build to a minimum and send it.
> ----- with L modifier, raises exceptions: ------------
> @Property(label = "Auto reload period",
> description = "Sleep interval between reloading scans.",longValue=0L)
> public final static String RELOAD_PERIOD = "reload.period";
> leads to:
> $ mvn clean install
> [INFO] Scanning for projects...
> [WARNING] POM for 'biz.aQute:bndlib:pom:1.43.0:runtime' is invalid.
> Its dependencies (if any) will NOT be available to the current build.
> [INFO] ------------------------------------------------------------------------
> [INFO] Building numclass-cmtport
> [INFO] task-segment: [clean, install]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] Deleting file set: /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target (included: [**], excluded: [])
> [INFO] [resources:resources {execution: default-resources}]
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 0 resource
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Compiling 6 source files to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/classes
> [INFO] [scr:scr {execution: generate-scr-scrdescriptor}]
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] For input string: ""
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NumberFormatException: For input string: ""
> at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
> at java.lang.Long.parseLong(Long.java:431)
> at com.thoughtworks.qdox.parser.impl.Parser.toLong(Parser.java:1180)
> at com.thoughtworks.qdox.parser.impl.Parser.yyparse(Parser.java:1784)
> at com.thoughtworks.qdox.parser.impl.Parser.parse(Parser.java:999)
> at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:353)
> at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:381)
> at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:377)
> at org.apache.felix.scrplugin.JavaClassDescriptorManager.getSources(JavaClassDescriptorManager.java:115)
> at org.apache.felix.scrplugin.JavaClassDescriptorManager.getJavaClassesFromSources(JavaClassDescriptorManager.java:459)
> at org.apache.felix.scrplugin.JavaClassDescriptorManager.getSourceDescriptions(JavaClassDescriptorManager.java:361)
> at org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:234)
> at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:184)
> at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
> at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 2 seconds
> [INFO] Finished at: Fri Nov 18 13:00:44 CET 2011
> [INFO] Final Memory: 23M/296M
> [INFO] ------------------------------------------------------------------------
> ---------
> --------- without the L modifer ( no problems )--------------
> @Property(label = "Auto reload period",
> description = "Sleep interval between reloading scans.",longValue=0)
> public final static String RELOAD_PERIOD = "reload.period";
> leads to:
> $ mvn clean install
> [INFO] Scanning for projects...
> [WARNING] POM for 'biz.aQute:bndlib:pom:1.43.0:runtime' is invalid.
> Its dependencies (if any) will NOT be available to the current build.
> [INFO] ------------------------------------------------------------------------
> [INFO] Building numclass-cmtport
> [INFO] task-segment: [clean, install]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] Deleting file set: /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target (included: [**], excluded: [])
> [INFO] [resources:resources {execution: default-resources}]
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 0 resource
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Compiling 6 source files to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/classes
> [INFO] [scr:scr {execution: generate-scr-scrdescriptor}]
> [INFO] Generating 2 MetaType Descriptors to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/scr-plugin-generated/OSGI-INF/metatype/metatype.xml
> [INFO] Writing abstract service descriptor /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/scr-plugin-generated/OSGI-INF/scr-plugin/scrinfo.xml with 1 entries.
> [INFO] Generating 1 Service Component Descriptors to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/scr-plugin-generated/OSGI-INF/serviceComponents.xml
> [INFO] [resources:testResources {execution: default-testResources}]
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 3 resources
> [INFO] [compiler:testCompile {execution: default-testCompile}]
> [INFO] Compiling 6 source files to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/test-classes
> [INFO] [surefire:test {execution: default-test}]
> [INFO] Surefire report directory: /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/surefire-reports
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Running TestSuite
> Nov 18, 2011 1:02:22 PM com.peoplecall.numclass.cmtport.CmtPortClassifier loadCmtData
> WARNING: Error loading cmt data from ESTO NO EXISTE NI PATRAS previous contents kept.
> Nov 18, 2011 1:02:22 PM com.peoplecall.numclass.cmtport.CmtPortClassifier loadPortData
> WARNING: Error loading porting data from ESTO NO EXISTE NI PATRAS previous contents kept.
> Tests run: 27, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.558 sec
> Results :
> Tests run: 27, Failures: 0, Errors: 0, Skipped: 0
> [INFO] [bundle:bundle {execution: default-bundle}]
> [INFO] [install:install {execution: default-install}]
> [INFO] Installing /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/numclass-cmtport-1.0-SNAPSHOT.jar to /home/folarte/.m2/repository/com/peoplecall/numclass-cmtport/1.0-SNAPSHOT/numclass-cmtport-1.0-SNAPSHOT.jar
> [INFO] [bundle:install {execution: default-install}]
> [INFO] Installing com/peoplecall/numclass-cmtport/1.0-SNAPSHOT/numclass-cmtport-1.0-SNAPSHOT.jar
> [INFO] Writing OBR metadata
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 4 seconds
> [INFO] Finished at: Fri Nov 18 13:02:23 CET 2011
> [INFO] Final Memory: 28M/247M
> [INFO] ------------------------------------------------------------------------
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (FELIX-3234) maven SCR plugin @Property
annotation raises exceptions on longValue=0L use
Posted by "Francisco Olarte (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-3234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13152961#comment-13152961 ]
Francisco Olarte commented on FELIX-3234:
-----------------------------------------
To satisfy my curiosity I added ( by copying and mutilating the Property annotation def ) one annotation and one use of it to my project, and got the same behaviour, qdox exception when 0L, ok when naked 0.
I don't know when/how to report this to qdox or what to do with this, so I'm pasting the ( by my consideration ) relevant chunks here in hope someone more knodledgeable knows what to do with them.
If neccessary I can run version printing commands if someone feels it's my system configuration faults, but it smells like a faulty parser to me. When I have some time and learn a little more about file-attaching I'll try to reduce everything to a standalone mini-maven project and post it here.
-------------- the annotation ------------------
package com.peoplecall.numclass.cmtport;
import java.lang.annotation.*;
@Target( { ElementType.TYPE, ElementType.FIELD })
@Retention(RetentionPolicy.SOURCE)
@Documented
public @interface TstAnnotation {
long[] longValue() default {};
}
---------- The class which uses it -------------------
package com.peoplecall.numclass.cmtport;
public class TstAnnotated {
@TstAnnotation(longValue=0)
public final static String TST_STRING = "tst_string";
}
-------- The exception----------------
[INFO] [scr:scr {execution: generate-scr-scrdescriptor}]
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] For input string: ""
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Long.parseLong(Long.java:431)
at com.thoughtworks.qdox.parser.impl.Parser.toLong(Parser.java:1180)
at com.thoughtworks.qdox.parser.impl.Parser.yyparse(Parser.java:1784)
at com.thoughtworks.qdox.parser.impl.Parser.parse(Parser.java:999)
at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:353)
at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:381)
at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:377)
at org.apache.felix.scrplugin.JavaClassDescriptorManager.getSources(JavaClassDescriptorManager.java:115)
at org.apache.felix.scrplugin.JavaClassDescriptorManager.getJavaClassesFromSources(JavaClassDescriptorManager.java:459)
at org.apache.felix.scrplugin.JavaClassDescriptorManager.getSourceDescriptions(JavaClassDescriptorManager.java:361)
at org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:234)
at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:184)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ------------------------------------------------------------------------
This has been tested with 1.7.2, I used 1.7.4 in my previous test.
> maven SCR plugin @Property annotation raises exceptions on longValue=0L use
> ----------------------------------------------------------------------------
>
> Key: FELIX-3234
> URL: https://issues.apache.org/jira/browse/FELIX-3234
> Project: Felix
> Issue Type: Bug
> Components: Maven SCR Plugin
> Affects Versions: maven-scr-plugin-1.7.2, maven-scr-plugin-1.7.4, scr annotations 1.6.0
> Environment: $ mvn -V
> Apache Maven 2.2.1 (rdebian-6)
> Java version: 1.6.0_26
> Java home: /usr/lib/jvm/java-6-sun-1.6.0.26/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux" version: "3.0.0-12-generic" arch: "amd64" Family: "unix"
> Reporter: Francisco Olarte
> Priority: Minor
>
> When putting longValue =0L I get an exception on build, note it MUST be '0L'. Exceptions does not hapen when using '0' ( without the long modifier ) or 1234567 or 1234567L
> It seems problem occurs only with the '0L' value, as '00L' and '00000L' work fine ( I have tested the values '0', '0L', '00L','00000L', '1234567' and '1234567L' , and, after that, '0l', 00l' ( one and two zeroes, lowercase L ) and the only ones which do not work are '0L' and '0l', all the other ones build flawlessly ).
> The contens of metatype.xml for the property are correct: ( with 00l ):
> <AD id="reload.period" type="Long" default="0" name="Auto reload period" description="Sleep interval between reloading scans."/>
> Included below are captures for 0L and 0, results for the other ones are the same.
> If needed I can try to strip the build to a minimum and send it.
> ----- with L modifier, raises exceptions: ------------
> @Property(label = "Auto reload period",
> description = "Sleep interval between reloading scans.",longValue=0L)
> public final static String RELOAD_PERIOD = "reload.period";
> leads to:
> $ mvn clean install
> [INFO] Scanning for projects...
> [WARNING] POM for 'biz.aQute:bndlib:pom:1.43.0:runtime' is invalid.
> Its dependencies (if any) will NOT be available to the current build.
> [INFO] ------------------------------------------------------------------------
> [INFO] Building numclass-cmtport
> [INFO] task-segment: [clean, install]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] Deleting file set: /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target (included: [**], excluded: [])
> [INFO] [resources:resources {execution: default-resources}]
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 0 resource
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Compiling 6 source files to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/classes
> [INFO] [scr:scr {execution: generate-scr-scrdescriptor}]
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] For input string: ""
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NumberFormatException: For input string: ""
> at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
> at java.lang.Long.parseLong(Long.java:431)
> at com.thoughtworks.qdox.parser.impl.Parser.toLong(Parser.java:1180)
> at com.thoughtworks.qdox.parser.impl.Parser.yyparse(Parser.java:1784)
> at com.thoughtworks.qdox.parser.impl.Parser.parse(Parser.java:999)
> at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:353)
> at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:381)
> at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:377)
> at org.apache.felix.scrplugin.JavaClassDescriptorManager.getSources(JavaClassDescriptorManager.java:115)
> at org.apache.felix.scrplugin.JavaClassDescriptorManager.getJavaClassesFromSources(JavaClassDescriptorManager.java:459)
> at org.apache.felix.scrplugin.JavaClassDescriptorManager.getSourceDescriptions(JavaClassDescriptorManager.java:361)
> at org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:234)
> at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:184)
> at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
> at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 2 seconds
> [INFO] Finished at: Fri Nov 18 13:00:44 CET 2011
> [INFO] Final Memory: 23M/296M
> [INFO] ------------------------------------------------------------------------
> ---------
> --------- without the L modifer ( no problems )--------------
> @Property(label = "Auto reload period",
> description = "Sleep interval between reloading scans.",longValue=0)
> public final static String RELOAD_PERIOD = "reload.period";
> leads to:
> $ mvn clean install
> [INFO] Scanning for projects...
> [WARNING] POM for 'biz.aQute:bndlib:pom:1.43.0:runtime' is invalid.
> Its dependencies (if any) will NOT be available to the current build.
> [INFO] ------------------------------------------------------------------------
> [INFO] Building numclass-cmtport
> [INFO] task-segment: [clean, install]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] Deleting file set: /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target (included: [**], excluded: [])
> [INFO] [resources:resources {execution: default-resources}]
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 0 resource
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Compiling 6 source files to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/classes
> [INFO] [scr:scr {execution: generate-scr-scrdescriptor}]
> [INFO] Generating 2 MetaType Descriptors to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/scr-plugin-generated/OSGI-INF/metatype/metatype.xml
> [INFO] Writing abstract service descriptor /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/scr-plugin-generated/OSGI-INF/scr-plugin/scrinfo.xml with 1 entries.
> [INFO] Generating 1 Service Component Descriptors to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/scr-plugin-generated/OSGI-INF/serviceComponents.xml
> [INFO] [resources:testResources {execution: default-testResources}]
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 3 resources
> [INFO] [compiler:testCompile {execution: default-testCompile}]
> [INFO] Compiling 6 source files to /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/test-classes
> [INFO] [surefire:test {execution: default-test}]
> [INFO] Surefire report directory: /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/surefire-reports
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Running TestSuite
> Nov 18, 2011 1:02:22 PM com.peoplecall.numclass.cmtport.CmtPortClassifier loadCmtData
> WARNING: Error loading cmt data from ESTO NO EXISTE NI PATRAS previous contents kept.
> Nov 18, 2011 1:02:22 PM com.peoplecall.numclass.cmtport.CmtPortClassifier loadPortData
> WARNING: Error loading porting data from ESTO NO EXISTE NI PATRAS previous contents kept.
> Tests run: 27, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.558 sec
> Results :
> Tests run: 27, Failures: 0, Errors: 0, Skipped: 0
> [INFO] [bundle:bundle {execution: default-bundle}]
> [INFO] [install:install {execution: default-install}]
> [INFO] Installing /home/folarte/NetBeansProjects/numclass/numclass-cmtport/target/numclass-cmtport-1.0-SNAPSHOT.jar to /home/folarte/.m2/repository/com/peoplecall/numclass-cmtport/1.0-SNAPSHOT/numclass-cmtport-1.0-SNAPSHOT.jar
> [INFO] [bundle:install {execution: default-install}]
> [INFO] Installing com/peoplecall/numclass-cmtport/1.0-SNAPSHOT/numclass-cmtport-1.0-SNAPSHOT.jar
> [INFO] Writing OBR metadata
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 4 seconds
> [INFO] Finished at: Fri Nov 18 13:02:23 CET 2011
> [INFO] Final Memory: 28M/247M
> [INFO] ------------------------------------------------------------------------
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira