You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Rahamim, Zvi (Zvi) ** CTR **" <ra...@avaya.com> on 2004/04/25 19:42:37 UTC

ZQ: Configure Maven to work with local network drive and different jar names

Hi!
In my company the jars of the various projects are in a network drive so that everybody can access them.
Each project has its own project directory, and under this directory there is a directory for each version (in the version directory there are all the files that relates to this versions).

For example, let's say that I have projects A and B (B uses A).
A has jar called aaa.jar.
A located at K:/Projects/A/
B located at K:/Projects/B/

Can you tell me how to configure Maven to build project B?


Some more questions:
1. I understood that I have to specify a specific jar name (that doesn't have the expected format) in all the projects that use A, right? (Why not put this information inside project.xml that relates to project A?)
2. Is there a way to use different file name than maven.xml?
3. Is there a way to 'overide' an existing goal (I know there are ways to do things before and after using the pre and post goal)


Thanks!
Zvi

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


Re: value between projects - Global scope.

Posted by Kenney Westerhof <fo...@neonics.com>.
On Mon, 14 Mar 2005, Vijay Venkataraman wrote:

Hi Vijay,

> I myself figure out that i can set it like
> ${pom.setCurrentVersion("TEST")} - It is a kind of hack. Cant we control
> the value of the attributes that get in to the war manifest?
> I think this should be very important feature, that we are able to
> control the attribute values that are auto generated.

Maybe you want to modify plugin.jelly in maven-war-plugin, to use preset
properties when present, and default to the pom properties. Send a patch
to the maven-war-plugin team, or use custom goals in maven.xml.

Greetings,

	Kenney

>
> Thanks,
> Vijay
>
> I would be happy if i can set  a value in the global scope and pull this
> in different projects.
>
> Thanks,
> Vijay
>
>
> Vijay Venkataraman wrote:
>
> > Hi,
> >
> > Thanks for the information Craig. The buildnumber task is available in
> > 1.5.2. Using bulidnumber scheme
> > i have to keep committing this file to the repository right?. We plan
> > to go with the date time stamp and are ok with that.
> > Is it possible to set a different value to pom.currentVersion between
> > goals?
> >
> > What i have done currently is have custom MANIFEST file which holds
> > the attribute i would currently like to override with the one that is
> > auto generated by the JAR and WAR goals.
> >
> > By doing the following setting it works fine with JAR plugin.
> > maven.jar.manifest=${user.home}/custom-MANIFEST.MF
> > ie. if there is a property in custom-MANIFEST.MF which matches with
> > that is in the auto generated manifest file, then property in
> > custom-MANIFEST.MF overrides it.
> > The problem is with WAR plug-in :
> > maven.war.manifest=${user.home}/custom-MANIFEST.MF
> > Here the property does not get overridden but gets written twice.
> > Which is shown in bold.
> >
> > Ant-Version: Apache Ant 1.5.3
> > Created-By: 1.4.2_04-b04 (Sun Microsystems Inc.)
> > Built-By: XYZUY
> > Implementation-Version: XYX-050311.2038            [This is the
> > property in custom-MANIFEST.MF]
> >
> > Name: custom project
> > Specification-Title: some demo
> > Specification-Version: {pom.currentVersion}
> > Specification-Vendor: Company
> > Implementation-Title: oracle.adfdemo.view.faces
> > Implementation-Version: XYX                        [The one auto
> > generated. ]
> > Implementation-Vendor: Company
> >
> > The implementation version comes out from pom.Version. If i can set
> > pom.Version before war goal and reset it in the post goal. I should be
> > able to achieve. Or if pom.Version cannot be changed .. then i have to
> > write a goal to unjar the war and rewrite the manifest file.
> >
> > Not sure whether it is a bug with war plug in.
> >
> > Thanks,
> > Vijay
> >
> >
> >
> > Craig S. Cottingham wrote:
> >
> >> -----BEGIN PGP SIGNED MESSAGE-----
> >> Hash: SHA1
> >>
> >> On Mar 10, 2005, at 06:41, Vijay Venkataraman wrote:
> >>
> >>> I want to generate a unique number for all the jars which i build in
> >>> my maven project.  There are multiple projects (multi project)with
> >>> in a given project. The value ${pom.currentVersion} is just not
> >>> enough. I need to know the number of each build. For this i have a
> >>> unique number generated for me. I need to pass this value to
> >>> different projects that are part of the same project.
> >>>
> >>> ${systemScope.put('dateTimeStamp','${versionInfo}')}
> >>> The syntax of the form mentioned above does not help me since it is
> >>> per JVM.
> >>>
> >>> Is there a way i could store it in a kind of global context and
> >>> retrieve it?
> >>
> >>
> >>
> >> Can you leverage Ant's BuildNumber task?
> >> <http://ant.apache.org/manual/CoreTasks/buildnumber.html> Yes, this
> >> documentation is for Ant 1.6.2, but I'm pretty sure BuildNumber was
> >> in Ant 1.5.x.
> >>
> >> - --
> >> Craig S. Cottingham
> >> craig@cottingham.net
> >> OpenPGP key available from:
> >> http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x7977F79C
> >> -----BEGIN PGP SIGNATURE-----
> >> Version: GnuPG v1.2.4 (Darwin)
> >>
> >> iD8DBQFCMGGxEJLQ3Hl395wRAtI4AJ4/isNG53ZNjgrdGWTZ5M+aMa/RmACcCnrc
> >> g+FwBzL824sOXMvhghT3bZ4=
> >> =MIPy
> >> -----END PGP SIGNATURE-----
> >>
> >>
> >> ---------------------------------------------------------------------
> >> 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
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

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


Re: value between projects - Global scope.

Posted by Vijay Venkataraman <vi...@oracle.com>.
I myself figure out that i can set it like
${pom.setCurrentVersion("TEST")} - It is a kind of hack. Cant we control 
the value of the attributes that get in to the war manifest?
I think this should be very important feature, that we are able to 
control the attribute values that are auto generated.

Thanks,
Vijay

I would be happy if i can set  a value in the global scope and pull this 
in different projects.

Thanks,
Vijay


Vijay Venkataraman wrote:

> Hi,
>
> Thanks for the information Craig. The buildnumber task is available in 
> 1.5.2. Using bulidnumber scheme
> i have to keep committing this file to the repository right?. We plan 
> to go with the date time stamp and are ok with that.
> Is it possible to set a different value to pom.currentVersion between 
> goals?
>
> What i have done currently is have custom MANIFEST file which holds 
> the attribute i would currently like to override with the one that is 
> auto generated by the JAR and WAR goals.
>
> By doing the following setting it works fine with JAR plugin.
> maven.jar.manifest=${user.home}/custom-MANIFEST.MF
> ie. if there is a property in custom-MANIFEST.MF which matches with 
> that is in the auto generated manifest file, then property in 
> custom-MANIFEST.MF overrides it.
> The problem is with WAR plug-in :
> maven.war.manifest=${user.home}/custom-MANIFEST.MF
> Here the property does not get overridden but gets written twice. 
> Which is shown in bold.
>
> Ant-Version: Apache Ant 1.5.3
> Created-By: 1.4.2_04-b04 (Sun Microsystems Inc.)
> Built-By: XYZUY
> Implementation-Version: XYX-050311.2038            [This is the 
> property in custom-MANIFEST.MF]
>
> Name: custom project
> Specification-Title: some demo
> Specification-Version: {pom.currentVersion}
> Specification-Vendor: Company
> Implementation-Title: oracle.adfdemo.view.faces
> Implementation-Version: XYX                        [The one auto 
> generated. ]
> Implementation-Vendor: Company
>
> The implementation version comes out from pom.Version. If i can set 
> pom.Version before war goal and reset it in the post goal. I should be 
> able to achieve. Or if pom.Version cannot be changed .. then i have to 
> write a goal to unjar the war and rewrite the manifest file.
>
> Not sure whether it is a bug with war plug in.
>
> Thanks,
> Vijay
>
>
>
> Craig S. Cottingham wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On Mar 10, 2005, at 06:41, Vijay Venkataraman wrote:
>>
>>> I want to generate a unique number for all the jars which i build in 
>>> my maven project.  There are multiple projects (multi project)with 
>>> in a given project. The value ${pom.currentVersion} is just not 
>>> enough. I need to know the number of each build. For this i have a 
>>> unique number generated for me. I need to pass this value to 
>>> different projects that are part of the same project.
>>>
>>> ${systemScope.put('dateTimeStamp','${versionInfo}')}
>>> The syntax of the form mentioned above does not help me since it is 
>>> per JVM.
>>>
>>> Is there a way i could store it in a kind of global context and 
>>> retrieve it?
>>
>>
>>
>> Can you leverage Ant's BuildNumber task? 
>> <http://ant.apache.org/manual/CoreTasks/buildnumber.html> Yes, this 
>> documentation is for Ant 1.6.2, but I'm pretty sure BuildNumber was 
>> in Ant 1.5.x.
>>
>> - --
>> Craig S. Cottingham
>> craig@cottingham.net
>> OpenPGP key available from:
>> http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x7977F79C
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.2.4 (Darwin)
>>
>> iD8DBQFCMGGxEJLQ3Hl395wRAtI4AJ4/isNG53ZNjgrdGWTZ5M+aMa/RmACcCnrc
>> g+FwBzL824sOXMvhghT3bZ4=
>> =MIPy
>> -----END PGP SIGNATURE-----
>>
>>
>> ---------------------------------------------------------------------
>> 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: value between projects - Global scope.

Posted by Vijay Venkataraman <vi...@oracle.com>.
Hi,

Thanks for the information Craig. The buildnumber task is available in 
1.5.2. Using bulidnumber scheme
i have to keep committing this file to the repository right?. We plan to 
go with the date time stamp and are ok with that.
Is it possible to set a different value to pom.currentVersion between goals?

What i have done currently is have custom MANIFEST file which holds the 
attribute i would currently like to override with the one that is auto 
generated by the JAR and WAR goals.

By doing the following setting it works fine with JAR plugin.
maven.jar.manifest=${user.home}/custom-MANIFEST.MF
ie. if there is a property in custom-MANIFEST.MF which matches with that 
is in the auto generated manifest file, then property in 
custom-MANIFEST.MF overrides it.
The problem is with WAR plug-in :
maven.war.manifest=${user.home}/custom-MANIFEST.MF
Here the property does not get overridden but gets written twice. Which 
is shown in bold.

Ant-Version: Apache Ant 1.5.3
Created-By: 1.4.2_04-b04 (Sun Microsystems Inc.)
Built-By: XYZUY
Implementation-Version: XYX-050311.2038            [This is the property 
in custom-MANIFEST.MF]

Name: custom project
Specification-Title: some demo
Specification-Version: {pom.currentVersion}
Specification-Vendor: Company
Implementation-Title: oracle.adfdemo.view.faces
Implementation-Version: XYX                        [The one auto 
generated. ]
Implementation-Vendor: Company

The implementation version comes out from pom.Version. If i can set 
pom.Version before war goal and reset it in the post goal. I should be 
able to achieve. Or if pom.Version cannot be changed .. then i have to 
write a goal to unjar the war and rewrite the manifest file.

Not sure whether it is a bug with war plug in.

Thanks,
Vijay



Craig S. Cottingham wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Mar 10, 2005, at 06:41, Vijay Venkataraman wrote:
>
>> I want to generate a unique number for all the jars which i build in 
>> my maven project.  There are multiple projects (multi project)with in 
>> a given project. The value ${pom.currentVersion} is just not enough. 
>> I need to know the number of each build. For this i have a unique 
>> number generated for me. I need to pass this value to different 
>> projects that are part of the same project.
>>
>> ${systemScope.put('dateTimeStamp','${versionInfo}')}
>> The syntax of the form mentioned above does not help me since it is 
>> per JVM.
>>
>> Is there a way i could store it in a kind of global context and 
>> retrieve it?
>
>
> Can you leverage Ant's BuildNumber task? 
> <http://ant.apache.org/manual/CoreTasks/buildnumber.html> Yes, this 
> documentation is for Ant 1.6.2, but I'm pretty sure BuildNumber was in 
> Ant 1.5.x.
>
> - --
> Craig S. Cottingham
> craig@cottingham.net
> OpenPGP key available from:
> http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x7977F79C
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (Darwin)
>
> iD8DBQFCMGGxEJLQ3Hl395wRAtI4AJ4/isNG53ZNjgrdGWTZ5M+aMa/RmACcCnrc
> g+FwBzL824sOXMvhghT3bZ4=
> =MIPy
> -----END PGP SIGNATURE-----
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: value between projects - Global scope.

Posted by "Craig S. Cottingham" <cr...@cottingham.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mar 10, 2005, at 06:41, Vijay Venkataraman wrote:

> I want to generate a unique number for all the jars which i build in 
> my maven project.  There are multiple projects (multi project)with in 
> a given project. The value ${pom.currentVersion} is just not enough. I 
> need to know the number of each build. For this i have a unique number 
> generated for me. I need to pass this value to different projects that 
> are part of the same project.
>
> ${systemScope.put('dateTimeStamp','${versionInfo}')}
> The syntax of the form mentioned above does not help me since it is 
> per JVM.
>
> Is there a way i could store it in a kind of global context and 
> retrieve it?

Can you leverage Ant's BuildNumber task? 
<http://ant.apache.org/manual/CoreTasks/buildnumber.html> Yes, this 
documentation is for Ant 1.6.2, but I'm pretty sure BuildNumber was in 
Ant 1.5.x.

- --
Craig S. Cottingham
craig@cottingham.net
OpenPGP key available from:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x7977F79C
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFCMGGxEJLQ3Hl395wRAtI4AJ4/isNG53ZNjgrdGWTZ5M+aMa/RmACcCnrc
g+FwBzL824sOXMvhghT3bZ4=
=MIPy
-----END PGP SIGNATURE-----


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


value between projects - Global scope.

Posted by Vijay Venkataraman <vi...@oracle.com>.
Hi,

I want to generate a unique number for all the jars which i build in my 
maven project.  There are multiple projects (multi project)with in a 
given project. The value ${pom.currentVersion} is just not enough. I 
need to know the number of each build. For this i have a unique number 
generated for me. I need to pass this value to different projects that 
are part of the same project.

${systemScope.put('dateTimeStamp','${versionInfo}')}
The syntax of the form mentioned above does not help me since it is per JVM.

Is there a way i could store it in a kind of global context and retrieve it?

Once i get this i can create a Project-MANIFEST.MF file write a property 
to it and set up a pregoal for jar and append this property to the jar 
manifest.

Running short of time to get this fixed. Has anyone faced a similar 
situation? does any one have a better solution?

Simply the requirement is to add the same build number in all the 
dependent jars. I am not using CVS.

Thanks,
Vijay







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