Re: mvn release:prepare fails with missing artifacts when project to be released runs an assembly

2010-05-11 Thread Stephen Connolly
On 11 May 2010 17:16, Markus Muenkel wrote:

> I'm releasing a Maven2 multi-module project. One of the modules is a POM
> project ("assembly project") that uses the maven-assembly-plugin in order to
> build an assembly (zip archive). The artifacts to be assembled are specified
> via dependencies in the POM. They point to modules contained in the same
> multi-module project.
>
> When running mvn release:prepare on the multi-module project, the build of
> the assembly project fails with the message that the dependencies cannot be
> resolved. These dependencies are reported with the version that should be
> released, e.g. 0.0.3. Before running the goal, all dependency versions are
> 0.0.3-SNAPSHOT.
>
> What seems to happen is that the snapshot version 0.0.3-SNAPSHOT is
> replaced by 0.0.3 and then the assembly plugin is started (which is bound to
> the package phase).


what goal did you bind with?

It needs to be assembly:single


> The assembly plugin tries to resolve the dependencies based on version
> 0.0.3 which however do not yet exist at that point.
>

The exist in the reactor, providing the project in which assembly is being
invoked has dependencies on those artifacts so that maven knows the build
order must build the dependent projects first.

to test if you have this working, here is a simple test procedure:
1. mvn versions:set -DnewVersion=0.0.3-reltesting-SNAPSHOT
2. mvn clean verify
3. mvn versions:rollback

it is essential that you only run up the lifecycle as far as verify when
testing, as if you go as far as install, the artifacts will have been pushed
to the local repo (and hence issues with your reactor will be missed)

If you are under the clock [i.e. your manager is saying "this needs to be
released yesterday, why did you recommend maven, your future at this company
is being questioned"] then just change the preparationGoals from "clean
verify" to "clean install" to get a release out the door. But the reality is
that such a release can end up with mixed build artifacts, wherein the
dependencies copied into your assembly where the ones built during the
release:prepare, while the same artifacts copied to your remote repository
were built during release:perform... so that if somebody checks say the md5
of the jar inside the assembly against the md5 of that same jar deployed to
the maven repo, they will find that the checksums do not match (different
timestamps)... additionally, if you use remoteTagging (which you pretty much
need to) and somebody commits while release:prepare is running, then the
release:perform will checkout different code and the subtle issues of
bundled artifact mismatches _will_ bite you in the ass.

So what I am saying is that you need to fix it so that your build works with
"clean verify" on a virgin version number (i.e. a version number that has
never been built before)... but if time pressures are forced on you, you can
get a release out... just don't forget to fix the real problem

-Stephen

I guess it is not a problem in Maven but I'm missing practice on how to
> perform a successful release in this situation.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Unexpected reference to an old Repository

2010-05-11 Thread Prout John - jprout
Hi

 

I'm running a Maven build (release 2.2.1). The build is broken because
it's somehow referencing an old repository:
maven1-repository.dev.java.net
(https://maven-repository.dev.java.net/repository/) 

 

The repository has been moved and is returning an HTTP 302 - permanently
moved, which Maven doesn't handle. Error returned is as follows:

 

Unable to get dependency information: Unable to read local copy of
metadata: Cannot read metadata from 'C:\Documents and
Settings\jprout\.m2\repository\com\digitalimpact\di-common-db\maven-meta
data-maven1-repository.dev.java.net.xml': end tag name  must
match start tag name  from line 7 (position: TEXT seen
...\n... @9:8) 

  com.digitalimpact:di-common-db:jar:null

 

from the specified remote repositories:

  central (http://repo1.maven.org/maven2),

  springfield (http://springfield.corp.acxiom.net:/m2/),

  maven1-repository.dev.java.net
(https://maven-repository.dev.java.net/repository/)

 

Path to dependency: 

1) com.acxiomdigital.iws:IWS-Service:war:8.3.0-5-SNAPSHOT

2) com.acxiomdigital.is.ws:is-ws-service:jar:8.2.0-3

3) com.acxiomdigital.is.cache:is-cache:jar:8.2.0-3

4) com.digitalimpact:factory:jar:8.2.0-31

5) com.digitalimpact:di-common:jar:8.1.0-136

 

di-common-db is one of my Artifacts and it doesn't contain any mention
of maven1-repository

 

What puzzles me is that I can't find anything in my project, which
references the maven1-repository, which I don't need. I expect the
reference is from one of my dependencies, but I can't find which one.
I've run the build with the -X flag, but still nothing to tell me why
it's referencing maven1-repository.

 

Is there any I can run the Maven build so it tells me where it's getting
its list of Repositories from?

Is there any way I can explicitly exclude the maven1-repository, so the
build doesn't look at it?

 

Thanks in advance!

 

John

***
The information contained in this communication is confidential, is
intended only for the use of the recipient named above, and may be legally
privileged.

If the reader of this message is not the intended recipient, you are
hereby notified that any dissemination, distribution or copying of this
communication is strictly prohibited.

If you have received this communication in error, please resend this
communication to the sender and delete the original message or any copy
of it from your computer system.

Thank You.



Re: Advice: How do you setup your Maven project for Continuous Integration?

2010-05-11 Thread Jemos Infra
We use profiles per project and then setup integration test CI modules
running those profiles. 

On Tue, 2010-05-11 at 13:03 +0930, Barrie Treloar wrote:
> I'm struggling to work out the best way to get my maven projects and
> continuous integration to play nicely together.
> 
> Here's some background:
> 
> Our build takes approximately 8 minutes to complete.
> To help keep the build time down the developers build doesn't do things like:
> * create source jars
> * create javadoc jars
> * run the integration test suite
> 
> These extra tasks are all done when we release our software, or the
> integration tests suite can also be invoked via profiles.
> 
> What I'd like to do is make sure that our continuous integration
> environment does these extra tasks.
> Ideally I'd like to define this once in our corporate parent pom and
> have it inherited.
> But profiles don't work this way
> (http://maven.apache.org/guides/introduction/introduction-to-profiles.html)
> It looks like the best I can do is to have a per-project profile
> (which I duplicate across all projects) at the root pom of the project
> to enable these extra tasks.
> 
> I've also looked at the way maven development process enforces some
> common tasks during the release process.
> e.g. in org.apache:apache:7 pom uses
> 
>   org.apache.maven.plugins
>   maven-release-plugin
>   2.0-beta-9
>   
> false
> deploy
> -Papache-release
>   
> 
> and further down defines the profile
> 
>   apache-release
> 
> I have no idea how this actually manages to get that profile to run
> since help:effective-pom doesn't list it as a valid profile.
> 
> So my question is how are you doing continuous integration?
> 
> -
> 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: Automate build and test process in maven

2010-05-11 Thread Jemos Infra
Another way to test this is to create a WAR project, include your jar as
dependency and use the jetty plugin.

On Mon, 2010-05-10 at 20:16 -0700, AnshuGupta wrote:
> We are using Maven as the build automation tool. The build process generates
> a jar file. The requirement here is to start execution of the java
> application which will be generated by the build - Wait for  a few seconds
> to let the application start completely and then move onto the test phase,
> which will perform start a test tool (SoapUI) that will issue soap calls
> against the java application  that was just started.
> 
> We tried using the exec plugin, to start the java application. However, when
> we moved onto the test phase, the java application terminated. Also, we
> couldn't figure out how to introduce a delay before the start of the soapUI
> tests.
> 
> What will be the best way to achieve the above?



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



No such archiver: 'swf'.

2010-05-11 Thread Brian Topping
We've been successfully using Flex-mojos with our projects under Maven.  It's 
been working well, but we need to include the .swf artifacts that are generated 
in an assembly.  That seems to be failing, and I get the following error:

Caused by: org.codehaus.plexus.archiver.manager.NoSuchArchiverException: No 
such archiver: 'swf'.
at 
org.codehaus.plexus.archiver.manager.DefaultArchiverManager.getResourceCollection(DefaultArchiverManager.java:90)
at 
org.codehaus.plexus.archiver.manager.DefaultArchiverManager.getResourceCollection(DefaultArchiverManager.java:128)
at 
org.codehaus.plexus.archiver.AbstractArchiver.asResourceCollection(AbstractArchiver.java:506)

My assembly descriptor, for reference, is pretty simple:

http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0
 http://maven.apache.org/xsd/assembly-1.1.0.xsd";>
php-webapp

zip




  *:swf:*

/
false




src/main/php
/




Is this the best way to compose the assembly?  If it is, I presume that I need 
to create and add an archiver that can deal with .swf (treating it as an opaque 
blob, presumably).  If not, it would be pretty easy to write a plugin, but I 
can't imagine I'm the only person running into this issue.

Thanks for any thoughts,

Brian

RE: Maven triggers cygwin warning

2010-05-11 Thread Pacileo, Ken
I've been getting the same message since I upgraded to Cygwin 1.7. I
don't think I got it with 1.5 but am not positive. The message only
appears during the first invocation of Maven. Since the various app
teams within our org use different versions of Maven I need to have many
scripts to set the version of Maven and Java that a particular app team
will use. I always run "mvn --version" at the end of my scripts to
verify I'm using the correct version. I've gotten this message with
Maven 2.0.8, 2.0.9, 2.0.10, 2.1.0 and 2.2.1 using Sun JDKs 1.4.2_15,
1.5.0_12 or 1.6.0_14.

If I include Nick's suggestion and add "CYGWIN=nodosfilewarning" the
warning does go away.

I'm using Cygwin Setup version 2.697. The message appears in both the
Cygwin bash shell and Xterm v255-1 using Xinit 1.2.1-1

Commenting out the "mvn --version" in my script and running sh -x
"$(which mvn)" -version >mvn.log 2>&1 instead still gives the message.

See the content of this log for output of running Maven 2.0.8 & JDK
1.4.2_15, Maven 2.2.1 & JDK 1.6.0_14 along with the "sh -x "$(which
mvn)" -version >mvn.log 2>&1" command.
http://pastebin.com/WAYwKy3k

This doesn't appear to affect any of our builds so it isn't a problem
for me. Just posting this info in case someone can use it.

Regards,
--Ken

-Original Message-
From: Wayne Fay [mailto:wayne...@gmail.com] 
Sent: Tuesday, May 11, 2010 10:40 AM
To: Maven Users List
Subject: Re: Maven triggers cygwin warning

> The warning is printed only once per session. Maybe you missed it?

No, I didn't.

> sh -x "$(which mvn)" -version >mvn.log 2>&1

See the content of my mvn.log here:
http://pastebin.com/SSCrqsjN

I really don't think this is a Maven issue, but rather something
specific about your environment or your specific Cygwin version. It may
also be due to the fact that I'm running cygwin 1.5.25-15, haven't
updated in a while. ;-)

Wayne

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


This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity
to which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified
that any dissemination, distribution or copying of this e-mail is
prohibited. If you have received this e-mail in error, please notify the
sender by replying to this message and delete this e-mail immediately.


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



Re: Converting Maven 1.0.8 to 2.2.1

2010-05-11 Thread Wayne Fay
> How would you suggest I approach this task?

Start with the leaf projects with the fewest dependencies and work
your way up. There is no big-bang silver bullet to migrate your whole
project to M2 from M1.

Wayne

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



Converting Maven 1.0.8 to 2.2.1

2010-05-11 Thread D D
Hello,

I'm working on converting an old build process. I have a solution based on
Maven 1.0.8 that needs to be moved to 2.2.1.

Currently it is a mixture of shell scripts and a single maven.xml file (in a
"mother" project) that controls compilation of 250+ other projects. The
maven.xml files resembles a shell script and it uses bits of shell scripts
to complete the job whenever maven could not complete the job.

Has anyone done a similar conversion where one maven.xml would compile many
projects?
How would you suggest I approach this task?

Thanks,
Dave


mvn release:prepare fails with missing artifacts when project to be released runs an assembly

2010-05-11 Thread Markus Muenkel
I'm releasing a Maven2 multi-module project. One of the 
modules is a POM project ("assembly project") that uses 
the maven-assembly-plugin in order to build an assembly 
(zip archive). The artifacts to be assembled are specified 
via dependencies in the POM. They point to modules 
contained in the same multi-module project.


When running mvn release:prepare on the multi-module 
project, the build of the assembly project fails with the 
message that the dependencies cannot be resolved. These 
dependencies are reported with the version that should be 
released, e.g. 0.0.3. Before running the goal, all 
dependency versions are 0.0.3-SNAPSHOT.


What seems to happen is that the snapshot version 
0.0.3-SNAPSHOT is replaced by 0.0.3 and then the assembly 
plugin is started (which is bound to the package phase). 
The assembly plugin tries to resolve the dependencies 
based on version 0.0.3 which however do not yet exist at 
that point.


I guess it is not a problem in Maven but I'm missing 
practice on how to perform a successful release in this 
situation.


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



Re: Maven triggers cygwin warning

2010-05-11 Thread Wayne Fay
> The warning is printed only once per session. Maybe you missed it?

No, I didn't.

> sh -x "$(which mvn)" -version >mvn.log 2>&1

See the content of my mvn.log here:
http://pastebin.com/SSCrqsjN

I really don't think this is a Maven issue, but rather something
specific about your environment or your specific Cygwin version. It
may also be due to the fact that I'm running cygwin 1.5.25-15, haven't
updated in a while. ;-)

Wayne

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



Re: Maven triggers cygwin warning

2010-05-11 Thread Nick Klauer
I've had that when upgrading to Cygwin 1.7, and it was a Cygwin issue that I
fixed it with.  I've never seen it since modifying my .profile:

export CYGWIN=nodosfilewarning

I'm pretty sure this is a Cygwin issue, not Maven.

For instance, from the "What's New" page on Cygwin 1.7:
http://www.cygwin.com/cygwin-ug-net/ov-new1.7.html

On the first usage of a DOS path (C:\foo, \\foo\bar), the Cygwin DLL emits a
> scary warning that DOS paths shouldn't be used. This warning may be disabled
> via the new CYGWIN=nodosfilewarning setting.


Do you have this setting configured when you open up a terminal (either by
placing in your .profile, .bash_profile, or .bashrc file)?

-Nick

On Tue, May 11, 2010 at 10:52 AM, David Balažic  wrote:

> On 11 May 2010 17:36, Wayne Fay  wrote:
> >> When I start maven inside cygwin environment, cygwin gives a warning
> >> about an  MS-DOS style path.
> >> As the mvn script tries to detect cygwin, I find that surprising.
> >
> > I've used Maven inside Cygwin on and off for quite a while now (not
> > really often to be honest), and I've never seen that warning.
> >
> > I read the messages posted to that Cygwin list, tried the "sh -x ..."
> > command suggested by Jeremy and got no warnings, then tried again
> > using mintty and still didn't get anything.
> >
> > This is testing on Win XP SP2, Maven 2.2.1, and Sun JDK 1.6.0_07 with
> > default locale en_US and encoding Cp1252.
>
> The warning is printed only once per session. Maybe you missed it?
>
> What do you get with
> sh -x "$(which mvn)" -version >mvn.log 2>&1
> ?
>
> About the "session", I'm not sure what exactly are the session borders.
> If I log into Windows, start mintty, I get one warning. If I close
> mintty and open it again,
> I again get the warning (once). If I have multiple consoles open,
> sometimes I can not
> get the warning, even if I close all of them and open one new.
>
> Regards,
> David
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: Maven triggers cygwin warning

2010-05-11 Thread Nick Klauer
I've had that when upgrading to Cygwin 1.7, and it was a Cygwin issue that I
fixed it with.  I've never seen it since modifying my .profile:

export CYGWIN=nodosfilewarning

I'm pretty sure this is a Cygwin issue, not Maven.

For instance, from the "What's New" page on Cygwin 1.7:
http://www.cygwin.com/cygwin-ug-net/ov-new1.7.html

On the first usage of a DOS path (C:\foo, \\foo\bar), the Cygwin DLL emits a
> scary warning that DOS paths shouldn't be used. This warning may be disabled
> via the new CYGWIN=nodosfilewarning setting.


Do you have this setting configured when you open up a terminal (either by
placing in your .profile, .bash_profile, or .bashrc file)?

-Nick

On Tue, May 11, 2010 at 10:52 AM, David Balažic  wrote:

> On 11 May 2010 17:36, Wayne Fay  wrote:
> >> When I start maven inside cygwin environment, cygwin gives a warning
> >> about an  MS-DOS style path.
> >> As the mvn script tries to detect cygwin, I find that surprising.
> >
> > I've used Maven inside Cygwin on and off for quite a while now (not
> > really often to be honest), and I've never seen that warning.
> >
> > I read the messages posted to that Cygwin list, tried the "sh -x ..."
> > command suggested by Jeremy and got no warnings, then tried again
> > using mintty and still didn't get anything.
> >
> > This is testing on Win XP SP2, Maven 2.2.1, and Sun JDK 1.6.0_07 with
> > default locale en_US and encoding Cp1252.
>
> The warning is printed only once per session. Maybe you missed it?
>
> What do you get with
> sh -x "$(which mvn)" -version >mvn.log 2>&1
> ?
>
> About the "session", I'm not sure what exactly are the session borders.
> If I log into Windows, start mintty, I get one warning. If I close
> mintty and open it again,
> I again get the warning (once). If I have multiple consoles open,
> sometimes I can not
> get the warning, even if I close all of them and open one new.
>
> Regards,
> David
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: Maven triggers cygwin warning

2010-05-11 Thread David Balažic
On 11 May 2010 17:36, Wayne Fay  wrote:
>> When I start maven inside cygwin environment, cygwin gives a warning
>> about an  MS-DOS style path.
>> As the mvn script tries to detect cygwin, I find that surprising.
>
> I've used Maven inside Cygwin on and off for quite a while now (not
> really often to be honest), and I've never seen that warning.
>
> I read the messages posted to that Cygwin list, tried the "sh -x ..."
> command suggested by Jeremy and got no warnings, then tried again
> using mintty and still didn't get anything.
>
> This is testing on Win XP SP2, Maven 2.2.1, and Sun JDK 1.6.0_07 with
> default locale en_US and encoding Cp1252.

The warning is printed only once per session. Maybe you missed it?

What do you get with
sh -x "$(which mvn)" -version >mvn.log 2>&1
?

About the "session", I'm not sure what exactly are the session borders.
If I log into Windows, start mintty, I get one warning. If I close
mintty and open it again,
I again get the warning (once). If I have multiple consoles open,
sometimes I can not
get the warning, even if I close all of them and open one new.

Regards,
David

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



Re: Sign existing artifacts in repository

2010-05-11 Thread Juven Xu
I have a line of shell script for this purpose:

find . | xargs -i -t sh -c 'cat pwd.txt | gpg -ab --passphrase-fd 0 {}'

(put the passphrase into pwd.txt)

On Tue, May 11, 2010 at 9:04 AM, Brett Porter  wrote:

> You can loop over them using shell and gpg. You can use an agent to store
> the password so it doesn't need to be typed in every time, or have it read
> from an argument.
>
> On 11/05/2010, at 10:51 AM, Mark Diggory wrote:
>
> > Hi,
> >
> > we have an existing repository which I want to batch sign all the
> > artifacts within. I do have file system access.  Is there any tool
> > available that will go though our existing repository and allow me to
> > sign the artifacts (all of which have been created by me in the past)?
> >
> > thanks,
> > Mark
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> > For additional commands, e-mail: users-h...@maven.apache.org
> >
>
> --
> Brett Porter
> br...@apache.org
> http://brettporter.wordpress.com/
>
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


-- 
- juven


Re: Maven triggers cygwin warning

2010-05-11 Thread Wayne Fay
> When I start maven inside cygwin environment, cygwin gives a warning
> about an  MS-DOS style path.
> As the mvn script tries to detect cygwin, I find that surprising.

I've used Maven inside Cygwin on and off for quite a while now (not
really often to be honest), and I've never seen that warning.

I read the messages posted to that Cygwin list, tried the "sh -x ..."
command suggested by Jeremy and got no warnings, then tried again
using mintty and still didn't get anything.

This is testing on Win XP SP2, Maven 2.2.1, and Sun JDK 1.6.0_07 with
default locale en_US and encoding Cp1252.

Wayne

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



How to stop maven1 from trying to download sources and javadoc

2010-05-11 Thread emerson cargnin
Since a few weeks ago, the maven1 client started to try to download sources
and javadocs of the libraries.
Is there any way to stop it from happening_

thanks
Emerson


Call to anyone using Maven 3 with webstart plugin

2010-05-11 Thread Julien HENRY
Hi all,

I think I have spotted a bug with Maven 3 beta 1 and webstart plugin 
(dependencies are not added in the jnlp file). Before I try to create a test 
case, does anybody else facing the same issue?

Regards,

Julien





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



Re: How to replace environment related files with maven.

2010-05-11 Thread Anders Hammar
Yes, this has been discussed several times before on this list. Searching
Nabble or similar would give you hits on how we suggest you do this with
Maven.

/Anders

On Tue, May 11, 2010 at 11:51, Jörg Schaible  wrote:

> Hi Donny,
>
> =?utf-8?B?6LCiIOWGrOm4ow==?= wrote:
>
> > Hi,
> >
> > I have a question about maven. In our project, I have one file named
> > "config.properties" which be changed in different environment, and also
> we
> > have some files named "config-dev.properties", "config-test.properties"
> > and "config-production.properties", in different environment we will
> > replace the "config.properties" with "config-dev.properties" and so on.
>  I
> > know maven has a feature called "profile", it can filter some text in my
> > files but it's not my want. Because I don't want to put those environment
> > variables to pom.xml (maybe some day i will use Ant to build my
> > application), and second I want to perform the replacement after every
> > compile, so it can be applied to my test phase or package phase(Yeah, if
> i
> > use maven's profile this will be easy).   So any one can help me? I used
> > Ant before, i can control the build process and replace files at any time
> > within ant, but how can i replace files and control process in maven
> > without its profile and filter text.
>
> Maven simply does not work this way. You should adapt your project setup to
> one build tool and stick with it.
>
> - Jörg
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: How to replace environment related files with maven.

2010-05-11 Thread Jörg Schaible
Hi Donny,

=?utf-8?B?6LCiIOWGrOm4ow==?= wrote:

> Hi,
> 
> I have a question about maven. In our project, I have one file named
> "config.properties" which be changed in different environment, and also we
> have some files named "config-dev.properties", "config-test.properties"
> and "config-production.properties", in different environment we will
> replace the "config.properties" with "config-dev.properties" and so on.  I
> know maven has a feature called "profile", it can filter some text in my
> files but it's not my want. Because I don't want to put those environment
> variables to pom.xml (maybe some day i will use Ant to build my
> application), and second I want to perform the replacement after every
> compile, so it can be applied to my test phase or package phase(Yeah, if i
> use maven's profile this will be easy).   So any one can help me? I used
> Ant before, i can control the build process and replace files at any time
> within ant, but how can i replace files and control process in maven
> without its profile and filter text.

Maven simply does not work this way. You should adapt your project setup to 
one build tool and stick with it.

- Jörg


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



How to replace environment related files with maven.

2010-05-11 Thread 谢 冬鸣
Hi,

I have a question about maven. In our project, I have one file named 
"config.properties" which be changed in different environment, and also we have 
some files named "config-dev.properties", "config-test.properties" and 
"config-production.properties", in different environment we will replace the 
"config.properties" with "config-dev.properties" and so on.  I know maven has a 
feature called "profile", it can filter some text in my files but it's not my 
want. Because I don't want to put those environment variables to pom.xml (maybe 
some day i will use Ant to build my application), and second I want to perform 
the replacement after every compile, so it can be applied to my test phase or 
package phase(Yeah, if i use maven's profile this will be easy).   So any one 
can help me? I used Ant before, i can control the build process and replace 
files at any time within ant, but how can i replace files and control process 
in maven without its profile and filter text.

Thanks!

Donny

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