Re: Reactor projects and ${project.version}

2015-09-15 Thread Neeraj Malik
Dear All,

I am using maven 3.2.5

i want to use difference property files to build war for diff environments
and deploy it on local, test and prod accordingly based on maven command -
mvn -Plocal clean install


/resources/local/env.properties
/resources/test/env.properties
/resources/prod/env.properties

local env property file -
weblogic.splitDevelopmentDirectoryMode = false
weblogic.targetName = AdminServer
weblogic.protocal = http
weblogic.url = localhost
weblogic.port = 7001
weblogic.user = user
weblogic.password = pass123
weblogic.upload = false
weblogic.remote = false
weblogic.verbose = false
weblogic.debug = false
weblogic.noExit = true
project.build.directory =


Can you please suggest whats wrong with given POM.

Thanks.

Regards
Neeraj


http://maven.apache.org/POM/4.0.0"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
4.0.0
com.purchase
Invoice
1.0
war



   
   local

   false





${project.basedir}/src/main/resources






${project.basedir}/src/test/resources



 
   

com.oracle.weblogic
weblogic-maven-plugin
10.3.4
   

install

deploy




   
 
   
  





weblogic-path
weblogic-path
system
${WL_HOME}/server/lib/weblogic.jar
10.3.5



log4j
log4j
1.2.15







src/main/resources

**/*.java



src/main/webapp

**/*.java






maven-compiler-plugin
3.1

1.6
1.6



maven-war-plugin
2.4

false





org.apache.maven.plugins
maven-antrun-plugin


com.sun
tools
1.6
system

${java.home}/../lib/tools.jar


 1.7




com.maven.plugins
weblogic-10.3.3.0-maven-plugin
2.9.1.2



${weblogic.splitDevelopmentDirectoryMode}


${weblogic.targetName}

${weblogic.protocal}

${weblogic.url}

${weblogic.port}
${weblogic.user}
${weblogic.password}

${weblogic.upload}
${weblogic.remote}

false
false
true

${project.build.directory}/InvoiceBAS-${version}

   










Re: Reactor projects and ${project.version}

2015-09-15 Thread Karl Heinz Marbaise

Hi,

On 9/16/15 1:50 AM, Jordan Zimmerman wrote:

Is there any way (using plugins, whatever) to get a stable reference to the 
root project version? Here is what I’m trying to do. I have a reactor project:

pom.xml
 module1/pom.xml
 module2/pom.xml

The wrinkle is that the root pom.xml has a parent (for example foo:bar:1.2).

> foo.bar has several of its own modules that I want to use.
>  So, in the root pom.xml I want to have a dependency from foo,
> in module1’s pom I want to have a dependency from foo etc.

If you are making a multi module build you can always use 
${project.version} ...? Can you make an example project of what you have 
tried and put it on github or something similar that we have something 
concrete where we can talk about...


Kind regards
Karl Heinz Marbaise

>
There seems to be no way to create a Maven property that matches foo’s 
version. If in the root pom I have:



 ${project.parent.version}


This won’t work in module1/2’s pom as it will reference the root pom’s version, 
not foo. The only thing that works is to hard code:


 1.2


But this means that I’m specifying foo’s version twice. Once in the parent tag 
and once as a property. Is there no way around this?

-Jordan




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



Reactor projects and ${project.version}

2015-09-15 Thread Jordan Zimmerman
Is there any way (using plugins, whatever) to get a stable reference to the 
root project version? Here is what I’m trying to do. I have a reactor project:

pom.xml
        module1/pom.xml
        module2/pom.xml

The wrinkle is that the root pom.xml has a parent (for example foo:bar:1.2). 
foo.bar has several of its own modules that I want to use. So, in the root 
pom.xml I want to have a dependency from foo, in module1’s pom I want to have a 
dependency from foo etc. There seems to be no way to create a Maven property 
that matches foo’s version. If in the root pom I have:


        ${project.parent.version}


This won’t work in module1/2’s pom as it will reference the root pom’s version, 
not foo. The only thing that works is to hard code:


        1.2


But this means that I’m specifying foo’s version twice. Once in the parent tag 
and once as a property. Is there no way around this?

-Jordan

Re: maven.config file and variable substitution

2015-09-15 Thread Bernd Eckenfels
Hello,

While having the basedir variable in the .config file might be good I think 
thats a pretty confusing usecase. I wonder if Maven by default should merge in 
.mvn/settings.xml? (Observing SKIPRC)

Gruß
Bernd

> Am 15.09.2015 um 14:26 schrieb Jason van Zyl :
> 
> There is currently no variable interpolation accepted as this is all handled 
> in the shell scripts. What you’re asking for is reasonable so I ask you 
> create an issue in JIRA with your use case. I think it’s a good one.
> 
>> On Sep 13, 2015, at 2:59 PM, Mehul Sanghvi  wrote:
>> 
>> Maven 3.3.1 introduces a ${maven.projectBaseDir}/.mvn/maven.config file
>> where I can specify common command line options.  How do I use variables in
>> that ?  Specifically if I'm trying to set the settings file to be something
>> like ${maven.projectBaseDir}/settings.xml, how would I set that in
>> maven.config ?
>> 
>> Currently I pass a -s${Bamboo.WorkingDir}/settings.xml option to the as
>> part of the automated builds.  When I run the builds manually on my laptop
>> I have to pass something like
>> -s${HOME}/path/to/project/root/dir/settings.xml.  And if I'm trying run it
>> manually on the build system, I had to pass something like
>> -s/path/to/Bamboo/build/working/dir/settings.xml.
>> 
>> Using maven.config would help tremendously, but it does not seem to
>> understand ${maven.projectBaseDir}.
>> 
>> I have a maven.config that contains the following:
>> 
>>  -B -V -s ${maven.projectBaseDir}/settings.xml
>> 
>> I get the following error when I try to build:
>> 
>> bash%  cd ${HOME}/source-repos/ProjectA
>> bash%  mvn clean install
>> [ERROR] The specified user settings file does not exist:
>> /home/mehul/source-repos/ProjectA/${maven.projectBaseDir}/settings.xml
>> 
>> 
>> Shouldn't Maven substitute the value of the ${maven.projectBaseDir}
>> variable ?
>> 
>> 
>> cheers,
>> 
>>mehul
>> 
>> -- 
>> Mehul N. Sanghvi
>> email: mehul.sang...@gmail.com
> 
> Thanks,
> 
> Jason
> 
> --
> Jason van Zyl
> Founder, Takari and Apache Maven
> http://twitter.com/jvanzyl
> http://twitter.com/takari_io
> -
> 
> A language that doesn’t affect the way you think about programming is not 
> worth knowing. 
> 
> -- Alan Perlis
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 

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



Re: maven.config file and variable substitution

2015-09-15 Thread Jason van Zyl
There is currently no variable interpolation accepted as this is all handled in 
the shell scripts. What you’re asking for is reasonable so I ask you create an 
issue in JIRA with your use case. I think it’s a good one.

> On Sep 13, 2015, at 2:59 PM, Mehul Sanghvi  wrote:
> 
> Maven 3.3.1 introduces a ${maven.projectBaseDir}/.mvn/maven.config file
> where I can specify common command line options.  How do I use variables in
> that ?  Specifically if I'm trying to set the settings file to be something
> like ${maven.projectBaseDir}/settings.xml, how would I set that in
> maven.config ?
> 
> Currently I pass a -s${Bamboo.WorkingDir}/settings.xml option to the as
> part of the automated builds.  When I run the builds manually on my laptop
> I have to pass something like
> -s${HOME}/path/to/project/root/dir/settings.xml.  And if I'm trying run it
> manually on the build system, I had to pass something like
> -s/path/to/Bamboo/build/working/dir/settings.xml.
> 
> Using maven.config would help tremendously, but it does not seem to
> understand ${maven.projectBaseDir}.
> 
> I have a maven.config that contains the following:
> 
>   -B -V -s ${maven.projectBaseDir}/settings.xml
> 
> I get the following error when I try to build:
> 
> bash%  cd ${HOME}/source-repos/ProjectA
> bash%  mvn clean install
> [ERROR] The specified user settings file does not exist:
> /home/mehul/source-repos/ProjectA/${maven.projectBaseDir}/settings.xml
> 
> 
> Shouldn't Maven substitute the value of the ${maven.projectBaseDir}
> variable ?
> 
> 
> cheers,
> 
> mehul
> 
> -- 
> Mehul N. Sanghvi
> email: mehul.sang...@gmail.com

Thanks,

Jason

--
Jason van Zyl
Founder, Takari and Apache Maven
http://twitter.com/jvanzyl
http://twitter.com/takari_io
-

A language that doesn’t affect the way you think about programming is not worth 
knowing. 
 
 -- Alan Perlis













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