Re: zip instead of jar

2011-10-19 Thread louis_xie
Hi,
I know this post has been quite dated to date, however, i believe it
continues to be relevant to many out there trying to create a zip package.

I have found a maven zip plugin at 
http://people.apache.org/~olamy/snapshots/maven-zip-plugin/index.html
http://people.apache.org/~olamy/snapshots/maven-zip-plugin/index.html .
However, I do not know how I could download this to include in my project.

Please pardon me as I'm a complete noob to Maven, and have no experience in
build scripts either. Would appreciate your patience.

Thanks!

--
View this message in context: 
http://maven.40175.n5.nabble.com/zip-instead-of-jar-tp111889p4916811.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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



Re: zip instead of jar

2011-10-19 Thread Guillaume Polet

Hi,

from my point of view, I would rather use the Maven assembly plugin since:
* the documentation if far more complete
* it may meet additional future requirements
* it seems more active

Its usage is all explained on their website: 
http://maven.apache.org/plugins/maven-assembly-plugin/usage.html
You could probably go with the build-in descriptor reference 'bin' but 
it produces two additional artifacts (tar.gz and tar.bz2).


If you feel lost with the usage of plugins, I can only advice you to 
read the Maven user documentation:
* http://maven.apache.org/guides/getting-started/index.html, and more 
specifically
* 
http://maven.apache.org/guides/getting-started/index.html#How_do_I_use_plug-ins



Cheers,
Guillaume

Le 19/10/2011 10:08, louis_xie a écrit :

Hi,
I know this post has been quite dated to date, however, i believe it
continues to be relevant to many out there trying to create a zip package.

I have found a maven zip plugin at
http://people.apache.org/~olamy/snapshots/maven-zip-plugin/index.html
http://people.apache.org/~olamy/snapshots/maven-zip-plugin/index.html .
However, I do not know how I could download this to include in my project.

Please pardon me as I'm a complete noob to Maven, and have no experience in
build scripts either. Would appreciate your patience.

Thanks!

--
View this message in context: 
http://maven.40175.n5.nabble.com/zip-instead-of-jar-tp111889p4916811.html
Sent from the Maven - Users mailing list archive at Nabble.com.

-
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: writing a parent pom that does not execute its plugins

2011-10-19 Thread Dirk Olmes
On 10/18/2011 01:55 PM, Anders Hammar wrote:
 I'm thinking that a custom packing type is what you want to create.
 Then use that as the packaging in those Maven projects where you
 create the install zips, and it will bind the appropriate plugins to
 the lifecycle.

Thanks, Anders. I looked into creating a custom packaging type -
assuming that I will need to create a custom lifecycle as described in
[1] or [2]. Ok, this allows me to bind additional plugins to lifecycle
phases but now how do I configure those plugins? I will have 3 different
executions for the assembly plugin, one for jarring up all classes to be
obfuscated, one for packaging up all libs and one for packaging the
final installer zip.

Where would I do that kind of configuration?

-dirk

[1]
http://www.sonatype.com/people/2009/08/create-a-customized-build-process-in-maven/
[2]
http://sonatype.com/books/mvnref-book/reference/writing-plugins-sect-plugins-lifecycle.html

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



Re: Uncompiled classes resulting in COMPILATION ERROR : cannot find symbol

2011-10-19 Thread bgik
I saw the same issue this week.

It appeared after a colleague merged in a large piece of work from a branch.

The remedy for us was to increase the heap size used by maven by setting
MAVEN_OPTS.

So i suspect it's caused by some 'silent' OutOfMemory error.

If you havent tried this, trying increasing the heap size.

thanks

--
View this message in context: 
http://maven.40175.n5.nabble.com/Uncompiled-classes-resulting-in-COMPILATION-ERROR-cannot-find-symbol-tp4903264p4917796.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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



Re: Uncompiled classes resulting in COMPILATION ERROR : cannot find symbol

2011-10-19 Thread Guillaume Polet

Thank you very much for the kind response.

I just made several attempts according to your remarks:
1) Increasing the Heap size to 1G (it used to be 512M)-- that did not work
2) I then tried to configure the maven compiler plugin to fork-- that 
did not work either
3) I also increases the maxmem of the m-c-p to 1G and with fork 
activated--still no luck :'(


Could it be that you also changed something else? Anyway, I find it very 
disturbing that with 2 projects in jenkins with the exact same 
configuration to the exception of their name (the one that works has a 
suffix '_2'), one of them works and not the other.


Moreover, if the java compiler encounters an OOME, it should definitely 
fail the build instead of silently continue. I think that if you can 
find an example that can pin-point this kind of issue, you should report 
it as a bug. Although, I think I have already encountered OOME in the 
past and I think it failed the build.


Cheers,
Guillaume

Le 19/10/2011 15:53, bgik a écrit :

I saw the same issue this week.

It appeared after a colleague merged in a large piece of work from a branch.

The remedy for us was to increase the heap size used by maven by setting
MAVEN_OPTS.

So i suspect it's caused by some 'silent' OutOfMemory error.

If you havent tried this, trying increasing the heap size.

thanks

--
View this message in context: 
http://maven.40175.n5.nabble.com/Uncompiled-classes-resulting-in-COMPILATION-ERROR-cannot-find-symbol-tp4903264p4917796.html
Sent from the Maven - Users mailing list archive at Nabble.com.

-
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: Uncompiled classes resulting in COMPILATION ERROR : cannot find symbol

2011-10-19 Thread Wayne Fay
 Could it be that you also changed something else? Anyway, I find it very
 disturbing that with 2 projects in jenkins with the exact same configuration
 to the exception of their name (the one that works has a suffix '_2'), one
 of them works and not the other.

Does this not point to perhaps an issue in Jenkins then? I don't see
how this is possible either.

Wayne

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



Re: Uncompiled classes resulting in COMPILATION ERROR : cannot find symbol

2011-10-19 Thread Guillaume Polet
Well this would have been my guess too, but as I mentionned earlier in 
another e-mail, I can also reproduce this on my laptop where there is 
absolutely no trace of jenkins.
If you have git and maven on your path, you can reproduce this issue 
with this:


 * Checkout the code: git clone git://github.com/agilebirds/openflexo.git
 * Go into the checked-out code: cd openflexo
 * Build the project: mvn -DskipTests clean package (I know, skipping
   test is a bad practice, but one step at a time...)

But maybe you will not have this issue (it comes up when compiling the 
test-classes of FlexoFoundation) and so this will definitely point into 
the direction of an environment issue.


Cheers,
Guillaume


Le 19/10/2011 18:09, Wayne Fay a écrit :

Could it be that you also changed something else? Anyway, I find it very
disturbing that with 2 projects in jenkins with the exact same configuration
to the exception of their name (the one that works has a suffix '_2'), one
of them works and not the other.

Does this not point to perhaps an issue in Jenkins then? I don't see
how this is possible either.

Wayne

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





Re: writing a parent pom that does not execute its plugins

2011-10-19 Thread Dirk Olmes
Am 18.10.2011 um 14:41 schrieb Anders Hammar and...@hammar.net:

 Today, activating a profile defined in a parent from the child is not 
 possible.

I was able to make the profile idea work in the end. The trick is the 
enablement: the parent module defines a profile that is enabled through a 
property. The child module defines that property. Works like a charm.

More details here: 
http://xanthippe.dyndns.org/blog/index.php?/archives/33-Templating-Maven-plugin-configurations.html

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



Re: writing a parent pom that does not execute its plugins

2011-10-19 Thread Mark Struberg
Some plugins already provide the following 2 properties

* skip
* forceMojoExecution

The idea is that those plugins must not get executed when the project is of 
type 'pom'. But since most of this plugins in bigger projects get defined in a 
'backend-parent' module (or kind of) which is the parent of all backend 
modules, it's pretty hard otherwise.

Example being the sql-maven-plugin [1], the openjpa-maven-plugin, etc


We have been discussing about generalizing this approach, but we would need a 
bit brainstorming still as there are mojos which explicitely gets executed on 
the parent pom (also).

Generalized I'd say there are 3 types of plugins:

a.) sql-maven-plugin like only need to get executed in projects with packaging 
!= pom
b.) aggregator mojos (like javadoc-aggregated) which run _only_ on the parent 
pom
c.) mojos which need to get executed in every project (like the site-plugin)

LieGrue,
strub


[1] http://mojo.codehaus.org/sql-maven-plugin/execute-mojo.html


- Original Message -
 From: Dirk Olmes d...@xanthippe.ping.de
 To: Maven Users List users@maven.apache.org
 Cc: 
 Sent: Wednesday, October 19, 2011 7:55 PM
 Subject: Re: writing a parent pom that does not execute its plugins
 
 Am 18.10.2011 um 14:41 schrieb Anders Hammar and...@hammar.net:
 
  Today, activating a profile defined in a parent from the child is not 
 possible.
 
 I was able to make the profile idea work in the end. The trick is the 
 enablement: the parent module defines a profile that is enabled through a 
 property. The child module defines that property. Works like a charm.
 
 More details here: 
 http://xanthippe.dyndns.org/blog/index.php?/archives/33-Templating-Maven-plugin-configurations.html
 
 -dirk
 -
 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: Findbugs with external configuration

2011-10-19 Thread Fabricio Lemos

Ok, thank you Robert

On 18/10/2011 13:53, Robert Scholte wrote:


The findbugs-maven-plugin is part of Codehaus Mojo[1]

Try their mailing list[2]



-Robert



[1] http://mojo.codehaus.org/

[2] http://mojo.codehaus.org/mail-lists.html





Date: Tue, 18 Oct 2011 10:52:56 -0300
From: fabricio.le...@sefaz.ce.gov.br
To: users@maven.apache.org
Subject: Re: Findbugs with external configuration

Was my question confusing or isn´t anyone using findbugs with maven-site
3 and external file configuration?

On 13/10/2011 16:25, Fabricio Lemos wrote:

Can anyone help me configure findbugs in the site reporting?

I use an external file to exclude some checks, so I used this
configuration:
http://maven.apache.org/plugins/maven-checkstyle-plugin/examples/multi-module-config.html
and adapted it to maven-site 3.

It works with checkstyle but fails with findbugs. Here is the log:

mvn clean compile site
[INFO] Scanning for projects...
[INFO]
[INFO]

[INFO] Building jee6-intranet 0.0.1-SNAPSHOT
[INFO]

[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @
jee6-intranet ---
[INFO] Deleting
D:\projetos\arquitetura\projetos_exemplo\jee6\jee6-intranet\target
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources)
@ jee6-intranet ---
[INFO] Using 'ISO-8859-1' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.1:compile (default-compile) @
jee6-intranet ---
[INFO] Compiling 7 source files to
D:\projetos\arquitetura\projetos_exemplo\jee6\jee6-intranet\target\classes
[INFO]
[INFO] --- maven-site-plugin:3.0:site (default-site) @ jee6-intranet ---
[INFO] configuring report plugin
org.codehaus.mojo:findbugs-maven-plugin:2.3.2
[INFO] canGenerate is true
[INFO] configuring report plugin
org.apache.maven.plugins:maven-checkstyle-plugin:2.5
[INFO] Parent project loaded from repository:
br.gov.ce.sefaz.jee:sefaz-jee-parent:pom:0.0.1-SNAPSHOT
[INFO] Parent project loaded from repository:
br.gov.ce.sefaz:sefaz-parent:pom:0.0.2-SNAPSHOT
[WARNING] No project URL defined - decoration links will not be
relativized!
[INFO] Rendering site with
org.apache.maven.skins:maven-default-skin:jar:1.0 skin.
[INFO] Generating FindBugs Report report ---
findbugs-maven-plugin:2.3.2
[INFO] canGenerate is true
[INFO] canGenerate is true
[INFO] Locale is en
[INFO] ** FindBugsMojo executeReport ***
[INFO] XML outputFile is
D:\projetos\arquitetura\projetos_exemplo\jee6\jee6-intranet\target\findbugsXml.xml
[INFO] XML output Directory is
D:\projetos\arquitetura\projetos_exemplo\jee6\jee6-intranet\target
[INFO] ** FindBugsMojo executeFindbugs ***
[INFO] Temp File is
D:\projetos\arquitetura\projetos_exemplo\jee6\jee6-intranet\target\findbugsTemp.xml
[INFO] Fork Value is true
[INFO]

[INFO] BUILD FAILURE
[INFO]

[INFO] Total time: 4.266s
[INFO] Finished at: Thu Oct 13 16:12:30 GMT-03:00 2011
[INFO] Final Memory: 19M/47M
[INFO]

[ERROR] Could not find resource
'build-configuration/findbugs-exclude.xml'. -  [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with
the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/ResourceNotFoundException
D:\projetos\arquitetura\projetos_exemplo\jee6\jee6-intranet

I´m pretty sure that the file build-configuration/findbugs-exclude.xml
does exists.

And this is my pom configuration:

build
pluginManagement
plugins
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-checkstyle-plugin/artifactId
version2.5/version
configuration
failsOnErrortrue/failsOnError
consoleOutputtrue/consoleOutput
includeTestSourceDirectorytrue/includeTestSourceDirectory
configLocationbuild-configuration/checkstyle.xml/configLocation
/configuration
dependencies
dependency
groupIdbr.gov.ce.sefaz/groupId
artifactIdbuild-configuration/artifactId
version${build.configuration.version}/version
/dependency
/dependencies
executions
execution
goals
goalcheck/goal
/goals
/execution
/executions
/plugin
plugin
groupIdorg.codehaus.mojo/groupId
artifactIdfindbugs-maven-plugin/artifactId
version2.3.2/version
configuration
excludeFilterFilebuild-configuration/findbugs-exclude.xml/excludeFilterFile

/configuration
dependencies
dependency
groupIdbr.gov.ce.sefaz/groupId
artifactIdbuild-configuration/artifactId
version${build.configuration.version}/version
/dependency
/dependencies
executions
execution
goals
goalcheck/goal
/goals
/execution
/executions
/plugin
/plugins

Re: writing a parent pom that does not execute its plugins

2011-10-19 Thread Anders Hammar
 I was able to make the profile idea work in the end. The trick is the 
 enablement: the parent module defines a profile that is enabled through a 
 property. The child module defines that property. Works like a charm.

That should not work. Are you using Maven 3.0.x or 2.x?

/Anders


 More details here: 
 http://xanthippe.dyndns.org/blog/index.php?/archives/33-Templating-Maven-plugin-configurations.html

 -dirk
 -
 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: writing a parent pom that does not execute its plugins

2011-10-19 Thread Anders Hammar
Unfortunately it is not possible to include configuration of a plugin
in a custom packaging type. You need to create specific plugins (with
the proper default config) and use them in the packaging type.

/Anders

On Wed, Oct 19, 2011 at 13:43, Dirk Olmes d...@xanthippe.ping.de wrote:
 On 10/18/2011 01:55 PM, Anders Hammar wrote:
 I'm thinking that a custom packing type is what you want to create.
 Then use that as the packaging in those Maven projects where you
 create the install zips, and it will bind the appropriate plugins to
 the lifecycle.

 Thanks, Anders. I looked into creating a custom packaging type -
 assuming that I will need to create a custom lifecycle as described in
 [1] or [2]. Ok, this allows me to bind additional plugins to lifecycle
 phases but now how do I configure those plugins? I will have 3 different
 executions for the assembly plugin, one for jarring up all classes to be
 obfuscated, one for packaging up all libs and one for packaging the
 final installer zip.

 Where would I do that kind of configuration?

 -dirk

 [1]
 http://www.sonatype.com/people/2009/08/create-a-customized-build-process-in-maven/
 [2]
 http://sonatype.com/books/mvnref-book/reference/writing-plugins-sect-plugins-lifecycle.html

 -
 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: writing a parent pom that does not execute its plugins

2011-10-19 Thread Ansgar Konermann
Am 18.10.2011 13:28, schrieb Dirk Olmes:
 I am aware of the pluginManagement section but fail to see if it would
 help: I'd still have to list all the plugins to be executed in the
 individual installer POMs.
True, but IMHO a lot better than specifying the whole plugin
configuration over and over again. This is probably the low hanging
fruit which you could harvest easily.

All other approaches I'm aware of involve a lot more effort.

Regarding your use case: do you have a) N products which need to be
packaged all in the same way or b) one product which has to be packaged
in N similar variants? Or where is the variation in your packaging
otherwise? What differs between the projects you're attempting to package?

Best regards

Ansgar


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



must not access source of jar on maven repository

2011-10-19 Thread Cody Zhang
Hi,All
Deploy source.jar to maven repository in Our company.
Maven repository is management by nexus of Sonatype.
We want that somebody access the source.jar when download binary jar?
Best Regards,
--Cody.Zhang


Re: must not access source of jar on maven repository

2011-10-19 Thread Barrie Treloar
On Thu, Oct 20, 2011 at 12:05 PM, Cody Zhang codyzhang.w...@gmail.com wrote:
 Hi,All
    Deploy source.jar to maven repository in Our company.
 Maven repository is management by nexus of Sonatype.
 We want that somebody access the source.jar when download binary jar?
    Best Regards,
        --Cody.Zhang


When you use the release plugin to release your artifacts, by default
the useReleaseProfile will be true.
http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html#useReleaseProfile

This will adds sources and javadocs to the released artifact, if
appropriate. which will all be deployed with your main artifact into
your company's Nexus repository.

Then when other projects depend on your artifact they are able to
download the source jar that belongs with that artifact.
How you do that depends upon the ide,
e.g.
maven-eclipse-plugin
(http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html)
you specify -DdownloadSources=true
m2e you would need to check their documentation - but it may do this
automatically.

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



Re: must not access source of jar on maven repository

2011-10-19 Thread Cody Zhang
Thank's replay! So sorry!It's wrong!
I mean,only somebody download source.jar ,but can't download by default!
Best Regards,
--Cody.Zhang


On Thu, Oct 20, 2011 at 11:41 AM, Barrie Treloar baerr...@gmail.com wrote:

 On Thu, Oct 20, 2011 at 12:05 PM, Cody Zhang codyzhang.w...@gmail.com
 wrote:
  Hi,All
 Deploy source.jar to maven repository in Our company.
  Maven repository is management by nexus of Sonatype.
  We want that somebody access the source.jar when download binary jar?
 Best Regards,
 --Cody.Zhang
 

 When you use the release plugin to release your artifacts, by default
 the useReleaseProfile will be true.

 http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html#useReleaseProfile

 This will adds sources and javadocs to the released artifact, if
 appropriate. which will all be deployed with your main artifact into
 your company's Nexus repository.

 Then when other projects depend on your artifact they are able to
 download the source jar that belongs with that artifact.
 How you do that depends upon the ide,
 e.g.
 maven-eclipse-plugin
 (http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html)
 you specify -DdownloadSources=true
 m2e you would need to check their documentation - but it may do this
 automatically.

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




Re: must not access source of jar on maven repository

2011-10-19 Thread Barrie Treloar
On Thu, Oct 20, 2011 at 3:33 PM, Cody Zhang codyzhang.w...@gmail.com wrote:
 Thank's replay! So sorry!It's wrong!
 I mean,only somebody download source.jar ,but can't download by default!
    Best Regards,
        --Cody.Zhang

Cody, I appreciate that english is not a native language, but I can't
understand what you mean to give any advice.

Can you give some examples?

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



Re: writing a parent pom that does not execute its plugins

2011-10-19 Thread Dirk Olmes

On 20.10.2011, at 00:21, Ansgar Konermann wrote:

Am 18.10.2011 13:28, schrieb Dirk Olmes:
I am aware of the pluginManagement section but fail to see if it  
would

help: I'd still have to list all the plugins to be executed in the
individual installer POMs.

True, but IMHO a lot better than specifying the whole plugin
configuration over and over again. This is probably the low hanging
fruit which you could harvest easily.


Not low enough for me :-)
The alternative would have been to write a custom generator for pom  
files.



Regarding your use case: do you have a) N products which need to be
packaged all in the same way or b) one product which has to be  
packaged

in N similar variants? Or where is the variation in your packaging
otherwise? What differs between the projects you're attempting to  
package?


It's more like a) - different products, same packaging. These products  
are all very similar since they sit on top of the same framework,  
though. The packaging process is always like this:


- use an assembly to put all of our classes from different child  
modules into one jar that's to be fed into proguard for obfuscation
- generate the obfuscator config, this plugin resolves depencies and  
puts paths to third party jars into a template
- use proguard to obfuscate only our classes - third party classes are  
open source anyway so there's little use in obfuscating them
- use another assembly to package up all third party jars along with  
our obfuscated jar and some supporting resources like scripts etc.  
into a deployment zip
- use yet another assembly to package up the deployment zip and an  
installer shell script into an installer.zip


All the installers we produce vary only in dependencies and in the  
contents of the various assemblies. The list of plugins and their  
configurations stays the same.


-dirk


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