You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Grigory Ptashko <gp...@cmmt.ru> on 2009/12/18 22:11:21 UTC

release plugin: version change not only in POMs ?

Hello.

Recently I've got acquainted with the release plugin. I started using it, it
works great but I am missing one feature. The problem is the following: the
version that is specified in a POM is used not only in this POM but also in
another place in a plain-text format. Actually it is used in the MANIFEST.MF
in the special header. So when I perform a release the release version have
the new version, the trunk version gets the new y-SNAPSHOT version but that
MANIFEST.MF file has old version x-SNAPSHOT which becomes wrong both in
trunk and in the release.

What I want is two steps to be executed while release:perform (phrases in
quotes are taken from here
http://maven.apache.org/plugins/maven-release-plugin/examples/prepare-release.html
):


   - The first is after the step "Change the version in the poms from
   x-SNAPSHOT to a new version (you will be prompted for the versions to use)":
   the same transformation must be done with the text file that I specify.
   - The second is after the step "Bump the version in the POMs to a new
   value y-SNAPSHOT (these values will also be prompted for)": the same
   transformation must be done with text file that I specify.


How can I achieve this?

Thank you.

-- 
С уважением,
Григорий Пташко

+7 (916) 1489766
gptashko@cmmt.ru
http://www.cmmt.ru

Re: release plugin: version change not only in POMs ?

Posted by Grigory Ptashko <gp...@cmmt.ru>.
This helped me! Thanks a lot!

19 декабря 2009 г. 14:45 пользователь Anders Hammar <an...@hammar.net>написал:

> Your plugin binding binds the resources plugin as configured to the Maven
> lifecycle. But you're executing
> mvn resources:copy-resources
> which isn't executing the lifecycle (it justs executed the copy-resources
> goal). Try
> mvn install
> instead!
>
> If you need to be able to run mvn resources:copy-resources (with the
> config)
> there are ways to solve that as well. Basically you need to move the
> configuration part into the pluginManagement section.
>
> /Anders
>
> 2009/12/19 Grigory Ptashko <gp...@cmmt.ru>
>
> > I've inserted the following configuration to my pom.xml (taken from here
> >
> >
> http://maven.apache.org/plugins/maven-resources-plugin/examples/copy-resources.html
> > ):
> >
> >      <plugin>
> >        <artifactId>maven-resources-plugin</artifactId>
> >        <version>2.4.1</version>
> >        <executions>
> >          <execution>
> >            <id>copy-resources</id>
> >            <!-- here the phase you need -->
> >            <phase>validate</phase>
> >            <goals>
> >              <goal>copy-resources</goal>
> >            </goals>
> >            <configuration>
> >              <outputDirectory>${basedir}</outputDirectory>
> >              <resources>
> >                <resource>
> >                  <directory>src/non-packaged-resources</directory>
> >                  <filtering>true</filtering>
> >                </resource>
> >              </resources>
> >            </configuration>
> >          </execution>
> >        </executions>
> >      </plugin>
> >
> >
> > The directory src/non-packaged-resources exists and my file is in there.
> > When I run mvn resources:copy-resources I get the following:
> >
> >
> > [ERROR] BUILD ERROR
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] One or more required plugin parameters are invalid/missing for
> > 'resources:copy-resources'
> >
> > [0] Inside the definition for plugin 'maven-resources-plugin' specify the
> > following:
> >
> > <configuration>
> >  ...
> >  <outputDirectory>VALUE</outputDirectory>
> > </configuration>.
> >
> > [1] Inside the definition for plugin 'maven-resources-plugin' specify the
> > following:
> >
> > <configuration>
> >  ...
> >  <resources>VALUE</resources>
> > </configuration>.
> >
> >
> > But I specified both directories as in the configuration snippet above.
> > What
> > am I doing wrong?
> >
> >
> > 2009/12/19 Roland Asmann <Ro...@adesso.at>
> >
> > > Hi,
> > >
> > > Sorry, didn't read the mail good enough and made some errors in my
> > > previous reply!
> > >
> > > - Put your files in src/main/config with the variables configured
> > > - Have the resource-plugin copy&filter them to the root of the project
> > > (make sure this is done before the pax-plugin runs)
> > >
> > > If you use the clean-plugin, it would be a good idea to put the 2 files
> > in
> > > the root of the project in the list of files to delete as well!
> > >
> > > Roland
> > >
> > >
> > > > Sorry for the mess but actually this is not directly the MANIFEST
> file.
> > > It
> > > > is a file used by other plugin to create the MANIFEST file. I am
> > talking
> > > > about the pax plugin and osgi.bnd file which must reside in the root
> of
> > > > the
> > > > maven project along with the pom.xml. This file is a not resource, it
> > is
> > > > not
> > > > going to the jar at all. It is like a config file for the pax plugin.
> > And
> > > > it
> > > > is a text file.
> > > >
> > > > I read the info in the link about the resources plugin - it is
> exactly
> > > > what
> > > > I need but without packing this file to the resulting jar and it must
> > not
> > > > go
> > > > to the target directory during the build process.
> > > >
> > > > 19 декабря 2009 г. 0:45 пользователь Dennis Lundberg
> > > > <de...@apache.org>написал:
> > > >
> > > >> You should try to go about this in another way. Instead of having
> the
> > > >> version explicitly in text files, you should filter these files
> using
> > > >> the Resources Plugin. See
> > > >>
> > > >>
> > >
> >
> http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html
> > > >>
> > > >>
> > > >> As for the example of the manifest file, you should let the JAR
> Plugin
> > > >> handle the version in there instead of managing it yourself. See
> > > >>
> > > >>
> > > >>
> > >
> >
> http://maven.apache.org/plugins/maven-jar-plugin/examples/manifest-customization.html
> > > >>
> > > >> and
> > > >>
> > > >> http://maven.apache.org/shared/maven-archiver/index.html
> > > >>
> > > >>
> > > >> Grigory Ptashko wrote:
> > > >> > Hello.
> > > >> >
> > > >> > Recently I've got acquainted with the release plugin. I started
> > using
> > > >> it,
> > > >> it
> > > >> > works great but I am missing one feature. The problem is the
> > > >> following:
> > > >> the
> > > >> > version that is specified in a POM is used not only in this POM
> but
> > > >> also
> > > >> in
> > > >> > another place in a plain-text format. Actually it is used in the
> > > >> MANIFEST.MF
> > > >> > in the special header. So when I perform a release the release
> > version
> > > >> have
> > > >> > the new version, the trunk version gets the new y-SNAPSHOT version
> > but
> > > >> that
> > > >> > MANIFEST.MF file has old version x-SNAPSHOT which becomes wrong
> both
> > > >> in
> > > >> > trunk and in the release.
> > > >> >
> > > >> > What I want is two steps to be executed while release:perform
> > (phrases
> > > >> in
> > > >> > quotes are taken from here
> > > >> >
> > > >>
> > >
> >
> http://maven.apache.org/plugins/maven-release-plugin/examples/prepare-release.html
> > > >> > ):
> > > >> >
> > > >> >
> > > >> >    - The first is after the step "Change the version in the poms
> > from
> > > >> >    x-SNAPSHOT to a new version (you will be prompted for the
> > versions
> > > >> to
> > > >> use)":
> > > >> >    the same transformation must be done with the text file that I
> > > >> specify.
> > > >> >    - The second is after the step "Bump the version in the POMs to
> a
> > > >> new
> > > >> >    value y-SNAPSHOT (these values will also be prompted for)": the
> > > >> same
> > > >> >    transformation must be done with text file that I specify.
> > > >> >
> > > >> >
> > > >> > How can I achieve this?
> > > >> >
> > > >> > Thank you.
> > > >> >
> > > >>
> > > >>
> > > >> --
> > > >> Dennis Lundberg
> > > >>
> > > >>
> ---------------------------------------------------------------------
> > > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > >> For additional commands, e-mail: users-help@maven.apache.org
> > > >>
> > > >>
> > > >
> > > >
> > > > --
> > > > С уважением,
> > > > Григорий Пташко
> > > >
> > > > +7 (916) 1489766
> > > > gptashko@cmmt.ru
> > > > http://www.cmmt.ru
> > > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> >
> > --
> > С уважением,
> > Григорий Пташко
> >
> > +7 (916) 1489766
> > gptashko@cmmt.ru
> > http://www.cmmt.ru
> >
>



-- 
С уважением,
Григорий Пташко

+7 (916) 1489766
gptashko@cmmt.ru
http://www.cmmt.ru

Re: release plugin: version change not only in POMs ?

Posted by Anders Hammar <an...@hammar.net>.
Your plugin binding binds the resources plugin as configured to the Maven
lifecycle. But you're executing
mvn resources:copy-resources
which isn't executing the lifecycle (it justs executed the copy-resources
goal). Try
mvn install
instead!

If you need to be able to run mvn resources:copy-resources (with the config)
there are ways to solve that as well. Basically you need to move the
configuration part into the pluginManagement section.

/Anders

2009/12/19 Grigory Ptashko <gp...@cmmt.ru>

> I've inserted the following configuration to my pom.xml (taken from here
>
> http://maven.apache.org/plugins/maven-resources-plugin/examples/copy-resources.html
> ):
>
>      <plugin>
>        <artifactId>maven-resources-plugin</artifactId>
>        <version>2.4.1</version>
>        <executions>
>          <execution>
>            <id>copy-resources</id>
>            <!-- here the phase you need -->
>            <phase>validate</phase>
>            <goals>
>              <goal>copy-resources</goal>
>            </goals>
>            <configuration>
>              <outputDirectory>${basedir}</outputDirectory>
>              <resources>
>                <resource>
>                  <directory>src/non-packaged-resources</directory>
>                  <filtering>true</filtering>
>                </resource>
>              </resources>
>            </configuration>
>          </execution>
>        </executions>
>      </plugin>
>
>
> The directory src/non-packaged-resources exists and my file is in there.
> When I run mvn resources:copy-resources I get the following:
>
>
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] One or more required plugin parameters are invalid/missing for
> 'resources:copy-resources'
>
> [0] Inside the definition for plugin 'maven-resources-plugin' specify the
> following:
>
> <configuration>
>  ...
>  <outputDirectory>VALUE</outputDirectory>
> </configuration>.
>
> [1] Inside the definition for plugin 'maven-resources-plugin' specify the
> following:
>
> <configuration>
>  ...
>  <resources>VALUE</resources>
> </configuration>.
>
>
> But I specified both directories as in the configuration snippet above.
> What
> am I doing wrong?
>
>
> 2009/12/19 Roland Asmann <Ro...@adesso.at>
>
> > Hi,
> >
> > Sorry, didn't read the mail good enough and made some errors in my
> > previous reply!
> >
> > - Put your files in src/main/config with the variables configured
> > - Have the resource-plugin copy&filter them to the root of the project
> > (make sure this is done before the pax-plugin runs)
> >
> > If you use the clean-plugin, it would be a good idea to put the 2 files
> in
> > the root of the project in the list of files to delete as well!
> >
> > Roland
> >
> >
> > > Sorry for the mess but actually this is not directly the MANIFEST file.
> > It
> > > is a file used by other plugin to create the MANIFEST file. I am
> talking
> > > about the pax plugin and osgi.bnd file which must reside in the root of
> > > the
> > > maven project along with the pom.xml. This file is a not resource, it
> is
> > > not
> > > going to the jar at all. It is like a config file for the pax plugin.
> And
> > > it
> > > is a text file.
> > >
> > > I read the info in the link about the resources plugin - it is exactly
> > > what
> > > I need but without packing this file to the resulting jar and it must
> not
> > > go
> > > to the target directory during the build process.
> > >
> > > 19 декабря 2009 г. 0:45 пользователь Dennis Lundberg
> > > <de...@apache.org>написал:
> > >
> > >> You should try to go about this in another way. Instead of having the
> > >> version explicitly in text files, you should filter these files using
> > >> the Resources Plugin. See
> > >>
> > >>
> >
> http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html
> > >>
> > >>
> > >> As for the example of the manifest file, you should let the JAR Plugin
> > >> handle the version in there instead of managing it yourself. See
> > >>
> > >>
> > >>
> >
> http://maven.apache.org/plugins/maven-jar-plugin/examples/manifest-customization.html
> > >>
> > >> and
> > >>
> > >> http://maven.apache.org/shared/maven-archiver/index.html
> > >>
> > >>
> > >> Grigory Ptashko wrote:
> > >> > Hello.
> > >> >
> > >> > Recently I've got acquainted with the release plugin. I started
> using
> > >> it,
> > >> it
> > >> > works great but I am missing one feature. The problem is the
> > >> following:
> > >> the
> > >> > version that is specified in a POM is used not only in this POM but
> > >> also
> > >> in
> > >> > another place in a plain-text format. Actually it is used in the
> > >> MANIFEST.MF
> > >> > in the special header. So when I perform a release the release
> version
> > >> have
> > >> > the new version, the trunk version gets the new y-SNAPSHOT version
> but
> > >> that
> > >> > MANIFEST.MF file has old version x-SNAPSHOT which becomes wrong both
> > >> in
> > >> > trunk and in the release.
> > >> >
> > >> > What I want is two steps to be executed while release:perform
> (phrases
> > >> in
> > >> > quotes are taken from here
> > >> >
> > >>
> >
> http://maven.apache.org/plugins/maven-release-plugin/examples/prepare-release.html
> > >> > ):
> > >> >
> > >> >
> > >> >    - The first is after the step "Change the version in the poms
> from
> > >> >    x-SNAPSHOT to a new version (you will be prompted for the
> versions
> > >> to
> > >> use)":
> > >> >    the same transformation must be done with the text file that I
> > >> specify.
> > >> >    - The second is after the step "Bump the version in the POMs to a
> > >> new
> > >> >    value y-SNAPSHOT (these values will also be prompted for)": the
> > >> same
> > >> >    transformation must be done with text file that I specify.
> > >> >
> > >> >
> > >> > How can I achieve this?
> > >> >
> > >> > Thank you.
> > >> >
> > >>
> > >>
> > >> --
> > >> Dennis Lundberg
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > >> For additional commands, e-mail: users-help@maven.apache.org
> > >>
> > >>
> > >
> > >
> > > --
> > > С уважением,
> > > Григорий Пташко
> > >
> > > +7 (916) 1489766
> > > gptashko@cmmt.ru
> > > http://www.cmmt.ru
> > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
> --
> С уважением,
> Григорий Пташко
>
> +7 (916) 1489766
> gptashko@cmmt.ru
> http://www.cmmt.ru
>

Re: release plugin: version change not only in POMs ?

Posted by Grigory Ptashko <gp...@cmmt.ru>.
I've inserted the following configuration to my pom.xml (taken from here
http://maven.apache.org/plugins/maven-resources-plugin/examples/copy-resources.html
):

      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.4.1</version>
        <executions>
          <execution>
            <id>copy-resources</id>
            <!-- here the phase you need -->
            <phase>validate</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${basedir}</outputDirectory>
              <resources>
                <resource>
                  <directory>src/non-packaged-resources</directory>
                  <filtering>true</filtering>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>


The directory src/non-packaged-resources exists and my file is in there.
When I run mvn resources:copy-resources I get the following:


[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] One or more required plugin parameters are invalid/missing for
'resources:copy-resources'

[0] Inside the definition for plugin 'maven-resources-plugin' specify the
following:

<configuration>
  ...
  <outputDirectory>VALUE</outputDirectory>
</configuration>.

[1] Inside the definition for plugin 'maven-resources-plugin' specify the
following:

<configuration>
  ...
  <resources>VALUE</resources>
</configuration>.


But I specified both directories as in the configuration snippet above. What
am I doing wrong?


2009/12/19 Roland Asmann <Ro...@adesso.at>

> Hi,
>
> Sorry, didn't read the mail good enough and made some errors in my
> previous reply!
>
> - Put your files in src/main/config with the variables configured
> - Have the resource-plugin copy&filter them to the root of the project
> (make sure this is done before the pax-plugin runs)
>
> If you use the clean-plugin, it would be a good idea to put the 2 files in
> the root of the project in the list of files to delete as well!
>
> Roland
>
>
> > Sorry for the mess but actually this is not directly the MANIFEST file.
> It
> > is a file used by other plugin to create the MANIFEST file. I am talking
> > about the pax plugin and osgi.bnd file which must reside in the root of
> > the
> > maven project along with the pom.xml. This file is a not resource, it is
> > not
> > going to the jar at all. It is like a config file for the pax plugin. And
> > it
> > is a text file.
> >
> > I read the info in the link about the resources plugin - it is exactly
> > what
> > I need but without packing this file to the resulting jar and it must not
> > go
> > to the target directory during the build process.
> >
> > 19 декабря 2009 г. 0:45 пользователь Dennis Lundberg
> > <de...@apache.org>написал:
> >
> >> You should try to go about this in another way. Instead of having the
> >> version explicitly in text files, you should filter these files using
> >> the Resources Plugin. See
> >>
> >>
> http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html
> >>
> >>
> >> As for the example of the manifest file, you should let the JAR Plugin
> >> handle the version in there instead of managing it yourself. See
> >>
> >>
> >>
> http://maven.apache.org/plugins/maven-jar-plugin/examples/manifest-customization.html
> >>
> >> and
> >>
> >> http://maven.apache.org/shared/maven-archiver/index.html
> >>
> >>
> >> Grigory Ptashko wrote:
> >> > Hello.
> >> >
> >> > Recently I've got acquainted with the release plugin. I started using
> >> it,
> >> it
> >> > works great but I am missing one feature. The problem is the
> >> following:
> >> the
> >> > version that is specified in a POM is used not only in this POM but
> >> also
> >> in
> >> > another place in a plain-text format. Actually it is used in the
> >> MANIFEST.MF
> >> > in the special header. So when I perform a release the release version
> >> have
> >> > the new version, the trunk version gets the new y-SNAPSHOT version but
> >> that
> >> > MANIFEST.MF file has old version x-SNAPSHOT which becomes wrong both
> >> in
> >> > trunk and in the release.
> >> >
> >> > What I want is two steps to be executed while release:perform (phrases
> >> in
> >> > quotes are taken from here
> >> >
> >>
> http://maven.apache.org/plugins/maven-release-plugin/examples/prepare-release.html
> >> > ):
> >> >
> >> >
> >> >    - The first is after the step "Change the version in the poms from
> >> >    x-SNAPSHOT to a new version (you will be prompted for the versions
> >> to
> >> use)":
> >> >    the same transformation must be done with the text file that I
> >> specify.
> >> >    - The second is after the step "Bump the version in the POMs to a
> >> new
> >> >    value y-SNAPSHOT (these values will also be prompted for)": the
> >> same
> >> >    transformation must be done with text file that I specify.
> >> >
> >> >
> >> > How can I achieve this?
> >> >
> >> > Thank you.
> >> >
> >>
> >>
> >> --
> >> Dennis Lundberg
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >
> >
> > --
> > С уважением,
> > Григорий Пташко
> >
> > +7 (916) 1489766
> > gptashko@cmmt.ru
> > http://www.cmmt.ru
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
С уважением,
Григорий Пташко

+7 (916) 1489766
gptashko@cmmt.ru
http://www.cmmt.ru

Re: release plugin: version change not only in POMs ?

Posted by Roland Asmann <Ro...@adesso.at>.
Hi,

Sorry, didn't read the mail good enough and made some errors in my
previous reply!

- Put your files in src/main/config with the variables configured
- Have the resource-plugin copy&filter them to the root of the project
(make sure this is done before the pax-plugin runs)

If you use the clean-plugin, it would be a good idea to put the 2 files in
the root of the project in the list of files to delete as well!

Roland


> Sorry for the mess but actually this is not directly the MANIFEST file. It
> is a file used by other plugin to create the MANIFEST file. I am talking
> about the pax plugin and osgi.bnd file which must reside in the root of
> the
> maven project along with the pom.xml. This file is a not resource, it is
> not
> going to the jar at all. It is like a config file for the pax plugin. And
> it
> is a text file.
>
> I read the info in the link about the resources plugin - it is exactly
> what
> I need but without packing this file to the resulting jar and it must not
> go
> to the target directory during the build process.
>
> 19 ÄÅËÁÂÒÑ 2009 Ç. 0:45 ÐÏÌØÚÏ×ÁÔÅÌØ Dennis Lundberg
> <de...@apache.org>ÎÁÐÉÓÁÌ:
>
>> You should try to go about this in another way. Instead of having the
>> version explicitly in text files, you should filter these files using
>> the Resources Plugin. See
>>
>> http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html
>>
>>
>> As for the example of the manifest file, you should let the JAR Plugin
>> handle the version in there instead of managing it yourself. See
>>
>>
>> http://maven.apache.org/plugins/maven-jar-plugin/examples/manifest-customization.html
>>
>> and
>>
>> http://maven.apache.org/shared/maven-archiver/index.html
>>
>>
>> Grigory Ptashko wrote:
>> > Hello.
>> >
>> > Recently I've got acquainted with the release plugin. I started using
>> it,
>> it
>> > works great but I am missing one feature. The problem is the
>> following:
>> the
>> > version that is specified in a POM is used not only in this POM but
>> also
>> in
>> > another place in a plain-text format. Actually it is used in the
>> MANIFEST.MF
>> > in the special header. So when I perform a release the release version
>> have
>> > the new version, the trunk version gets the new y-SNAPSHOT version but
>> that
>> > MANIFEST.MF file has old version x-SNAPSHOT which becomes wrong both
>> in
>> > trunk and in the release.
>> >
>> > What I want is two steps to be executed while release:perform (phrases
>> in
>> > quotes are taken from here
>> >
>> http://maven.apache.org/plugins/maven-release-plugin/examples/prepare-release.html
>> > ):
>> >
>> >
>> >    - The first is after the step "Change the version in the poms from
>> >    x-SNAPSHOT to a new version (you will be prompted for the versions
>> to
>> use)":
>> >    the same transformation must be done with the text file that I
>> specify.
>> >    - The second is after the step "Bump the version in the POMs to a
>> new
>> >    value y-SNAPSHOT (these values will also be prompted for)": the
>> same
>> >    transformation must be done with text file that I specify.
>> >
>> >
>> > How can I achieve this?
>> >
>> > Thank you.
>> >
>>
>>
>> --
>> Dennis Lundberg
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
>
> --
> ó Õ×ÁÖÅÎÉÅÍ,
> çÒÉÇÏÒÉÊ ðÔÁÛËÏ
>
> +7 (916) 1489766
> gptashko@cmmt.ru
> http://www.cmmt.ru
>



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


Re: release plugin: version change not only in POMs ?

Posted by Roland Asmann <Ro...@adesso.at>.
Then configure the resource-plugin specially for this file of yours:

- put the file in src/main/config (or something like that)
- have the resource-plugin copy&filter it to target/config (or something,
anything but target/classes I would say)
- configure the pax-plugin to read from the location used in the step above

I presume here that the pax-plugin can read its configuration from a
specific (configurable) location... If not, I guess you're screwed...

Roland


> Sorry for the mess but actually this is not directly the MANIFEST file. It
> is a file used by other plugin to create the MANIFEST file. I am talking
> about the pax plugin and osgi.bnd file which must reside in the root of
> the
> maven project along with the pom.xml. This file is a not resource, it is
> not
> going to the jar at all. It is like a config file for the pax plugin. And
> it
> is a text file.
>
> I read the info in the link about the resources plugin - it is exactly
> what
> I need but without packing this file to the resulting jar and it must not
> go
> to the target directory during the build process.
>
> 19 ÄÅËÁÂÒÑ 2009 Ç. 0:45 ÐÏÌØÚÏ×ÁÔÅÌØ Dennis Lundberg
> <de...@apache.org>ÎÁÐÉÓÁÌ:
>
>> You should try to go about this in another way. Instead of having the
>> version explicitly in text files, you should filter these files using
>> the Resources Plugin. See
>>
>> http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html
>>
>>
>> As for the example of the manifest file, you should let the JAR Plugin
>> handle the version in there instead of managing it yourself. See
>>
>>
>> http://maven.apache.org/plugins/maven-jar-plugin/examples/manifest-customization.html
>>
>> and
>>
>> http://maven.apache.org/shared/maven-archiver/index.html
>>
>>
>> Grigory Ptashko wrote:
>> > Hello.
>> >
>> > Recently I've got acquainted with the release plugin. I started using
>> it,
>> it
>> > works great but I am missing one feature. The problem is the
>> following:
>> the
>> > version that is specified in a POM is used not only in this POM but
>> also
>> in
>> > another place in a plain-text format. Actually it is used in the
>> MANIFEST.MF
>> > in the special header. So when I perform a release the release version
>> have
>> > the new version, the trunk version gets the new y-SNAPSHOT version but
>> that
>> > MANIFEST.MF file has old version x-SNAPSHOT which becomes wrong both
>> in
>> > trunk and in the release.
>> >
>> > What I want is two steps to be executed while release:perform (phrases
>> in
>> > quotes are taken from here
>> >
>> http://maven.apache.org/plugins/maven-release-plugin/examples/prepare-release.html
>> > ):
>> >
>> >
>> >    - The first is after the step "Change the version in the poms from
>> >    x-SNAPSHOT to a new version (you will be prompted for the versions
>> to
>> use)":
>> >    the same transformation must be done with the text file that I
>> specify.
>> >    - The second is after the step "Bump the version in the POMs to a
>> new
>> >    value y-SNAPSHOT (these values will also be prompted for)": the
>> same
>> >    transformation must be done with text file that I specify.
>> >
>> >
>> > How can I achieve this?
>> >
>> > Thank you.
>> >
>>
>>
>> --
>> Dennis Lundberg
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
>
> --
> ó Õ×ÁÖÅÎÉÅÍ,
> çÒÉÇÏÒÉÊ ðÔÁÛËÏ
>
> +7 (916) 1489766
> gptashko@cmmt.ru
> http://www.cmmt.ru
>



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


Re: release plugin: version change not only in POMs ?

Posted by Grigory Ptashko <gp...@cmmt.ru>.
Sorry for the mess but actually this is not directly the MANIFEST file. It
is a file used by other plugin to create the MANIFEST file. I am talking
about the pax plugin and osgi.bnd file which must reside in the root of the
maven project along with the pom.xml. This file is a not resource, it is not
going to the jar at all. It is like a config file for the pax plugin. And it
is a text file.

I read the info in the link about the resources plugin - it is exactly what
I need but without packing this file to the resulting jar and it must not go
to the target directory during the build process.

19 декабря 2009 г. 0:45 пользователь Dennis Lundberg
<de...@apache.org>написал:

> You should try to go about this in another way. Instead of having the
> version explicitly in text files, you should filter these files using
> the Resources Plugin. See
>
> http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html
>
>
> As for the example of the manifest file, you should let the JAR Plugin
> handle the version in there instead of managing it yourself. See
>
>
> http://maven.apache.org/plugins/maven-jar-plugin/examples/manifest-customization.html
>
> and
>
> http://maven.apache.org/shared/maven-archiver/index.html
>
>
> Grigory Ptashko wrote:
> > Hello.
> >
> > Recently I've got acquainted with the release plugin. I started using it,
> it
> > works great but I am missing one feature. The problem is the following:
> the
> > version that is specified in a POM is used not only in this POM but also
> in
> > another place in a plain-text format. Actually it is used in the
> MANIFEST.MF
> > in the special header. So when I perform a release the release version
> have
> > the new version, the trunk version gets the new y-SNAPSHOT version but
> that
> > MANIFEST.MF file has old version x-SNAPSHOT which becomes wrong both in
> > trunk and in the release.
> >
> > What I want is two steps to be executed while release:perform (phrases in
> > quotes are taken from here
> >
> http://maven.apache.org/plugins/maven-release-plugin/examples/prepare-release.html
> > ):
> >
> >
> >    - The first is after the step "Change the version in the poms from
> >    x-SNAPSHOT to a new version (you will be prompted for the versions to
> use)":
> >    the same transformation must be done with the text file that I
> specify.
> >    - The second is after the step "Bump the version in the POMs to a new
> >    value y-SNAPSHOT (these values will also be prompted for)": the same
> >    transformation must be done with text file that I specify.
> >
> >
> > How can I achieve this?
> >
> > Thank you.
> >
>
>
> --
> Dennis Lundberg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
С уважением,
Григорий Пташко

+7 (916) 1489766
gptashko@cmmt.ru
http://www.cmmt.ru

Re: release plugin: version change not only in POMs ?

Posted by Dennis Lundberg <de...@apache.org>.
You should try to go about this in another way. Instead of having the
version explicitly in text files, you should filter these files using
the Resources Plugin. See

http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html


As for the example of the manifest file, you should let the JAR Plugin
handle the version in there instead of managing it yourself. See

http://maven.apache.org/plugins/maven-jar-plugin/examples/manifest-customization.html

and

http://maven.apache.org/shared/maven-archiver/index.html


Grigory Ptashko wrote:
> Hello.
> 
> Recently I've got acquainted with the release plugin. I started using it, it
> works great but I am missing one feature. The problem is the following: the
> version that is specified in a POM is used not only in this POM but also in
> another place in a plain-text format. Actually it is used in the MANIFEST.MF
> in the special header. So when I perform a release the release version have
> the new version, the trunk version gets the new y-SNAPSHOT version but that
> MANIFEST.MF file has old version x-SNAPSHOT which becomes wrong both in
> trunk and in the release.
> 
> What I want is two steps to be executed while release:perform (phrases in
> quotes are taken from here
> http://maven.apache.org/plugins/maven-release-plugin/examples/prepare-release.html
> ):
> 
> 
>    - The first is after the step "Change the version in the poms from
>    x-SNAPSHOT to a new version (you will be prompted for the versions to use)":
>    the same transformation must be done with the text file that I specify.
>    - The second is after the step "Bump the version in the POMs to a new
>    value y-SNAPSHOT (these values will also be prompted for)": the same
>    transformation must be done with text file that I specify.
> 
> 
> How can I achieve this?
> 
> Thank you.
> 


-- 
Dennis Lundberg

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