properties in assembly plugin

2010-03-03 Thread Stefano Nichele

Hi All,
in my assembly file I have several fileSets sections and some of them 
are used to copy some files under PATH/lib , others PATH/bin, others 
in PATH/licenses. My issue is the I'd like to have PATH configured 
just in one place and not replicated in all fileSets sections.


Is there a way to set in once in the assembly file or in the pom.xml as 
configuration property ?


Thanks in advance
ste


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



Re: properties in assembly plugin

2010-03-03 Thread Stefano Nichele

Thanks and sorry
it was easy ...

ste

On 03/03/2010 12.59, Andreas M wrote:



Stefano Nichele-2 wrote:
   

Hi All,
in my assembly file I have several fileSets sections and some of them
are used to copy some files underPATH/lib , othersPATH/bin, others
inPATH/licenses. My issue is the I'd like to havePATH  configured
just in one place and not replicated in all fileSets sections.

Is there a way to set in once in the assembly file or in the pom.xml as
configuration property ?

Thanks in advance
ste

 

Well, I reference ${project.build.directory} with no problems in my
assembly.xml, so you should just be able to define a property in your pom
and go with it.
Does that not work?

/Andreas
   



--
Stefano Nichele

Funambol Chief Architect
Funambol :: Open Source Mobile Cloud Sync and Push Email



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



selecting profile in the pom.xml file

2008-05-31 Thread Stefano Nichele

Hi All,
in my setting.xml I have two profiles for two project categories. Is it 
possible to select the profile to use in the pom.xml file so that for 
any project there is no way to use the wrong profile ?


Thanks in advance
ste

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: selecting profile in the pom.xml file

2008-05-31 Thread Stefano Nichele

Hi Mick,
thanks for your comment, but maybe my question was not clear enough. It 
seems that in the settings.xml, you comment the profile that you don't 
want to use according to the project that you are building. My 
requirement is a bit different.

In my settings.xml I have profileA and profileB. ProfileA is the active one.

Now I would like that  project1 uses profileA and project2 uses profileB 
but I don't want to change my settings.xml  anytime. I need something to 
say in the pom file of the project2 that the profile to use is profileB.


Ste

Mick Knutson wrote:

Yes.
I add this at the bottom of my settings.xml:

activeProfiles
!--===  Environment Specific
=--
!--activeProfilelocal/activeProfile--
activeProfilelocal-baselogic/activeProfile

!--activeProfiledev/activeProfile--
!--activeProfileprod/activeProfile--


!--===  Choose one of container
===--
activeProfiletomcat5.5/activeProfile
/activeProfiles



On Sat, May 31, 2008 at 7:48 AM, Stefano Nichele [EMAIL PROTECTED]
wrote:

  

Hi All,
in my setting.xml I have two profiles for two project categories. Is it
possible to select the profile to use in the pom.xml file so that for any
project there is no way to use the wrong profile ?

Thanks in advance
ste

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  



--
Stefano Nichele

Funambol Servers Tech Lead
funambol :: mobile open source :: http://www.funambol.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to preserve the file name running deploy:deploy-file ?

2008-04-26 Thread Stefano Nichele

Hi all,
running:

mvn deploy:deploy-file -Durl=myurl -Dfile=my-file.tgz -Dpackaging=tgz 
-DgroupId=mygroup -DartifactId=myartifact -Dersion=3.5.1 -DrepositoryId=private

the file my-file.tgz is deployed, but in the repository I have:

mygroup
|myartifact
 | 3.5.1
 | myartifact-3.5.1.tgz

that is the artifcatId is used also as filename.

Is there a way to change the file name ? I would like to preserve the 
original one (my-file.tgz)


Thnaks in advance
Ste

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Filtering java source files

2007-09-30 Thread Stefano Nichele

Hi All,
is there a way to filter the java source files ? I have a java class 
that contains the version of my application and I would like to set that 
value automatically to the one contained in the pom.


I tried putting in my java file:

   private static final String VERSION = ${project.version};


and modifying my pom in order to have the java files in the resources:

...
 resource
   directorysrc/main/java/directory
   filteringtrue/filtering
   targetPathjava/targetPath
 /resource
...

In this way, under target/generated-sources/java I have my java class 
with the right version, but now I have to compile it.

I tried setting the sourceDirectory in the build section:

...
 build
   sourceDirectorytarget/generated-sources/java/sourceDirectory
   resources
...

but it doesn't work because the compilation is performed before my java 
classes are copied in target/generated-sources/java.


Any hint ?

Thanks in advance
Ste

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Filtering java source files

2007-09-30 Thread Stefano Nichele
Yes, this was my first implementation, but it is really easy to update a 
jar file (in a production environment for instance) without increasing 
the version in the properties file so I would like to put the version in 
the source code.



Tomislav Stojcevich wrote:

Why don't you just put your version in a standard properties file
using maven's resource filtering (like you are trying to do with the
java file) and have your class read it from there?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Filtering java source files

2007-09-30 Thread Stefano Nichele
You are right...I checked the maven lifecycle and re-doing my tests, my 
first idea works ! I don't know why it didn't work,

probably I did a lot of confusion during my attempts.

Thanks a lot
ste

Tomislav Stojcevich wrote:

Ah, I see what you are trying to do now.  Although according to the
maven lifecycle the resources should get processed before the compile.
 http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
 so it should be working.

I think you can get your end result by manually binding the resource
plugin to the generate sources phase but it seems like a lot of extra
work just to get a version in the file.

Does your SCM tool provide keyword substitution upon commit?  You
might be able to have it inject the file's scm version.  It won't be
the same as your maven project version but if you have everything
tagged in your SCM tool you should be able to map it back to a
specific tag.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  



--
  () Stefano Nichele   [EMAIL PROTECTED]
_.._  Funambol Servers Tech Lead
  ||
  || funambol :: mobile open source :: http://www.funambol.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Filtering java source files

2007-09-30 Thread Stefano Nichele

Thanks a lot for you hint. I'll try it...

Do you think this is pretty stable ? I mean, in the next plugin version, 
could this change ?


Ste

Michael McCallum wrote:

maven-jar-plugin puts the version into a file

META-INF/maven/groupid/artifactid/pom.properties

have a look... easy to read out...

On Monday 01 October 2007 05:18, Stefano Nichele wrote:
  

Hi All,
is there a way to filter the java source files ? I have a java class
that contains the version of my application and I would like to set that
value automatically to the one contained in the pom.

I tried putting in my java file:

private static final String VERSION = ${project.version};


and modifying my pom in order to have the java files in the resources:

...
  resource
directorysrc/main/java/directory
filteringtrue/filtering
targetPathjava/targetPath
  /resource
...

In this way, under target/generated-sources/java I have my java class
with the right version, but now I have to compile it.
I tried setting the sourceDirectory in the build section:

...
  build
sourceDirectorytarget/generated-sources/java/sourceDirectory
resources
...

but it doesn't work because the compilation is performed before my java
classes are copied in target/generated-sources/java.

Any hint ?

Thanks in advance
Ste

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  



--
  () Stefano Nichele   [EMAIL PROTECTED]
_.._  Funambol Servers Tech Lead
  ||
  || funambol :: mobile open source :: http://www.funambol.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to configure ArchiveManager

2006-11-09 Thread Stefano Nichele

Hi All,
from assembly plugin home page :

Currently it can create distributions in the following formats:

   * zip
   * tar.gz
   * tar.bz2
   * jar
   * dir
   * war
   * and any other format that the ArchiveManager has been configured for


My question is, how to configure the ArchiveManager ? I need to add my 
own format.


Thanks a lot
Ste

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Assembly plugin - packaging chaning the extension

2006-11-06 Thread Stefano Nichele

Hi All,
I have a problem with the assembly plug-in.
My project builds a war application but the output should be a zip file 
with the following structure:


/webapp/ 
   myapp.war

/config
   configFile1.xml
   configFile2.xml
   configFile3.xml

I'm using the following assembly descriptor:

assembly
 idbin/id
 formats
   formatzip/format
 /formats

 fileSets
   fileSet
 directorysrc/main/resources/bean/directory
 outputDirectoryconfig/outputDirectory
 includes
   include**/*.*/include
 /includes
   /fileSet

   fileSet
 directorytarget/directory
 outputDirectorywebapp/outputDirectory
 includes
   include*.war/include
 /includes
   /fileSet
 /fileSets
/assembly

Using that descriptor, the output file is a zip file but i need a 
different extension. I mean, I need a zip file (as format) with 
extension s4j.


How can i do to  obtain that ?

Moreover, using the above descriptor I obtain a zip file that contains:

/myartifactid
   /webapp
myapp.war
  /config
   *.xml

How can I remove the first level myartifactid ?

Thanks in advance.
Ste





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]