You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Paul Spencer <pa...@apache.org> on 2007/04/20 20:41:51 UTC

Problem using custom announcement with changes plugin

I am trying to configure the changes plugin, version 2.0-beta-2, to use a custom
announcement.vm file.  Setting templateDirectory in to /src/main/resources does
not work.  The command "mvn changes:announcement-generate" always fails with the
following error message:

   ResourceManager : unable to find resource '/src/main/resources/announcement.vm' in any resource loader

Belows is additional information related the the problem:

***
* From POM.XML
***
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-changes-plugin</artifactId>
	<configuration>
           <template>announcement.vm</template>
	  <templateDirectory>/src/main/resources</templateDirectory>
         </configuration>
       </plugin>

***
* Directory output
***
  Directory of C:\cvs\reporting-jsf\src\main\resources

04/20/2007  01:45 PM    <DIR>          .
04/20/2007  01:45 PM    <DIR>          ..
04/20/2007  01:45 PM             1,848 announcement.vm
04/18/2007  10:01 AM                69 application.properties
09/20/2006  11:56 AM               206 implementations.properties
04/12/2007  04:40 PM             1,109 log4j.xml
                4 File(s)          3,232 bytes
                2 Dir(s)  67,573,653,504 bytes free

C:\cvs_apms\apms-reporting-jsf>
***
* Maven debug output
***
[INFO] **************************************************************
[INFO] Starting Jakarta Velocity v1.4
[INFO] RuntimeInstance initializing.
[INFO] Default Properties File: org\apache\velocity\runtime\defaults\velocity.properties
[INFO] Default ResourceManager initializing. (class org.apache.velocity.runtime.resource.ResourceManagerImpl)
[INFO] Resource Loader Instantiated: org.apache.maven.plugin.resource.loader.ProjectResourceLoader
[INFO] ProjectResourceLoader : initialization starting.
[INFO] path :C:\cvs\reporting-jsf\src\main\resources\
[INFO] ProjectResourceLoader : adding path 'C:\cvs\reporting-jsf\src\main\resources\'
[INFO] ProjectResourceLoader : initialization complete.
[INFO] Resource Loader Instantiated: org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
[INFO] ClasspathResourceLoader : initialization starting.
[INFO] ClasspathResourceLoader : initialization complete.
[INFO] ResourceCache : initialized. (class org.apache.velocity.runtime.resource.ResourceCacheImpl)
[INFO] Default ResourceManager initialization complete.
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Literal
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Macro
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Parse
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Include
[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Foreach
[INFO] Created: 20 parsers.
[INFO] Velocimacro : initialization starting.
[INFO] Velocimacro : adding VMs from VM library template : VM_global_library.vm
[ERROR] ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader.
[INFO] Velocimacro : error using  VM library template VM_global_library.vm : org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'VM_global_library.vm'
[INFO] Velocimacro :  VM library template macro registration complete.
[INFO] Velocimacro : allowInline = true : VMs can be defined inline in templates
[INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline may NOT replace previous VM definitions
[INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will be  global in scope if allowed.
[INFO] Velocimacro : messages on  : VM system will output logging messages
[INFO] Velocimacro : autoload off  : VM system will not automatically reload global library macros
[INFO] Velocimacro : initialization complete.
[INFO] Velocity successfully started.
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-changes-plugin:2.0-beta-2:announcement-generate' -->
[DEBUG]   (s) artifactId = reporting-jsf
[DEBUG]   (s) developmentTeam = reporting-jsf-team
[DEBUG]   (s) finalName = reporting-jsf-1.0.2-SNAPSHOT.war
[DEBUG]   (f) generateJiraAnnouncement = false
[DEBUG]   (s) groupId = com.mikon.customer.kc
[DEBUG]   (s) introduction = Generalized web based reporting tool for data.
[DEBUG]   (f) jiraXML = C:\cvs\reporting-jsf\target/jira-announcement.xml
[DEBUG]   (f) nbEntries = 25
[DEBUG]   (s) outputDirectory = C:\cvs\reporting-jsf\target/announcement
[DEBUG]   (s) packaging = war
[DEBUG]   (f) project = org.apache.maven.project.MavenProject@4ff0d01
[DEBUG]   (f) resolutionId = Fixed
[DEBUG]   (f) setting = org.apache.maven.settings.Settings@1b01afa
[DEBUG]   (f) statusId = Closed
[DEBUG]   (f) template = announcement.vm
[DEBUG]   (f) templateDirectory = /src/main/resources
[DEBUG]   (s) url = http://developer.foo.com/projects/reporting-jsf/1.0.2-SNAPSHOT/reporting-jsf
[DEBUG]   (s) urlDownload = http://developer.foo.com/projects/reporting-jsf/1.0.2-SNAPSHOT/reporting-jsf/reporting-jsf-1.0.2-SNAPSHOT.jar
[DEBUG]   (s) version = 1.0.2-SNAPSHOT
[DEBUG]   (s) xmlPath = C:\cvs\reporting-jsf/src/changes/changes.xml
[DEBUG] -- end configuration --
[INFO] [changes:announcement-generate]
[INFO] Creating announcement file from changes.xml...
[ERROR] ResourceManager : unable to find resource '/src/main/resources/announcement.vm' in any resource loader.
[INFO] ------------------------------------------------------------------------

Is this a bug or a configuration error?

Paul Spencer


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Problem using custom announcement with changes plugin

Posted by Dennis Lundberg <de...@apache.org>.
I had a look at this and it seems that this is a requirement of 
Velocity, which is used to merge the template with the data. I'll add 
some text about this in the documentation for the plugin.

Dennis Lundberg wrote:
> That is a very good question. I'm afraid I don't know the answer to it. 
> Since the changes-plugin is still in beta, I think that it would be 
> possible to change the default location for the templates. The normal 
> plugin behavior when it comes to configuration, is to start out from 
> ${basedir}.
> 
> Steven Rowe wrote:
>> Hi Dennis,
>>
>> Why not use /src/changes/ instead of /src/main/resources/ ?
>>
>> By default, for jar packaging anyway, everything /src/main/resources/
>> will be put into the artifact, but why would anybody ever want an email
>> announcement template in the artifact?
>>
>> Just curious,
>> Steve
>>
>> Dennis Lundberg wrote:
>>> Hi Paul,
>>>
>>> I committed a new page for the site that explains how to create and use
>>> a custom template for the announcement. As you sort of figured out
>>> already, the templateDirectory starts from /src/main/resources, i.e. not
>>> from ${basedir}.
>>>
>>> I have not deployed a new site yet, but you can have a look at the apt
>>> file in svn, until the site is deployed:
>>>
>>>
>>> http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/using-a-custom-announcement-template.apt 
>>>
>>>
>>>
>>> Paul Spencer wrote:
>>>> I am trying to configure the changes plugin, version 2.0-beta-2, to
>>>> use a custom
>>>> announcement.vm file.  Setting templateDirectory in to
>>>> /src/main/resources does
>>>> not work.  The command "mvn changes:announcement-generate" always
>>>> fails with the
>>>> following error message:
>>>>
>>>>   ResourceManager : unable to find resource
>>>> '/src/main/resources/announcement.vm' in any resource loader
>>>>
>>>> Belows is additional information related the the problem:
>>>>
>>>> ***
>>>> * From POM.XML
>>>> ***
>>>>       <plugin>
>>>>         <groupId>org.apache.maven.plugins</groupId>
>>>>         <artifactId>maven-changes-plugin</artifactId>
>>>>     <configuration>
>>>>           <template>announcement.vm</template>
>>>>       <templateDirectory>/src/main/resources</templateDirectory>
>>>>         </configuration>
>>>>       </plugin>
>>>>
>>>> ***
>>>> * Directory output
>>>> ***
>>>>  Directory of C:\cvs\reporting-jsf\src\main\resources
>>>>
>>>> 04/20/2007  01:45 PM    <DIR>          .
>>>> 04/20/2007  01:45 PM    <DIR>          ..
>>>> 04/20/2007  01:45 PM             1,848 announcement.vm
>>>> 04/18/2007  10:01 AM                69 application.properties
>>>> 09/20/2006  11:56 AM               206 implementations.properties
>>>> 04/12/2007  04:40 PM             1,109 log4j.xml
>>>>                4 File(s)          3,232 bytes
>>>>                2 Dir(s)  67,573,653,504 bytes free
>>>>
>>>> C:\cvs_apms\apms-reporting-jsf>
>>>> ***
>>>> * Maven debug output
>>>> ***
>>>> [INFO] **************************************************************
>>>> [INFO] Starting Jakarta Velocity v1.4
>>>> [INFO] RuntimeInstance initializing.
>>>> [INFO] Default Properties File:
>>>> org\apache\velocity\runtime\defaults\velocity.properties
>>>> [INFO] Default ResourceManager initializing. (class
>>>> org.apache.velocity.runtime.resource.ResourceManagerImpl)
>>>> [INFO] Resource Loader Instantiated:
>>>> org.apache.maven.plugin.resource.loader.ProjectResourceLoader
>>>> [INFO] ProjectResourceLoader : initialization starting.
>>>> [INFO] path :C:\cvs\reporting-jsf\src\main\resources\
>>>> [INFO] ProjectResourceLoader : adding path
>>>> 'C:\cvs\reporting-jsf\src\main\resources\'
>>>> [INFO] ProjectResourceLoader : initialization complete.
>>>> [INFO] Resource Loader Instantiated:
>>>> org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
>>>> [INFO] ClasspathResourceLoader : initialization starting.
>>>> [INFO] ClasspathResourceLoader : initialization complete.
>>>> [INFO] ResourceCache : initialized. (class
>>>> org.apache.velocity.runtime.resource.ResourceCacheImpl)
>>>> [INFO] Default ResourceManager initialization complete.
>>>> [INFO] Loaded System Directive:
>>>> org.apache.velocity.runtime.directive.Literal
>>>> [INFO] Loaded System Directive:
>>>> org.apache.velocity.runtime.directive.Macro
>>>> [INFO] Loaded System Directive:
>>>> org.apache.velocity.runtime.directive.Parse
>>>> [INFO] Loaded System Directive:
>>>> org.apache.velocity.runtime.directive.Include
>>>> [INFO] Loaded System Directive:
>>>> org.apache.velocity.runtime.directive.Foreach
>>>> [INFO] Created: 20 parsers.
>>>> [INFO] Velocimacro : initialization starting.
>>>> [INFO] Velocimacro : adding VMs from VM library template :
>>>> VM_global_library.vm
>>>> [ERROR] ResourceManager : unable to find resource
>>>> 'VM_global_library.vm' in any resource loader.
>>>> [INFO] Velocimacro : error using  VM library template
>>>> VM_global_library.vm :
>>>> org.apache.velocity.exception.ResourceNotFoundException: Unable to
>>>> find resource 'VM_global_library.vm'
>>>> [INFO] Velocimacro :  VM library template macro registration complete.
>>>> [INFO] Velocimacro : allowInline = true : VMs can be defined inline in
>>>> templates
>>>> [INFO] Velocimacro : allowInlineToOverride = false : VMs defined
>>>> inline may NOT replace previous VM definitions
>>>> [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline
>>>> will be  global in scope if allowed.
>>>> [INFO] Velocimacro : messages on  : VM system will output logging
>>>> messages
>>>> [INFO] Velocimacro : autoload off  : VM system will not automatically
>>>> reload global library macros
>>>> [INFO] Velocimacro : initialization complete.
>>>> [INFO] Velocity successfully started.
>>>> [DEBUG] Configuring mojo
>>>> 'org.apache.maven.plugins:maven-changes-plugin:2.0-beta-2:announcement-generate' 
>>>>
>>>> -->
>>>> [DEBUG]   (s) artifactId = reporting-jsf
>>>> [DEBUG]   (s) developmentTeam = reporting-jsf-team
>>>> [DEBUG]   (s) finalName = reporting-jsf-1.0.2-SNAPSHOT.war
>>>> [DEBUG]   (f) generateJiraAnnouncement = false
>>>> [DEBUG]   (s) groupId = com.mikon.customer.kc
>>>> [DEBUG]   (s) introduction = Generalized web based reporting tool for
>>>> data.
>>>> [DEBUG]   (f) jiraXML = 
>>>> C:\cvs\reporting-jsf\target/jira-announcement.xml
>>>> [DEBUG]   (f) nbEntries = 25
>>>> [DEBUG]   (s) outputDirectory = 
>>>> C:\cvs\reporting-jsf\target/announcement
>>>> [DEBUG]   (s) packaging = war
>>>> [DEBUG]   (f) project = org.apache.maven.project.MavenProject@4ff0d01
>>>> [DEBUG]   (f) resolutionId = Fixed
>>>> [DEBUG]   (f) setting = org.apache.maven.settings.Settings@1b01afa
>>>> [DEBUG]   (f) statusId = Closed
>>>> [DEBUG]   (f) template = announcement.vm
>>>> [DEBUG]   (f) templateDirectory = /src/main/resources
>>>> [DEBUG]   (s) url =
>>>> http://developer.foo.com/projects/reporting-jsf/1.0.2-SNAPSHOT/reporting-jsf 
>>>>
>>>>
>>>> [DEBUG]   (s) urlDownload =
>>>> http://developer.foo.com/projects/reporting-jsf/1.0.2-SNAPSHOT/reporting-jsf/reporting-jsf-1.0.2-SNAPSHOT.jar 
>>>>
>>>>
>>>> [DEBUG]   (s) version = 1.0.2-SNAPSHOT
>>>> [DEBUG]   (s) xmlPath = C:\cvs\reporting-jsf/src/changes/changes.xml
>>>> [DEBUG] -- end configuration --
>>>> [INFO] [changes:announcement-generate]
>>>> [INFO] Creating announcement file from changes.xml...
>>>> [ERROR] ResourceManager : unable to find resource
>>>> '/src/main/resources/announcement.vm' in any resource loader.
>>>> [INFO]
>>>> ------------------------------------------------------------------------ 
>>>>
>>>>
>>>> Is this a bug or a configuration error?
>>>>
>>>> Paul Spencer
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
> 
> 


-- 
Dennis Lundberg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Problem using custom announcement with changes plugin

Posted by Dennis Lundberg <de...@apache.org>.
That is a very good question. I'm afraid I don't know the answer to it. 
Since the changes-plugin is still in beta, I think that it would be 
possible to change the default location for the templates. The normal 
plugin behavior when it comes to configuration, is to start out from 
${basedir}.

Steven Rowe wrote:
> Hi Dennis,
> 
> Why not use /src/changes/ instead of /src/main/resources/ ?
> 
> By default, for jar packaging anyway, everything /src/main/resources/
> will be put into the artifact, but why would anybody ever want an email
> announcement template in the artifact?
> 
> Just curious,
> Steve
> 
> Dennis Lundberg wrote:
>> Hi Paul,
>>
>> I committed a new page for the site that explains how to create and use
>> a custom template for the announcement. As you sort of figured out
>> already, the templateDirectory starts from /src/main/resources, i.e. not
>> from ${basedir}.
>>
>> I have not deployed a new site yet, but you can have a look at the apt
>> file in svn, until the site is deployed:
>>
>>
>> http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/using-a-custom-announcement-template.apt
>>
>>
>> Paul Spencer wrote:
>>> I am trying to configure the changes plugin, version 2.0-beta-2, to
>>> use a custom
>>> announcement.vm file.  Setting templateDirectory in to
>>> /src/main/resources does
>>> not work.  The command "mvn changes:announcement-generate" always
>>> fails with the
>>> following error message:
>>>
>>>   ResourceManager : unable to find resource
>>> '/src/main/resources/announcement.vm' in any resource loader
>>>
>>> Belows is additional information related the the problem:
>>>
>>> ***
>>> * From POM.XML
>>> ***
>>>       <plugin>
>>>         <groupId>org.apache.maven.plugins</groupId>
>>>         <artifactId>maven-changes-plugin</artifactId>
>>>     <configuration>
>>>           <template>announcement.vm</template>
>>>       <templateDirectory>/src/main/resources</templateDirectory>
>>>         </configuration>
>>>       </plugin>
>>>
>>> ***
>>> * Directory output
>>> ***
>>>  Directory of C:\cvs\reporting-jsf\src\main\resources
>>>
>>> 04/20/2007  01:45 PM    <DIR>          .
>>> 04/20/2007  01:45 PM    <DIR>          ..
>>> 04/20/2007  01:45 PM             1,848 announcement.vm
>>> 04/18/2007  10:01 AM                69 application.properties
>>> 09/20/2006  11:56 AM               206 implementations.properties
>>> 04/12/2007  04:40 PM             1,109 log4j.xml
>>>                4 File(s)          3,232 bytes
>>>                2 Dir(s)  67,573,653,504 bytes free
>>>
>>> C:\cvs_apms\apms-reporting-jsf>
>>> ***
>>> * Maven debug output
>>> ***
>>> [INFO] **************************************************************
>>> [INFO] Starting Jakarta Velocity v1.4
>>> [INFO] RuntimeInstance initializing.
>>> [INFO] Default Properties File:
>>> org\apache\velocity\runtime\defaults\velocity.properties
>>> [INFO] Default ResourceManager initializing. (class
>>> org.apache.velocity.runtime.resource.ResourceManagerImpl)
>>> [INFO] Resource Loader Instantiated:
>>> org.apache.maven.plugin.resource.loader.ProjectResourceLoader
>>> [INFO] ProjectResourceLoader : initialization starting.
>>> [INFO] path :C:\cvs\reporting-jsf\src\main\resources\
>>> [INFO] ProjectResourceLoader : adding path
>>> 'C:\cvs\reporting-jsf\src\main\resources\'
>>> [INFO] ProjectResourceLoader : initialization complete.
>>> [INFO] Resource Loader Instantiated:
>>> org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
>>> [INFO] ClasspathResourceLoader : initialization starting.
>>> [INFO] ClasspathResourceLoader : initialization complete.
>>> [INFO] ResourceCache : initialized. (class
>>> org.apache.velocity.runtime.resource.ResourceCacheImpl)
>>> [INFO] Default ResourceManager initialization complete.
>>> [INFO] Loaded System Directive:
>>> org.apache.velocity.runtime.directive.Literal
>>> [INFO] Loaded System Directive:
>>> org.apache.velocity.runtime.directive.Macro
>>> [INFO] Loaded System Directive:
>>> org.apache.velocity.runtime.directive.Parse
>>> [INFO] Loaded System Directive:
>>> org.apache.velocity.runtime.directive.Include
>>> [INFO] Loaded System Directive:
>>> org.apache.velocity.runtime.directive.Foreach
>>> [INFO] Created: 20 parsers.
>>> [INFO] Velocimacro : initialization starting.
>>> [INFO] Velocimacro : adding VMs from VM library template :
>>> VM_global_library.vm
>>> [ERROR] ResourceManager : unable to find resource
>>> 'VM_global_library.vm' in any resource loader.
>>> [INFO] Velocimacro : error using  VM library template
>>> VM_global_library.vm :
>>> org.apache.velocity.exception.ResourceNotFoundException: Unable to
>>> find resource 'VM_global_library.vm'
>>> [INFO] Velocimacro :  VM library template macro registration complete.
>>> [INFO] Velocimacro : allowInline = true : VMs can be defined inline in
>>> templates
>>> [INFO] Velocimacro : allowInlineToOverride = false : VMs defined
>>> inline may NOT replace previous VM definitions
>>> [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline
>>> will be  global in scope if allowed.
>>> [INFO] Velocimacro : messages on  : VM system will output logging
>>> messages
>>> [INFO] Velocimacro : autoload off  : VM system will not automatically
>>> reload global library macros
>>> [INFO] Velocimacro : initialization complete.
>>> [INFO] Velocity successfully started.
>>> [DEBUG] Configuring mojo
>>> 'org.apache.maven.plugins:maven-changes-plugin:2.0-beta-2:announcement-generate'
>>> -->
>>> [DEBUG]   (s) artifactId = reporting-jsf
>>> [DEBUG]   (s) developmentTeam = reporting-jsf-team
>>> [DEBUG]   (s) finalName = reporting-jsf-1.0.2-SNAPSHOT.war
>>> [DEBUG]   (f) generateJiraAnnouncement = false
>>> [DEBUG]   (s) groupId = com.mikon.customer.kc
>>> [DEBUG]   (s) introduction = Generalized web based reporting tool for
>>> data.
>>> [DEBUG]   (f) jiraXML = C:\cvs\reporting-jsf\target/jira-announcement.xml
>>> [DEBUG]   (f) nbEntries = 25
>>> [DEBUG]   (s) outputDirectory = C:\cvs\reporting-jsf\target/announcement
>>> [DEBUG]   (s) packaging = war
>>> [DEBUG]   (f) project = org.apache.maven.project.MavenProject@4ff0d01
>>> [DEBUG]   (f) resolutionId = Fixed
>>> [DEBUG]   (f) setting = org.apache.maven.settings.Settings@1b01afa
>>> [DEBUG]   (f) statusId = Closed
>>> [DEBUG]   (f) template = announcement.vm
>>> [DEBUG]   (f) templateDirectory = /src/main/resources
>>> [DEBUG]   (s) url =
>>> http://developer.foo.com/projects/reporting-jsf/1.0.2-SNAPSHOT/reporting-jsf
>>>
>>> [DEBUG]   (s) urlDownload =
>>> http://developer.foo.com/projects/reporting-jsf/1.0.2-SNAPSHOT/reporting-jsf/reporting-jsf-1.0.2-SNAPSHOT.jar
>>>
>>> [DEBUG]   (s) version = 1.0.2-SNAPSHOT
>>> [DEBUG]   (s) xmlPath = C:\cvs\reporting-jsf/src/changes/changes.xml
>>> [DEBUG] -- end configuration --
>>> [INFO] [changes:announcement-generate]
>>> [INFO] Creating announcement file from changes.xml...
>>> [ERROR] ResourceManager : unable to find resource
>>> '/src/main/resources/announcement.vm' in any resource loader.
>>> [INFO]
>>> ------------------------------------------------------------------------
>>>
>>> Is this a bug or a configuration error?
>>>
>>> Paul Spencer
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 


-- 
Dennis Lundberg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Problem using custom announcement with changes plugin

Posted by Steven Rowe <sa...@syr.edu>.
Hi Dennis,

Why not use /src/changes/ instead of /src/main/resources/ ?

By default, for jar packaging anyway, everything /src/main/resources/
will be put into the artifact, but why would anybody ever want an email
announcement template in the artifact?

Just curious,
Steve

Dennis Lundberg wrote:
> Hi Paul,
> 
> I committed a new page for the site that explains how to create and use
> a custom template for the announcement. As you sort of figured out
> already, the templateDirectory starts from /src/main/resources, i.e. not
> from ${basedir}.
> 
> I have not deployed a new site yet, but you can have a look at the apt
> file in svn, until the site is deployed:
> 
> 
> http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/using-a-custom-announcement-template.apt
> 
> 
> Paul Spencer wrote:
>> I am trying to configure the changes plugin, version 2.0-beta-2, to
>> use a custom
>> announcement.vm file.  Setting templateDirectory in to
>> /src/main/resources does
>> not work.  The command "mvn changes:announcement-generate" always
>> fails with the
>> following error message:
>>
>>   ResourceManager : unable to find resource
>> '/src/main/resources/announcement.vm' in any resource loader
>>
>> Belows is additional information related the the problem:
>>
>> ***
>> * From POM.XML
>> ***
>>       <plugin>
>>         <groupId>org.apache.maven.plugins</groupId>
>>         <artifactId>maven-changes-plugin</artifactId>
>>     <configuration>
>>           <template>announcement.vm</template>
>>       <templateDirectory>/src/main/resources</templateDirectory>
>>         </configuration>
>>       </plugin>
>>
>> ***
>> * Directory output
>> ***
>>  Directory of C:\cvs\reporting-jsf\src\main\resources
>>
>> 04/20/2007  01:45 PM    <DIR>          .
>> 04/20/2007  01:45 PM    <DIR>          ..
>> 04/20/2007  01:45 PM             1,848 announcement.vm
>> 04/18/2007  10:01 AM                69 application.properties
>> 09/20/2006  11:56 AM               206 implementations.properties
>> 04/12/2007  04:40 PM             1,109 log4j.xml
>>                4 File(s)          3,232 bytes
>>                2 Dir(s)  67,573,653,504 bytes free
>>
>> C:\cvs_apms\apms-reporting-jsf>
>> ***
>> * Maven debug output
>> ***
>> [INFO] **************************************************************
>> [INFO] Starting Jakarta Velocity v1.4
>> [INFO] RuntimeInstance initializing.
>> [INFO] Default Properties File:
>> org\apache\velocity\runtime\defaults\velocity.properties
>> [INFO] Default ResourceManager initializing. (class
>> org.apache.velocity.runtime.resource.ResourceManagerImpl)
>> [INFO] Resource Loader Instantiated:
>> org.apache.maven.plugin.resource.loader.ProjectResourceLoader
>> [INFO] ProjectResourceLoader : initialization starting.
>> [INFO] path :C:\cvs\reporting-jsf\src\main\resources\
>> [INFO] ProjectResourceLoader : adding path
>> 'C:\cvs\reporting-jsf\src\main\resources\'
>> [INFO] ProjectResourceLoader : initialization complete.
>> [INFO] Resource Loader Instantiated:
>> org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
>> [INFO] ClasspathResourceLoader : initialization starting.
>> [INFO] ClasspathResourceLoader : initialization complete.
>> [INFO] ResourceCache : initialized. (class
>> org.apache.velocity.runtime.resource.ResourceCacheImpl)
>> [INFO] Default ResourceManager initialization complete.
>> [INFO] Loaded System Directive:
>> org.apache.velocity.runtime.directive.Literal
>> [INFO] Loaded System Directive:
>> org.apache.velocity.runtime.directive.Macro
>> [INFO] Loaded System Directive:
>> org.apache.velocity.runtime.directive.Parse
>> [INFO] Loaded System Directive:
>> org.apache.velocity.runtime.directive.Include
>> [INFO] Loaded System Directive:
>> org.apache.velocity.runtime.directive.Foreach
>> [INFO] Created: 20 parsers.
>> [INFO] Velocimacro : initialization starting.
>> [INFO] Velocimacro : adding VMs from VM library template :
>> VM_global_library.vm
>> [ERROR] ResourceManager : unable to find resource
>> 'VM_global_library.vm' in any resource loader.
>> [INFO] Velocimacro : error using  VM library template
>> VM_global_library.vm :
>> org.apache.velocity.exception.ResourceNotFoundException: Unable to
>> find resource 'VM_global_library.vm'
>> [INFO] Velocimacro :  VM library template macro registration complete.
>> [INFO] Velocimacro : allowInline = true : VMs can be defined inline in
>> templates
>> [INFO] Velocimacro : allowInlineToOverride = false : VMs defined
>> inline may NOT replace previous VM definitions
>> [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline
>> will be  global in scope if allowed.
>> [INFO] Velocimacro : messages on  : VM system will output logging
>> messages
>> [INFO] Velocimacro : autoload off  : VM system will not automatically
>> reload global library macros
>> [INFO] Velocimacro : initialization complete.
>> [INFO] Velocity successfully started.
>> [DEBUG] Configuring mojo
>> 'org.apache.maven.plugins:maven-changes-plugin:2.0-beta-2:announcement-generate'
>> -->
>> [DEBUG]   (s) artifactId = reporting-jsf
>> [DEBUG]   (s) developmentTeam = reporting-jsf-team
>> [DEBUG]   (s) finalName = reporting-jsf-1.0.2-SNAPSHOT.war
>> [DEBUG]   (f) generateJiraAnnouncement = false
>> [DEBUG]   (s) groupId = com.mikon.customer.kc
>> [DEBUG]   (s) introduction = Generalized web based reporting tool for
>> data.
>> [DEBUG]   (f) jiraXML = C:\cvs\reporting-jsf\target/jira-announcement.xml
>> [DEBUG]   (f) nbEntries = 25
>> [DEBUG]   (s) outputDirectory = C:\cvs\reporting-jsf\target/announcement
>> [DEBUG]   (s) packaging = war
>> [DEBUG]   (f) project = org.apache.maven.project.MavenProject@4ff0d01
>> [DEBUG]   (f) resolutionId = Fixed
>> [DEBUG]   (f) setting = org.apache.maven.settings.Settings@1b01afa
>> [DEBUG]   (f) statusId = Closed
>> [DEBUG]   (f) template = announcement.vm
>> [DEBUG]   (f) templateDirectory = /src/main/resources
>> [DEBUG]   (s) url =
>> http://developer.foo.com/projects/reporting-jsf/1.0.2-SNAPSHOT/reporting-jsf
>>
>> [DEBUG]   (s) urlDownload =
>> http://developer.foo.com/projects/reporting-jsf/1.0.2-SNAPSHOT/reporting-jsf/reporting-jsf-1.0.2-SNAPSHOT.jar
>>
>> [DEBUG]   (s) version = 1.0.2-SNAPSHOT
>> [DEBUG]   (s) xmlPath = C:\cvs\reporting-jsf/src/changes/changes.xml
>> [DEBUG] -- end configuration --
>> [INFO] [changes:announcement-generate]
>> [INFO] Creating announcement file from changes.xml...
>> [ERROR] ResourceManager : unable to find resource
>> '/src/main/resources/announcement.vm' in any resource loader.
>> [INFO]
>> ------------------------------------------------------------------------
>>
>> Is this a bug or a configuration error?
>>
>> Paul Spencer


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Problem using custom announcement with changes plugin

Posted by Dennis Lundberg <de...@apache.org>.
Hi Paul,

I committed a new page for the site that explains how to create and use 
a custom template for the announcement. As you sort of figured out 
already, the templateDirectory starts from /src/main/resources, i.e. not 
from ${basedir}.

I have not deployed a new site yet, but you can have a look at the apt 
file in svn, until the site is deployed:

 
http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-changes-plugin/src/site/apt/examples/using-a-custom-announcement-template.apt

Paul Spencer wrote:
> I am trying to configure the changes plugin, version 2.0-beta-2, to use 
> a custom
> announcement.vm file.  Setting templateDirectory in to 
> /src/main/resources does
> not work.  The command "mvn changes:announcement-generate" always fails 
> with the
> following error message:
> 
>   ResourceManager : unable to find resource 
> '/src/main/resources/announcement.vm' in any resource loader
> 
> Belows is additional information related the the problem:
> 
> ***
> * From POM.XML
> ***
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-changes-plugin</artifactId>
>     <configuration>
>           <template>announcement.vm</template>
>       <templateDirectory>/src/main/resources</templateDirectory>
>         </configuration>
>       </plugin>
> 
> ***
> * Directory output
> ***
>  Directory of C:\cvs\reporting-jsf\src\main\resources
> 
> 04/20/2007  01:45 PM    <DIR>          .
> 04/20/2007  01:45 PM    <DIR>          ..
> 04/20/2007  01:45 PM             1,848 announcement.vm
> 04/18/2007  10:01 AM                69 application.properties
> 09/20/2006  11:56 AM               206 implementations.properties
> 04/12/2007  04:40 PM             1,109 log4j.xml
>                4 File(s)          3,232 bytes
>                2 Dir(s)  67,573,653,504 bytes free
> 
> C:\cvs_apms\apms-reporting-jsf>
> ***
> * Maven debug output
> ***
> [INFO] **************************************************************
> [INFO] Starting Jakarta Velocity v1.4
> [INFO] RuntimeInstance initializing.
> [INFO] Default Properties File: 
> org\apache\velocity\runtime\defaults\velocity.properties
> [INFO] Default ResourceManager initializing. (class 
> org.apache.velocity.runtime.resource.ResourceManagerImpl)
> [INFO] Resource Loader Instantiated: 
> org.apache.maven.plugin.resource.loader.ProjectResourceLoader
> [INFO] ProjectResourceLoader : initialization starting.
> [INFO] path :C:\cvs\reporting-jsf\src\main\resources\
> [INFO] ProjectResourceLoader : adding path 
> 'C:\cvs\reporting-jsf\src\main\resources\'
> [INFO] ProjectResourceLoader : initialization complete.
> [INFO] Resource Loader Instantiated: 
> org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
> [INFO] ClasspathResourceLoader : initialization starting.
> [INFO] ClasspathResourceLoader : initialization complete.
> [INFO] ResourceCache : initialized. (class 
> org.apache.velocity.runtime.resource.ResourceCacheImpl)
> [INFO] Default ResourceManager initialization complete.
> [INFO] Loaded System Directive: 
> org.apache.velocity.runtime.directive.Literal
> [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Macro
> [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Parse
> [INFO] Loaded System Directive: 
> org.apache.velocity.runtime.directive.Include
> [INFO] Loaded System Directive: 
> org.apache.velocity.runtime.directive.Foreach
> [INFO] Created: 20 parsers.
> [INFO] Velocimacro : initialization starting.
> [INFO] Velocimacro : adding VMs from VM library template : 
> VM_global_library.vm
> [ERROR] ResourceManager : unable to find resource 'VM_global_library.vm' 
> in any resource loader.
> [INFO] Velocimacro : error using  VM library template 
> VM_global_library.vm : 
> org.apache.velocity.exception.ResourceNotFoundException: Unable to find 
> resource 'VM_global_library.vm'
> [INFO] Velocimacro :  VM library template macro registration complete.
> [INFO] Velocimacro : allowInline = true : VMs can be defined inline in 
> templates
> [INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline 
> may NOT replace previous VM definitions
> [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will 
> be  global in scope if allowed.
> [INFO] Velocimacro : messages on  : VM system will output logging messages
> [INFO] Velocimacro : autoload off  : VM system will not automatically 
> reload global library macros
> [INFO] Velocimacro : initialization complete.
> [INFO] Velocity successfully started.
> [DEBUG] Configuring mojo 
> 'org.apache.maven.plugins:maven-changes-plugin:2.0-beta-2:announcement-generate' 
> -->
> [DEBUG]   (s) artifactId = reporting-jsf
> [DEBUG]   (s) developmentTeam = reporting-jsf-team
> [DEBUG]   (s) finalName = reporting-jsf-1.0.2-SNAPSHOT.war
> [DEBUG]   (f) generateJiraAnnouncement = false
> [DEBUG]   (s) groupId = com.mikon.customer.kc
> [DEBUG]   (s) introduction = Generalized web based reporting tool for data.
> [DEBUG]   (f) jiraXML = C:\cvs\reporting-jsf\target/jira-announcement.xml
> [DEBUG]   (f) nbEntries = 25
> [DEBUG]   (s) outputDirectory = C:\cvs\reporting-jsf\target/announcement
> [DEBUG]   (s) packaging = war
> [DEBUG]   (f) project = org.apache.maven.project.MavenProject@4ff0d01
> [DEBUG]   (f) resolutionId = Fixed
> [DEBUG]   (f) setting = org.apache.maven.settings.Settings@1b01afa
> [DEBUG]   (f) statusId = Closed
> [DEBUG]   (f) template = announcement.vm
> [DEBUG]   (f) templateDirectory = /src/main/resources
> [DEBUG]   (s) url = 
> http://developer.foo.com/projects/reporting-jsf/1.0.2-SNAPSHOT/reporting-jsf 
> 
> [DEBUG]   (s) urlDownload = 
> http://developer.foo.com/projects/reporting-jsf/1.0.2-SNAPSHOT/reporting-jsf/reporting-jsf-1.0.2-SNAPSHOT.jar 
> 
> [DEBUG]   (s) version = 1.0.2-SNAPSHOT
> [DEBUG]   (s) xmlPath = C:\cvs\reporting-jsf/src/changes/changes.xml
> [DEBUG] -- end configuration --
> [INFO] [changes:announcement-generate]
> [INFO] Creating announcement file from changes.xml...
> [ERROR] ResourceManager : unable to find resource 
> '/src/main/resources/announcement.vm' in any resource loader.
> [INFO] 
> ------------------------------------------------------------------------
> 
> Is this a bug or a configuration error?
> 
> Paul Spencer
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 


-- 
Dennis Lundberg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Problem using custom announcement with changes plugin

Posted by Paul Spencer <pa...@apache.org>.
Found a workaround/solution!

1) Set <templateDirectory>announcement</templateDirectory>
2) Place the template, announcement.vm,  in located in
       ${basedir}\src\main\resources\announcement.
    This assumes ${basedir}\src\main\resources is already
    in the resource classpath!

BTW: templateDirectory is a bad name since it has no relation to a
      directory. templatePackage would more accurate.

Paul Spencer


Paul Spencer wrote:
> Wayne,
> Neither work.
>   <templateDirectory>src/main/resources</templateDirectory>
>   <templateDirectory></templateDirectory>
>   <templateDirectory/>
> 
> I even tried the following, which also failed:
>   removing the directory src/main/resources
>   <templateDirectory>${basedir}/src/main/announcement</templateDirectory>
> [INFO] Resource Loader Instantiated: 
> org.apache.maven.plugin.resource.loader.ProjectResourceLoader
> [INFO] ProjectResourceLoader : initialization starting.
> [INFO] path :C:\cvs\reporting-jsf\src\main\resources\
> [INFO] ProjectResourceLoader : adding path 
> 'C:\cvs\reporting-jsf\src\main\resources\'
> [INFO] ProjectResourceLoader : initialization complete.
> ...
> [DEBUG]   (f) templateDirectory = 
> C:\cvs\reporting-jsf/src/main/announcement
> ...
> [DEBUG] -- end configuration --
> [INFO] [changes:announcement-generate]
> [INFO] Creating announcement file from changes.xml...
> [ERROR] ResourceManager : unable to find resource 
> 'C:\cvs\reporting-jsf/src/main/announcement/announcement.vm' in any 
> resource loader.
> [INFO] 
> ------------------------------------------------------------------------
> 
> I suspect it is always looking for the resource 
> <templateDirectory>/<template> in
> the classpath instead of looking for <template>.  That would explain why 
> it works
> when announcement.vm is located in 
> C:\cvs\reporting-jsf\src\main\resources\src\main\resources.
> 
> To compound the problem:
> o <templateDirectory> is set to "org/apache/maven/plugin/announcement" 
> when it is null, "", " ".
> o The template is only looked for in the classpath and not in the 
> template directory.
> 
> Paul Spencer
> 
> Wayne Fay wrote:
>> Just stabbing in the dark... Have you tried:
>> <templateDirectory>src/main/resources</templateDirectory>
>> Note the missing / at the beginning.
>>
>> Or for that matter, <templateDirectory/> (no value)?
>>
>> Wayne
>>
>> On 4/20/07, Paul Spencer <pa...@apache.org> wrote:
>>> I already tried that!
>>>   <templateDirectory>${basedir}/src/main/resources</templateDirectory>
>>>
>>> [INFO] ProjectResourceLoader : initialization starting.
>>> [INFO] path :C:\cvs\reporting-jsf\src\main\resources\
>>> [INFO] ProjectResourceLoader : adding path 
>>> 'C:\cvs\reporting-jsf\src\main\resources\'
>>> ...
>>> [ERROR] ResourceManager : unable to find resource 
>>> 'C:\cvs\reporting-jsf/src/main/resources/announcement.vm' in any 
>>> resource loader.
>>>
>>> BTW: The following works, but it is WRONG:
>>>
>>>   <templateDirectory>/src/main/resources</templateDirectory>
>>>
>>>   Directory of 
>>> C:\cvs\reporting-jsf\src\main\resources\src\main\resources
>>>   04/20/2007  01:45 PM             1,848 announcement.vm
>>>
>>> Paul Spencer
>>>
>>>
>>> Siegfried Goeschl wrote:
>>> > Veryyyyy stupid question ...
>>> >
>>> > <templateDirectory>/src/main/resources</templateDirectory>
>>> >
>>> > seems to be an absolute reference to a directory whereas
>>> >
>>> > C:\cvs\reporting-jsf\src\main\resources
>>> >
>>> > is the absolute path
>>> >
>>> > Cheers
>>> >
>>> > Siegfried Goeschl
>>> >
>>> >
>>> >
>>> > Paul Spencer wrote:
>>> >> I am trying to configure the changes plugin, version 2.0-beta-2, to
>>> >> use a custom
>>> >> announcement.vm file.  Setting templateDirectory in to
>>> >> /src/main/resources does
>>> >> not work.  The command "mvn changes:announcement-generate" always
>>> >> fails with the
>>> >> following error message:
>>> >>
>>> >>   ResourceManager : unable to find resource
>>> >> '/src/main/resources/announcement.vm' in any resource loader
>>> >>
>>> >> Belows is additional information related the the problem:
>>> >>
>>> >> ***
>>> >> * From POM.XML
>>> >> ***
>>> >>       <plugin>
>>> >>         <groupId>org.apache.maven.plugins</groupId>
>>> >>         <artifactId>maven-changes-plugin</artifactId>
>>> >>     <configuration>
>>> >>           <template>announcement.vm</template>
>>> >>       <templateDirectory>/src/main/resources</templateDirectory>
>>> >>         </configuration>
>>> >>       </plugin>
>>> >>
>>> >> ***
>>> >> * Directory output
>>> >> ***
>>> >>  Directory of C:\cvs\reporting-jsf\src\main\resources
>>> >>
>>> >> 04/20/2007  01:45 PM    <DIR>          .
>>> >> 04/20/2007  01:45 PM    <DIR>          ..
>>> >> 04/20/2007  01:45 PM             1,848 announcement.vm
>>> >> 04/18/2007  10:01 AM                69 application.properties
>>> >> 09/20/2006  11:56 AM               206 implementations.properties
>>> >> 04/12/2007  04:40 PM             1,109 log4j.xml
>>> >>                4 File(s)          3,232 bytes
>>> >>                2 Dir(s)  67,573,653,504 bytes free
>>> >>
>>> >> C:\cvs_apms\apms-reporting-jsf>
>>> >> ***
>>> >> * Maven debug output
>>> >> ***
>>> >> [INFO] **************************************************************
>>> >> [INFO] Starting Jakarta Velocity v1.4
>>> >> [INFO] RuntimeInstance initializing.
>>> >> [INFO] Default Properties File:
>>> >> org\apache\velocity\runtime\defaults\velocity.properties
>>> >> [INFO] Default ResourceManager initializing. (class
>>> >> org.apache.velocity.runtime.resource.ResourceManagerImpl)
>>> >> [INFO] Resource Loader Instantiated:
>>> >> org.apache.maven.plugin.resource.loader.ProjectResourceLoader
>>> >> [INFO] ProjectResourceLoader : initialization starting.
>>> >> [INFO] path :C:\cvs\reporting-jsf\src\main\resources\
>>> >> [INFO] ProjectResourceLoader : adding path
>>> >> 'C:\cvs\reporting-jsf\src\main\resources\'
>>> >> [INFO] ProjectResourceLoader : initialization complete.
>>> >> [INFO] Resource Loader Instantiated:
>>> >> org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
>>> >> [INFO] ClasspathResourceLoader : initialization starting.
>>> >> [INFO] ClasspathResourceLoader : initialization complete.
>>> >> [INFO] ResourceCache : initialized. (class
>>> >> org.apache.velocity.runtime.resource.ResourceCacheImpl)
>>> >> [INFO] Default ResourceManager initialization complete.
>>> >> [INFO] Loaded System Directive:
>>> >> org.apache.velocity.runtime.directive.Literal
>>> >> [INFO] Loaded System Directive:
>>> >> org.apache.velocity.runtime.directive.Macro
>>> >> [INFO] Loaded System Directive:
>>> >> org.apache.velocity.runtime.directive.Parse
>>> >> [INFO] Loaded System Directive:
>>> >> org.apache.velocity.runtime.directive.Include
>>> >> [INFO] Loaded System Directive:
>>> >> org.apache.velocity.runtime.directive.Foreach
>>> >> [INFO] Created: 20 parsers.
>>> >> [INFO] Velocimacro : initialization starting.
>>> >> [INFO] Velocimacro : adding VMs from VM library template :
>>> >> VM_global_library.vm
>>> >> [ERROR] ResourceManager : unable to find resource
>>> >> 'VM_global_library.vm' in any resource loader.
>>> >> [INFO] Velocimacro : error using  VM library template
>>> >> VM_global_library.vm :
>>> >> org.apache.velocity.exception.ResourceNotFoundException: Unable to
>>> >> find resource 'VM_global_library.vm'
>>> >> [INFO] Velocimacro :  VM library template macro registration 
>>> complete.
>>> >> [INFO] Velocimacro : allowInline = true : VMs can be defined 
>>> inline in
>>> >> templates
>>> >> [INFO] Velocimacro : allowInlineToOverride = false : VMs defined
>>> >> inline may NOT replace previous VM definitions
>>> >> [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline
>>> >> will be  global in scope if allowed.
>>> >> [INFO] Velocimacro : messages on  : VM system will output logging
>>> >> messages
>>> >> [INFO] Velocimacro : autoload off  : VM system will not automatically
>>> >> reload global library macros
>>> >> [INFO] Velocimacro : initialization complete.
>>> >> [INFO] Velocity successfully started.
>>> >> [DEBUG] Configuring mojo
>>> >> 
>>> 'org.apache.maven.plugins:maven-changes-plugin:2.0-beta-2:announcement-generate' 
>>>
>>> >> -->
>>> >> [DEBUG]   (s) artifactId = reporting-jsf
>>> >> [DEBUG]   (s) developmentTeam = reporting-jsf-team
>>> >> [DEBUG]   (s) finalName = reporting-jsf-1.0.2-SNAPSHOT.war
>>> >> [DEBUG]   (f) generateJiraAnnouncement = false
>>> >> [DEBUG]   (s) groupId = com.mikon.customer.kc
>>> >> [DEBUG]   (s) introduction = Generalized web based reporting tool for
>>> >> data.
>>> >> [DEBUG]   (f) jiraXML = 
>>> C:\cvs\reporting-jsf\target/jira-announcement.xml
>>> >> [DEBUG]   (f) nbEntries = 25
>>> >> [DEBUG]   (s) outputDirectory = 
>>> C:\cvs\reporting-jsf\target/announcement
>>> >> [DEBUG]   (s) packaging = war
>>> >> [DEBUG]   (f) project = org.apache.maven.project.MavenProject@4ff0d01
>>> >> [DEBUG]   (f) resolutionId = Fixed
>>> >> [DEBUG]   (f) setting = org.apache.maven.settings.Settings@1b01afa
>>> >> [DEBUG]   (f) statusId = Closed
>>> >> [DEBUG]   (f) template = announcement.vm
>>> >> [DEBUG]   (f) templateDirectory = /src/main/resources
>>> >> [DEBUG]   (s) url =
>>> >> 
>>> http://developer.foo.com/projects/reporting-jsf/1.0.2-SNAPSHOT/reporting-jsf 
>>>
>>> >>
>>> >> [DEBUG]   (s) urlDownload =
>>> >> 
>>> http://developer.foo.com/projects/reporting-jsf/1.0.2-SNAPSHOT/reporting-jsf/reporting-jsf-1.0.2-SNAPSHOT.jar 
>>>
>>> >>
>>> >> [DEBUG]   (s) version = 1.0.2-SNAPSHOT
>>> >> [DEBUG]   (s) xmlPath = C:\cvs\reporting-jsf/src/changes/changes.xml
>>> >> [DEBUG] -- end configuration --
>>> >> [INFO] [changes:announcement-generate]
>>> >> [INFO] Creating announcement file from changes.xml...
>>> >> [ERROR] ResourceManager : unable to find resource
>>> >> '/src/main/resources/announcement.vm' in any resource loader.
>>> >> [INFO]
>>> >> 
>>> ------------------------------------------------------------------------
>>> >>
>>> >> Is this a bug or a configuration error?
>>> >>
>>> >> Paul Spencer
>>> >>
>>> >>
>>> >> ---------------------------------------------------------------------
>>> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> >> For additional commands, e-mail: users-help@maven.apache.org
>>> >>
>>> >>
>>> >>
>>> >
>>> > ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> > For additional commands, e-mail: users-help@maven.apache.org
>>> >
>>> >
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Problem using custom announcement with changes plugin

Posted by Paul Spencer <pa...@apache.org>.
Wayne,
Neither work.
   <templateDirectory>src/main/resources</templateDirectory>
   <templateDirectory></templateDirectory>
   <templateDirectory/>

I even tried the following, which also failed:
   removing the directory src/main/resources
   <templateDirectory>${basedir}/src/main/announcement</templateDirectory>
[INFO] Resource Loader Instantiated: org.apache.maven.plugin.resource.loader.ProjectResourceLoader
[INFO] ProjectResourceLoader : initialization starting.
[INFO] path :C:\cvs\reporting-jsf\src\main\resources\
[INFO] ProjectResourceLoader : adding path 'C:\cvs\reporting-jsf\src\main\resources\'
[INFO] ProjectResourceLoader : initialization complete.
...
[DEBUG]   (f) templateDirectory = C:\cvs\reporting-jsf/src/main/announcement
...
[DEBUG] -- end configuration --
[INFO] [changes:announcement-generate]
[INFO] Creating announcement file from changes.xml...
[ERROR] ResourceManager : unable to find resource 'C:\cvs\reporting-jsf/src/main/announcement/announcement.vm' in any resource loader.
[INFO] ------------------------------------------------------------------------

I suspect it is always looking for the resource <templateDirectory>/<template> in
the classpath instead of looking for <template>.  That would explain why it works
when announcement.vm is located in C:\cvs\reporting-jsf\src\main\resources\src\main\resources.

To compound the problem:
o <templateDirectory> is set to "org/apache/maven/plugin/announcement" when it is null, "", " ".
o The template is only looked for in the classpath and not in the template directory.

Paul Spencer

Wayne Fay wrote:
> Just stabbing in the dark... Have you tried:
> <templateDirectory>src/main/resources</templateDirectory>
> Note the missing / at the beginning.
> 
> Or for that matter, <templateDirectory/> (no value)?
> 
> Wayne
> 
> On 4/20/07, Paul Spencer <pa...@apache.org> wrote:
>> I already tried that!
>>   <templateDirectory>${basedir}/src/main/resources</templateDirectory>
>>
>> [INFO] ProjectResourceLoader : initialization starting.
>> [INFO] path :C:\cvs\reporting-jsf\src\main\resources\
>> [INFO] ProjectResourceLoader : adding path 
>> 'C:\cvs\reporting-jsf\src\main\resources\'
>> ...
>> [ERROR] ResourceManager : unable to find resource 
>> 'C:\cvs\reporting-jsf/src/main/resources/announcement.vm' in any 
>> resource loader.
>>
>> BTW: The following works, but it is WRONG:
>>
>>   <templateDirectory>/src/main/resources</templateDirectory>
>>
>>   Directory of C:\cvs\reporting-jsf\src\main\resources\src\main\resources
>>   04/20/2007  01:45 PM             1,848 announcement.vm
>>
>> Paul Spencer
>>
>>
>> Siegfried Goeschl wrote:
>> > Veryyyyy stupid question ...
>> >
>> > <templateDirectory>/src/main/resources</templateDirectory>
>> >
>> > seems to be an absolute reference to a directory whereas
>> >
>> > C:\cvs\reporting-jsf\src\main\resources
>> >
>> > is the absolute path
>> >
>> > Cheers
>> >
>> > Siegfried Goeschl
>> >
>> >
>> >
>> > Paul Spencer wrote:
>> >> I am trying to configure the changes plugin, version 2.0-beta-2, to
>> >> use a custom
>> >> announcement.vm file.  Setting templateDirectory in to
>> >> /src/main/resources does
>> >> not work.  The command "mvn changes:announcement-generate" always
>> >> fails with the
>> >> following error message:
>> >>
>> >>   ResourceManager : unable to find resource
>> >> '/src/main/resources/announcement.vm' in any resource loader
>> >>
>> >> Belows is additional information related the the problem:
>> >>
>> >> ***
>> >> * From POM.XML
>> >> ***
>> >>       <plugin>
>> >>         <groupId>org.apache.maven.plugins</groupId>
>> >>         <artifactId>maven-changes-plugin</artifactId>
>> >>     <configuration>
>> >>           <template>announcement.vm</template>
>> >>       <templateDirectory>/src/main/resources</templateDirectory>
>> >>         </configuration>
>> >>       </plugin>
>> >>
>> >> ***
>> >> * Directory output
>> >> ***
>> >>  Directory of C:\cvs\reporting-jsf\src\main\resources
>> >>
>> >> 04/20/2007  01:45 PM    <DIR>          .
>> >> 04/20/2007  01:45 PM    <DIR>          ..
>> >> 04/20/2007  01:45 PM             1,848 announcement.vm
>> >> 04/18/2007  10:01 AM                69 application.properties
>> >> 09/20/2006  11:56 AM               206 implementations.properties
>> >> 04/12/2007  04:40 PM             1,109 log4j.xml
>> >>                4 File(s)          3,232 bytes
>> >>                2 Dir(s)  67,573,653,504 bytes free
>> >>
>> >> C:\cvs_apms\apms-reporting-jsf>
>> >> ***
>> >> * Maven debug output
>> >> ***
>> >> [INFO] **************************************************************
>> >> [INFO] Starting Jakarta Velocity v1.4
>> >> [INFO] RuntimeInstance initializing.
>> >> [INFO] Default Properties File:
>> >> org\apache\velocity\runtime\defaults\velocity.properties
>> >> [INFO] Default ResourceManager initializing. (class
>> >> org.apache.velocity.runtime.resource.ResourceManagerImpl)
>> >> [INFO] Resource Loader Instantiated:
>> >> org.apache.maven.plugin.resource.loader.ProjectResourceLoader
>> >> [INFO] ProjectResourceLoader : initialization starting.
>> >> [INFO] path :C:\cvs\reporting-jsf\src\main\resources\
>> >> [INFO] ProjectResourceLoader : adding path
>> >> 'C:\cvs\reporting-jsf\src\main\resources\'
>> >> [INFO] ProjectResourceLoader : initialization complete.
>> >> [INFO] Resource Loader Instantiated:
>> >> org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
>> >> [INFO] ClasspathResourceLoader : initialization starting.
>> >> [INFO] ClasspathResourceLoader : initialization complete.
>> >> [INFO] ResourceCache : initialized. (class
>> >> org.apache.velocity.runtime.resource.ResourceCacheImpl)
>> >> [INFO] Default ResourceManager initialization complete.
>> >> [INFO] Loaded System Directive:
>> >> org.apache.velocity.runtime.directive.Literal
>> >> [INFO] Loaded System Directive:
>> >> org.apache.velocity.runtime.directive.Macro
>> >> [INFO] Loaded System Directive:
>> >> org.apache.velocity.runtime.directive.Parse
>> >> [INFO] Loaded System Directive:
>> >> org.apache.velocity.runtime.directive.Include
>> >> [INFO] Loaded System Directive:
>> >> org.apache.velocity.runtime.directive.Foreach
>> >> [INFO] Created: 20 parsers.
>> >> [INFO] Velocimacro : initialization starting.
>> >> [INFO] Velocimacro : adding VMs from VM library template :
>> >> VM_global_library.vm
>> >> [ERROR] ResourceManager : unable to find resource
>> >> 'VM_global_library.vm' in any resource loader.
>> >> [INFO] Velocimacro : error using  VM library template
>> >> VM_global_library.vm :
>> >> org.apache.velocity.exception.ResourceNotFoundException: Unable to
>> >> find resource 'VM_global_library.vm'
>> >> [INFO] Velocimacro :  VM library template macro registration complete.
>> >> [INFO] Velocimacro : allowInline = true : VMs can be defined inline in
>> >> templates
>> >> [INFO] Velocimacro : allowInlineToOverride = false : VMs defined
>> >> inline may NOT replace previous VM definitions
>> >> [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline
>> >> will be  global in scope if allowed.
>> >> [INFO] Velocimacro : messages on  : VM system will output logging
>> >> messages
>> >> [INFO] Velocimacro : autoload off  : VM system will not automatically
>> >> reload global library macros
>> >> [INFO] Velocimacro : initialization complete.
>> >> [INFO] Velocity successfully started.
>> >> [DEBUG] Configuring mojo
>> >> 
>> 'org.apache.maven.plugins:maven-changes-plugin:2.0-beta-2:announcement-generate' 
>>
>> >> -->
>> >> [DEBUG]   (s) artifactId = reporting-jsf
>> >> [DEBUG]   (s) developmentTeam = reporting-jsf-team
>> >> [DEBUG]   (s) finalName = reporting-jsf-1.0.2-SNAPSHOT.war
>> >> [DEBUG]   (f) generateJiraAnnouncement = false
>> >> [DEBUG]   (s) groupId = com.mikon.customer.kc
>> >> [DEBUG]   (s) introduction = Generalized web based reporting tool for
>> >> data.
>> >> [DEBUG]   (f) jiraXML = 
>> C:\cvs\reporting-jsf\target/jira-announcement.xml
>> >> [DEBUG]   (f) nbEntries = 25
>> >> [DEBUG]   (s) outputDirectory = 
>> C:\cvs\reporting-jsf\target/announcement
>> >> [DEBUG]   (s) packaging = war
>> >> [DEBUG]   (f) project = org.apache.maven.project.MavenProject@4ff0d01
>> >> [DEBUG]   (f) resolutionId = Fixed
>> >> [DEBUG]   (f) setting = org.apache.maven.settings.Settings@1b01afa
>> >> [DEBUG]   (f) statusId = Closed
>> >> [DEBUG]   (f) template = announcement.vm
>> >> [DEBUG]   (f) templateDirectory = /src/main/resources
>> >> [DEBUG]   (s) url =
>> >> 
>> http://developer.foo.com/projects/reporting-jsf/1.0.2-SNAPSHOT/reporting-jsf 
>>
>> >>
>> >> [DEBUG]   (s) urlDownload =
>> >> 
>> http://developer.foo.com/projects/reporting-jsf/1.0.2-SNAPSHOT/reporting-jsf/reporting-jsf-1.0.2-SNAPSHOT.jar 
>>
>> >>
>> >> [DEBUG]   (s) version = 1.0.2-SNAPSHOT
>> >> [DEBUG]   (s) xmlPath = C:\cvs\reporting-jsf/src/changes/changes.xml
>> >> [DEBUG] -- end configuration --
>> >> [INFO] [changes:announcement-generate]
>> >> [INFO] Creating announcement file from changes.xml...
>> >> [ERROR] ResourceManager : unable to find resource
>> >> '/src/main/resources/announcement.vm' in any resource loader.
>> >> [INFO]
>> >> 
>> ------------------------------------------------------------------------
>> >>
>> >> Is this a bug or a configuration error?
>> >>
>> >> Paul Spencer
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> >> For additional commands, e-mail: users-help@maven.apache.org
>> >>
>> >>
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > For additional commands, e-mail: users-help@maven.apache.org
>> >
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Problem using custom announcement with changes plugin

Posted by Wayne Fay <wa...@gmail.com>.
Just stabbing in the dark... Have you tried:
<templateDirectory>src/main/resources</templateDirectory>
Note the missing / at the beginning.

Or for that matter, <templateDirectory/> (no value)?

Wayne

On 4/20/07, Paul Spencer <pa...@apache.org> wrote:
> I already tried that!
>   <templateDirectory>${basedir}/src/main/resources</templateDirectory>
>
> [INFO] ProjectResourceLoader : initialization starting.
> [INFO] path :C:\cvs\reporting-jsf\src\main\resources\
> [INFO] ProjectResourceLoader : adding path 'C:\cvs\reporting-jsf\src\main\resources\'
> ...
> [ERROR] ResourceManager : unable to find resource 'C:\cvs\reporting-jsf/src/main/resources/announcement.vm' in any resource loader.
>
> BTW: The following works, but it is WRONG:
>
>   <templateDirectory>/src/main/resources</templateDirectory>
>
>   Directory of C:\cvs\reporting-jsf\src\main\resources\src\main\resources
>   04/20/2007  01:45 PM             1,848 announcement.vm
>
> Paul Spencer
>
>
> Siegfried Goeschl wrote:
> > Veryyyyy stupid question ...
> >
> > <templateDirectory>/src/main/resources</templateDirectory>
> >
> > seems to be an absolute reference to a directory whereas
> >
> > C:\cvs\reporting-jsf\src\main\resources
> >
> > is the absolute path
> >
> > Cheers
> >
> > Siegfried Goeschl
> >
> >
> >
> > Paul Spencer wrote:
> >> I am trying to configure the changes plugin, version 2.0-beta-2, to
> >> use a custom
> >> announcement.vm file.  Setting templateDirectory in to
> >> /src/main/resources does
> >> not work.  The command "mvn changes:announcement-generate" always
> >> fails with the
> >> following error message:
> >>
> >>   ResourceManager : unable to find resource
> >> '/src/main/resources/announcement.vm' in any resource loader
> >>
> >> Belows is additional information related the the problem:
> >>
> >> ***
> >> * From POM.XML
> >> ***
> >>       <plugin>
> >>         <groupId>org.apache.maven.plugins</groupId>
> >>         <artifactId>maven-changes-plugin</artifactId>
> >>     <configuration>
> >>           <template>announcement.vm</template>
> >>       <templateDirectory>/src/main/resources</templateDirectory>
> >>         </configuration>
> >>       </plugin>
> >>
> >> ***
> >> * Directory output
> >> ***
> >>  Directory of C:\cvs\reporting-jsf\src\main\resources
> >>
> >> 04/20/2007  01:45 PM    <DIR>          .
> >> 04/20/2007  01:45 PM    <DIR>          ..
> >> 04/20/2007  01:45 PM             1,848 announcement.vm
> >> 04/18/2007  10:01 AM                69 application.properties
> >> 09/20/2006  11:56 AM               206 implementations.properties
> >> 04/12/2007  04:40 PM             1,109 log4j.xml
> >>                4 File(s)          3,232 bytes
> >>                2 Dir(s)  67,573,653,504 bytes free
> >>
> >> C:\cvs_apms\apms-reporting-jsf>
> >> ***
> >> * Maven debug output
> >> ***
> >> [INFO] **************************************************************
> >> [INFO] Starting Jakarta Velocity v1.4
> >> [INFO] RuntimeInstance initializing.
> >> [INFO] Default Properties File:
> >> org\apache\velocity\runtime\defaults\velocity.properties
> >> [INFO] Default ResourceManager initializing. (class
> >> org.apache.velocity.runtime.resource.ResourceManagerImpl)
> >> [INFO] Resource Loader Instantiated:
> >> org.apache.maven.plugin.resource.loader.ProjectResourceLoader
> >> [INFO] ProjectResourceLoader : initialization starting.
> >> [INFO] path :C:\cvs\reporting-jsf\src\main\resources\
> >> [INFO] ProjectResourceLoader : adding path
> >> 'C:\cvs\reporting-jsf\src\main\resources\'
> >> [INFO] ProjectResourceLoader : initialization complete.
> >> [INFO] Resource Loader Instantiated:
> >> org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
> >> [INFO] ClasspathResourceLoader : initialization starting.
> >> [INFO] ClasspathResourceLoader : initialization complete.
> >> [INFO] ResourceCache : initialized. (class
> >> org.apache.velocity.runtime.resource.ResourceCacheImpl)
> >> [INFO] Default ResourceManager initialization complete.
> >> [INFO] Loaded System Directive:
> >> org.apache.velocity.runtime.directive.Literal
> >> [INFO] Loaded System Directive:
> >> org.apache.velocity.runtime.directive.Macro
> >> [INFO] Loaded System Directive:
> >> org.apache.velocity.runtime.directive.Parse
> >> [INFO] Loaded System Directive:
> >> org.apache.velocity.runtime.directive.Include
> >> [INFO] Loaded System Directive:
> >> org.apache.velocity.runtime.directive.Foreach
> >> [INFO] Created: 20 parsers.
> >> [INFO] Velocimacro : initialization starting.
> >> [INFO] Velocimacro : adding VMs from VM library template :
> >> VM_global_library.vm
> >> [ERROR] ResourceManager : unable to find resource
> >> 'VM_global_library.vm' in any resource loader.
> >> [INFO] Velocimacro : error using  VM library template
> >> VM_global_library.vm :
> >> org.apache.velocity.exception.ResourceNotFoundException: Unable to
> >> find resource 'VM_global_library.vm'
> >> [INFO] Velocimacro :  VM library template macro registration complete.
> >> [INFO] Velocimacro : allowInline = true : VMs can be defined inline in
> >> templates
> >> [INFO] Velocimacro : allowInlineToOverride = false : VMs defined
> >> inline may NOT replace previous VM definitions
> >> [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline
> >> will be  global in scope if allowed.
> >> [INFO] Velocimacro : messages on  : VM system will output logging
> >> messages
> >> [INFO] Velocimacro : autoload off  : VM system will not automatically
> >> reload global library macros
> >> [INFO] Velocimacro : initialization complete.
> >> [INFO] Velocity successfully started.
> >> [DEBUG] Configuring mojo
> >> 'org.apache.maven.plugins:maven-changes-plugin:2.0-beta-2:announcement-generate'
> >> -->
> >> [DEBUG]   (s) artifactId = reporting-jsf
> >> [DEBUG]   (s) developmentTeam = reporting-jsf-team
> >> [DEBUG]   (s) finalName = reporting-jsf-1.0.2-SNAPSHOT.war
> >> [DEBUG]   (f) generateJiraAnnouncement = false
> >> [DEBUG]   (s) groupId = com.mikon.customer.kc
> >> [DEBUG]   (s) introduction = Generalized web based reporting tool for
> >> data.
> >> [DEBUG]   (f) jiraXML = C:\cvs\reporting-jsf\target/jira-announcement.xml
> >> [DEBUG]   (f) nbEntries = 25
> >> [DEBUG]   (s) outputDirectory = C:\cvs\reporting-jsf\target/announcement
> >> [DEBUG]   (s) packaging = war
> >> [DEBUG]   (f) project = org.apache.maven.project.MavenProject@4ff0d01
> >> [DEBUG]   (f) resolutionId = Fixed
> >> [DEBUG]   (f) setting = org.apache.maven.settings.Settings@1b01afa
> >> [DEBUG]   (f) statusId = Closed
> >> [DEBUG]   (f) template = announcement.vm
> >> [DEBUG]   (f) templateDirectory = /src/main/resources
> >> [DEBUG]   (s) url =
> >> http://developer.foo.com/projects/reporting-jsf/1.0.2-SNAPSHOT/reporting-jsf
> >>
> >> [DEBUG]   (s) urlDownload =
> >> http://developer.foo.com/projects/reporting-jsf/1.0.2-SNAPSHOT/reporting-jsf/reporting-jsf-1.0.2-SNAPSHOT.jar
> >>
> >> [DEBUG]   (s) version = 1.0.2-SNAPSHOT
> >> [DEBUG]   (s) xmlPath = C:\cvs\reporting-jsf/src/changes/changes.xml
> >> [DEBUG] -- end configuration --
> >> [INFO] [changes:announcement-generate]
> >> [INFO] Creating announcement file from changes.xml...
> >> [ERROR] ResourceManager : unable to find resource
> >> '/src/main/resources/announcement.vm' in any resource loader.
> >> [INFO]
> >> ------------------------------------------------------------------------
> >>
> >> Is this a bug or a configuration error?
> >>
> >> Paul Spencer
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Problem using custom announcement with changes plugin

Posted by Paul Spencer <pa...@apache.org>.
I already tried that!
   <templateDirectory>${basedir}/src/main/resources</templateDirectory>

[INFO] ProjectResourceLoader : initialization starting.
[INFO] path :C:\cvs\reporting-jsf\src\main\resources\
[INFO] ProjectResourceLoader : adding path 'C:\cvs\reporting-jsf\src\main\resources\'
...
[ERROR] ResourceManager : unable to find resource 'C:\cvs\reporting-jsf/src/main/resources/announcement.vm' in any resource loader.

BTW: The following works, but it is WRONG:

   <templateDirectory>/src/main/resources</templateDirectory>

   Directory of C:\cvs\reporting-jsf\src\main\resources\src\main\resources
   04/20/2007  01:45 PM             1,848 announcement.vm

Paul Spencer


Siegfried Goeschl wrote:
> Veryyyyy stupid question ...
> 
> <templateDirectory>/src/main/resources</templateDirectory>
> 
> seems to be an absolute reference to a directory whereas
> 
> C:\cvs\reporting-jsf\src\main\resources
> 
> is the absolute path
> 
> Cheers
> 
> Siegfried Goeschl
> 
> 
> 
> Paul Spencer wrote:
>> I am trying to configure the changes plugin, version 2.0-beta-2, to 
>> use a custom
>> announcement.vm file.  Setting templateDirectory in to 
>> /src/main/resources does
>> not work.  The command "mvn changes:announcement-generate" always 
>> fails with the
>> following error message:
>>
>>   ResourceManager : unable to find resource 
>> '/src/main/resources/announcement.vm' in any resource loader
>>
>> Belows is additional information related the the problem:
>>
>> ***
>> * From POM.XML
>> ***
>>       <plugin>
>>         <groupId>org.apache.maven.plugins</groupId>
>>         <artifactId>maven-changes-plugin</artifactId>
>>     <configuration>
>>           <template>announcement.vm</template>
>>       <templateDirectory>/src/main/resources</templateDirectory>
>>         </configuration>
>>       </plugin>
>>
>> ***
>> * Directory output
>> ***
>>  Directory of C:\cvs\reporting-jsf\src\main\resources
>>
>> 04/20/2007  01:45 PM    <DIR>          .
>> 04/20/2007  01:45 PM    <DIR>          ..
>> 04/20/2007  01:45 PM             1,848 announcement.vm
>> 04/18/2007  10:01 AM                69 application.properties
>> 09/20/2006  11:56 AM               206 implementations.properties
>> 04/12/2007  04:40 PM             1,109 log4j.xml
>>                4 File(s)          3,232 bytes
>>                2 Dir(s)  67,573,653,504 bytes free
>>
>> C:\cvs_apms\apms-reporting-jsf>
>> ***
>> * Maven debug output
>> ***
>> [INFO] **************************************************************
>> [INFO] Starting Jakarta Velocity v1.4
>> [INFO] RuntimeInstance initializing.
>> [INFO] Default Properties File: 
>> org\apache\velocity\runtime\defaults\velocity.properties
>> [INFO] Default ResourceManager initializing. (class 
>> org.apache.velocity.runtime.resource.ResourceManagerImpl)
>> [INFO] Resource Loader Instantiated: 
>> org.apache.maven.plugin.resource.loader.ProjectResourceLoader
>> [INFO] ProjectResourceLoader : initialization starting.
>> [INFO] path :C:\cvs\reporting-jsf\src\main\resources\
>> [INFO] ProjectResourceLoader : adding path 
>> 'C:\cvs\reporting-jsf\src\main\resources\'
>> [INFO] ProjectResourceLoader : initialization complete.
>> [INFO] Resource Loader Instantiated: 
>> org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
>> [INFO] ClasspathResourceLoader : initialization starting.
>> [INFO] ClasspathResourceLoader : initialization complete.
>> [INFO] ResourceCache : initialized. (class 
>> org.apache.velocity.runtime.resource.ResourceCacheImpl)
>> [INFO] Default ResourceManager initialization complete.
>> [INFO] Loaded System Directive: 
>> org.apache.velocity.runtime.directive.Literal
>> [INFO] Loaded System Directive: 
>> org.apache.velocity.runtime.directive.Macro
>> [INFO] Loaded System Directive: 
>> org.apache.velocity.runtime.directive.Parse
>> [INFO] Loaded System Directive: 
>> org.apache.velocity.runtime.directive.Include
>> [INFO] Loaded System Directive: 
>> org.apache.velocity.runtime.directive.Foreach
>> [INFO] Created: 20 parsers.
>> [INFO] Velocimacro : initialization starting.
>> [INFO] Velocimacro : adding VMs from VM library template : 
>> VM_global_library.vm
>> [ERROR] ResourceManager : unable to find resource 
>> 'VM_global_library.vm' in any resource loader.
>> [INFO] Velocimacro : error using  VM library template 
>> VM_global_library.vm : 
>> org.apache.velocity.exception.ResourceNotFoundException: Unable to 
>> find resource 'VM_global_library.vm'
>> [INFO] Velocimacro :  VM library template macro registration complete.
>> [INFO] Velocimacro : allowInline = true : VMs can be defined inline in 
>> templates
>> [INFO] Velocimacro : allowInlineToOverride = false : VMs defined 
>> inline may NOT replace previous VM definitions
>> [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline 
>> will be  global in scope if allowed.
>> [INFO] Velocimacro : messages on  : VM system will output logging 
>> messages
>> [INFO] Velocimacro : autoload off  : VM system will not automatically 
>> reload global library macros
>> [INFO] Velocimacro : initialization complete.
>> [INFO] Velocity successfully started.
>> [DEBUG] Configuring mojo 
>> 'org.apache.maven.plugins:maven-changes-plugin:2.0-beta-2:announcement-generate' 
>> -->
>> [DEBUG]   (s) artifactId = reporting-jsf
>> [DEBUG]   (s) developmentTeam = reporting-jsf-team
>> [DEBUG]   (s) finalName = reporting-jsf-1.0.2-SNAPSHOT.war
>> [DEBUG]   (f) generateJiraAnnouncement = false
>> [DEBUG]   (s) groupId = com.mikon.customer.kc
>> [DEBUG]   (s) introduction = Generalized web based reporting tool for 
>> data.
>> [DEBUG]   (f) jiraXML = C:\cvs\reporting-jsf\target/jira-announcement.xml
>> [DEBUG]   (f) nbEntries = 25
>> [DEBUG]   (s) outputDirectory = C:\cvs\reporting-jsf\target/announcement
>> [DEBUG]   (s) packaging = war
>> [DEBUG]   (f) project = org.apache.maven.project.MavenProject@4ff0d01
>> [DEBUG]   (f) resolutionId = Fixed
>> [DEBUG]   (f) setting = org.apache.maven.settings.Settings@1b01afa
>> [DEBUG]   (f) statusId = Closed
>> [DEBUG]   (f) template = announcement.vm
>> [DEBUG]   (f) templateDirectory = /src/main/resources
>> [DEBUG]   (s) url = 
>> http://developer.foo.com/projects/reporting-jsf/1.0.2-SNAPSHOT/reporting-jsf 
>>
>> [DEBUG]   (s) urlDownload = 
>> http://developer.foo.com/projects/reporting-jsf/1.0.2-SNAPSHOT/reporting-jsf/reporting-jsf-1.0.2-SNAPSHOT.jar 
>>
>> [DEBUG]   (s) version = 1.0.2-SNAPSHOT
>> [DEBUG]   (s) xmlPath = C:\cvs\reporting-jsf/src/changes/changes.xml
>> [DEBUG] -- end configuration --
>> [INFO] [changes:announcement-generate]
>> [INFO] Creating announcement file from changes.xml...
>> [ERROR] ResourceManager : unable to find resource 
>> '/src/main/resources/announcement.vm' in any resource loader.
>> [INFO] 
>> ------------------------------------------------------------------------
>>
>> Is this a bug or a configuration error?
>>
>> Paul Spencer
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Problem using custom announcement with changes plugin

Posted by Siegfried Goeschl <si...@it20one.at>.
Veryyyyy stupid question ...

<templateDirectory>/src/main/resources</templateDirectory>

seems to be an absolute reference to a directory whereas

C:\cvs\reporting-jsf\src\main\resources

is the absolute path

Cheers

Siegfried Goeschl



Paul Spencer wrote:
> I am trying to configure the changes plugin, version 2.0-beta-2, to use 
> a custom
> announcement.vm file.  Setting templateDirectory in to 
> /src/main/resources does
> not work.  The command "mvn changes:announcement-generate" always fails 
> with the
> following error message:
> 
>   ResourceManager : unable to find resource 
> '/src/main/resources/announcement.vm' in any resource loader
> 
> Belows is additional information related the the problem:
> 
> ***
> * From POM.XML
> ***
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-changes-plugin</artifactId>
>     <configuration>
>           <template>announcement.vm</template>
>       <templateDirectory>/src/main/resources</templateDirectory>
>         </configuration>
>       </plugin>
> 
> ***
> * Directory output
> ***
>  Directory of C:\cvs\reporting-jsf\src\main\resources
> 
> 04/20/2007  01:45 PM    <DIR>          .
> 04/20/2007  01:45 PM    <DIR>          ..
> 04/20/2007  01:45 PM             1,848 announcement.vm
> 04/18/2007  10:01 AM                69 application.properties
> 09/20/2006  11:56 AM               206 implementations.properties
> 04/12/2007  04:40 PM             1,109 log4j.xml
>                4 File(s)          3,232 bytes
>                2 Dir(s)  67,573,653,504 bytes free
> 
> C:\cvs_apms\apms-reporting-jsf>
> ***
> * Maven debug output
> ***
> [INFO] **************************************************************
> [INFO] Starting Jakarta Velocity v1.4
> [INFO] RuntimeInstance initializing.
> [INFO] Default Properties File: 
> org\apache\velocity\runtime\defaults\velocity.properties
> [INFO] Default ResourceManager initializing. (class 
> org.apache.velocity.runtime.resource.ResourceManagerImpl)
> [INFO] Resource Loader Instantiated: 
> org.apache.maven.plugin.resource.loader.ProjectResourceLoader
> [INFO] ProjectResourceLoader : initialization starting.
> [INFO] path :C:\cvs\reporting-jsf\src\main\resources\
> [INFO] ProjectResourceLoader : adding path 
> 'C:\cvs\reporting-jsf\src\main\resources\'
> [INFO] ProjectResourceLoader : initialization complete.
> [INFO] Resource Loader Instantiated: 
> org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
> [INFO] ClasspathResourceLoader : initialization starting.
> [INFO] ClasspathResourceLoader : initialization complete.
> [INFO] ResourceCache : initialized. (class 
> org.apache.velocity.runtime.resource.ResourceCacheImpl)
> [INFO] Default ResourceManager initialization complete.
> [INFO] Loaded System Directive: 
> org.apache.velocity.runtime.directive.Literal
> [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Macro
> [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Parse
> [INFO] Loaded System Directive: 
> org.apache.velocity.runtime.directive.Include
> [INFO] Loaded System Directive: 
> org.apache.velocity.runtime.directive.Foreach
> [INFO] Created: 20 parsers.
> [INFO] Velocimacro : initialization starting.
> [INFO] Velocimacro : adding VMs from VM library template : 
> VM_global_library.vm
> [ERROR] ResourceManager : unable to find resource 'VM_global_library.vm' 
> in any resource loader.
> [INFO] Velocimacro : error using  VM library template 
> VM_global_library.vm : 
> org.apache.velocity.exception.ResourceNotFoundException: Unable to find 
> resource 'VM_global_library.vm'
> [INFO] Velocimacro :  VM library template macro registration complete.
> [INFO] Velocimacro : allowInline = true : VMs can be defined inline in 
> templates
> [INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline 
> may NOT replace previous VM definitions
> [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will 
> be  global in scope if allowed.
> [INFO] Velocimacro : messages on  : VM system will output logging messages
> [INFO] Velocimacro : autoload off  : VM system will not automatically 
> reload global library macros
> [INFO] Velocimacro : initialization complete.
> [INFO] Velocity successfully started.
> [DEBUG] Configuring mojo 
> 'org.apache.maven.plugins:maven-changes-plugin:2.0-beta-2:announcement-generate' 
> -->
> [DEBUG]   (s) artifactId = reporting-jsf
> [DEBUG]   (s) developmentTeam = reporting-jsf-team
> [DEBUG]   (s) finalName = reporting-jsf-1.0.2-SNAPSHOT.war
> [DEBUG]   (f) generateJiraAnnouncement = false
> [DEBUG]   (s) groupId = com.mikon.customer.kc
> [DEBUG]   (s) introduction = Generalized web based reporting tool for data.
> [DEBUG]   (f) jiraXML = C:\cvs\reporting-jsf\target/jira-announcement.xml
> [DEBUG]   (f) nbEntries = 25
> [DEBUG]   (s) outputDirectory = C:\cvs\reporting-jsf\target/announcement
> [DEBUG]   (s) packaging = war
> [DEBUG]   (f) project = org.apache.maven.project.MavenProject@4ff0d01
> [DEBUG]   (f) resolutionId = Fixed
> [DEBUG]   (f) setting = org.apache.maven.settings.Settings@1b01afa
> [DEBUG]   (f) statusId = Closed
> [DEBUG]   (f) template = announcement.vm
> [DEBUG]   (f) templateDirectory = /src/main/resources
> [DEBUG]   (s) url = 
> http://developer.foo.com/projects/reporting-jsf/1.0.2-SNAPSHOT/reporting-jsf 
> 
> [DEBUG]   (s) urlDownload = 
> http://developer.foo.com/projects/reporting-jsf/1.0.2-SNAPSHOT/reporting-jsf/reporting-jsf-1.0.2-SNAPSHOT.jar 
> 
> [DEBUG]   (s) version = 1.0.2-SNAPSHOT
> [DEBUG]   (s) xmlPath = C:\cvs\reporting-jsf/src/changes/changes.xml
> [DEBUG] -- end configuration --
> [INFO] [changes:announcement-generate]
> [INFO] Creating announcement file from changes.xml...
> [ERROR] ResourceManager : unable to find resource 
> '/src/main/resources/announcement.vm' in any resource loader.
> [INFO] 
> ------------------------------------------------------------------------
> 
> Is this a bug or a configuration error?
> 
> Paul Spencer
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org