Re: NetBeans - the UI for Maven

2018-11-24 Thread Jan Lahoda
Hi Martin,

I appreciate that your are using NetBeans - thanks for that!

But, as I understand Jarsolav's proposal, it only proposes to change the
presentation in the "New Project" dialog, so that the (more standard) Maven
projects would be ordered in front of/above the Ant projects. Users would
still be able to create the Ant projects, if they chose so; and of course
NetBeans would still be able to open existing Ant projects (and I don't
think we'd want or be able to drop the ability to open the Ant projects in
the foreseeable future).

So, I am +1 on this proposal.

On Sat, Nov 24, 2018 at 11:29 AM Martin Desruisseaux <
martin.desruisse...@geomatys.com> wrote:

> I think differently. In Apache SIS for example, we maintain both a Maven
> and Ant project. The root source code directory is a classical Maven
> project with pom.xml file [1], but we also maintain a sub-directory with
> NetBeans Ant project configuration [2]. The official project
> configuration is the Maven one, but the Ant project configuration is
> keep in sync and takes its dependencies directly from the
> ~/.m2/repository directory. This means that the project needs to be
> built with Maven once before we can use the Ant project. We do that for
> the following reasons:
>
>   * NetBeans Ant project builds faster.
>   * Application and debugging sessions start faster in NetBeans Ant
> project. This is very convenient when we do a lot of "modify - test"
> cycles.
>   * Allow to commit configurations that can not be done in Maven (header
> license, hints, additional words for check speller).
>   * NetBeans Ant Jigsaw project configuration offers better
> compatibility with Jigsaw (more on it below).
>
> A major issue is that since Jigsaw, Maven standard directory layout is
> incompatible with java, javac and javadoc "--module-path" option, which
> is making me look for alternatives (Gradle?). I describe the issue at
> [3]. I would like to try changes in maven-compiler, maven-javadoc,
> maven-jar and maven-deploy plugins for supporting Jigsaw, but did not
> had the time to start yet. As far as I can see, I can not modularize my
> projects the way I want with Maven at it stands today.
>

FWIW, there is StandardJavaFileManager.setLocationForModule:
https://docs.oracle.com/javase/10/docs/api/javax/tools/StandardJavaFileManager.html#setLocationForModule(javax.tools.JavaFileManager.Location,java.lang.String,java.util.Collection)

which might be useful in some cases.

Jan


> I also feel more concerned about Maven standard directory layout not
> only because of its incompatibility with Jigsaw module paths, but also
> because it does not seem well suited to project mixing two or more
> languages. For example in the given directory layout:
>
>   * src/main/java
>   * src/main/cpp
>   * src/main/resources
>
> Does the resources applies to Java, to C++ or both?
>
> So Maven is a great tool, but its speed is not yet the same than the
> NetBeans Ant project configuration (admittedly it may be improved with
> time) and - more importantly - I think that the Maven standard directory
> layout needs to be modified at least for Jigsaw compatibility, maybe for
> better multi-language support.
>
> Regards,
>
> Martin
>
> [1] https://github.com/apache/sis
> [2]
> https://github.com/apache/sis/tree/master/ide-project/NetBeans/nbproject
> [3] https://github.com/Geomatys/maven-plugins/wiki
>
>


RE: buildnumber plugin - last revision vs revision

2017-03-30 Thread Jan Tosovsky
Hi Karl Heinz,

On 2017-03-31 Karl Heinz Marbaise wrote:
> On 31/03/17 00:18, Jan Tosovsky wrote:
> > On 2017-03-30 Karl Heinz Marbaise wrote:
> >> On 30/03/17 22:01, Jan Tosovsky wrote:
> >>>
> >>> I'd like to implement versioning of my builds based on actual SVN
> >>> revisions.
> >>>
> >>> However, when using buildnumber plugin, it returns the revision of
> >>> top level folder (repository root), not my subfolder.
> >>>
> >>> When running the following command in console, which seems to be
> >>> executed via plugin during the build process:
> >>>
> >>> svn --non-interactive info C:\trunk\liferay\test-portlet
> >>>
> >>> I am getting the following outcome:
> >>>
> >>> Path: C:\trunk\liferay\test-portlet
> >>> Working Copy Root Path: C:\trunk
> >>> URL: https://svn.doctribute.org/svn/dev/trunk/liferay/test-portlet
> >>> Relative URL: ^/trunk/liferay/test-portlet
> >>> Repository Root: https://svn.doctribute.org/svn/dev
> >>> Repository UUID: d2212073-805c-254b-a7b3-a8ceac86dd9a
> >>> Revision: 44044
> >>> Node Kind: directory
> >>> Schedule: normal
> >>> Last Changed Author: j.tosovsky
> >>> Last Changed Rev: 43992
> >>> Last Changed Date: 2017-03-24 16:44:15 +0100 (Fri, 24 Mar 2017)
> >>>
> >>>
> >>> For my use I'd prefer using 'Last Changed Rev' and 'Last Changed
> >>> Date' for the final buildNumber and timestamp respectively.
> >>> Currently I am getting 44044, which is not the revision of my code,
> >>> but the revision of other (sister) project.
> >>>
> >>> I've tried to modify this option (with both true/false values), but
> >>> the result is same:
> >>> false
> >>> (I am not sure I understand the meaning of this feature)
> >>>
> >>> Is there any chance to utilize 'Last Changed XXX' entries?
> >>
> >> which version of the buildnumber-maven-plugin do you use?
> >
> > oops, it is 1.4.
> 
> Just fine that is the latest release of it...
> 
> >
> > In meantime I found GitHub Pages and my issue resembles
> > https://github.com/mojohaus/buildnumber-maven-plugin/issues/36
> >
> > and also (fixed, but not released yet)
> > https://github.com/mojohaus/buildnumber-maven-plugin/issues/38
> >
> > But there is also a pull request mentioning the support for the 
> > Last Changed Date (what I need as well):
> > https://github.com/mojohaus/buildnumber-maven-plugin/pull/16
> >
> >
> > So I most likely need to integrate that pull request and to build 
> > the custom version from sources to get correct behavior. Or is 
> > there planned any new build (the last one was in 2015)?
> >
> 
> At the moment I'm working on such issues...and trying to fix some of
> them...cause the 3.0.0 milestone has a large number of fixes in the
> meantime...I'm thinking of making a release of it within the next 
> few weeks...
> 

I'll wait then (even it will take even longer). Thanks a lot!

Btw, I'd be grateful for implementing especially this one:
https://github.com/mojohaus/buildnumber-maven-plugin/issues/17

;-)

Jan


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



RE: buildnumber plugin - last revision vs revision

2017-03-30 Thread Jan Tosovsky
On 2017-03-30 Karl Heinz Marbaise wrote:
> On 30/03/17 22:01, Jan Tosovsky wrote:
> >
> > I'd like to implement versioning of my builds based on actual SVN
> > revisions.
> >
> > However, when using buildnumber plugin, it returns the revision of
> > top level folder (repository root), not my subfolder.
> >
> > When running the following command in console, which seems to be
> > executed via plugin during the build process:
> >
> > svn --non-interactive info C:\trunk\liferay\test-portlet
> >
> > I am getting the following outcome:
> >
> > Path: C:\trunk\liferay\test-portlet
> > Working Copy Root Path: C:\trunk
> > URL: https://svn.doctribute.org/svn/dev/trunk/liferay/test-portlet
> > Relative URL: ^/trunk/liferay/test-portlet
> > Repository Root: https://svn.doctribute.org/svn/dev
> > Repository UUID: d2212073-805c-254b-a7b3-a8ceac86dd9a
> > Revision: 44044
> > Node Kind: directory
> > Schedule: normal
> > Last Changed Author: j.tosovsky
> > Last Changed Rev: 43992
> > Last Changed Date: 2017-03-24 16:44:15 +0100 (Fri, 24 Mar 2017)
> >
> >
> > For my use I'd prefer using 'Last Changed Rev' and 'Last Changed
> > Date' for the final buildNumber and timestamp respectively. 
> > Currently I am getting 44044, which is not the revision of my code, 
> > but the revision of other (sister) project.
> >
> > I've tried to modify this option (with both true/false values), but
> > the result is same:
> > false
> > (I am not sure I understand the meaning of this feature)
> >
> > Is there any chance to utilize 'Last Changed XXX' entries?
> 
> which version of the buildnumber-maven-plugin do you use?

oops, it is 1.4.

In meantime I found GitHub Pages and my issue resembles
https://github.com/mojohaus/buildnumber-maven-plugin/issues/36

and also (fixed, but not released yet)
https://github.com/mojohaus/buildnumber-maven-plugin/issues/38

But there is also a pull request mentioning the support for the Last Changed 
Date (what I need as well):
https://github.com/mojohaus/buildnumber-maven-plugin/pull/16


So I most likely need to integrate that pull request and to build the custom 
version from sources to get correct behavior. Or is there planned any new build 
(the last one was in 2015)?

Thanks, Jan


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



buildnumber plugin - last revision vs revision

2017-03-30 Thread Jan Tosovsky
Dear All,

I'd like to implement versioning of my builds based on actual SVN revisions.

However, when using buildnumber plugin, it returns the revision of top level
folder (repository root), not my subfolder.

When running the following command in console, which seems to be executed
via plugin during the build process:

svn --non-interactive info C:\trunk\liferay\test-portlet

I am getting the following outcome:

Path: C:\trunk\liferay\test-portlet
Working Copy Root Path: C:\trunk
URL: https://svn.doctribute.org/svn/dev/trunk/liferay/test-portlet
Relative URL: ^/trunk/liferay/test-portlet
Repository Root: https://svn.doctribute.org/svn/dev
Repository UUID: d2212073-805c-254b-a7b3-a8ceac86dd9a
Revision: 44044
Node Kind: directory
Schedule: normal
Last Changed Author: j.tosovsky
Last Changed Rev: 43992
Last Changed Date: 2017-03-24 16:44:15 +0100 (Fri, 24 Mar 2017)


For my use I'd prefer using 'Last Changed Rev' and 'Last Changed Date' for
the final buildNumber and timestamp respectively. Currently I am getting
44044, which is not the revision of my code, but the revision of other
(sister) project.

I've tried to modify this option (with both true/false values), but the
result is same:
false
(I am not sure I understand the meaning of this feature)

Is there any chance to utilize 'Last Changed XXX' entries?

Thanks,

Jan



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



Re: Offlining maven: how to set up the p2 cache?

2016-01-29 Thread Sievers, Jan
there was an offline bug [1] but it should be fixed in Tycho 0.25.0-SNAPSHOT.
You need to prime the local maven repo by doing an online build first of course.

Regards,
Jan

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=474885
[2] https://wiki.eclipse.org/Tycho/Release_Notes/0.25




On 29/01/16 01:11, "Jason van Zyl" <ja...@takari.io> wrote:

>You are attempting to do a Tycho build which to my knowledge will not work in 
>offline mode. You can do as Ron suggests and use a repository manager, or you 
>might want to ask on the Tycho users list for possible work arounds:
>
>https://dev.eclipse.org/mailman/listinfo/tycho-user
>
>> On Jan 28, 2016, at 3:54 PM, Thibault, Daniel 
>> <daniel.thiba...@drdc-rddc.gc.ca> wrote:
>> 
>>   I have these two projects that need to be compiled offline.  I thought I 
>> would first compile them on-line and then transplant the ~/.m2/repository to 
>> the offline system.  However, something isn't quite right.  I'm using Apache 
>> Maven 3.3.9 and Java 1.8.0_45.
>> 
>>   The two projects (when run with 'mvn --offline') both give a failure along 
>> the lines of:
>> 
>> [INFO] Adding repository http://download.eclipse.org/tools/cdt/releases/8.8
>> [ERROR] Failed to resolve target definition <...>.target: Failed to load p2 
>> metadata repository from location 
>> http://download.eclipse.org/tools/cdt/releases/8.8/: Repository system is 
>> offline and no local cache available for 
>> http://download.eclipse.org/tools/cdt/releases/8.8 -> [Help 1]
>> 
>>   Isn't the p2 cache in ~/.m2/repository/p2 ?
>> 
>>   Strangely, the two projects behave differently.
>> 
>>   For one, building offline fails as described above while building online 
>> fetches 15 compositeContent.xml, content.jar, content.xml.xz and p2.index 
>> from download.eclipse.org before using the cache and completing normally.
>> 
>>   For the other, the first offline run caused a Java exception (same error 
>> as above, somehow not handled).  I then ran it online, successfully (same 
>> behaviour as the other project).  But running it offline now succeeds as 
>> well!
>> 
>>   What is the established procedure for setting up the m2 and p2 caches in 
>> order to ensure maven builds succeed offline?
>> 
>> Daniel U. Thibault, M.Sc.²
>> 
>> Informaticien scientifique, CME-PSC, Centre de recherches de Valcartier
>> Recherche et développement pour la défense Canada / Gouvernement du Canada
>> daniel.thiba...@drdc-rddc.gc.ca<mailto:daniel.thiba...@drdc-rddc.gc.ca> / 
>> Tél: 418-844-4000x4245 Téléc: 418-844-4538
>> daniel.thiba...@forces.gc.ca<mailto:daniel.thiba...@forces.gc.ca> / Tél: 
>> 418-844-4000x4245 Téléc: 418-844-4538
>> 
>> Computer Scientist, MCCS-SPC, Valcartier Research Centre
>> Defence Research and Development Canada / Government of Canada
>> daniel.thiba...@drdc-rddc.gc.ca<mailto:daniel.thiba...@drdc-rddc.gc.ca> / 
>> Tel: 418-844-4000x4245 Fax: 418-844-4538
>> daniel.thiba...@forces.gc.ca<mailto:daniel.thiba...@forces.gc.ca> / Tel: 
>> 418-844-4000x4245 Fax: 418-844-4538
>> 
>> DRDC is an agency of the Department of National Defence / RDDC est une 
>> agence du ministère de la Défense nationale
>> 
>
>Thanks,
>
>Jason
>
>--
>Jason van Zyl
>Founder, Takari and Apache Maven
>http://twitter.com/jvanzyl
>http://twitter.com/takari_io
>-
>
>
>
>-
>To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>For additional commands, e-mail: users-h...@maven.apache.org
>


HTML links in maven site to projects on local server

2015-06-16 Thread Jan Schultze
Hi,

I have a maven project (say A) depending on another project (say B) whose
project URL refers to a server without a global DNS name (e.g.
http://server.company.local/... or http://serverXYZ/...). The dependencies
page of the maven site for project A shows the URL of project B as plain
text and not the link named after B's artifactId with a proper href to B's
URL. I tried maven 3.0.5 and 3.3.3.

Is there a known workaround for this?

A little research showed, that this behavior comes from
maven-reporting-impl which is validating the URL with an apache-commons
UrlValidator. If validation fails, the href is output as text. The version
of the UrlValidator in use actually rejects any Top Level Domain longer
than 4 characters. Newer versions, however, would not solve my problem, as
they rely on a white list of top level domains not including .local.

Can anybody explain to me why the URL has to be validated?

Thanks in advance!


Build once, deploy everywhere

2014-09-10 Thread Jan
Hi All,

Does anyone using Maven as Build Once and deploy Everywhere method? Like
lets say i don't want to recompile my source code everytime for different
environment DEV,SIT,UAT  PROD. I want to do my compile and package only at
DEV then deploy the artifact to all mentioned environment. Is this possible
using Maven, is there any reference any one could share with me Please.


Re: Build once, deploy everywhere

2014-09-10 Thread Jan
Thanks All.

My package is not environment specific, and currently i compile and package
using Maven, and run deployment using Ant, coz when i tried to run maven
deploy it was using the full life cycle goals again, instead of this is
there any way to execute just deploy and skip all other goals?


On Wed, Sep 10, 2014 at 9:26 AM, Graham Leggett minf...@sharp.fm wrote:

 On 10 Sep 2014, at 10:03, Jan raghure...@gmail.com wrote:

  Does anyone using Maven as Build Once and deploy Everywhere method? Like
  lets say i don't want to recompile my source code everytime for different
  environment DEV,SIT,UAT  PROD. I want to do my compile and package only
 at
  DEV then deploy the artifact to all mentioned environment. Is this
 possible
  using Maven, is there any reference any one could share with me Please.

 We do this extensively with maven, using the maven release plugin.

 Our artifacts are in turn installable packages (rpms in our case, but
 could be deb, whatever) which get published into a yum repository.

 The code is promoted from dev to test to higher environments by hard
 linking the packages into distinct yum repos, a yum repo for each
 environment.

 The release created by the release plugin is built just once and promoted.
 The rpms are created using the rpm-maven-plugin.

 Regards,
 Graham
 --


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




RE: Testing Maven 3.2.3

2014-08-13 Thread Sievers, Jan
I can confirm https access to https://repo.maven.apache.org/maven2 works fine 
with staged maven 3.2.3 when building Tycho demo project

http://git.eclipse.org/c/tycho/org.eclipse.tycho-demo.git/tree/itp04-rcp 

from behind an http(s) proxy.

Regards,
Jan

-Original Message-
From: Jason van Zyl [mailto:ja...@takari.io] 
Sent: Mittwoch, 13. August 2014 07:36
To: Maven Users List
Subject: Testing Maven 3.2.3

Hi,

We have staged Maven 3.2.3 and I'd ask that users try and test this version 
because we have changed to using the HTTPS connection to Maven Central by 
default. The information for the release can be found below. I encourage users 
to give this release a spin before we actually release it to ensure the HTTPS 
connection is working for everyone.

Begin forwarded message:

 From: Jason van Zyl ja...@takari.io
 Subject: [VOTE] Maven 3.2.3 Release
 Date: August 11, 2014 at 2:19:34 PM PDT
 To: Maven Developers List d...@maven.apache.org
 Reply-To: Maven Developers List d...@maven.apache.org
 
 Hi,
 
 Time to release Maven 3.2.3!
 
 This release contains the important change of switching to HTTPS transport by 
 default! Please test this release with your builds!
 
 Here is a link to Jira with 9 issues resolved:
 https://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=10500version=20443
 
 Staging repo:
 https://repository.apache.org/content/repositories/maven-1046/
 
 The distributable binaries and sources for testing can be found here:
 https://repository.apache.org/content/repositories/maven-1046/org/apache/maven/apache-maven/3.2.3/
 
 Specifically the zip, tarball, and source archives can be found here:
 https://repository.apache.org/content/repositories/maven-1046/org/apache/maven/apache-maven/3.2.3/apache-maven-3.2.3-bin.zip
 https://repository.apache.org/content/repositories/maven-1046/org/apache/maven/apache-maven/3.2.3/apache-maven-3.2.3-bin.tar.gz
 https://repository.apache.org/content/repositories/maven-1046/org/apache/maven/apache-maven/3.2.3/apache-maven-3.2.3-src.zip
 https://repository.apache.org/content/repositories/maven-1046/org/apache/maven/apache-maven/3.2.3/apache-maven-3.2.3-src.tar.gz
 
 Source release checksum(s):
 apache-maven-3.2.3-src.zip sha1: 8607b9922d21078133f31ed8523ebae90a871d1f
 
 Staging site:
 http://people.apache.org/~jvanzyl/maven-3.2.3/
 
 Vote open for 72 hours.
 
 [ ] +1
 [ ] +0
 [ ] -1
 
 Thanks,
 
 The Maven Team
 
 
 
 
 
 
 
 

Thanks,

Jason

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

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.

  -- Jacques Ellul, The Technological Society



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



JavaDoc plugin and firewall

2013-06-25 Thread Jan Engler
Hi,

currently, I am facing a problem with the javadoc plugin: It seems that 
the plugin tries to download connected dependencies (that are used in our 
type hierarchy) from repo1 (central) although we have a defined mirror for 
that in the settings. Can I specify mirrors for plugins somewhere in the 
settings.xml or in the configuration of the plugin?

Here is my stacktrace (the output from the plugin):

The javasoft:synthetica:jar lies in our own repositorybut apperantly, 
the plugin only searches in repo1.

[INFO] Scanning for projects...
[INFO] 
[INFO] 

[INFO] Building My-Custom-App
[INFO] 

[INFO] 
[INFO]  maven-javadoc-plugin:2.9:javadoc (default-cli) 
@My-Custom-App
[INFO] 
[INFO]  maven-javadoc-plugin:2.9:javadoc (default-cli) @ My-Custom-App 

Downloading: http://repo1.maven.org/maven2/junit/junit/4.11/junit-4.11.pom 

Downloading: 
http://repo1.maven.org/maven2/org/easymock/easymock/3.1/easymock-3.1.pom 
Downloading: 
http://repo1.maven.org/maven2/org/easymock/easymockclassextension/3.1/easymockclassextension-3.1.pom
 

Downloading: 
http://repo1.maven.org/maven2/org/springframework/spring-test/3.2.2.RELEASE/spring-test-3.2.2.RELEASE.pom
 

[INFO] 

[INFO] BUILD FAILURE
[INFO] 

[INFO] Total time: 1:45.795s
[INFO] Finished at: Tue Jun 25 08:26:59 CEST 2013
[INFO] Final Memory: 5M/15M
[INFO] 

[ERROR] Failed to execute goal on project sick-lnf: Could not resolve 
dependencies for project de.sick.sopas:my-custom-app:jar:3.0.0-SNAPSHOT: 
Failed to collect dependencies for [de.javasoft:synthetica:jar:1.0 
(compile), junit:junit:jar:4.11 (test), org.easymock:easymock:jar:3.1 
(test), org.easymock:easymockclassextension:jar:3.1 (test), 
org.springframework:spring-test:jar:3.2.2.RELEASE (test)]: Failed to read 
artifact descriptor for de.javasoft:synthetica:jar:1.0: Could not transfer 
artifact de.javasoft:synthetica:pom:1.0 from/to central (
http://repo1.maven.org/maven2): Error transferring file: Connection timed 
out: connect - [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/DependencyResolutionException 



I have a mirrorOf entry in our settings.xml:
mirrors
mirror
idcentral-proxy/id
nameLocal proxy of central repo/name
url
http://nexusserver.devserver.net:8080/nexus/content/repositories/central/
/url
mirrorOfcentral/mirrorOf
/mirror
/mirrors

Any hints?

Mit freundlichen Grüßen / Best regards

Jan Engler
 
 
SICK AG - Sitz: Waldkirch i. Br. - Handelsregister: Freiburg i. Br. HRB 
280355 
Vorstand: Dr. Robert Bauer (Vorsitzender)  -  Reinhard Bösl  -  Dr. Mats 
Gökstorp  -  Dr. Martin Krämer  -  Markus Vatter 
Aufsichtsrat: Gisela Sick (Ehrenvorsitzende) - Klaus M. Bukenberger 
(Vorsitzender) 


Custom Maven Plugin

2013-03-18 Thread Jan Engler
Hi,

I am writing my first custom plugin for maven. 
I`m now facing 2 problem.
- I need to know the absolute location of every dependency (incl. 
transitive deps)
- Is there a solution for workspace dependencies (i would like to have a 
jar of them as well) like disable workspace resolution as a method 
call in the plugin?

Thx in advance!
 Jan 

Mit freundlichen Grüßen / Best regards

Jan Engler
Central Research  Development

SICK AG
Erwin-Sick-Str. 1
79183 Waldkirch, Germany

Phone +49 7681 202-3214
mailto:jan.eng...@sick.de
http://www.sick.com

 
 
SICK AG - Sitz: Waldkirch i. Br. - Handelsregister: Freiburg i. Br. HRB 
280355 
Vorstand: Dr. Robert Bauer (Vorsitzender)  -  Reinhard Bösl  -  Dr. Martin 
Krämer  -  Markus Paschmann  -  Markus Vatter 
Aufsichtsrat: Gisela Sick (Ehrenvorsitzende) - Klaus M. Bukenberger 
(Vorsitzender) 


Antwort: Re: Custom Maven Plugin

2013-03-18 Thread Jan Engler
Ok,

I am adapting the jni4net maven plugin  (see 
https://code.google.com/p/jni4net/) to fit our needs. In short, this 
plugin collects a set of classes with the intention to generate .net 
wrapper for. Furthermore, the tool that create those wrappers 
(proxygen.exe) needs the complete dependecies as 'classpath' argument. It 
works so far, but beneath the direct dependencies of the maven project my 
plugin is running on, I also need the transitive dependencies. All the 
information about that is passed to the proxygen.exe using an xml file...
In the case of a dependency that is described by a workspace resolution I 
would like to pass a jar
I tried your hint with  @requiresDependencyResolution compile  but that 
didn't work. Here is a snippet of my code:

/**
 * @requiresDependencyResolution compile
 * @goal proxygen
 * 
 * @phase process-sources
 */
public class ProxygenMojo extends AbstractMojo {
/**
 * @parameter expression=${proxygen.exe}
 * @required
 */
private File exe;

/** @parameter expression=${proxygen.xml} default-
value=proxygen.xml */
private File xml;
/** @parameter expression=${proxygen.bin} default-
value=target/classes */
private String bin;

/**
 * @parameter
 */
private ListString artifacts;
/**
 * @parameter
 */
private ListString classes;

/**
 * @parameter expression=${proxygen.targetDirJvm}
 *default-value=TargetDirJvmjava/TargetDirJvm
 */
String targetDirJvm;

/**
 * @parameter expression=${proxygen.targetDirClr}
 *default-value=TargetDirClrcsharp/TargetDirClr
 */
String targetDirClr;

/** @parameter default-value=${project} */
MavenProject project;

@SuppressWarnings(unchecked)
public void execute() throws MojoExecutionException {
if (artifacts == null)
artifacts = Collections.emptyList();

getLog().info(exe =  + exe.getPath());
 
String jarPath;
ArrayListString classPathList = null;
ArrayListString classList = null;

SetArtifact artifactSet = project
.getDependencyArtifacts();
project.getDependencies();
for (Artifact artifact : artifactSet) {
try {
JarFile depFile = new 
JarFile(artifact.getFile());
if (classPathList == null) {
classPathList = new 
ArrayListString();
}
classPathList.add(depFile.getName());
} catch (IOException e1) {
 
e1.printStackTrace();
}
jarPath = null;

getLog().info(artifact  + 
artifact.getFile().getPath());
}

StringBuilder xmlBuilder = new StringBuilder(
?xml version=\1.0\ encoding=\utf-8\ 
?);
xmlBuilder
.append(\njni4net-proxygen xmlns=\
http://jni4net.sf.net/0.8.0.0/toolConfig.xsd\;\n);
xmlBuilder.append(\nTargetDirJvm).append(targetDirJvm)
.append(/TargetDirJvm);
xmlBuilder.append(\nTargetDirClr).append(targetDirClr)
.append(/TargetDirClr\n);

if (classPathList == null) {
getLog().warn(no artifacts found);
} else {
for (String artifact : classPathList) {
xmlBuilder.append(\nClassPath Path=\ + 
artifact + \/);
}
xmlBuilder.append(\nClassPath Path=\ + bin + 
\/);
xmlBuilder.append('\n');
}
for (String clazzAsString : classes) {
if (classList == null) {
classList = new ArrayListString();
}
classList.add(clazzAsString);
}
if (classList == null) {
getLog().warn(no classes found);
} else {
for (String className : classList) {
xmlBuilder.append(\nJavaClass 
TypeName=\ + className
+ \/);
}
}
xmlBuilder.append(\n\n/jni4net-proxygen\n);


Any ideas? 

Mit freundlichen Grüßen / Best regards

Jan Engler
Central Research  Development

SICK AG
Erwin-Sick-Str. 1
79183 Waldkirch, Germany

Phone +49 7681 202-3214
mailto:jan.eng...@sick.de
http://www.sick.com





Von:Stephen

Antwort: Re: Re: Custom Maven Plugin

2013-03-18 Thread Jan Engler
Hey,

thanks a lot! That solved my problems!

Mit freundlichen Grüßen / Best regards

Jan Engler
Central Research  Development

SICK AG
Erwin-Sick-Str. 1
79183 Waldkirch, Germany

Phone +49 7681 202-3214
mailto:jan.eng...@sick.de
http://www.sick.com





Von:Thomas Broyer t.bro...@gmail.com
An: Maven Users List users@maven.apache.org
Datum:  18.03.2013 14:28
Betreff:Re: Re: Custom Maven Plugin



Try project.getCompileClasspathElements(), it resolves transitive
dependencies and gives you their location as absolute file names.

http://maven.apache.org/ref/3.0.5/maven-core/apidocs/org/apache/maven/project/MavenProject.html#getCompileClasspathElements()


On Mon, Mar 18, 2013 at 2:22 PM, Jan Engler jan.eng...@sick.de wrote:
 Ok,

 I am adapting the jni4net maven plugin  (see
 https://code.google.com/p/jni4net/) to fit our needs. In short, this
 plugin collects a set of classes with the intention to generate .net
 wrapper for. Furthermore, the tool that create those wrappers
 (proxygen.exe) needs the complete dependecies as 'classpath' argument. 
It
 works so far, but beneath the direct dependencies of the maven project 
my
 plugin is running on, I also need the transitive dependencies. All the
 information about that is passed to the proxygen.exe using an xml 
file...
 In the case of a dependency that is described by a workspace resolution 
I
 would like to pass a jar
 I tried your hint with  @requiresDependencyResolution compile  but that
 didn't work. Here is a snippet of my code:

 /**
  * @requiresDependencyResolution compile
  * @goal proxygen
  *
  * @phase process-sources
  */
 public class ProxygenMojo extends AbstractMojo {
 /**
  * @parameter expression=${proxygen.exe}
  * @required
  */
 private File exe;

 /** @parameter expression=${proxygen.xml} default-
 value=proxygen.xml */
 private File xml;
 /** @parameter expression=${proxygen.bin} default-
 value=target/classes */
 private String bin;

 /**
  * @parameter
  */
 private ListString artifacts;
 /**
  * @parameter
  */
 private ListString classes;

 /**
  * @parameter expression=${proxygen.targetDirJvm}
  *default-value=TargetDirJvmjava/TargetDirJvm
  */
 String targetDirJvm;

 /**
  * @parameter expression=${proxygen.targetDirClr}
  * default-value=TargetDirClrcsharp/TargetDirClr
  */
 String targetDirClr;

 /** @parameter default-value=${project} */
 MavenProject project;

 @SuppressWarnings(unchecked)
 public void execute() throws MojoExecutionException {
 if (artifacts == null)
 artifacts = Collections.emptyList();

 getLog().info(exe =  + exe.getPath());

 String jarPath;
 ArrayListString classPathList = null;
 ArrayListString classList = null;

 SetArtifact artifactSet = project
 .getDependencyArtifacts();
 project.getDependencies();
 for (Artifact artifact : artifactSet) {
 try {
 JarFile depFile = new
 JarFile(artifact.getFile());
 if (classPathList == null) {
 classPathList = new
 ArrayListString();
 }
 classPathList.add(depFile.getName());
 } catch (IOException e1) {

 e1.printStackTrace();
 }
 jarPath = null;

 getLog().info(artifact  +
 artifact.getFile().getPath());
 }

 StringBuilder xmlBuilder = new StringBuilder(
 ?xml version=\1.0\ 
encoding=\utf-8\
 ?);
 xmlBuilder
 .append(\njni4net-proxygen xmlns=\
 http://jni4net.sf.net/0.8.0.0/toolConfig.xsd\;\n);
 xmlBuilder.append(\nTargetDirJvm).append(targetDirJvm)
 .append(/TargetDirJvm);
 xmlBuilder.append(\nTargetDirClr).append(targetDirClr)
 .append(/TargetDirClr\n);

 if (classPathList == null) {
 getLog().warn(no artifacts found);
 } else {
 for (String artifact : classPathList) {
 xmlBuilder.append(\nClassPath Path=\ 
+
 artifact + \/);
 }
 xmlBuilder.append(\nClassPath Path=\ + bin +
 \/);
 xmlBuilder.append('\n');
 }
 for (String clazzAsString : classes) {
 if (classList == null) {
 classList

Antwort: Re: Antwort: Re: Maven Shade Plugin

2013-03-01 Thread Jan Engler
Hi,

To prevent any problems, I have now split up the build into two builds 
(api-build and full-jar). I think I will introduce now a third project 
(with pom packaging) that will build up all modules and collect the 
artifacts that are needed. I hope that is a correct strategy to solve the 
problem. I would like to reuse the api.jar and the full.jar as artifacts 
that can be used as dependencies, therefore I take Jörg's comment into 
account, thanks!

Best,
 Jan

Mit freundlichen Grüßen / Best regards

Jan Engler
Central Research  Development

SICK AG
Erwin-Sick-Str. 1
79183 Waldkirch, Germany

Phone +49 7681 202-3214
mailto:jan.eng...@sick.de
http://www.sick.com





Von:Jörg Schaible joerg.schai...@scalaris.com
An: users@maven.apache.org
Datum:  01.03.2013 08:27
Betreff:Re: Antwort: Re: Maven Shade Plugin



Hi Tim,

Tim Kettler wrote:

 Am 28.02.2013 19:47, schrieb Joachim Durchholz:
 Am 28.02.2013 16:24, schrieb Jan Engler:
 At first: in fact this is only one artifact. The full jar contains all
 classes of the dependecies, the api a reduced set (using filtern in 
the
 shade plugin).

 Is there a (conceivable) Maven build that uses api.jar as a dependency?
 Then it must be the main artifact at its GAV (groupId/artifact/version)
 coordinate.

 Is there a (conceivable) Maven build that uses full.jar as a 
dependency?
 Then it must be the main artifact at its GAV coordinate.

 If both jars need to be main artifacts, they need to go to different 
GAV
 coordinates. Because the dependent projects that need either api.jar or
 full.jar have no way of specifying which of them they actually need, 
the
 dependency section in their poms can only specify the GAV coordinate.
 
 That's not correct. The classifier is part of the artifact coordinates
 just like group, artifact(name) and version. A POM can just as well
 depend on a secondary artifact:
 
dependency
  groupIdfoo/groupId
  artifactIdbar/artifactId
  version1.0/version
  classifierapi/classifier
/dependency
 
 The complete coordinates of an artifact are GAVTC: group,
 artifact(name), version, type (default is jar), classifier (default is
 empty).

That's not the real problem. What actually *is* a problem, if you depend 
on 
different artifacts that bring both jars as transitive dependencies - you 
cannot exclude e.g. the -api, because for exclusions you can only specify 
GA. :-/

- Jörg


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


 
 
SICK AG - Sitz: Waldkirch i. Br. - Handelsregister: Freiburg i. Br. HRB 
280355 
Vorstand: Dr. Robert Bauer (Vorsitzender)  -  Reinhard Bösl  -  Dr. Martin 
Krämer  -  Markus Paschmann  -  Markus Vatter 
Aufsichtsrat: Gisela Sick (Ehrenvorsitzende) - Klaus M. Bukenberger 
(Vorsitzender) 


Antwort: Re: Antwort: Re: Maven Shade Plugin

2013-03-01 Thread Jan Engler
Ok,

working with a split-up build project seems to work. The only problem that 
I face in the moment is that there is not only my 2 shaded jars (api and 
api-sources) but also a file called original-api.jar. The content of 
this jar is only the meta-inf folder and I don't want this file to be 
placed in my nexusAny hints?

Best,
 Jan 

Mit freundlichen Grüßen / Best regards

Jan Engler
Central Research  Development

SICK AG
Erwin-Sick-Str. 1
79183 Waldkirch, Germany

Phone +49 7681 202-3214
mailto:jan.eng...@sick.de
http://www.sick.com





Von:Tim Kettler tim.kett...@udo.edu
An: Maven Users List users@maven.apache.org
Datum:  01.03.2013 09:49
Betreff:Re: Antwort: Re: Maven Shade Plugin



Am 01.03.2013 08:26, schrieb Jörg Schaible:
 Hi Tim,

 Tim Kettler wrote:

 Am 28.02.2013 19:47, schrieb Joachim Durchholz:
 Am 28.02.2013 16:24, schrieb Jan Engler:
 At first: in fact this is only one artifact. The full jar contains 
all
 classes of the dependecies, the api a reduced set (using filtern in 
the
 shade plugin).

 Is there a (conceivable) Maven build that uses api.jar as a 
dependency?
 Then it must be the main artifact at its GAV 
(groupId/artifact/version)
 coordinate.

 Is there a (conceivable) Maven build that uses full.jar as a 
dependency?
 Then it must be the main artifact at its GAV coordinate.

 If both jars need to be main artifacts, they need to go to different 
GAV
 coordinates. Because the dependent projects that need either api.jar 
or
 full.jar have no way of specifying which of them they actually need, 
the
 dependency section in their poms can only specify the GAV coordinate.

 That's not correct. The classifier is part of the artifact coordinates
 just like group, artifact(name) and version. A POM can just as well
 depend on a secondary artifact:

 dependency
   groupIdfoo/groupId
   artifactIdbar/artifactId
   version1.0/version
   classifierapi/classifier
 /dependency

 The complete coordinates of an artifact are GAVTC: group,
 artifact(name), version, type (default is jar), classifier (default is
 empty).

 That's not the real problem. What actually *is* a problem, if you depend 
on
 different artifacts that bring both jars as transitive dependencies - 
you
 cannot exclude e.g. the -api, because for exclusions you can only 
specify
 GA. :-/

Ouch, never ran into this one.

 - Jörg

-Tim


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


 
 
SICK AG - Sitz: Waldkirch i. Br. - Handelsregister: Freiburg i. Br. HRB 
280355 
Vorstand: Dr. Robert Bauer (Vorsitzender)  -  Reinhard Bösl  -  Dr. Martin 
Krämer  -  Markus Paschmann  -  Markus Vatter 
Aufsichtsrat: Gisela Sick (Ehrenvorsitzende) - Klaus M. Bukenberger 
(Vorsitzender) 


Antwort: Re: Re: Antwort: Re: Maven Shade Plugin

2013-03-01 Thread Jan Engler
Hmmm, I don't understand this. I will have an more or less empty jar in my 
nexus then, which is useless and there for no reason? For what reason does 
that file exists then?

Jan

Mit freundlichen Grüßen / Best regards

Jan Engler
Central Research  Development

SICK AG
Erwin-Sick-Str. 1
79183 Waldkirch, Germany

Phone +49 7681 202-3214
mailto:jan.eng...@sick.de
http://www.sick.com





Von:Wayne Fay wayne...@gmail.com
An: Maven Users List users@maven.apache.org
Datum:  01.03.2013 14:00
Betreff:Re: Re: Antwort: Re: Maven Shade Plugin



 working with a split-up build project seems to work. The only problem 
that
 I face in the moment is that there is not only my 2 shaded jars (api and
 api-sources) but also a file called original-api.jar. The content of
 this jar is only the meta-inf folder and I don't want this file to be
 placed in my nexusAny hints?

Yes, put it in Nexus even though you don't want to.

Wayne

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


 
 
SICK AG - Sitz: Waldkirch i. Br. - Handelsregister: Freiburg i. Br. HRB 
280355 
Vorstand: Dr. Robert Bauer (Vorsitzender)  -  Reinhard Bösl  -  Dr. Martin 
Krämer  -  Markus Paschmann  -  Markus Vatter 
Aufsichtsrat: Gisela Sick (Ehrenvorsitzende) - Klaus M. Bukenberger 
(Vorsitzender) 


Maven Shade Plugin

2013-02-28 Thread Jan Engler
 /
/manifest
manifestEntries
!-- keyvalue/key --
/manifestEntries
manifestFile /
pomPropertiesFile /
/archive
artifactSet
includes
include*:*/include
/includes
excludes
exclude
de.my.company:excludedArtifact/exclude
/excludes
/artifactSet
/configuration
/execution
/executions
/plugin

As you might have seen, I want to have 4 artifacts: api.jar, 
api-sources.jar, full.jar, full-sources.jar.
As this is my assembly project, I would like to have all modules built, 
before distributing. Therefore I inserted the modules. Now I need to have 
packaging:pom (and not packaging:jar) in the pom.xml. The artifacts (api, 
full + sources) are built correctly, but as pom instead of jar. 
outputFile does not do the trick, cause I need sources and normal jar 
separated.

 Can I override the packaging in the shade plugin? Any other hints?


Mit freundlichen Gr??en / Best regards

Jan Engler
Central Research  Development

SICK AG
Erwin-Sick-Str. 1
79183 Waldkirch, Germany

Phone +49 7681 202-3214
mailto:jan.eng...@sick.de
http://www.sick.com

 
 
SICK AG - Sitz: Waldkirch i. Br. - Handelsregister: Freiburg i. Br. HRB 
280355 
Vorstand: Dr. Robert Bauer (Vorsitzender)  -  Reinhard B?sl  -  Dr. Martin 
Kr?mer  -  Markus Paschmann  -  Markus Vatter 
Aufsichtsrat: Gisela Sick (Ehrenvorsitzende) - Klaus M. Bukenberger 
(Vorsitzender) 


Antwort: Re: Maven Shade Plugin

2013-02-28 Thread Jan Engler
Hi,

thanks for your help,

At first: in fact this is only one artifact. The full jar contains all 
classes of the dependecies, the api a reduced set (using filtern in the 
shade plugin). 
Even if I split that up into 2 projects, I cannot define modules then in 
the pom, right? I need to do s/t like that:
- Build up all modules (to be sure that everything is up to date)
- Build the shaded artifacts
- cross-compile them (using ikvm)
- put the artifact with some other stuff  (doc, examples, dlls, etc).into 
one zip (in fact three: windows, linux, mac) 
- deploy all artifacts into nexus (or maybe somewhere else using wagon)

Thanks again!
 Jan


Mit freundlichen Grüßen / Best regards

Jan Engler
Central Research  Development

SICK AG
Erwin-Sick-Str. 1
79183 Waldkirch, Germany

Phone +49 7681 202-3214
mailto:jan.eng...@sick.de
http://www.sick.com





Von:Joachim Durchholz j...@durchholz.org
An: users@maven.apache.org
Datum:  28.02.2013 15:38
Betreff:Re: Maven Shade Plugin



Am 28.02.2013 14:50, schrieb Jan Engler:
 As you might have seen, I want to have 4 artifacts: api.jar,
 api-sources.jar, full.jar, full-sources.jar.

Which of these are supposed to be used as dependencies in other projects?

Each project can supply exactly 1 artifact for dependent Maven builds.
Other software may make use of more artifacts, that's why 
foo-sources.jar is so commonplace - IDEs typically can use multiple 
artifacts, one for binaries, one for sources, one for javadoc. But only 
1 binaries artifact for inclusion in other projects via the 
dependencies, that's it.

This looks as if you need two projects, one that generates api.jar and 
api-sources.jar, and one that generates full.jar and full-sources.jar.

Hope this points you in the right direction.

Regards,
Jo

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


 
 
SICK AG - Sitz: Waldkirch i. Br. - Handelsregister: Freiburg i. Br. HRB 
280355 
Vorstand: Dr. Robert Bauer (Vorsitzender)  -  Reinhard Bösl  -  Dr. Martin 
Krämer  -  Markus Paschmann  -  Markus Vatter 
Aufsichtsrat: Gisela Sick (Ehrenvorsitzende) - Klaus M. Bukenberger 
(Vorsitzender) 


Re: Incremental build help

2012-10-05 Thread Jan
Currently i use buildforge with maven but i do execute them separately for
each module, means runs mvn clean install commands from each module. This
will basically cleans and compiles everything whether there is change or
not. Now i'm trying to make use of incremental build function, so i changed
to execute mvn install from parent project itself with the -amd option
when i did this even though change is only in Module C it still
did compilation on Module A  B. I can understand the compilation part of
Module D when there is a change in Module C but why A  B?. Should i use
incremental build instead of -amd option? Basically i just want to
compile only changed source code files not everything everytime.

On Fri, Oct 5, 2012 at 10:22 AM, Ron Wheeler rwhee...@artifact-software.com
 wrote:

 What have you tried and what did it do?
 Did you read up on multi-module builds to see how they are supposed to
 work and what you need to do to make it happen?

 Ron



 On 05/10/2012 10:56 AM, Jan wrote:

 Hi All,

 I'm trying to see is there any best way or process to do incremental build
 using maven?

 Basically i have multi module project like show below, when i run mvn with
 -amd command how maven will compile only changed files?

 For Eg lets say i have

 - Project A
| - Module-A
| - Module-B
| - Module-C
| - Module- D

 Dependency wise
 B - A,
 C - A,B
 D - A,B,C

 In this setup when run my root pom from Project a location i expect maven
 to identify only C Module is changed, so it will compile C  D. Will maven
 automatically finds which module code is updated or we have to pass the
 changed module as argument for build.

 Please help



 --
 Ron Wheeler
 President
 Artifact Software Inc
 email: rwhee...@artifact-software.com
 skype: ronaldmwheeler
 phone: 866-970-2435, ext 102


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




Writing site documenation with eclipse

2012-07-16 Thread Jan Torben Heuer
I'm starting to write documentation for my maven project. Which format 
(apt,xdoc,..?) and which editor is available for eclipse? The documentation 
is very code-centric so any tool that helps me refering to Class names (and 
even validates it) would be helpful.

Also, xDoc != XDoc, right?
https://github.com/RvonMassow/xDoc/blob/master/README.textile
http://maven.apache.org/doxia/references/xdoc-format.html


Cheers,

Jan



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



feedback on surefire issue?

2012-02-14 Thread Sievers, Jan
Hi,

about two weeks ago I reported surefire issue 
https://jira.codehaus.org/browse/SUREFIRE-825 with patch attached, no reaction 
so far.
I would appreciate some feedback from surefire developers if you think the 
issue is valid.

Thanks in advance,
Jan




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



ejb depedency problem

2012-01-06 Thread Jan
Hi All,

I'm having weird ejb dependency problem, can anyone help me with my
situation.

Here is my problem

I have multi module like

Root
   __   EJB Module
   __   JAR1 Module
   __   JAR2 Module
   __   Web

i have declared dependency as typeejb/type in my jar1  jar2 modules.
now when i tried to run maven compile goal from Root my comilation fails at
JAR1 module, when i looked at the classpath for JAR1 module its not loading
the EJBModule into its classpath. But when i run compile just from JAR1
Module it then my compilation is not failing.

So why this behave differently when run my owl project ie from root  vs
running on just one module ie from JAR1Module?

As i side note when i change my typejar/type at my root and take off
type declaration from my JAR module then everthing works perfectly either
from root or individual.


${project.parent.basedir} not working inside resources

2011-12-15 Thread Jan Bernhardt
Hello,

I can not figer out, how to get this working...

I would like to refer a config-file resource from a parent pom directory, but 
when I insert this code to my child pom file:

build
resources
   resource
 
directory${project.basedir}/src/main/resources/directory
 filteringtrue/filtering
   /resource
   resource
 
directory${project.parent.basedir}/src/main/config/directory
 filteringtrue/filtering
   /resource
/resources
...
/build


I get the following error message

[INFO] skip non existing resourceDirectory 
C:\Users\myname\workspace\parent\child\${project.parent.basedir}\src\main\config

For some reason I do not know, this property is not replaced with the expected 
value. Any ideas?

Kind regards
Jan



maven plexus bug

2011-12-05 Thread Sievers, Jan
Hi,

a week ago I opened http://jira.codehaus.org/browse/MNG-5206 , no reaction up 
to date.

Even if it's a won't fix, I would appreciate some feedback on this.

Best Regards,
Jan

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



Execution control for self developed maven plugins

2011-11-15 Thread Jan Bernhardt

Hi,

how can I ensure that resource filtering took place before my maven plugin is 
executed?

Background:
I wrote my own maven plugin. I used spring to wire my components together and 
set specific configuration parameters.
Now I would like to use maven properties in my spring-config.xml. I put my 
spring-config.xml into src/main/resources/ and used ${maven.property} 
placeholders.
In my plugin I now want to read the spring-config.xml which contains the values 
from my pom.xml file instead of my placeholders.
I used the following code to access this config file in my plugin:

/**
* @parameter expression=${spring.config} 
default-value=${project.build.outputDirectory}${file.separator}spring-config.xml
* @required
*/
private String config;


But because the target sources have not been generated yet, I get a 
FileNotFoundException when I try to read this config file.
I read something about an @execute Annotation which executes another plugin 
first, before executing the current plugin. But I don't know how to set it 
right, that filtering takes place before my plugin is executed. I tried, but it 
didn't work:

@execute goal=resources:resources

Kind regards
Jan


Jan Bernhardt, M.Sc., +49 (228) 76 37 76 - 15, Talend, global leader in Open 
Source Integration



[Description: sig_businesscard]http://www.talend.com/JANBER.vcf[Description: 
sig_direction]http://www.talend.com/open-source-provider/contacts.php[Description:
 sig_download]http://www.talend.com/download.php?src=EmailSignature

[Description: sig_talend]http://www.talend.com/





Re: where to put common dependecies in multi-module project

2011-10-24 Thread Jan Fredrik Wedén
If you actually use a dependency (in code) in a module, that dependency
should always be a direct dependency of the module, either declared in the
module itself or in a parent POM. From my experience, declaring dependencies
(not dependencyManagement) in parent POMs comes with some disadvantages, but
from your description it sounds like this approach is a good fit for you. In
my case we had to do a lot of excludes in packaging modules (like ears, zips
etc) before we changed to a more proper way of declaring dependencies.

As for the other alternative you mention. Even if you have control over all
the artifacts in the build, as you seem do in this case, relying on
transitive dependencies from the core module for stuff you actually use in
other modules is a bad approach. It does not express true intent, and
conceptually these dependencies should be direct, as stated above. Also it
leaves your other modules open for breakage if someone in the future
intentionally or accidentally changes the core module in a way you did not
anticipate.

On Mon, Oct 24, 2011 at 11:08, codingplayer roman.ce...@smartengine.atwrote:

 Hi Martin,

 thanks for your hint to the pluginManagement section.

 But actually, that is not exaclty what i want.
 Since i do not want to repeat defining each common dependency separately
 for
 each sub-module.

 This approach would be ideal, if i want to use this dependency in many
 sub-modules (but not all), so i could skip the definition in those
 sub-modules, where i do not need it.


 If a want to have a new common dependecy which shall be used for all
 sub-modules, i could simply add this dependency to the parent-pom, right?
 Why would i rather put in it each module individually, what would be the
 benefits?

 And why not put it into the core module (e.g. sandbox-core) , since all
 other sub-modules would use the core anyway?

 br
 R.C.

 --
 View this message in context:
 http://maven.40175.n5.nabble.com/where-to-put-common-dependecies-in-multi-module-project-tp4931654p4931809.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




-- 
- Jan Fredrik Wedén


maven 3 multi-module site

2010-11-19 Thread Sievers, Jan
Hi,

following 
http://maven.apache.org/plugins/maven-site-plugin-3.0-beta-3/maven-3.html I 
have been trying to generate mojo docs for the tycho project

https://github.com/sonatype/sonatype-tycho/blob/master/pom.xml .

which builds with maven 3.0.

I have added

build
plugins
plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-site-plugin/artifactId
  version3.0-beta-3/version
 configuration
reportPlugins
  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-plugin-plugin/artifactId
version2.5.1/version
  /plugin
/reportPlugins
  /configuration
/plugin

to the root pom.

When I do 'mvn site', mojo docs are generated fine for each maven-plugin module 
in target/site/plugin-info.html, but the root POM target/site/ folder is empty 
apart from standard css/ and images/ folders.
  
Maybe there is sth fundamental I am missing here?

Thanks for your help,
Jan



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



RE: maven 3 multi-module site

2010-11-17 Thread Sievers, Jan
I added 

plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-project-info-reports-plugin/artifactId
version2.2/version
  reportSets
reportSet
  reports
reportindex/report
  /reports
/reportSet
  /reportSets
/plugin 

to the reportPlugins section and now I get index.html files on module and root 
level.

Thanks,
Jan



-Original Message-
From: Andreas Sewe [mailto:s...@st.informatik.tu-darmstadt.de] 
Sent: Dienstag, 16. November 2010 17:34
To: Maven Users List
Subject: Re: maven 3  multi-module site

Hi Jan,

 I have added
 
 build
 plugins
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-site-plugin/artifactId
   version3.0-beta-3/version
  configuration
 reportPlugins
   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-plugin-plugin/artifactId
 version2.5.1/version
   /plugin
 /reportPlugins
   /configuration
 /plugin
 
 to the root pom.
 
 When I do 'mvn site', mojo docs are generated fine for each maven-plugin 
 module in target/site/plugin-info.html, but the root POM target/site/ folder 
 is empty apart from standard css/ and images/ folders.
   
 Maybe there is sth fundamental I am missing here?

I think you came across http://jira.codehaus.org/browse/MSITE-484. Try 
adding the m-project-info-reports-p as a reportPlugin as well.

I hope this helps.

Andreas

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



Fatal Error in Maven release plugin: java.lang.NoClassDefFoundError: org/jaxen/NamespaceContext

2010-09-16 Thread Jan Torben Heuer
Hi,

Any idea what could be the cause of this error when executing 'maven 
release:prepare' ?

[FATAL ERROR] org.apache.maven.plugins.release.PrepareReleaseMojo#execute() 
caused a linkage error (java.lang.NoClassDefFoundError) and may be out-of-
date. Check the realms:
[FATAL ERROR] Plugin realm = app0.child-
container[org.apache.maven.plugins:maven-release-plugin:2.0]
urls[0] = file:/home/jan/.m2/repository/org/apache/maven/plugins/maven-
release-plugin/2.0/maven-release-plugin-2.0.jar
urls[1] = file:/home/jan/.m2/repository/org/apache/maven/release/maven-
release-manager/2.0/maven-release-manager-2.0.jar
urls[2] = file:/home/jan/.m2/repository/org/codehaus/plexus/plexus-
utils/1.5.6/plexus-utils-1.5.6.jar
urls[3] = file:/home/jan/.m2/repository/org/apache/maven/shared/maven-
invoker/2.0.9/maven-invoker-2.0.9.jar
urls[4] = file:/home/jan/.m2/repository/commons-lang/commons-
lang/2.4/commons-lang-2.4.jar
urls[5] = file:/home/jan/.m2/repository/commons-cli/commons-cli/1.0/commons-
cli-1.0.jar
urls[6] = file:/home/jan/.m2/repository/commons-logging/commons-
logging/1.0/commons-logging-1.0.jar
urls[7] = file:/home/jan/.m2/repository/org/apache/maven/scm/maven-scm-
providers-standard/1.3/maven-scm-providers-standard-1.3.pom
urls[8] = file:/home/jan/.m2/repository/org/apache/maven/scm/maven-scm-
provider-accurev/1.3/maven-scm-provider-accurev-1.3.jar
urls[9] = file:/home/jan/.m2/repository/org/apache/maven/scm/maven-scm-
api/1.3/maven-scm-api-1.3.jar
urls[10] = file:/home/jan/.m2/repository/org/apache/maven/scm/maven-scm-
provider-bazaar/1.3/maven-scm-provider-bazaar-1.3.jar
urls[11] = file:/home/jan/.m2/repository/regexp/regexp/1.3/regexp-1.3.jar
urls[12] = file:/home/jan/.m2/repository/org/apache/maven/scm/maven-scm-
provider-clearcase/1.3/maven-scm-provider-clearcase-1.3.jar
urls[13] = file:/home/jan/.m2/repository/org/apache/maven/scm/maven-scm-
provider-cvsexe/1.3/maven-scm-provider-cvsexe-1.3.jar
urls[14] = file:/home/jan/.m2/repository/org/apache/maven/scm/maven-scm-
provider-cvs-commons/1.3/maven-scm-provider-cvs-commons-1.3.jar
urls[15] = file:/home/jan/.m2/repository/org/apache/maven/scm/maven-scm-
provider-cvsjava/1.3/maven-scm-provider-cvsjava-1.3.jar
urls[16] = 
file:/home/jan/.m2/repository/org/netbeans/lib/cvsclient/20060125/cvsclient-20060125.jar
urls[17] = file:/home/jan/.m2/repository/ch/ethz/ganymed/ganymed-
ssh2/build210/ganymed-ssh2-build210.jar
urls[18] = file:/home/jan/.m2/repository/org/apache/maven/scm/maven-scm-
provider-gitexe/1.3/maven-scm-provider-gitexe-1.3.jar
urls[19] = file:/home/jan/.m2/repository/org/apache/maven/scm/maven-scm-
provider-git-commons/1.3/maven-scm-provider-git-commons-1.3.jar
urls[20] = file:/home/jan/.m2/repository/org/apache/maven/scm/maven-scm-
provider-hg/1.3/maven-scm-provider-hg-1.3.jar
urls[21] = file:/home/jan/.m2/repository/org/apache/maven/scm/maven-scm-
provider-perforce/1.3/maven-scm-provider-perforce-1.3.jar
urls[22] = file:/home/jan/.m2/repository/org/apache/maven/scm/maven-scm-
provider-starteam/1.3/maven-scm-provider-starteam-1.3.jar
urls[23] = file:/home/jan/.m2/repository/org/apache/maven/scm/maven-scm-
provider-svnexe/1.3/maven-scm-provider-svnexe-1.3.jar
urls[24] = file:/home/jan/.m2/repository/org/apache/maven/scm/maven-scm-
provider-svn-commons/1.3/maven-scm-provider-svn-commons-1.3.jar
urls[25] = file:/home/jan/.m2/repository/org/apache/maven/scm/maven-scm-
provider-synergy/1.3/maven-scm-provider-synergy-1.3.jar
urls[26] = file:/home/jan/.m2/repository/org/apache/maven/scm/maven-scm-
provider-vss/1.3/maven-scm-provider-vss-1.3.jar
urls[27] = file:/home/jan/.m2/repository/org/apache/maven/scm/maven-scm-
provider-tfs/1.3/maven-scm-provider-tfs-1.3.jar
urls[28] = file:/home/jan/.m2/repository/org/apache/maven/scm/maven-scm-
manager-plexus/1.3/maven-scm-manager-plexus-1.3.jar
urls[29] = file:/home/jan/.m2/repository/org/jdom/jdom/1.1/jdom-1.1.jar
urls[30] = file:/home/jan/.m2/repository/jaxen/jaxen/1.1-beta-8/jaxen-1.1-
beta-8.jar
urls[31] = file:/home/jan/.m2/repository/jdom/jdom/1.0/jdom-1.0.jar
[FATAL ERROR] Container realm = plexus.core
urls[0] = file:/usr/share/maven2/lib/maven-debian-uber.jar
[INFO] 

[ERROR] FATAL ERROR
[INFO] 

[INFO] org/jaxen/NamespaceContext
org.jaxen.NamespaceContext
[INFO] 

[INFO] Trace
java.lang.NoClassDefFoundError: org/jaxen/NamespaceContext
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at org.jdom.xpath.XPath.newInstance(XPath.java:134)
at 
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.getDependencies(AbstractRewritePomsPhase.java:515)
at 
org.apache.maven.shared.release.phase.AbstractRewritePomsPhase.updateDomVersion(AbstractRewritePomsPhase.java:561

Can the javac message format be changed?

2010-07-14 Thread Jan T. Kim
Dear All,

is it possiible to change the format of error messages to that which the
standalone javac compiler produces? I haven't found anything on that in
the compiler:compile at maven.apache.org.

Sorry if this is a silly question, I'd verny much value pointers to the
relevant documentation.

Best regards, Jan
-- 
 +- Jan T. Kim ---+
 | email: j@uea.ac.uk |
 | WWW:   http://www.cmp.uea.ac.uk/people/jtk |
 *-=  hierarchical systems are for files, not for humans  =-*

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



Re: Can the javac message format be changed?

2010-07-14 Thread Jan T. Kim
On Wed, Jul 14, 2010 at 02:56:33PM +0100, Wayne Fay wrote:
  is it possiible to change the format of error messages to that which the
  standalone javac compiler produces? I haven't found anything on that in
  the compiler:compile at maven.apache.org.
 
 If you can find a way to do this with plain old Javac from the command
 line, then you can probably make it work in Maven.
 
 What is the command line equivalent javac  blah.java that you
 want to utilize?

the background of my question is that I'd like emacs to be able of jumping
to the source that caused the error. That has stopped working for me since
switching to Maven.

However, I've now managed to restorE that to a reasonable extent (I hope)
by adding an additional regular expression to the list that emacs uses
for parsing compilation errors by adding

(setq compilation-error-regexp-alist (cons '(^\\(\\[WARNING\\] 
\\)?\\(/[^:]+\\):\\[\\([0-9]+\\),\\([0-9]+\\)\\] 2 3 4) 
compilation-error-regexp-alist))

to my ~/.emacs startup file.

The maven compilation error messages don't contain any constant text that
one could easily use for matching with a regular expression, my regexp
above just relies on error messages starting with a forward slash (as part
of the absolute path to the source file) and that the line number is
separated from the file name by :[. So as a thought, perhaps a future
version of maven could change the format to contain a fixed, regexp-friendly
string -- or perhaps error message formats could become configurable via
pom settings.

Best regards, Jan
-- 
 +- Jan T. Kim ---+
 | email: j@uea.ac.uk |
 | WWW:   http://www.cmp.uea.ac.uk/people/jtk |
 *-=  hierarchical systems are for files, not for humans  =-*

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



Shade plugin: including system-scoped dependencies?

2010-07-09 Thread Jan T. Kim
Dear All,

is it possible to include system-scoped dependencies in a shaded jar?
My dependencies look like this:

dependency
  groupIdjboss-stuff/groupId
  artifactIdjbossall-client/artifactId
  version5.1/version
  scopesystem/scope
  systemPath${jbosshome}/client/jbossall-client.jar/systemPath
/dependency

I've tried adding

artifactSet
  includes
includejboss-stuff:*/include
  /includes
/artifactSet

but the contents of jbossall-client.jar still don't get included in the
shaded jar.

Am I just making a stupid mistake? Or are system-scoped dependencies
always excluded from shaded jars?

Best regards, Jan
-- 
 +- Jan T. Kim ---+
 | email: j@uea.ac.uk |
 | WWW:   http://www.cmp.uea.ac.uk/people/jtk |
 *-=  hierarchical systems are for files, not for humans  =-*

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



Re: Shade plugin: including system-scoped dependencies?

2010-07-09 Thread Jan T. Kim
On Fri, Jul 09, 2010 at 03:44:21PM +0100, J??rg Schaible wrote:
 Jan T. Kim wrote:
 
  Dear All,
  
  is it possible to include system-scoped dependencies in a shaded jar?
  My dependencies look like this:
  
  dependency
groupIdjboss-stuff/groupId
artifactIdjbossall-client/artifactId
version5.1/version
scopesystem/scope
systemPath${jbosshome}/client/jbossall-client.jar/systemPath
  /dependency
  
  I've tried adding
  
  artifactSet
includes
  includejboss-stuff:*/include
/includes
  /artifactSet
  
  but the contents of jbossall-client.jar still don't get included in the
  shaded jar.
  
  Am I just making a stupid mistake? Or are system-scoped dependencies
  always excluded from shaded jars?
 
 This jbossall-client.jar contains only a manifest, so what do you expect ?

That's a valid point -- I hadn't noticed that the jbossall-client file
is empty these days. Apologies for providing a bad example and thanks for
looking into this.

Not all jboss-stuff jars are empty, here's another example dependency:

dependency
  groupIdjboss-stuff/groupId
  artifactIdjnpserver/artifactId
  version5.1/version
  scopesystem/scope
  systemPath${jbosshome}/common/lib/jnpserver.jar/systemPath
/dependency

This time I checked that that's not an empty jar:

% jar tvf jnpserver.jar 
[...]
 0 Mon May 11 16:47:10 BST 2009 org/
 0 Mon May 11 16:47:10 BST 2009 org/jboss/
 0 Mon May 11 16:47:10 BST 2009 org/jboss/naming/
 0 Mon May 11 16:47:10 BST 2009 org/jnp/
 0 Mon May 11 16:47:10 BST 2009 org/jnp/client/
 0 Mon May 11 16:47:10 BST 2009 org/jnp/interfaces/
 0 Mon May 11 16:47:10 BST 2009 org/jnp/interfaces/java/
 0 Mon May 11 16:47:10 BST 2009 org/jnp/interfaces/jnp/
 0 Mon May 11 16:47:10 BST 2009 org/jnp/server/
  2792 Mon May 11 16:47:10 BST 2009 org/jboss/naming/BindingsInitializer.class
[...]

So I'm trying to get org/jboss/naming/BindingsInitializer.class etc. included
in the shaded jar.

As a bit of background, this is for a command line app. Currently, I've put
the jboss jars that that app depends on into the Class-Path entry in the
jar's manifest. Obviously, that works only as long as the absolute paths to
the jars are the same on all machines the app is used on. However, that's no
longer the case, so now I'm trying to get the jar to include the stuff it
depends on. If anyone has a suggestion for solving this in a more elegant
way, I'd be interested.

Best regards, Jan
-- 
 +- Jan T. Kim ---+
 | email: j@uea.ac.uk |
 | WWW:   http://www.cmp.uea.ac.uk/people/jtk |
 *-=  hierarchical systems are for files, not for humans  =-*

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



Re: Shade plugin: including system-scoped dependencies?

2010-07-09 Thread Jan T. Kim
On Fri, Jul 09, 2010 at 07:11:14PM +0100, Wayne Fay wrote:
   is it possible to include system-scoped dependencies in a shaded jar?
 
 Do not use system-scope in your builds, period.
 
  jar's manifest. Obviously, that works only as long as the absolute paths to
  the jars are the same on all machines the app is used on. However, that's no
  longer the case, so now I'm trying to get the jar to include the stuff it
  depends on. If anyone has a suggestion for solving this in a more elegant
  way, I'd be interested.
 
 Do not use system-scope. Install or deploy the jars into local Maven
 repos. Anything else is a hack.

Ok, it's a hack (in admitting that it's not elegant I had already sort
of agreed to that), but sometimes a hack that works is just what's needed
-- so I'm still interested in how to commit this hack.

As for installing the jars, yes, that's an option I sometimes use. It's
resulting in a growing collection of jars, along with a script that
runs ``mvn install:install-file ... -Dfile=jarfile'' on all these.
I think of that collection and script as a hack as well -- creating
copies of jars in a repository goes against my desire for normalisation
and non-redundancy.

The root of the trouble really is the lack of an indirection mechanism
that would allow building a host dependent component into Class-Path
entries in a jar manifest. The duplication of stuff (whether by installing
into repos or by building shaded jars) could be avoided if something
like

Class-Path: ${JBOSS_HOME}/common/lib/jnpserver.jar

was supported. So it seems to me that since the root of the problem is
not a maven issue, all attempts of using maven to address is are bound
to end up being hacks.

Best regards, Jan
-- 
 +- Jan T. Kim ---+
 | email: j@uea.ac.uk |
 | WWW:   http://www.cmp.uea.ac.uk/people/jtk |
 *-=  hierarchical systems are for files, not for humans  =-*

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



Shade plugin: dependency-reduced-pom.xml fails to validate

2010-07-06 Thread Jan T. Kim
Dear All,

I've consolidated dependencies in a multi-module project by putting them
all into a dependencyManagement element of the top-level pom.xml so that
dependencies the modules can be simplified. However ``mvn package''
now ends with an error in a module (called import) that's building a
shaded executable jar:

[INFO] Error creating shaded jar: Failed to validate POM for project 
isacrodi-proj:import at ./import/dependency-reduced-pom.xml

Running maven with the -e switch gives a stacktrace as expected but
I can't find anything in that to help me identify the problem. Adding
-X didn't flush out anything useful either.

I've restored the dependencies in import module to what they were before
tidying them up but the problem persists. Further, I found that mentioning
the dependencies in the top-level pom.xml causes the problem.

I'm rather mystified by the fact that the ./import/dependency-reduced-pom.xml
which is left after the build failure is identical to
./import/target/dependency-reduced-pom.xml after a successful build.
So the validation failure is not caused by anything in the
dependency-reduced-pom.xml as such, it appears to be caused by validating
dependency-reduced-pom.xml in the context of the parent pom.xml containing
the problematic dependencies in the dependencyManagement element.

A sample dependency in the top level pom.xml is:

dependency
  groupIdjboss-stuff/groupId
  artifactIdjbossall-client/artifactId
  version5.1/version
  scopesystem/scope
  systemPath${jbosshome}/client/jbossall-client.jar/systemPath
/dependency

In the dependency-reduced-pom.xml file, the jbosshome property is
expanded but otherwise the dependencies are the same.

I'd be grateful for any tips on this topic. Also, if you have any
advice on how to get more specific / meaningful messages on validation
problems out of maven, I'd be very interested -- stack traces seem like
a rather basic format of reporting validation errors, particularly if
there isn't even a line number or some other hint...

Best regards, Jan

P.S.: here's a sample stack trace:

[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error creating shaded 
jar: Failed to validate POM for project isacrodi-proj:import at 
/local/home/jtk/devel/isacrodi/trunk/import/dependency-reduced-pom.xml
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at 
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error creating 
shaded jar: Failed to validate POM for project isacrodi-proj:import at 
/local/home/jtk/devel/isacrodi/trunk/import/dependency-reduced-pom.xml
at 
org.apache.maven.plugins.shade.mojo.ShadeMojo.execute(ShadeMojo.java:489)
at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more
Caused by: org.apache.maven.project.InvalidProjectModelException: Failed to 
validate POM for project isacrodi-proj:import at 
/local/home/jtk/devel/isacrodi/trunk/import/dependency-reduced-pom.xml
at 
org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(DefaultMavenProjectBuilder.java:1077)
at 
org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:880

Multi-module project - how to use Assembly plugin to create zip file for different target platforms?

2010-06-01 Thread Vandaele, Jan
Hi,

 

I am using a multi-module java project with a root pom to create a zip
file with the assembly plugin. The zip file contains some 3rd party
platform-specific files (dll's for windows, dylib for mac, .so for
linux).

 

This works fine when using following instructions in the root pom:

 

  plugin

artifactIdmaven-assembly-plugin/artifactId

configuration

  appendAssemblyIdfalse/appendAssemblyId

  finalNamemyName/finalName

  descriptors

descriptorassembly.xml/descriptor

  /descriptors

/configuration

  /plugin

 

Maven is started from command line using mvn clean package
assembly:assembly

 

The resulting assembly (zip file) contains all the files that are
platform specific I would like to create a specific zip file for each
target platform, containing only the files for that platform. I could
use a specific assembly.xml file for each target platform, and add this
to the descriptors.

 

  descriptors

descriptorassemblyWin.xml/descriptor

descriptorassemblyMac.xml/descriptor

descriptorassemblyLinux.xml/descriptor

  /descriptors

 

This works, but I cannot specify the final name for each of the
descriptors. The 3 zip files have the same name, so only the last one is
available (the 2 other files are overwritten).

 

I tried specifying different executions for the assembly plugin, but
then I get an error that the assembly descriptors cannot be found.
Apparently this does not work in the root pom of a multi-module project.

[INFO]


[ERROR] BUILD ERROR

[INFO]


[INFO] Error reading assemblies: No assembly descriptors found.

 

  plugin

artifactIdmaven-assembly-plugin/artifactId

executions

  execution

idwin/id

configuration

  appendAssemblyIdfalse/appendAssemblyId

  finalNamemyNameWin/finalName

  descriptors

descriptorassemblyWin.xml/descriptor

  /descriptors

/configuration

  /execution

  execution

idmac/id

configuration

  appendAssemblyIdfalse/appendAssemblyId

  finalNamemyNameMac/finalName

  descriptors

descriptorassemblyMac.xml/descriptor

  /descriptors

/configuration

  /execution

/executions

  /plugin

 

Is there any possibility to have different zip file assemblies without
having to create different root pom's, so I don't need to recompile the
different packages over and over again?

 

Thanks,

 

Jan

 



DISCLAIMER:
Unless indicated otherwise, the information contained in this message is 
privileged and confidential, and is intended only for the use of the 
addressee(s) named above and others who have been specifically authorized to 
receive it. If you are not the intended recipient, you are hereby notified that 
any dissemination, distribution or copying of this message and/or attachments 
is strictly prohibited. The company accepts no liability for any damage caused 
by any virus transmitted by this email. Furthermore, the company does not 
warrant a proper and complete transmission of this information, nor does it 
accept liability for any delays. If you have received this message in error, 
please contact the sender and delete the message. Thank you.


RE: Multi-module project - how to use Assembly plugin to create zip file for different target platforms?

2010-06-01 Thread Vandaele, Jan
Hi Nick,

Thanks for your answer. That solved my problem.

Regards
Jan

-Original Message-
From: Nick Stolwijk [mailto:nick.stolw...@gmail.com] 
Sent: dinsdag 1 juni 2010 12:15
To: Maven Users List
Subject: Re: Multi-module project - how to use Assembly plugin to create
zip file for different target platforms?

You are specifying that the assembly id is not used in the name:

appendAssemblyIdfalse/appendAssemblyId

Set that to true (the default) and put an id in your descriptor files,
then all files will be created.

With regards,

Nick Stolwijk
~Java Developer~

IPROFS BV.
Claus Sluterweg 125
2012 WS Haarlem
http://www.iprofs.nl



On Tue, Jun 1, 2010 at 12:00 PM, Vandaele, Jan jan.vanda...@barco.com
wrote:
 appendAssemblyIdfalse/appendAssemblyId

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



DISCLAIMER:
Unless indicated otherwise, the information contained in this message is 
privileged and confidential, and is intended only for the use of the 
addressee(s) named above and others who have been specifically authorized to 
receive it. If you are not the intended recipient, you are hereby notified that 
any dissemination, distribution or copying of this message and/or attachments 
is strictly prohibited. The company accepts no liability for any damage caused 
by any virus transmitted by this email. Furthermore, the company does not 
warrant a proper and complete transmission of this information, nor does it 
accept liability for any delays. If you have received this message in error, 
please contact the sender and delete the message. Thank you.

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



How to do Buld and Deployment Different time

2010-05-06 Thread Jan
Hi All,

I've been using maven for sometime, but i always used it only for building
artifact and to deploy i used ant, but whenever someone asked me why not use
maven for both build and deploy to servers i couldn't really tell them why?

Here is my requirement we have different env like DEV,SIT,UAT and PROD and
now i use maven to build the code at DEV stream in clearcase, at the end of
successful compilation i create a ear using maven ear plugin create a ear
and store it some central location. for this i use a command mvn -e clean
package. After this whenever there is a request to deploy the ear file at
different times i take the ear file from this central location and deploy it
to different environment without rebuilding again, so for this purpose
initially i tried adding the my server related plugin at install phase then
tried running mvn -e clean install but whenever i did maven goes thru full
life cyle again like compiling,packaging again, but i didn't want on this
way i just want to take the ear file already created and just run that
install phase, i tried the same in different phase and tried to run just
that goal, but never got it working. so finally i decided my self that this
is not possible unless we want to go thru full lifecyle
(compile,package,deploy) every time, so moved to ant it was very easy with
ant. But time to time i do see lot of emails on this forum asking about
failure in deployments, is everyone is doing full lifecycle every time ? no
one just compile and package only one time then stage the artifact then
deploy it from there using maven? is there something i'm missing here ?

Any one has any thought on this?


Re: Release plugin and updating a release with some fixes

2010-05-05 Thread Jan Torben Heuer
Tim O'Brien wrote:

 mvn versions:set -DnewVersion=1.1-SNAPSHOT

Great and much simpler than I expected ;-)

Thanks (to both of you)

Jan
-- 
From address is valid until 01.06.2010


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



release plugin: Create new SNAPSHOT from release tag?

2010-04-30 Thread Jan Torben Heuer
Hi,
Using release:prepare, release:perform I successfully created a tag in svn. 
I now have to fix some bugs so I thought I should create a new branch from 
the svn tag. Is this the way to go?

So I created from 1.0-SNAPSHOT the svn tag 1.0 and have the working copy 
2.0-SNAPSHOT. To fix a bug i the old release I want to create the branch 
1.1-SNAPSHOT from the version 1.0.

How can I do this? It is a multi module project and I'd rather not fix all 
versions by hand...

Cheers,

Jan
-- 
From address is valid until 01.06.2010


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



Re: Release plugin and updating a release with some fixes

2010-04-30 Thread Jan Torben Heuer
Wendy Smoak wrote:

 If you find you need to make a fix, then you can branch from the tag
 -- in your case the version number on your branch might be
 1.5.1-SNAPSHOT.

How do I create a branch from a tag?
I have a:
2.0-SNAPSHOT (current /trunk/)
1.0 /tags/1.0/

and I want to have a /branch/1.1-SNAPSHOT.
It is a a multi module project so version numbers must be changed.

Jan
-- 
From address is valid until 01.06.2010

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



Re: Building standalone jars

2010-03-23 Thread Jan T. Kim
On Tue, Mar 23, 2010 at 04:38:32AM +, Ron Wheeler wrote:
 Everyone should be used to using Classes that are grouped into libraries.

yes -- that's what I require adding jars to my classpath for.

 Jan T. Kim wrote:
  Dear All,
 
  I need to build a standalone executable jar and have the following
  difficulties:
 
  * the app needs a bunch of classes from another module

 break the other module into a jar that contains the sharable classes and 
 an application that depends on that jar
  * the app needs classes provided by non-Maven jars

 Get Nexus and load the non-Maven, non-yours jars into your Maven 
 repository.
  This leads me to these questions:
 
  (1) How can I include classes from other modules in my jar?

Thanks to Wayne Fay for pointing out the shade plugin. It does this, but
I couldn't figure out how to set the classpath with the shade plugin.

 Build a jar with just the common classes.
  (2) How can I add arbitrary jars, in arbitrary directories, to my
Class-Path entry in my jar?

I've now managed this:

plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-jar-plugin/artifactId
  configuration
archive
  manifestEntries
Class-Path${libdir}/path/to/lib1.jar ${libdir}/path/to/lib2.jar 
... /Class-Path
Main-Classcanonical.name.of.MainClass/Main-Class
  /manifestEntries
/archive
  /configuration
/plugin

Before figuring out this, I tried declaring the lib?.jars using
dependencies with system scope but they did not get included in the
Class-Path entry in the jar's META-INF/MANIFEST.MF, even though I
did set manifestaddClasspathtrue/addClasspath/manifest --
any ideas why that didn't work?

 Use maven to define your dependencies as dependencies in your pom
  (1) has been my usual solution to the problem that classes cannot be
  provided by jars inside jars, but if it's possible to include the
  absolute paths to jars built by other modules that would probably be
  ok.
 

 Not a good idea. just declare your dependencies.
  (2) referencing those other jars by absolute path would be ok for
  my purpose.
 

 Use Maven to define your jars. Do not try to tell maven absolute paths.

I understand the sentiment of prefering to let Maven handle such
things, but that's not always practical or desirable. For my purpose
there's just no way how Maven (or anything else) could automagically
find libdir, so setting that as a property in the top-level pom.xml
or via an environment variable is quite reasonable.

  I guess my general question is: How do you build standalone executable
  jars that don't depend on other jars moving along with them?
 

 You create jars that include all of the dependencies that are required.

Please see above -- if system-scoped dependencies did produce the right
classpath entries I'd prefer to use them.

Best regards, Jan
-- 
 +- Jan T. Kim ---+
 | email: j@uea.ac.uk |
 | WWW:   http://www.cmp.uea.ac.uk/people/jtk |
 *-=  hierarchical systems are for files, not for humans  =-*

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



Building standalone jars

2010-03-22 Thread Jan T. Kim
Dear All,

I need to build a standalone executable jar and have the following
difficulties:

* the app needs a bunch of classes from another module

* the app needs classes provided by non-Maven jars

This leads me to these questions:

(1) How can I include classes from other modules in my jar?

(2) How can I add arbitrary jars, in arbitrary directories, to my
  Class-Path entry in my jar?

(1) has been my usual solution to the problem that classes cannot be
provided by jars inside jars, but if it's possible to include the
absolute paths to jars built by other modules that would probably be
ok.

(2) referencing those other jars by absolute path would be ok for
my purpose.

I guess my general question is: How do you build standalone executable
jars that don't depend on other jars moving along with them?

Best regards, Jan
-- 
 +- Jan T. Kim ---+
 | email: j@uea.ac.uk |
 | WWW:   http://www.cmp.uea.ac.uk/people/jtk |
 *-=  hierarchical systems are for files, not for humans  =-*

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



Add dependency to maven-compiler-plugin classpath

2010-01-20 Thread Jan-Kees van Andel
Hey,

In my project I have a dependency that I only want to have on my
compiler-plugin classpath, but not on my normal project classpath.

This is my code:
build
 ...
 plugins
   ...
   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-compiler-plugin/artifactId
 configuration
   verbosetrue/verbose
   compilerArguments
 s${basedir}/target/generated-sources/s
   /compilerArguments
 /configuration
 dependencies
   dependency
 groupIdmy.dependency.groupId/groupId
 artifactIdartifactId/artifactId
 version${parent.version}/version
 scopecompile/scope
   /dependency
 /dependencies
   /plugin
   ...
 /plugins
 ...
/build

When I run Maven with -X, I see the following output by the compiler plugin:
[INFO] [compiler:compile]
[DEBUG] Using compiler 'javac'.
[DEBUG] Source directories:
[C:\java\work\idea-9\...\buildergenerator\test\src\main\java]
[DEBUG] Classpath: [C:\java\work\idea-9\...\buildergenerator\test\target\classes
 
C:\java\maven-repo\nl\...\buildergenerator\buildergenerator-annotations\0.1-SNAPSHOT\buildergenerator-annotations-0.1-SNAPSHOT.jar
 C:\java\maven-repo\joda-time\joda-time\1.6\joda-time-1.6.jar]

When I add the same dependency as a project dependency, I see the
following output:
[INFO] [compiler:compile]
[DEBUG] Using compiler 'javac'.
[DEBUG] Source directories:
[C:\java\work\idea-9\...\buildergenerator\test\src\main\java]
[DEBUG] Classpath: [C:\java\work\idea-9\...\buildergenerator\test\target\classes
 
C:\java\maven-repo\nl\...\buildergenerator\buildergenerator-annotations\0.1-SNAPSHOT\buildergenerator-annotations-0.1-SNAPSHOT.jar
 
C:\java\maven-repo\nl\...\buildergenerator\buildergenerator-core\0.1-SNAPSHOT\buildergenerator-core-0.1-SNAPSHOT.jar
 C:\java\maven-repo\org\freemarker\freemarker\2.3.15\freemarker-2.3.15.jar
 C:\java\maven-repo\joda-time\joda-time\1.6\joda-time-1.6.jar]

As you can see, I have one more dependency on my compiler classpath
(buildergenerator-core-0.1-SNAPSHOT.jar).

For some reason, the plugin dependency is not added to the compiler classpath.

Is there a way to fix this? I've also tried to add a classpath
element to compilerArguments, but this had the effect of removing
all other dependencies from the classpath, which is of course also not
desirable.

Thanks ans regards,
Jan-Kees

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



Re: Add dependency to maven-compiler-plugin classpath

2010-01-20 Thread Jan-Kees van Andel
Allright, I should have provided a bit more context. Here it is:

I've written an APT annotation processor which generates builder
classes for immutable objects. Objects annotated with @Immutable are
processed by this annotation processor and code is generated
appropriately.

It used to contain only one module, containing both the annotations,
the processor class and a META-INF file to configure the processor...

The annoying thing of this was that the compiler auto-detects any
processors on the classpath and invokes them automatically. This is
something I don't want, so I decided to split it up into two parts:
- First a project with the annotations (the project that uses the
builder, needs to have the annotations on its classpath, since they
are in the source code).
- The other project contains the processor and its configuration. This
is not a compile dependency and I don't want it in my distribution.
It's a tool and I only want it on the classpath when compiling.

The reason not to use a project dependency with scope=provided is
because of my IDE's. On my project, we use both IntelliJ and RSA and I
don't want the processor project on the classpath, since it modifies
the build/make process in the IDE. This causes issues with build/make,
because the processor gets invoked by it, leading to duplicate class
kind of compiler errors, because it's trying to generate a class
that's already generated by the maven-compiler-plugin.

So, long story short (and also after cleaning up my own mind), it
looks like I need a provided dependency, but I don't want it to be
included in my eclipse/idea classpath. I hoped to achieve this by
using a plugin dependency, but maybe I can just as easy exclude it
from those plugins (eclipse:idea)...

Regards,
Jan-Kees


2010/1/20 Stephen Connolly stephen.alan.conno...@gmail.com:
 scope=provided

 2010/1/20 Jan-Kees van Andel jankeesvanan...@apache.org:
 Hey,

 In my project I have a dependency that I only want to have on my
 compiler-plugin classpath, but not on my normal project classpath.

 This is my code:
 build
  ...
  plugins
   ...
   plugin
     groupIdorg.apache.maven.plugins/groupId
     artifactIdmaven-compiler-plugin/artifactId
     configuration
       verbosetrue/verbose
       compilerArguments
         s${basedir}/target/generated-sources/s
       /compilerArguments
     /configuration
     dependencies
       dependency
         groupIdmy.dependency.groupId/groupId
         artifactIdartifactId/artifactId
         version${parent.version}/version
         scopecompile/scope
       /dependency
     /dependencies
   /plugin
   ...
  /plugins
  ...
 /build

 When I run Maven with -X, I see the following output by the compiler plugin:
 [INFO] [compiler:compile]
 [DEBUG] Using compiler 'javac'.
 [DEBUG] Source directories:
 [C:\java\work\idea-9\...\buildergenerator\test\src\main\java]
 [DEBUG] Classpath: 
 [C:\java\work\idea-9\...\buildergenerator\test\target\classes
  C:\java\maven-repo\nl\...\buildergenerator\buildergenerator-annotations\0.1-SNAPSHOT\buildergenerator-annotations-0.1-SNAPSHOT.jar
  C:\java\maven-repo\joda-time\joda-time\1.6\joda-time-1.6.jar]

 When I add the same dependency as a project dependency, I see the
 following output:
 [INFO] [compiler:compile]
 [DEBUG] Using compiler 'javac'.
 [DEBUG] Source directories:
 [C:\java\work\idea-9\...\buildergenerator\test\src\main\java]
 [DEBUG] Classpath: 
 [C:\java\work\idea-9\...\buildergenerator\test\target\classes
  C:\java\maven-repo\nl\...\buildergenerator\buildergenerator-annotations\0.1-SNAPSHOT\buildergenerator-annotations-0.1-SNAPSHOT.jar
  C:\java\maven-repo\nl\...\buildergenerator\buildergenerator-core\0.1-SNAPSHOT\buildergenerator-core-0.1-SNAPSHOT.jar
  C:\java\maven-repo\org\freemarker\freemarker\2.3.15\freemarker-2.3.15.jar
  C:\java\maven-repo\joda-time\joda-time\1.6\joda-time-1.6.jar]

 As you can see, I have one more dependency on my compiler classpath
 (buildergenerator-core-0.1-SNAPSHOT.jar).

 For some reason, the plugin dependency is not added to the compiler 
 classpath.

 Is there a way to fix this? I've also tried to add a classpath
 element to compilerArguments, but this had the effect of removing
 all other dependencies from the classpath, which is of course also not
 desirable.

 Thanks ans regards,
 Jan-Kees

 -
 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



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



weird error

2009-10-02 Thread Jan
Any one has any idea on below error, weird thing is same project works fine
if rerun it again, but the error keeps coming back, if i run this project
continuously


[INFO]

[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] Error building POM (may not be this project's POM).


Project ID: unknown:maven-clean-plugin
POM Location: Artifact [org.apache.maven.plugins:maven-clean-plugin:pom:2.2]

Reason: Failed to interpolate field: public static final java.lang.String
org.apache.maven.model.PluginExecution.DEFAULT_EXECUTION_ID on class:
org.apac
he.maven.model.PluginExecution for project unknown:maven-clean-plugin at
Artifact [org.apache.maven.plugins:maven-clean-plugin:pom:2.2]


[INFO]

[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Unable to build
project for plugin 'org.apache.maven.plugins:maven-clean-plugin': Failed to
inte
rpolate field: public static final java.lang.String
org.apache.maven.model.PluginExecution.DEFAULT_EXECUTION_ID on class:
org.apache.maven.model.PluginE
xecution for project unknown:maven-clean-plugin at Artifact
[org.apache.maven.plugins:maven-clean-plugin:pom:2.2]
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1557)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1851)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindLifecycleForPackaging(DefaultLifecycleExecutor.java:1311)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycleMappings(DefaultLifecycleExecutor.java:1275)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:534)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.InvalidPluginException: Unable to build
project for plugin 'org.apache.maven.plugins:maven-clean-plugin': Failed to
i
nterpolate field: public static final java.lang.String
org.apache.maven.model.PluginExecution.DEFAULT_EXECUTION_ID on class:
org.apache.maven.model.Plug
inExecution for project unknown:maven-clean-plugin at Artifact
[org.apache.maven.plugins:maven-clean-plugin:pom:2.2]
at
org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(DefaultPluginManager.java:293)
at
org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:205)
at
org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:184)
at
org.apache.maven.plugin.DefaultPluginManager.loadPluginDescriptor(DefaultPluginManager.java:1642)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1540)
... 19 more
Caused by: org.apache.maven.project.InvalidProjectModelException: Failed to
interpolate field: public static final java.lang.String org.apache.maven.mod
el.PluginExecution.DEFAULT_EXECUTION_ID on class:
org.apache.maven.model.PluginExecution for project
unknown:maven-clean-plugin at Artifact [org.apache.
maven.plugins:maven-clean-plugin:pom:2.2]
at
org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:884)
at
org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:255)
at
org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(DefaultPluginManager.java:277)
... 23 more
Caused by:

Overwrite an active by default profile in settings.xml

2009-10-01 Thread Jan Emmel
Hi!

In my local settings.xml i defined some profiles. One profile is set
activebydefaulttrue/activebydefault. This works fine. But if i
want to activate another profile with the -P CLI option the default
profile is still active and the default properties are used.

Is there any solution?

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



Re: Weird Error -CHILDREN_COMBINATION_MODE_ATTRIBUTE

2009-09-30 Thread Jan
I'm using maven 2.2.1

Problem is i don't fix any thing, i just keep running the same pom for few
times, then this error message goes away.

On Tue, Sep 29, 2009 at 11:26 PM, Brett Porter br...@apache.org wrote:

 Do you have a sample POM that illustrates it? I'm guessing a configuration
 element with an attribute?

 What version of Maven?


 On 30/09/2009, at 11:16 AM, Jan wrote:

  Hi All,

 I'm getting this weird error at some time, even without changing anything
 this error goes off after some time,

 Any one has any idea on this?


 [INFO]
 
 [ERROR] FATAL ERROR
 [INFO]
 
 [INFO] Error building POM (may not be this project's POM).


 Project ID: ProjectA.Admin:Web
 POM Location: C:\srcviews\RG_Myview\WEB\pom.xml

 Reason: Failed to interpolate field: public static final java.lang.String

 org.codehaus.plexus.util.xml.Xpp3Dom.CHILDREN_COMBINATION_MODE_ATTRIBUTE on
 class: org.codehaus.plexus.util.xml
 .Xpp3Dom for project ProjectA.Admin:Web at
 C:\srcviews\RG_Myview\WEB\pom.xml


 [INFO]
 
 [INFO] Trace
 org.apache.maven.reactor.MavenExecutionException: Failed to interpolate
 field: public static final java.lang.String
 org.codehaus.plexus.util.xml.Xpp3Dom.CHILDREN_COMBINATION_MODE_ATTRIB
 UTE on class: org.codehaus.plexus.util.xml.Xpp3Dom for project
 ProjectA.Admin:Web at C:\srcviews\RG_Myview\WEB\pom.xml
   at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:404)
   at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:272)
   at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
   at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
   at
 org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at

 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
   at

 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:615)
   at
 org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
   at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
   at
 org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
   at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
 Caused by: org.apache.maven.project.InvalidProjectModelException: Failed
 to
 interpolate field: public static final java.lang.String
 org.codehaus.plexus.util.xml.Xpp3Dom.CHILDREN_COMBINA
 TION_MODE_ATTRIBUTE on class: org.codehaus.plexus.util.xml.Xpp3Dom for
 project ProjectA.Admin:Web at C:\srcviews\RG_Myview\WEB\pom.xml
   at

 org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:884)
   at

 org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:508)
   at

 org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:200)
   at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:604)
   at
 org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:487)
   at
 org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:560)
   at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:391)
   ... 12 more
 Caused by:
 org.apache.maven.project.interpolation.ModelInterpolationException: Failed
 to interpolate field: public static final java.lang.String
 org.codehaus.plexus.util.xml.Xpp3Dom.CHI
 LDREN_COMBINATION_MODE_ATTRIBUTE on class:
 org.codehaus.plexus.util.xml.Xpp3Dom
   at

 org.apache.maven.project.interpolation.StringSearchModelInterpolator$InterpolateObjectAction.traverseObjectWithParents(StringSearchModelInterpolator.java:318)
   at

 org.apache.maven.project.interpolation.StringSearchModelInterpolator$InterpolateObjectAction.run(StringSearchModelInterpolator.java:135)
   at

 org.apache.maven.project.interpolation.StringSearchModelInterpolator$InterpolateObjectAction.run(StringSearchModelInterpolator.java:102)
   at
 java.security.AccessController.doPrivileged(AccessController.java:192)
   at

 org.apache.maven.project.interpolation.StringSearchModelInterpolator.interpolateObject(StringSearchModelInterpolator.java:80)
   at

 org.apache.maven.project.interpolation.StringSearchModelInterpolator.interpolate(StringSearchModelInterpolator.java:62)
   at

 org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(DefaultMavenProjectBuilder.java:990)
   at

 org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:880)
   ... 18 more
 Caused by: java.lang.IllegalAccessException: Field is final

Weird Error -CHILDREN_COMBINATION_MODE_ATTRIBUTE

2009-09-29 Thread Jan
Hi All,

I'm getting this weird error at some time, even without changing anything
this error goes off after some time,

Any one has any idea on this?


[INFO]

[ERROR] FATAL ERROR
[INFO]

[INFO] Error building POM (may not be this project's POM).


Project ID: ProjectA.Admin:Web
POM Location: C:\srcviews\RG_Myview\WEB\pom.xml

Reason: Failed to interpolate field: public static final java.lang.String
org.codehaus.plexus.util.xml.Xpp3Dom.CHILDREN_COMBINATION_MODE_ATTRIBUTE on
class: org.codehaus.plexus.util.xml
.Xpp3Dom for project ProjectA.Admin:Web at C:\srcviews\RG_Myview\WEB\pom.xml


[INFO]

[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Failed to interpolate
field: public static final java.lang.String
org.codehaus.plexus.util.xml.Xpp3Dom.CHILDREN_COMBINATION_MODE_ATTRIB
UTE on class: org.codehaus.plexus.util.xml.Xpp3Dom for project
ProjectA.Admin:Web at C:\srcviews\RG_Myview\WEB\pom.xml
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:404)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:272)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.project.InvalidProjectModelException: Failed to
interpolate field: public static final java.lang.String
org.codehaus.plexus.util.xml.Xpp3Dom.CHILDREN_COMBINA
TION_MODE_ATTRIBUTE on class: org.codehaus.plexus.util.xml.Xpp3Dom for
project ProjectA.Admin:Web at C:\srcviews\RG_Myview\WEB\pom.xml
at
org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:884)
at
org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:508)
at
org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:200)
at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:604)
at
org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:487)
at
org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:560)
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:391)
... 12 more
Caused by:
org.apache.maven.project.interpolation.ModelInterpolationException: Failed
to interpolate field: public static final java.lang.String
org.codehaus.plexus.util.xml.Xpp3Dom.CHI
LDREN_COMBINATION_MODE_ATTRIBUTE on class:
org.codehaus.plexus.util.xml.Xpp3Dom
at
org.apache.maven.project.interpolation.StringSearchModelInterpolator$InterpolateObjectAction.traverseObjectWithParents(StringSearchModelInterpolator.java:318)
at
org.apache.maven.project.interpolation.StringSearchModelInterpolator$InterpolateObjectAction.run(StringSearchModelInterpolator.java:135)
at
org.apache.maven.project.interpolation.StringSearchModelInterpolator$InterpolateObjectAction.run(StringSearchModelInterpolator.java:102)
at
java.security.AccessController.doPrivileged(AccessController.java:192)
at
org.apache.maven.project.interpolation.StringSearchModelInterpolator.interpolateObject(StringSearchModelInterpolator.java:80)
at
org.apache.maven.project.interpolation.StringSearchModelInterpolator.interpolate(StringSearchModelInterpolator.java:62)
at
org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(DefaultMavenProjectBuilder.java:990)
at
org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:880)
... 18 more
Caused by: java.lang.IllegalAccessException: Field is final
at
sun.reflect.UnsafeQualifiedStaticObjectFieldAccessorImpl.set(UnsafeQualifiedStaticObjectFieldAccessorImpl.java:77)
at java.lang.reflect.Field.set(Field.java:684)
at
org.apache.maven.project.interpolation.StringSearchModelInterpolator$InterpolateObjectAction.traverseObjectWithParents(StringSearchModelInterpolator.java:189)
... 25 more
[INFO]

[INFO] Total time:  1 

Profile activation based on JDK, how it works?

2009-09-25 Thread Jan
Hi All,

I was just wondering  about the following situation

I'm using maven 2.2.1 which requires jdk 1.5 to run, but my modules will
compile only with 1.4, so i used the 1.4 executable in my compiler plugin.

In this case if i create profile with the activation rule for jdk1.4/jdk
when this profile will get activated?

Any one had this situation


Pom Parent Version Properties

2009-09-24 Thread Jan
Hi All,

I have multimodule project so i defined a root pom which has entry like
project
modelVersion4.0.0/modelVersion
  groupIdAdmin/groupId
  artifactIdProjetA/artifactId
  version${releaseNumber}/version
.

modules
 modulemy-modA/module
modulemy-modB/module
modulemy-modC/module
modulemy-modD/module

then in child pom i refer my pom like

project
modelVersion4.0.0/modelVersion
parent
groupIdAdmin/groupId
artifactIdProjectA/artifactId
version${releaseNumber}/version
relativePath${basedir}/../pom.xml/relativePath
/parent


now when i run mvn -DreleaseNumber=55.0.0.0 clean install from the root
level everything works fine, it is parsing the ${releaseNumber}, but when i
just want to compile only my-modD its not working,${releaseNumber} is
notbeing parsed ie.  if i execute the same mvn command from the my-modD
folder directly its giving me an Error like


Downloading:
http://repo1.maven.org/maven2/Admin/ProjectA/${releaseNumber}/ProjectA-${releaseNumber}.pom
[DEBUG] Unable to locate resource in repository
org.apache.maven.wagon.ResourceDoesNotExistException: Unable to locate
resource in repository
at
org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData(LightweightHttpWagon.java:139)
at
org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
at
org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
at
org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(DefaultWagonManager.java:546)
at
org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:427)
at
org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:382)
at
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:216)
at
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:90)

:::
[INFO]

[ERROR] FATAL ERROR
[INFO]

[INFO] Failed to resolve artifact.

GroupId: Admin
ArtifactId: ProjectA
Version: ${releaseNumber}

Reason: Unable to download the artifact from any repository

  Admin:ProjectA:pom:${releaseNumber}

from the specified remote repositories:
  central (http://repo1.maven.org/maven2)



Is there any other ways to pass this version as a parameter or it has to be
hardcoded??

Please help


Re: m2eclipse+galileo: index issue? (solved)

2009-09-23 Thread Jan de Ruiter


tony_k wrote:
 
 ...
 
 so on a lark, i reinstalled galileo and then m2eclipse and this time let
 the updating indexes phase run to completion (it actually did take about
 a half hour) and then things seemed ok.
 
 ...
 
re-installing may not be necessary. I tried this:
Do in eclipse: window-show view-other-maven-maven indexes. One of the
indexes is: 
http://repo1.maven.org/maven2. 
right-click on this one, and try rebuild index. 
If that does not work, create a new index with the same address, and do a
rebuild of that. With me that worked, and I could remove the original one.
After this a restart of eclipse will NOT show the error anymore, and the add
dependency search function operates as it should. Problem solved.


-- 
View this message in context: 
http://n2.nabble.com/m2eclipse-galileo-index-issue-tp3165039p3699256.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



AW: Re: RE : AW: RE: AW: Re: AW: Re: Maven for Non-Java Projects

2009-08-18 Thread Jan Wedel
@ Vincent:

Great to hear that you can provide the patches.

Just for my understanding: Is is not possible to use Nexus because of 
the dynamic artifactID and Nexus being not eable to understand it? Or is 
it a general issue with the NAR plugin?

@ Jörg:

Could you please also post an excerpt of the demo-dll-project POM and 
how you specify different classifiers in the first place?

Thanks!

Jan

-Ursprüngliche Nachricht-
Von: Vincent Hardion [mailto:vincent.hard...@gmail.com] 
Gesendet: Dienstag, 18. August 2009 01:00
An: Maven Users List
Betreff: Re: RE : AW: RE: AW: Re: AW: Re: Maven for Non-Java Projects

Hi,

   - Are your patches applied in the trunk of the nar plugin ?

I'm not commiter on the CVS of Freehep. But as suggest Jan, I'll send  
you the patch from the last known version once I come back to my office.

   - Is the nar plugin works well also for other phase than compile  
 (for
 instance, test phase) ?

We didn't try yet the unit test with Cpp project maybe we'll use  
CppUnit. It's planned for Q4.
I know there are specials goals like nar-testCompile and nar-test but  
I can't tell you more.

Agree and it's quite pain with platform dependent languages such  
 C/C++
How do you cope with this problem ?

In fact, there are more than one variable in this problem. In C++, we  
have to think also with release/debug mode et static/shared linking  
for library.

We tried several solutions. The most integrated to maven should be to  
set the classifier field of pom used to  distinguish jdk.
But It doesn't work for 2 reasons :
Nar plugin doesn't support it all (I had more than patch it)
It breaks snapshot feature. The binaries are in the same deployment  
path with different timestamps.

So the workaround we choose contists to use a dynamic artifactId  
name with the OS name inner with a property.

We save lot of time of work but with the experience shows that this is  
not the best solution.
We can't longer use proxy manager like Nexus,  the BOM (import of  
version) is difficult and this won't be support longer by maven.
I think we could use the 1st solution by deploy artifacts after all  
compilation.

Best regards,

Vincent






Le 14 août 09 à 16:53, Rémy Sanlaville a écrit :

 Hi Vincent,

 Thanks for your interesting feedback.

 I have some more questions :
   - Are your patches applied in the trunk of the nar plugin ?

   - Is the nar plugin works well also for other phase than compile  
 (for
 instance, test phase) ? If yes, which unit test framework are you  
 using
 (CppUnit, CxxTest, googletest...) ?

  - In C++ with the same code, you need to build one binary for each
 platform. Worst, you need to build on each platform to generate the  
 good
 binary.
Agree and it's quite pain with platform dependent languages such  
 C/C++
How do you cope with this problem ?

 Rémy


-
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



AW: Re: AW: Re: RE : AW: RE: AW: Re: AW: Re: Maven for Non-Java Projects

2009-08-18 Thread Jan Wedel
So, you just have to include the DUMMY part, but the resulting file name 
does not include it?

Anyhow, as you have some experience in studying the code, what would you 
say how difficult is it to include a new compiler that is not currently 
supported by the nar? I read that NAR is using the ant cpptasks for 
calling the native compilers. Is it just adding a new xml entry 
somewhere or do I have to modify the plugin itself?

Thanks,

Jan


-Ursprüngliche Nachricht-
Von: Jörg Schaible [mailto:joerg.schai...@gmx.de] 
Gesendet: Dienstag, 18. August 2009 09:19
An: users@maven.apache.org
Betreff: Re: AW: Re: RE : AW: RE: AW: Re: AW: Re: Maven for Non-Java 
Projects

Hi Jan,

Jan Wedel wrote at Dienstag, 18. August 2009 08:52:

[snip]

 @ Jörg:
 
 Could you please also post an excerpt of the demo-dll-project POM 
and
 how you specify different classifiers in the first place?

 % 
project
  [...]
  groupIdcom.acme.demo/groupId
  artifactIddemo-dll/artifactId
  packagingnar/packaging
  [...]
plugin
  groupIdorg.freehep/groupId
  artifactIdfreehep-nar-plugin/artifactId
  configuration
runtimestatic/runtime
linker
  namemsvc/name
/linker
libraries
  library
typeshared/type
  /library
/libraries
c
  optimizespeed/optimize
/c
  /configuration
/plugin
  [...]
/project
 % 

So, actually we do not define the classifier, it is auto-generated by 
the
nar plugin based on the environment in use.

- Jörg


-
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



AW: Re: AW: Re: RE : AW: RE: AW: Re: AW: Re: Maven for Non-Java Projects

2009-08-18 Thread Jan Wedel
Hi Mark!

It's good to hear something from the original source of the plug-in. I 
am currently evaluating whether we are using maven for C projects or 
not. I tried your plug-in by using the helloworldexe project and 
immediately got a build failure ([INFO] NAR: Please specify Includes 
as part of Cpp, C or Fortran for x86.Windows.gcc.cpp.).

I know I changed the POM to gcc but it should also compile well.

No matter if you can help me with this issue or not, I can tell you some 
requirements for my company of which I am not sure if NAR already 
supports it or not and which you might implement if the latter is the 
case.

We want to build C project with embedded compilers such as gcc or IAR. 
The output could be a intel-hex file, e.g. or other microcontroller 
specific formats. We need to specify different compile settings for 
release, debug, test and factory-test e.g. That means using cpptest for 
test and specifying precompiler defines by using the pom configuration, 
if possible (e.g. USE_UART, USE_DISPLAY etc.). As part of the lifecycle, 
it would be nice if the deployment could mean to upload the binary to 
a microcontroller (which would be just a parametrizable call to an 
executable).

Maybe, you could give some comments or advises if its already possible 
or if it can be achieved by just changing configuration file etc.

Thanks,

Jan


-Ursprüngliche Nachricht-
Von: Donszelmann Mark [mailto:mark.donszelm...@gmail.com] 
Gesendet: Dienstag, 18. August 2009 09:44
An: Maven Users List
Betreff: Re: AW: Re: RE : AW: RE: AW: Re: AW: Re: Maven for Non-Java 
Projects

Hi

I am the original author of the freehep-nar-plugin. It was made at  
SLAC, Stanford Linear Accelerator Center,
when I worked there. In my current job, which terminates on september  
15, I hade no time to support this
and the other Native code related plugins.

I am planning to pick things up again middle of september. I would be  
interested in your lists of things that
fail to work with NAR, though I can think of a few myself. Any patches  
you have created can be applied if
they work fine for NAR.

I plan to build some good test cases, and some better examples so that  
things run out of the box.

Let me know

Regards
Mark Donszelmann


-
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



Building multiple projects without creating a single output file?

2009-08-17 Thread Jan Wedel
Hi,

 

one of Maven’s primary aims was to have one output file for one project
(as far as I can remember).  The question is, can I have some kind of
parent pom that invokes multiple sub pom and respectively their projects
to be build? E.g my project has a web application, a client applet, a
PHP application and whatever. All of them belong to one project. Is it
possible to trigger all project to be build without the need to package
all into a jar file which would not make much sense?

 

Thanks,

 

Jan




AW: Building multiple projects without creating a single output file?

2009-08-17 Thread Jan Wedel
Oh, yes! That's it. I've already read about it, but it's hard to 
remember all Maven terms and what they stand for. Maven is very powerful 
because of its abstraction but on the other hand hard to learn in the 
first place because of the very same reason.

Thanks,

Jan


-Ursprüngliche Nachricht-
Von: Lewis, Eric [mailto:eric.le...@ipi.ch] 
Gesendet: Montag, 17. August 2009 09:34
An: Maven Users List
Betreff: AW: Building multiple projects without creating a single output 
file?

Hi

Yes, normally you would do this by defining a project and several 
modules.

Best regards,
Eric 

 -Ursprüngliche Nachricht-
 Von: Jan Wedel [mailto:jan.we...@ettex.de] 
 Gesendet: Montag, 17. August 2009 09:30
 An: users@maven.apache.org
 Betreff: Building multiple projects without creating a single 
 output file?
 
 Hi,
 
  
 
 one of Maven's primary aims was to have one output file for 
 one project
 (as far as I can remember).  The question is, can I have some kind of
 parent pom that invokes multiple sub pom and respectively 
 their projects
 to be build? E.g my project has a web application, a client applet, a
 PHP application and whatever. All of them belong to one project. Is it
 possible to trigger all project to be build without the need 
 to package
 all into a jar file which would not make much sense?
 
  
 
 Thanks,
 
  
 
 Jan
 
 
 
-
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



Project and external file Deployment?

2009-08-14 Thread Jan Wedel
Hi,

 

I was just wondering how I can configure Maven to deploy a whole
project, e.g. a web application that needs other war files to also be
deployed on the server as well as probable configuration files. 

 

Is it possible to copy other projects jar/war files together with the
projects war into a web container e.g.? Image I have several web
applications that interact with each other but which are not contained
in a single war file. I could use maven to deploy each file separately.
But maybe there are 3rd party war files which I like to deploy together
with my files. Can I somehow specify files that belong to the project
that I like to be deployed?

 

Thanks,

 

Jan




AW: RE: AW: Re: AW: Re: Maven for Non-Java Projects

2009-08-14 Thread Jan Wedel
Hi,

I recently did not receive any Mails from the list..so I'm answering 
now.

Vincent, 

this sounds very interesting! Yesterday, I tried hours to compile the 
example program bundled with the nar plugin and got strange errors about 
not having specified any include files...but the project does not 
contain include files at all because its a hello world... I was really 
frustrated and almost gave up until I read your post. Could you probably 
provide your version with the applied patches or at least the patches 
themselves? This would be really helpful to get it working. I also need 
to apply some patches for enabling embedded support.

Rémy,

Do you also use it for Perl? Perl also uses a lot of libraries (.pm 
files e.g.)  and even perl make scripts sometimes. I couldn't find any 
maven plugin supporting perl projects. Do you have any idea if this is 
possible?

Jan

-Ursprüngliche Nachricht-
Von: Jan Wedel 
Gesendet: Dienstag, 11. August 2009 16:28
An: users@maven.apache.org
Betreff: AW: RE: AW: Re: AW: Re: Maven for Non-Java Projects

As stated before by John,

There is a PHP plugin. Moreover, I found a .NET plugin. For C, Fortran 
and C++, the NAR plugin can be used. The maven-native-plugin indeed 
seems to be discontinued and on the maven nar website, they say they 
created their plugin because the maven native plugin wasn't flexible 
enough.

As far as I can say, their procedure sound very interesting. They bundle 

Header and object files and POM in a zip file called .nar which can be 
used as any Java artifact in the repository.

Thats the theory. But I'd like to hear anybody who really used it, 
because most often, it's the small things that matter the most meaning 
that some small issues / missing features could have a drastic influence 

on the whole project workflow/ building process.


-Ursprüngliche Nachricht-
Von: Martin Gainty [mailto:mgai...@hotmail.com] 
Gesendet: Dienstag, 11. August 2009 15:37
An: users@maven.apache.org
Betreff: RE: AW: Re: AW: Re: Maven for Non-Java Projects


Since PHP,Python and even Perl (mod form or exe) are library or 
executable binaries
the only solution I can envision is to pass control to 
maven-antrun-plugin and have build.xml spawn some manner of make or c 
compiler for these modules

here is an example maven-antrun-plugin calling a build.xml with a 
specific target
http://maven.apache.org/plugins/maven-antrun-plugin/examples/classpaths.html

i would be interested in hearing other solutions 

*gruss*
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene 
Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede 
unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. 
Diese Nachricht dient lediglich dem Austausch von Informationen und 
entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten 
Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt 
uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas 
le destinataire prévu, nous te demandons avec bonté que pour satisfaire 
informez l'expéditeur. N'importe quelle diffusion non autorisée ou la 
copie de ceci est interdite. Ce message sert à l'information seulement 
et n'aura pas n'importe quel effet légalement obligatoire. Étant donné 
que les email peuvent facilement être sujets à la manipulation, nous ne 
pouvons accepter aucune responsabilité pour le contenu fourni.




 Date: Tue, 11 Aug 2009 13:34:02 +0200
 From: jan.we...@ettex.de
 To: users@maven.apache.org
 Subject: AW: Re: AW: Re: Maven for Non-Java Projects
 
 Thanks John! 
 
 But our aim is not to use Maven at any cost. We are searching for a 
tool 
 that can be used on many platforms and compilers.
 
 Sometime we have one project ported to different languages and 
sometimes 
 we have have a project that is composed of several sub-projects in 
 different languages.
 
 So, we are searching for a tool that can be triggered to build such a 
 heterogeneous project. So, still the question is: Does Maven provide 
 enough flexibility to support such a development environment as 
 explained? Either by existing plug-in or by providing the necessary 
 framework and structures to allow us writing own plugins.
 
 What I mean is, are there any limitation in maven that would prevent 
 writing and/or using native plugins while maintaining the terminology 
 and structure of artifacts, groups, dependencies, repositories etc. 
 together with C, Python and other languages.
 
 Thanks,
 
 Jan
 
 -Ursprüngliche Nachricht-
 Von: John Dunlap [mailto:john.dun...@exceter.com] 
 Gesendet: Dienstag, 11. August 2009 13:18
 An: Maven Users List
 Betreff: Re: AW: Re: Maven for Non-Java Projects
 
 You could always try using something like the maven exec-maven-plugin 
to 
 
 execute CMake (which supports generating project files

AW: Re: Project and external file Deployment?

2009-08-14 Thread Jan Wedel
Thanks, I think the Cargo plug-in looks quite like what I was looking 
for!

-Ursprüngliche Nachricht-
Von: Anders Hammar [mailto:and...@hammar.net] 
Gesendet: Freitag, 14. August 2009 12:51
An: Maven Users List
Betreff: Re: Project and external file Deployment?

Do you want to do this as part of your integration tests? Or is it for 
the
actual deployment (to prod servers)? In the latter case Maven would not 
be
the typical tool as it is a build tool.
In the first case there are several plugins, one being the generic cargo
plugin (http://cargo.codehaus.org/Maven2+plugin). But there are also 
server
specific ones. In general, to deploy other artifacts than the one from 
the
project at hands, they should be avalaible (already built) in a repo 
(such
as your corporate repo).

/Anders

On Fri, Aug 14, 2009 at 11:26, Jan Wedel jan.we...@ettex.de wrote:

 Hi,



 I was just wondering how I can configure Maven to deploy a whole
 project, e.g. a web application that needs other war files to also be
 deployed on the server as well as probable configuration files.



 Is it possible to copy other projects jar/war files together with the
 projects war into a web container e.g.? Image I have several web
 applications that interact with each other but which are not contained
 in a single war file. I could use maven to deploy each file 
separately.
 But maybe there are 3rd party war files which I like to deploy 
together
 with my files. Can I somehow specify files that belong to the project
 that I like to be deployed?



 Thanks,



 Jan






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



Broken by design

2009-08-14 Thread Jan Wedel
Hi,

while I was searching for a Perl plugin for maven, I found this link in 
interesting discussion:

http://fishbowl.pastiche.org/2007/12/20/maven_broken_by_design/

Since this is quite old, I guess this was already discussed on this 
list. I am interested if there are solutions for the mentioned problems.

At first maven looks like an attractive girl. But I've got a little idea 
that this girls is gonna get real bitchy once put a ring on her finger 
and live together.

What I'm trying to say is, the idea behind maven is promising. But maybe 
you end up dealing with maven repository and resolution issues as well 
as plugin version issues instead of working on your project. I can 
remember other colleagues telling my Damn, I spend the last day 
resolving a maven problem

I especially have concerns about the reliability and repeatability 
issues. Transitive resolving is a really helpful, but it would be nice 
if you could do it just once and then have everything on your internal 
repository, frozen within a version and not having maven touching it 
again... And if you need to reproduce an earlier version, you just need 
to check out that particular version and have everything together 
instead of maven starting to search for plugins again.

Any comment is appreciated!

Jan

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



AW: Re: Maven for Non-Java Projects

2009-08-11 Thread Jan Wedel
Thanks for your answers!

Where do you see most of the problems in including native compilers? I 
means, in general Maven already supports a highly abstract object model 
that does not have much in common with Java. So why is it complicated to 
integrate another compiler?


-Ursprüngliche Nachricht-
Von: Brett Randall [mailto:javabr...@gmail.com] 
Gesendet: Dienstag, 11. August 2009 02:11
An: Maven Users List
Betreff: Re: Maven for Non-Java Projects

On Mon, Aug 10, 2009 at 10:50 PM, David Hoffer dhoff...@gmail.com 
wrote:

 We are currently using it for flex in addition to java, for flex the 
builds
 work fine the only negative is the plugins that allow direct IDE
 integration
 are not as complete as they are for Java.

 Regarding C/C++ I have tried to use this in the past, I think I was 
using
 the nar plugin but can't be sure.  There were a couple of 
road-blocking
 bugs/missing-features that prevented us from using maven for these 
types of
 projects.  If I recall correctly the issues were that it did not have
 support for the new universal OSX binaries and on Windows you couldn't
 specify the compiler version.  I.e. it would use whatever MSVC version 
it
 found on the system, and we had to support multiple versions (this is
 probably true on other platforms as well).  You could probably modify 
the
 plugins when you find issues like these but I didn't go down that 
path.
 (This was a couple+ years ago so if these are kept current they may be
 fixed
 by now.)

 -Dave

 On Mon, Aug 10, 2009 at 5:58 AM, Jan Wedel jan.we...@ettex.de wrote:

  Hi there!
 
  I already searched google for some help but it seems that it's not
  really common to use Maven for non-Java projects.
 
  However, we plan to be platform and language-independent by 
supporting
  e.g. embedded Java, C, C++ and Python. The question is if it is 
feasible
  to use Maven for all projects?
  I found the maven-native-plugin and maven-nar-plugin but I'm not 
really
  sure if it supports everything that's needed. We are looking for a
  server-based central repository maintaining different projects and
  libraries in various languages.
 
  Can anybody who uses or used any of these or other plug-ins to 
support
  non-Java projects please respond with some comments, hints, 
suggestions,
  pro and cons etc. that might be helpful?
 
  Thanks a lot!
 
  Jan
 
  
-
  To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
  For additional commands, e-mail: users-h...@maven.apache.org
 
 


I haven't yet had much joy with Maven-plugins for building 
Windows-native
DLLs from C++ using the MSVC compiler, so if anyone would like to 
nominate
their favorite plugin there.  native-mave-plugin seems out-of date or 
not
maintained for latest MSVC compiler versions?

Brett



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



AW: Re: AW: Re: Maven for Non-Java Projects

2009-08-11 Thread Jan Wedel
Thanks John! 

But our aim is not to use Maven at any cost. We are searching for a tool 
that can be used on many platforms and compilers.

Sometime we have one project ported to different languages and sometimes 
we have have a project that is composed of several sub-projects in 
different languages.

So, we are searching for a tool that can be triggered to build such a 
heterogeneous project. So, still the question is: Does Maven provide 
enough flexibility to support such a development environment as 
explained? Either by existing plug-in or by providing the necessary 
framework and structures to allow us writing own plugins.

What I mean is, are there any limitation in maven that would prevent 
writing and/or using native plugins while maintaining the terminology 
and structure of artifacts, groups, dependencies, repositories etc. 
together with C, Python and other languages.

Thanks,

Jan

-Ursprüngliche Nachricht-
Von: John Dunlap [mailto:john.dun...@exceter.com] 
Gesendet: Dienstag, 11. August 2009 13:18
An: Maven Users List
Betreff: Re: AW: Re: Maven for Non-Java Projects

You could always try using something like the maven exec-maven-plugin to 

execute CMake (which supports generating project files for VS, XCode, 
and GCC from a common text file on Mac, Windows, and Linux).
http://www.cmake.org/

Jan Wedel wrote:
 Thanks for your answers!

 Where do you see most of the problems in including native compilers? I 

 means, in general Maven already supports a highly abstract object 
model 
 that does not have much in common with Java. So why is it complicated 
to 
 integrate another compiler?


 -Ursprüngliche Nachricht-
 Von: Brett Randall [mailto:javabr...@gmail.com] 
 Gesendet: Dienstag, 11. August 2009 02:11
 An: Maven Users List
 Betreff: Re: Maven for Non-Java Projects

 On Mon, Aug 10, 2009 at 10:50 PM, David Hoffer dhoff...@gmail.com 
 wrote:

   
 We are currently using it for flex in addition to java, for flex the 
 
 builds
   
 work fine the only negative is the plugins that allow direct IDE
 integration
 are not as complete as they are for Java.

 Regarding C/C++ I have tried to use this in the past, I think I was 
 
 using
   
 the nar plugin but can't be sure.  There were a couple of 
 
 road-blocking
   
 bugs/missing-features that prevented us from using maven for these 
 
 types of
   
 projects.  If I recall correctly the issues were that it did not have
 support for the new universal OSX binaries and on Windows you 
couldn't
 specify the compiler version.  I.e. it would use whatever MSVC 
version 
 
 it
   
 found on the system, and we had to support multiple versions (this is
 probably true on other platforms as well).  You could probably modify 

 
 the
   
 plugins when you find issues like these but I didn't go down that 
 
 path.
   
 (This was a couple+ years ago so if these are kept current they may 
be
 fixed
 by now.)

 -Dave

 On Mon, Aug 10, 2009 at 5:58 AM, Jan Wedel jan.we...@ettex.de 
wrote:

 
 Hi there!

 I already searched google for some help but it seems that it's not
 really common to use Maven for non-Java projects.

 However, we plan to be platform and language-independent by 
   
 supporting
   
 e.g. embedded Java, C, C++ and Python. The question is if it is 
   
 feasible
   
 to use Maven for all projects?
 I found the maven-native-plugin and maven-nar-plugin but I'm not 
   
 really
   
 sure if it supports everything that's needed. We are looking for a
 server-based central repository maintaining different projects and
 libraries in various languages.

 Can anybody who uses or used any of these or other plug-ins to 
   
 support
   
 non-Java projects please respond with some comments, hints, 
   
 suggestions,
   
 pro and cons etc. that might be helpful?

 Thanks a lot!

 Jan


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


   

 I haven't yet had much joy with Maven-plugins for building 
 Windows-native
 DLLs from C++ using the MSVC compiler, so if anyone would like to 
 nominate
 their favorite plugin there.  native-mave-plugin seems out-of date or 
 not
 maintained for latest MSVC compiler versions?

 Brett



 -
 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




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



AW: RE: AW: Re: AW: Re: Maven for Non-Java Projects

2009-08-11 Thread Jan Wedel
As stated before by John,

There is a PHP plugin. Moreover, I found a .NET plugin. For C, Fortran 
and C++, the NAR plugin can be used. The maven-native-plugin indeed 
seems to be discontinued and on the maven nar website, they say they 
created their plugin because the maven native plugin wasn't flexible 
enough.

As far as I can say, their procedure sound very interesting. They bundle 
Header and object files and POM in a zip file called .nar which can be 
used as any Java artifact in the repository.

Thats the theory. But I'd like to hear anybody who really used it, 
because most often, it's the small things that matter the most meaning 
that some small issues / missing features could have a drastic influence 
on the whole project workflow/ building process.


-Ursprüngliche Nachricht-
Von: Martin Gainty [mailto:mgai...@hotmail.com] 
Gesendet: Dienstag, 11. August 2009 15:37
An: users@maven.apache.org
Betreff: RE: AW: Re: AW: Re: Maven for Non-Java Projects


Since PHP,Python and even Perl (mod form or exe) are library or 
executable binaries
the only solution I can envision is to pass control to 
maven-antrun-plugin and have build.xml spawn some manner of make or c 
compiler for these modules

here is an example maven-antrun-plugin calling a build.xml with a 
specific target
http://maven.apache.org/plugins/maven-antrun-plugin/examples/classpaths.html

i would be interested in hearing other solutions 

*gruss*
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene 
Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede 
unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. 
Diese Nachricht dient lediglich dem Austausch von Informationen und 
entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten 
Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt 
uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas 
le destinataire prévu, nous te demandons avec bonté que pour satisfaire 
informez l'expéditeur. N'importe quelle diffusion non autorisée ou la 
copie de ceci est interdite. Ce message sert à l'information seulement 
et n'aura pas n'importe quel effet légalement obligatoire. Étant donné 
que les email peuvent facilement être sujets à la manipulation, nous ne 
pouvons accepter aucune responsabilité pour le contenu fourni.




 Date: Tue, 11 Aug 2009 13:34:02 +0200
 From: jan.we...@ettex.de
 To: users@maven.apache.org
 Subject: AW: Re: AW: Re: Maven for Non-Java Projects
 
 Thanks John! 
 
 But our aim is not to use Maven at any cost. We are searching for a 
tool 
 that can be used on many platforms and compilers.
 
 Sometime we have one project ported to different languages and 
sometimes 
 we have have a project that is composed of several sub-projects in 
 different languages.
 
 So, we are searching for a tool that can be triggered to build such a 
 heterogeneous project. So, still the question is: Does Maven provide 
 enough flexibility to support such a development environment as 
 explained? Either by existing plug-in or by providing the necessary 
 framework and structures to allow us writing own plugins.
 
 What I mean is, are there any limitation in maven that would prevent 
 writing and/or using native plugins while maintaining the terminology 
 and structure of artifacts, groups, dependencies, repositories etc. 
 together with C, Python and other languages.
 
 Thanks,
 
 Jan
 
 -Ursprüngliche Nachricht-
 Von: John Dunlap [mailto:john.dun...@exceter.com] 
 Gesendet: Dienstag, 11. August 2009 13:18
 An: Maven Users List
 Betreff: Re: AW: Re: Maven for Non-Java Projects
 
 You could always try using something like the maven exec-maven-plugin 
to 
 
 execute CMake (which supports generating project files for VS, XCode, 
 and GCC from a common text file on Mac, Windows, and Linux).
 http://www.cmake.org/
 
 Jan Wedel wrote:
  Thanks for your answers!
 
  Where do you see most of the problems in including native compilers? 
I 
 
  means, in general Maven already supports a highly abstract object 
 model 
  that does not have much in common with Java. So why is it 
complicated 
 to 
  integrate another compiler?
 
 
  -Ursprüngliche Nachricht-
  Von: Brett Randall [mailto:javabr...@gmail.com] 
  Gesendet: Dienstag, 11. August 2009 02:11
  An: Maven Users List
  Betreff: Re: Maven for Non-Java Projects
 
  On Mon, Aug 10, 2009 at 10:50 PM, David Hoffer dhoff...@gmail.com 
  wrote:
 

  We are currently using it for flex in addition to java, for flex 
the 
  
  builds

  work fine the only negative is the plugins that allow direct IDE
  integration
  are not as complete as they are for Java.
 
  Regarding C/C++ I have tried to use this in the past, I think I was 

  
  using

  the nar plugin but can't be sure.  There were

Maven for Non-Java Projects

2009-08-10 Thread Jan Wedel
Hi there!

I already searched google for some help but it seems that it's not 
really common to use Maven for non-Java projects.

However, we plan to be platform and language-independent by supporting 
e.g. embedded Java, C, C++ and Python. The question is if it is feasible 
to use Maven for all projects?
I found the maven-native-plugin and maven-nar-plugin but I'm not really 
sure if it supports everything that's needed. We are looking for a 
server-based central repository maintaining different projects and 
libraries in various languages.

Can anybody who uses or used any of these or other plug-ins to support 
non-Java projects please respond with some comments, hints, suggestions, 
pro and cons etc. that might be helpful?

Thanks a lot!

Jan

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



Re: error with maven-metadata-Agile Java.xml

2009-07-14 Thread Jan Koen Annot

Yesterday, I observed the same error in the maven-metadata-agilejava.xml file
of the maven-checkstyle-plugin and maven-surefire-report-plugin.
My work around was to edit the file and change the two lines


 meta http-equiv=content-type content=text/html; charset=iso-8859-1
 meta name=generator content=HAPedit 3.1
 
to


 meta http-equiv=content-type content=text/html; charset=iso-8859-1/
 meta name=generator content=HAPedit 3.1/
 
(so I simply changed the closing  to a closing /).

Of course this is not a real solution...
Today I encountered the same error on a system where I do not have write
permission in the .m2 directory, so I am stuck...

Further help is very welcome.


fachhoch wrote:
 
 All of a sudden I started getting this error
 
 Error message: Unable to get dependency information: Unable to read local
 copy of metadata: Cannot read metadata from 'C:\Documents and
 Settings\sairamm\.m2\repository\commons-collections\commons-collections\maven-metadata-Agile
 Java.xml': end tag name /head must be the same as start tag meta from
 line 6 (position: TEXT seen ...h;width:100%;
 margin-left:10px;text-align:left}\r\n/style\r\n/head... @27:8)
   commons-collections:commons-collections:jar:null
 
 
 Root error message: end tag name /head must be the same as start tag
 meta from line 6 (position: TEXT seen ...h;width:100%;
 margin-left:10px;text-align:left}\r\n/style\r\n/head... @27:8)
 
 Please help how can I resolve this.
 
 

-- 
View this message in context: 
http://www.nabble.com/error-with-maven-metadata-Agile-Java.xml-tp24463840p24476303.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: error with maven-metadata-Agile Java.xml

2009-07-14 Thread Jan Koen Annot

I found that the agilejava plugin repository web site
http://agilejava.com/maven/ is down.
The html error message returned by web hosting company lunarpages is stored
into the xml file maven-metadata-agilejava.xml and appears to be incorrect
xml.

I disabled this plugin repository by adding the following code to my own
pom.xml:

pluginRepositories
pluginRepository
!-- this plugin repository was disabled, as its 
website was down. --
idagilejava/id
urlhttp://agilejava.com/maven//url
snapshots
enabledfalse/enabled
/snapshots
releases
enabledfalse/enabled
/releases
/pluginRepository
/pluginRepositories

-- 
View this message in context: 
http://www.nabble.com/error-with-maven-metadata-Agile-Java.xml-tp24463840p24479206.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



Properties from setting.xml are not populated in parent pom

2009-04-30 Thread Ackermann, Jan Florian
Hi 

I have a problem with populating properties wich are set in my settings.xml in 
my home directory.

So i have a parent pom, a child pom and the properties that look like:

settings.xml

properties
artifact-version7.1/artifact-version
/properties


parent pom.

dependency
groupIdid.group/groupId
artifactIdartifactName/artifactId
version${artifact-version}/version
/dependency

child pom
parent
groupIdid.someOtherGroup/groupId
artifactIdparentpom/artifactId
version1/version
/parent

So if i try to build the child project i get this error message

Downloading: 
http://some.repository/id/group/artifactName/${artifact-version}/artifactName-${artifact-version}.pom
[INFO] Unable to find resource 'id.group:artifactName:pom:${artifact-version}' 
in repository SomeRepo (Repo URL)

Same error for the try to download the jar file from this project.

If i use mvn help:effective-pom the correct values (in this case 7.1) is shown 
there.
If these artifacts are present in my local repository the build will succed, 
but if  i delete the artifact from the localrepository it will not be 
downloaded again except for the case i replace the property with the actual 
value in the parent pom.

Does someone has an idea of why this happens?

Geschaeftsfuehrung/Management Board: Heinz-Josef Boeck (Vorsitzender/CEO),  Dr. 
Dirk Toepfer, Dr. Gerd Wolfram
Sitz Duesseldorf, Amtsgericht Duesseldorf, HRB 18232/Commercial Register of the 
Duesseldorf Local Court, HRB 18232 

This e-mail message is intended exclusively for the addressee. If the e-mail 
was sent to you by mistake, would you please call us immediately? In this case, 
we also request you to destroy the e-mail and to neither use the content nor 
disclose them in any manner to third parties, because the message can contain 
confidential information which may be protected by professional secrecy.

Re: Is there a way to exclude a inherited dependency?

2009-04-30 Thread Jan Torben Heuer
David Hoffer wrote:

 I have a similar use case.  In a multi-module build all but two of the
 modules have the same base dependency so they are specified in the parent
 pom.  However I really don't want those dependencies in the two modules,
 so how can I exclude them?

I'd go another way: Create some kind of project-commons artifact and 
depend on it. If many artifacts share the same dependency, there is often 
more redundant code that can be refactored this way and makes the whole code 
cleaner.

Cheers,

Jan



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



mvn deploy puts snapshots into releases directory

2009-04-28 Thread Jan Torben Heuer
Hi,

When I deploy my artifact (version 1.0-SNAPSHOT), maven puts it in the 
/releases directory although I set up both, repository and 
snapshotrepository in the parent pom:

distributionManagement
repository
idftp/id
urlftp://.../mvn-repository/releases/url
/repository

snapshotRepository
idftp-snaphots/id
nameifgi-ftp (snapshots)/name
urlftp://.../snapshots/url
/snapshotRepository
/distributionManagement

How does maven decide where to upload the artifact to?

Cheers,

Jan



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



Renaming Folder while creating project from archetype

2009-04-09 Thread Ackermann, Jan Florian
Hello,
 
I'm quite new to Maven and facing the a problem with the creation of projects 
from a (selfmade) archetype.
 
There are not much files within the archetype and the creatinion works fine but
i wonder if there is any possibility to rename folders while creating the 
project.
E.g.:
 
Folder structure within the created project:
 
projectArtifactId
|__src/main
   |___webapp
  |___WEB-INF
  |   |application
  |___application
 
Is there a way to create the project with the application folder 
automatically renamed to projectArtifactId?
Maybe someone has antoher idea how to solve this problem then let me know.
At the moment I think about placing a build.xml within the root of the project 
that contains an ant task
for renaming the the folders but the my main target is to only use maven is 
possible.


 
 
Mit freundlichen Grüßen/Best regards

Jan Florian Ackermann



Geschaeftsfuehrung/Management Board: Heinz-Josef Boeck (Vorsitzender/CEO),  Dr. 
Dirk Toepfer, Dr. Gerd Wolfram
Sitz Duesseldorf, Amtsgericht Duesseldorf, HRB 18232/Commercial Register of the 
Duesseldorf Local Court, HRB 18232 

This e-mail message is intended exclusively for the addressee. If the e-mail 
was sent to you by mistake, would you please call us immediately? In this case, 
we also request you to destroy the e-mail and to neither use the content nor 
disclose them in any manner to third parties, because the message can contain 
confidential information which may be protected by professional secrecy.

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



Deploy on shared internal repository

2009-02-16 Thread Jan Chodura

Hi,

can you help me what's wrong with my configuration for deploying app to 
JFrog artifactory?


On jfrog artifactory I have repository myAppsRepository.
I use eclipse 3.4 (but on the command line it's the same problem), maven 
2.0.9


settings.xml
settings
 servers
   server
 idmyRemoteRepository/id
 usernameuser/username
 passwordpassword/password
 /server
   /servers
/settings

pom.xml contains
repositories
   repository
   idiBbRepository/id
   url
   http://somewhere:8081/artifactory/myAppsRepository
   /url
   /repository
   /repositories

and

   distributionManagement
   repository
   idmyRemoteRepository/id
   nameRapper/name
   urlhttp://somewhere:8081/artifactory/myAppsRepository/url
   /repository
  /distributionManagement

And there is stacktrace:
[DEBUG] Configuring mojo 
'org.apache.maven.plugins:maven-deploy-plugin:2.4:deploy' --

[DEBUG]   (f) artifact = cz.billboard:myApp:war:0.0.1
[DEBUG]   (f) attachedArtifacts = []
[DEBUG]   (f) deploymentRepository = [myRemoteRepository] - 
http://somewhere:8081/artifactory/myAppsRepository
[DEBUG]   (s) localRepository = [local] - file://C:\Documents and 
Settings\jach\.m2\repository

[DEBUG]   (f) packaging = war
[DEBUG]   (f) pomFile = C:\data\eclipse\projects\Application\pom.xml
[DEBUG]   (f) skip = false
[DEBUG]   (f) updateReleaseInfo = false
[DEBUG] -- end configuration --
[INFO] [deploy:deploy]
Uploading: 
http://somewhere:8081/artifactory/myAppsRepository/cz/billboard//myApp/0.0.1/myApp-0.0.1.war

31394K uploaded
[INFO] 


[ERROR] BUILD ERROR
[INFO] 


[INFO] Error deploying artifact: Error transferring file

Error writing to server
[INFO] 


[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error deploying 
artifact: Error transferring file
   at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:583)
   at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
   at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
   at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
   at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
   at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)

   at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
   at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
   at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
   at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
   at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
   at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error 
deploying artifact: Error transferring file
   at 
org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:195)
   at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
   at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)

   ... 16 more
Caused by: 
org.apache.maven.artifact.deployer.ArtifactDeploymentException: Error 
deploying artifact: Error transferring file
   at 
org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:94)
   at 
org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:173)

   ... 18 more
Caused by: org.apache.maven.wagon.TransferFailedException: Error 
transferring file
   at 
org.apache.maven.wagon.providers.http.LightweightHttpWagon.put(LightweightHttpWagon.java:178)
   at 
org.apache.maven.artifact.manager.DefaultWagonManager.putRemoteFile(DefaultWagonManager.java:244)
   at 
org.apache.maven.artifact.manager.DefaultWagonManager.putArtifact(DefaultWagonManager.java:160)
   at 
org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:80)

   ... 19 more
Caused by: java.io.IOException: Error writing to server
   at 
sun.net.www.protocol.http.HttpURLConnection.writeRequests(HttpURLConnection.java:453)
   at 

Obfuscation of several artifacts with Proguard

2009-02-05 Thread Jan Schoppenhorst

Hi,

we have a main application with plugins where each plugin is a jar 
depending on the main application jar. I would like to obfuscate all 
jars (main and plugins) in one go with the proguard maven plugin without 
using ant. Does anyone know what is the best way to achieve this?



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

Re: New to Maven - need help

2008-10-17 Thread Jan K

I went through the book,i donot find any information regarding adding our own
dependencies in maven.
I read a article as :
dependency
   groupIdquartz/groupId
   artifactIdquartz/artifactId
   version1.5.1/version
   scopecompile/scope
 /dependency

Maven downloads and use Quartz as a dependency for our project.So whatever
dependency we need,maven will download right?but i have some predefined
dependency for my project which doesnot exist in maven.Please let me know
how should i load my own dependency into maven and call it using
dependency tag.


Jan K wrote:
 
 Is there any possiblity of adding our own dependencies in maven?
 
 
 
 Thomas Lutz wrote:
 
 Jan K schrieb:
 First time i created a project using
  mvn archetype:create -DgroupId=com.careertales -DartifactId=careertales
 -DarchetypeArtifactId=maven-archetype-webapp.

 I got a folder structure as :
 src/main
  -- resources
  -- webapp

 In resources folder,i placed a simple java file(Test.java) which just
 prints
 a string.In webapp folder,I got some default index.jsp file and  a
 web-inf
 folder.Then i executed mvn install command.I got Build Successful in my
 console.I am able to see a target folder created.Inside this target
 folder i
 have war,classes,careertales.war folders.Then i executed mvn compile
 command.Inside classes folder, my point is i should see the  class file
 of
 Test.But instead i can see the same Test.java file in classes
 folder.What is
 going wrong?
   
 
 resources is not compiled.. it's for resources. place it in 
 src/main/java...
 
 follow the maven in 5 minutes guide from http://maven.apache.org ... 
 start with the standard java archetype... makes it easier :-)
 


 After that i placed a java file(This file prints a string)


 matinh wrote:
   
 On Thursday 16 October 2008 Jan K wrote:
 
 I went through the site given by arnaud.It is really useful for as i
 am
 new maven.
   
 Through the whole book? Really?

 
 It get the following message in the console:

 [INFO] OldArchetype created in dir:
 /home/jano/CVS/margadarsi/ct3/src/careertales
 [INFO]
 
 [INFO] BUILD SUCCESSFUL
 [INFO]
 
 [INFO] Total time: 17 seconds
 [INFO] Finished at: Thu Oct 16 13:44:21 GMT+05:30 2008
 [INFO] Final Memory: 7M/13M
   
 The build succeeds. The question is, what did you build? Accoring to
 the 
 messages above I guess you executed some mvn archetype:create
 command, 
 right? This does not compile anything, it generates a new project.

 
 I have placed my java files in src/main/java.I dont get the class
 files
 generated when i compile.What is wrong in my code?please help
   
 How do you compile? As I explained earlier you should execute mvn
 compile 
 to compile your classes. The result can be found in the folder 
 target/classes.

 hth,
 - martin

  

 

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

-- 
View this message in context: 
http://www.nabble.com/New-to-Maven---need-help-tp19971205p20027612.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: New to Maven - need help

2008-10-17 Thread Jan K

I will explain in detail what i have in my hand.

I created a project.I have a folder structure created .Please note,i have
client related java files in one folder,Servlet related java files in
another folder and so on in my project.So In src/main/java ,i copied all the 
jave files(with the folder structure such as client ,servlet etc) i have in
my project and placed it there.Now in src/main/java,i have nearly 6 folders
have java files.I have run it using ant.Now i asked to do the same in
Maven.In ant,i have dependency written for each a every thing required and
finally will call the dependency in build.xml. How should i do this using
maven?Also i read in a article as : maven will download the the dependency
required for our project.How can i add my own dependencies in maven?please
help.
 


Jan K wrote:
 
 I am very new to maven.I have downloaded apache-maven-2.0.9.I read the
 doc's and installed maven. I executed the following commands  in command
 prompt,
 
 mvn archetype:create \
   -DarchetypeGroupId=org.apache.maven.archetypes \
   -DgroupId=com.mycompany.app \
   -DartifactId=my-app
 
 
 I got a folder as my-app in my local path.I can see the pom.xml.Please
 help me what should i do next?How to change it the project i am willing to
 run?
 
 

-- 
View this message in context: 
http://www.nabble.com/New-to-Maven---need-help-tp19971205p20027789.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: New to Maven - need help

2008-10-17 Thread Jan K

Hi dchicks,

I will explain in detail what i have in my hand.

I created a project in maven.I have a folder structure created .Please
note,i have client related java files in one folder,Servlet related java
files in another folder and so on in my project.So In src/main/java ,i
copied all the jave files(with the folder structure such as client ,servlet
etc) i have in my project and placed it there.Now in src/main/java,i have
nearly 6 folders having java files.I have run it using ant.Now i asked to do
the same in Maven.In ant,i have dependency written for each a every thing
required in a xml file and finally will call all the xml files in build.xml.
How should i do this using maven?Also i read in a article as : maven will
download the the dependency required for our project.How can i add my own
dependencies in maven?please help.


dchicks wrote:
 
 Jan,
 
 I would first suggest you search the main repository to make sure that 
 the dependency you're looking for is truly not already in there.  Here 
 is the site to search:  http://www.mvnrepository.com/
 
 If you can't find what you're looking for there, then you can always add 
 dependencies to your local repository using the install command.  It 
 goes something like this:
 
 mvn install:install-file -DgroupId=grouIp -DartifactId=artifactId 
 -Dversion=version -Dpackaging=jar -Dfile=/path/to/file
 
 If you need to share that dependency among a team of developers, then I 
 would suggest looking at Artifactory to set up your own site-wide 
 repository.  It will also cache dependencies pulled from the main 
 repository and save you a little bit of network bandwidth:  
 http://www.jfrog.org/sites/artifactory/1.2/
 
 Dave
 
 Jan K wrote:
 I went through the book,i donot find any information regarding adding our
 own
 dependencies in maven.
 I read a article as :
 dependency
groupIdquartz/groupId
artifactIdquartz/artifactId
version1.5.1/version
scopecompile/scope
  /dependency

 Maven downloads and use Quartz as a dependency for our project.So
 whatever
 dependency we need,maven will download right?but i have some predefined
 dependency for my project which doesnot exist in maven.Please let me know
 how should i load my own dependency into maven and call it using
 dependency tag.


 Jan K wrote:
   
 Is there any possiblity of adding our own dependencies in maven?



 Thomas Lutz wrote:
 
 Jan K schrieb:
   
 First time i created a project using
  mvn archetype:create -DgroupId=com.careertales
 -DartifactId=careertales
 -DarchetypeArtifactId=maven-archetype-webapp.

 I got a folder structure as :
 src/main
  -- resources
  -- webapp

 In resources folder,i placed a simple java file(Test.java) which just
 prints
 a string.In webapp folder,I got some default index.jsp file and  a
 web-inf
 folder.Then i executed mvn install command.I got Build Successful in
 my
 console.I am able to see a target folder created.Inside this target
 folder i
 have war,classes,careertales.war folders.Then i executed mvn compile
 command.Inside classes folder, my point is i should see the  class
 file
 of
 Test.But instead i can see the same Test.java file in classes
 folder.What is
 going wrong?
   
 
 resources is not compiled.. it's for resources. place it in 
 src/main/java...

 follow the maven in 5 minutes guide from http://maven.apache.org ... 
 start with the standard java archetype... makes it easier :-)

   
 After that i placed a java file(This file prints a string)


 matinh wrote:
   
 
 On Thursday 16 October 2008 Jan K wrote:
 
   
 I went through the site given by arnaud.It is really useful for as i
 am
 new maven.
   
 
 Through the whole book? Really?

 
   
 It get the following message in the console:

 [INFO] OldArchetype created in dir:
 /home/jano/CVS/margadarsi/ct3/src/careertales
 [INFO]
 
 [INFO] BUILD SUCCESSFUL
 [INFO]
 
 [INFO] Total time: 17 seconds
 [INFO] Finished at: Thu Oct 16 13:44:21 GMT+05:30 2008
 [INFO] Final Memory: 7M/13M
   
 
 The build succeeds. The question is, what did you build? Accoring to
 the 
 messages above I guess you executed some mvn archetype:create
 command, 
 right? This does not compile anything, it generates a new project.

 
   
 I have placed my java files in src/main/java.I dont get the class
 files
 generated when i compile.What is wrong in my code?please help
   
 
 How do you compile? As I explained earlier you should execute mvn
 compile 
 to compile your classes. The result can be found in the folder 
 target/classes.

 hth,
 - martin

  

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

Re: New to Maven - need help

2008-10-16 Thread Jan K

I able to build the project successfully.I get a target folder created.But i
donot find any class files created for the project.Here is my sample pom.xml
file:

project xmlns=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/maven-v4_0_0.xsd;
  modelVersion4.0.0/modelVersion
  groupIdcareertales.net/groupId
  artifactIdcareertales/artifactId
  packagingjar/packaging
  version1.0-SNAPSHOT/version
  nameCT/name
  urlhttp://localhost:8080/ct2/url
  dependencies
dependency
  groupIdjunit/groupId
  artifactIdjunit/artifactId
  version3.8.1/version
  scopetest/scope
/dependency
  /dependencies
/project

Please correct me.Please let me know what i am missing.




Jan K wrote:
 
 I am very new to maven.I have downloaded apache-maven-2.0.9.I read the
 doc's and installed maven. I executed the following commands  in command
 prompt,
 
 mvn archetype:create \
   -DarchetypeGroupId=org.apache.maven.archetypes \
   -DgroupId=com.mycompany.app \
   -DartifactId=my-app
 
 
 I got a folder as my-app in my local path.I can see the pom.xml.Please
 help me what should i do next?How to change it the project i am willing to
 run?
 
 

-- 
View this message in context: 
http://www.nabble.com/New-to-Maven---need-help-tp19971205p20008277.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: New to Maven - need help

2008-10-16 Thread Jan K

Hi Wayne,
Sorry to miss this information.I have a folder called classes in the target
folder.It has the entire java files used in my project.I should instead have
class files right?Please let me know.


Wayne Fay wrote:
 
 Based on the information you are providing, it is nearly impossible to
 tell you what's going on/wrong/missing/etc in your specific project.
 
 Are your Java source files in src/main/java?
 When you run mvn compile, what happens? Does it say BUILD
 SUCCESSFUL near the bottom of the output?
 When you look in the target directory, what kinds of files (if any) do
 you find? You may need to go into target/classes to see your Java
 class files.
 
 The free e-books linked to by Arnaud are basically considered
 mandatory reading for people posting on this list. If you have not
 read them yet, you should go do it now.
 
 Wayne
 
 On Thu, Oct 16, 2008 at 12:06 AM, Jan K [EMAIL PROTECTED] wrote:

 I able to build the project successfully.I get a target folder
 created.But i
 donot find any class files created for the project.Here is my sample
 pom.xml
 file:

 project xmlns=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/maven-v4_0_0.xsd;
  modelVersion4.0.0/modelVersion
  groupIdcareertales.net/groupId
  artifactIdcareertales/artifactId
  packagingjar/packaging
  version1.0-SNAPSHOT/version
  nameCT/name
  urlhttp://localhost:8080/ct2/url
  dependencies
dependency
  groupIdjunit/groupId
  artifactIdjunit/artifactId
  version3.8.1/version
  scopetest/scope
/dependency
  /dependencies
 /project

 Please correct me.Please let me know what i am missing.




 Jan K wrote:

 I am very new to maven.I have downloaded apache-maven-2.0.9.I read the
 doc's and installed maven. I executed the following commands  in command
 prompt,

 mvn archetype:create \
   -DarchetypeGroupId=org.apache.maven.archetypes \
   -DgroupId=com.mycompany.app \
   -DartifactId=my-app


 I got a folder as my-app in my local path.I can see the pom.xml.Please
 help me what should i do next?How to change it the project i am willing
 to
 run?



 --
 View this message in context:
 http://www.nabble.com/New-to-Maven---need-help-tp19971205p20008277.html
 Sent from the Maven - Users mailing list archive at Nabble.com.


 -
 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]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/New-to-Maven---need-help-tp19971205p20010431.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: New to Maven - need help

2008-10-16 Thread Jan K

First time i created a project using
 mvn archetype:create -DgroupId=com.careertales -DartifactId=careertales
-DarchetypeArtifactId=maven-archetype-webapp.

I got a folder structure as :
src/main
 -- resources
 -- webapp

In resources folder,i placed a simple java file(Test.java) which just prints
a string.In webapp folder,I got some default index.jsp file and  a web-inf
folder.Then i executed mvn install command.I got Build Successful in my
console.I am able to see a target folder created.Inside this target folder i
have war,classes,careertales.war folders.Then i executed mvn compile
command.Inside classes folder, my point is i should see the  class file of
Test.But instead i can see the same Test.java file in classes folder.What is
going wrong?



After that i placed a java file(This file prints a string)


matinh wrote:
 
 On Thursday 16 October 2008 Jan K wrote:
 I went through the site given by arnaud.It is really useful for as i am
 new maven.
 
 Through the whole book? Really?
 
 It get the following message in the console:

 [INFO] OldArchetype created in dir:
 /home/jano/CVS/margadarsi/ct3/src/careertales
 [INFO]
 
 [INFO] BUILD SUCCESSFUL
 [INFO]
 
 [INFO] Total time: 17 seconds
 [INFO] Finished at: Thu Oct 16 13:44:21 GMT+05:30 2008
 [INFO] Final Memory: 7M/13M
 
 The build succeeds. The question is, what did you build? Accoring to the 
 messages above I guess you executed some mvn archetype:create command, 
 right? This does not compile anything, it generates a new project.
 
 I have placed my java files in src/main/java.I dont get the class files
 generated when i compile.What is wrong in my code?please help
 
 How do you compile? As I explained earlier you should execute mvn
 compile 
 to compile your classes. The result can be found in the folder 
 target/classes.
 
 hth,
 - martin
 
  
 

-- 
View this message in context: 
http://www.nabble.com/New-to-Maven---need-help-tp19971205p20011195.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: New to Maven - need help

2008-10-16 Thread Jan K

Is there any possiblity of adding our own dependencies in maven?



Thomas Lutz wrote:
 
 Jan K schrieb:
 First time i created a project using
  mvn archetype:create -DgroupId=com.careertales -DartifactId=careertales
 -DarchetypeArtifactId=maven-archetype-webapp.

 I got a folder structure as :
 src/main
  -- resources
  -- webapp

 In resources folder,i placed a simple java file(Test.java) which just
 prints
 a string.In webapp folder,I got some default index.jsp file and  a
 web-inf
 folder.Then i executed mvn install command.I got Build Successful in my
 console.I am able to see a target folder created.Inside this target
 folder i
 have war,classes,careertales.war folders.Then i executed mvn compile
 command.Inside classes folder, my point is i should see the  class file
 of
 Test.But instead i can see the same Test.java file in classes folder.What
 is
 going wrong?
   
 
 resources is not compiled.. it's for resources. place it in 
 src/main/java...
 
 follow the maven in 5 minutes guide from http://maven.apache.org ... 
 start with the standard java archetype... makes it easier :-)
 


 After that i placed a java file(This file prints a string)


 matinh wrote:
   
 On Thursday 16 October 2008 Jan K wrote:
 
 I went through the site given by arnaud.It is really useful for as i am
 new maven.
   
 Through the whole book? Really?

 
 It get the following message in the console:

 [INFO] OldArchetype created in dir:
 /home/jano/CVS/margadarsi/ct3/src/careertales
 [INFO]
 
 [INFO] BUILD SUCCESSFUL
 [INFO]
 
 [INFO] Total time: 17 seconds
 [INFO] Finished at: Thu Oct 16 13:44:21 GMT+05:30 2008
 [INFO] Final Memory: 7M/13M
   
 The build succeeds. The question is, what did you build? Accoring to the 
 messages above I guess you executed some mvn archetype:create command, 
 right? This does not compile anything, it generates a new project.

 
 I have placed my java files in src/main/java.I dont get the class files
 generated when i compile.What is wrong in my code?please help
   
 How do you compile? As I explained earlier you should execute mvn
 compile 
 to compile your classes. The result can be found in the folder 
 target/classes.

 hth,
 - martin

  

 

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

-- 
View this message in context: 
http://www.nabble.com/New-to-Maven---need-help-tp19971205p20013278.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: New to Maven - need help

2008-10-16 Thread Jan K

I went through the site given by arnaud.It is really useful for as i am new
maven.
It get the following message in the console:

[INFO] OldArchetype created in dir:
/home/jano/CVS/margadarsi/ct3/src/careertales
[INFO]

[INFO] BUILD SUCCESSFUL
[INFO]

[INFO] Total time: 17 seconds
[INFO] Finished at: Thu Oct 16 13:44:21 GMT+05:30 2008
[INFO] Final Memory: 7M/13M

I have placed my java files in src/main/java.I dont get the class files
generated when i compile.What is wrong in my code?please help


Wayne Fay wrote:
 
 Based on the information you are providing, it is nearly impossible to
 tell you what's going on/wrong/missing/etc in your specific project.
 
 Are your Java source files in src/main/java?
 When you run mvn compile, what happens? Does it say BUILD
 SUCCESSFUL near the bottom of the output?
 When you look in the target directory, what kinds of files (if any) do
 you find? You may need to go into target/classes to see your Java
 class files.
 
 The free e-books linked to by Arnaud are basically considered
 mandatory reading for people posting on this list. If you have not
 read them yet, you should go do it now.
 
 Wayne
 
 On Thu, Oct 16, 2008 at 12:06 AM, Jan K [EMAIL PROTECTED] wrote:

 I able to build the project successfully.I get a target folder
 created.But i
 donot find any class files created for the project.Here is my sample
 pom.xml
 file:

 project xmlns=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/maven-v4_0_0.xsd;
  modelVersion4.0.0/modelVersion
  groupIdcareertales.net/groupId
  artifactIdcareertales/artifactId
  packagingjar/packaging
  version1.0-SNAPSHOT/version
  nameCT/name
  urlhttp://localhost:8080/ct2/url
  dependencies
dependency
  groupIdjunit/groupId
  artifactIdjunit/artifactId
  version3.8.1/version
  scopetest/scope
/dependency
  /dependencies
 /project

 Please correct me.Please let me know what i am missing.




 Jan K wrote:

 I am very new to maven.I have downloaded apache-maven-2.0.9.I read the
 doc's and installed maven. I executed the following commands  in command
 prompt,

 mvn archetype:create \
   -DarchetypeGroupId=org.apache.maven.archetypes \
   -DgroupId=com.mycompany.app \
   -DartifactId=my-app


 I got a folder as my-app in my local path.I can see the pom.xml.Please
 help me what should i do next?How to change it the project i am willing
 to
 run?



 --
 View this message in context:
 http://www.nabble.com/New-to-Maven---need-help-tp19971205p20008277.html
 Sent from the Maven - Users mailing list archive at Nabble.com.


 -
 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]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/New-to-Maven---need-help-tp19971205p20009878.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: New to Maven - need help

2008-10-15 Thread Jan K

What are the mandatory fields(tags) to be used for settings.xml? 

Arnaud HERITIER wrote:
 
 You'll have more information in :
 - http://www.sonatype.com/community/definitive_guide.html
 - http://www.exist.com/better-build-maven
 
 Arnaud
 
 On Tue, Oct 14, 2008 at 12:54 PM, Jan K [EMAIL PROTECTED] wrote:
 

 I am very new to maven.I have downloaded apache-maven-2.0.9.I read the
 doc's
 and installed maven. I executed the following commands  in command
 prompt,

 mvn archetype:create \
  -DarchetypeGroupId=org.apache.maven.archetypes \
  -DgroupId=com.mycompany.app \
  -DartifactId=my-app


 I got a folder as my-app in my local path.I can see the pom.xml.Please
 help
 me what should i do next?How to change it the project i am willing to
 run?

 --
 View this message in context:
 http://www.nabble.com/New-to-Maven---need-help-tp19971205p19971205.html
 Sent from the Maven - Users mailing list archive at Nabble.com.

 
 
 
 -- 
 ..
 Arnaud HERITIER
 ..
 OCTO Technology - aheritier AT octo DOT com
 www.octo.com | blog.octo.com
 ..
 ASF - aheritier AT apache DOT org
 www.apache.org | maven.apache.org
 ...
 
 

-- 
View this message in context: 
http://www.nabble.com/New-to-Maven---need-help-tp19971205p19988056.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



New to Maven - need help

2008-10-14 Thread Jan K

I am very new to maven.I have downloaded apache-maven-2.0.9.I read the doc's
and installed maven. I executed the following commands  in command prompt,

mvn archetype:create \
  -DarchetypeGroupId=org.apache.maven.archetypes \
  -DgroupId=com.mycompany.app \
  -DartifactId=my-app


I got a folder as my-app in my local path.I can see the pom.xml.Please help
me what should i do next?How to change it the project i am willing to run?

-- 
View this message in context: 
http://www.nabble.com/New-to-Maven---need-help-tp19971205p19971205.html
Sent from the Maven - Users mailing list archive at Nabble.com.


Re: Maven2 import, runtime scope only?

2008-09-11 Thread Jan Fredrik Wedén
On Thu, Sep 11, 2008 at 1:07 AM, Scott Carter [EMAIL PROTECTED] wrote:
 I need help understanding import scope in Maven2.  I am using the import
 mechanism to control third party dependences and transitive dependencies
 from a centralized pom as explained here -
 http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html.
 My problem is that the import of the pom that controls the dependent
 versions seems to have only runtime scope, and can not find the dependencies
 at compile time.  Is there a fix to this.  I can not give the dependency a
 compile scope because it already has import scope.  How can I pull in
 dependencies from an import scope at compile time?

 Please help.  Thanks in advance.

I thought the import scope was only designed to import
dependencyManagement - that is, it will not actually add any
dependencies to your project, just help you manage versions etc. by
adding those in dependencyManagement from the imported POM to the
dependencyManagement section of your POM.

I might have missed something, though. Never used import scope myself
yet, but we're looking into it in my corp.


-- 
- Jan Fredrik Wedén

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



Re: Caused by: java.lang.NoClassDefFoundError: javax/activation/MimeTypeParseException

2008-09-01 Thread Jan Torben Heuer
thomas2004 wrote:

Hi thomas2004,

 I build my project with mvn eclipse:eclipse but I got error:
 
 Caused by: java.lang.NoClassDefFoundError:
 javax/activation/MimeTypeParseException
 
 I've check the class javax.activation.MimeTypeParseException.java is in
 activation-1.1.jar and this jar is already in the Maven dependency in
 Eclipse.
 
 What could be the problem?

AFAIK the eclipse goal does not compile your code thus it shouldn't raise
the error - but I may be wrong. Can you post the relevant lines from
mvn -X -e eclipse:eclipse?

Jan


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



Best Practice for DLLs in Maven with Eclipse

2008-09-01 Thread Jan Schoppenhorst
One of the many things I like about Maven is that the binaries are in 
repositiories and not in CVS. For normal Jars this works perfect but 
DLLs and .so files are often also packed in jars and then put into the 
repositories. These jars have to be unpacked before they can be used 
when running the Project within Eclipse. My old way to use these DLLs 
was to put them into the project root (single module) and then put 
everything in CVS. When s.o. was checking this out with Eclipse from CVS 
everything worked and the project could be run directly. I can do the 
same now with M2E projects but it feels wrong to put the DLLs in the CVS 
and to not use the repo for that. My question is how people are handling 
this problem. The idea is that when someone joins the team he can 
checkout the project and start it right away (without the DLLs being in 
CVS).




Jan Schoppenhorst
GDV
Gesellschaft für geografische Datenverarbeitung mbH
Binger Straße 49-51
55218 Ingelheim
Tel.:   06132/7148-19
Fax.:   06132/7148-28
www.gdv.com
www.gdv-mapbuilder.de

Sitz der Gesellschaft: Ingelheim
Amtsgericht Mainz HRB 23123
Gerichtsstand Mainz
Geschäftsführer: Thomas Riehl, Dirk Hübener 




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

Re: How do I add generated resources to target jar?

2008-08-31 Thread Jan van Mansum
Thanks Dan!

That did the trick. I included the following in my pom and it works beautifully:

...
  build
resources
resource
directorytarget/generated-sources/antlr/directory
includes
include**/*.tokens/include
/includes
/resource
/resources
  
   /build


2008/8/30 Dan Tran [EMAIL PROTECTED]:
 Maven pom allows you to add additional resource directories.  Check
 the pom schema again.

 -D

 On Fri, Aug 29, 2008 at 2:40 PM, Jan van Mansum [EMAIL PROTECTED] wrote:
 Hello group,

 I am using the antlr3 maven plugin to generate a parser. I would also like 
 the
 .tokens file to be included in the target jar file, so that a client
 project can use
 it to generate a tree walker. How can a achieve this?

 Thanks for any help,

 best regards,

 --
 Jan van Mansum

 -
 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]





-- 
Jan van Mansum

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



How do I add generated resources to target jar?

2008-08-29 Thread Jan van Mansum
Hello group,

I am using the antlr3 maven plugin to generate a parser. I would also like the
.tokens file to be included in the target jar file, so that a client
project can use
it to generate a tree walker. How can a achieve this?

Thanks for any help,

best regards,

-- 
Jan van Mansum

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



Re: Centrally managing configuration files in a multi-module project

2008-08-28 Thread Jan van Mansum
Thanks Brett!

It turns out that the jalopy plug-in does support multi-module projects ...

http://mojo.codehaus.org/jalopy-maven-plugin/examples/multimodule.html

Sorry for not looking at the docs a bit closer before firing off
questions on the mailing
list. But thanks anyway for drawing my attention to the dependency
plug-in. I think
I have some other problems that can be solved with it.

Best regards,

Jan van Mansum.

2008/8/28 Brett Porter [EMAIL PROTECTED]:
 The general approach used here can be seen in the checkstyle plugin - the
 configuration is able to be provided at either a file, URL, or within a
 repository artifact. The last option is the best since it makes advantage of
 Maven's resolution and local caching but also makes it referencable from any
 project regardless of the source hierachy.
 If jalopy doesn't support this, you can use the dependency plugin to grab
 the config, unpack it to the target directory, and then use it from there.

 - Brett

 2008/8/27 Jan van Mansum [EMAIL PROTECTED]

 Sorry, for the confusing message, I hit a gmail shortcut that sent the
 mail out prematurely.

 So, again: I tried adding the following configuration to the main pom.xml:

 plugin
groupIdorg.codehaus.mojo/groupId
artifactIdjalopy-maven-plugin/artifactId
version1.0-alpha-1/version
configuration
convention${basedir}/docs/jalopy/jalopy.xml/convention
/configuration
executions
execution
phaseprocess-classes/phase
goals
goalformat/goal
/goals
/execution
/executions
 /plugin

 and putting the jalopy.xml in the directory docs/jalopy relative to
 the main project's pom.xml.
 However, ${basedir} resolves to the base directory of the pom.xml that
 is executed, so this
 won't work. Is there a way to refer to the pom.xml that actually
 declares the plugin element?

 Thanks and regards,

 Jan van Mansum.





 2008/8/27 Jan van Mansum [EMAIL PROTECTED]:
  Hello group,
 
  I have a multi-module project and I want to use the same jalopy (code
  formatting)
  settings for all the modules. I tried to add the following to the main
 pom.xml:
 
  plugins
  ...
  plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdjalopy-maven-plugin/artifactId
 version1.0-alpha-1/version
  configuration
 
  convention${basedir}/docs/jalopy/jalopy.xml/convention
 /configuration
 executions
 execution
 phaseprocess-classes/phase
 goals
 goalformat/goal
 /goals
 /execution
 /executions
  /plugin
 
 
  --
  Jan van Mansum
 



 --
 Jan van Mansum

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




 --
 Brett Porter
 Blog: http://blogs.exist.com/bporter/




--
Jan van Mansum

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



Centrally managing configuration files in a multi-module project

2008-08-27 Thread Jan van Mansum
Hello group,

I have a multi-module project and I want to use the same jalopy (code
formatting)
settings for all the modules. I tried to add the following to the main pom.xml:

plugins
...
plugin
groupIdorg.codehaus.mojo/groupId
artifactIdjalopy-maven-plugin/artifactId
version1.0-alpha-1/version
configuration
convention${basedir}/docs/jalopy/jalopy.xml/convention
/configuration
executions
execution
phaseprocess-classes/phase
goals
goalformat/goal
/goals
/execution
/executions
/plugin


--
Jan van Mansum

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



Re: Centrally managing configuration files in a multi-module project

2008-08-27 Thread Jan van Mansum
Sorry, for the confusing message, I hit a gmail shortcut that sent the
mail out prematurely.

So, again: I tried adding the following configuration to the main pom.xml:

plugin
groupIdorg.codehaus.mojo/groupId
artifactIdjalopy-maven-plugin/artifactId
version1.0-alpha-1/version
configuration
convention${basedir}/docs/jalopy/jalopy.xml/convention
/configuration
executions
execution
phaseprocess-classes/phase
goals
goalformat/goal
/goals
/execution
/executions
/plugin

and putting the jalopy.xml in the directory docs/jalopy relative to
the main project's pom.xml.
However, ${basedir} resolves to the base directory of the pom.xml that
is executed, so this
won't work. Is there a way to refer to the pom.xml that actually
declares the plugin element?

Thanks and regards,

Jan van Mansum.





2008/8/27 Jan van Mansum [EMAIL PROTECTED]:
 Hello group,

 I have a multi-module project and I want to use the same jalopy (code
 formatting)
 settings for all the modules. I tried to add the following to the main 
 pom.xml:

 plugins
 ...
 plugin
groupIdorg.codehaus.mojo/groupId
artifactIdjalopy-maven-plugin/artifactId
version1.0-alpha-1/version
 configuration
convention${basedir}/docs/jalopy/jalopy.xml/convention
/configuration
executions
execution
phaseprocess-classes/phase
goals
goalformat/goal
/goals
/execution
/executions
 /plugin


 --
 Jan van Mansum




-- 
Jan van Mansum

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



how to resolve conflicts? (xerces)

2008-07-15 Thread Jan Torben Heuer
Hi, I have a conflict in my classpath, I think it caused by:

[INFO] org.n52.swe.sas:sas-muse:war:3.0-SNAPSHOT
[INFO] +- muse.osgi-bundles:muse-complete:jar:2.2.0:compile
[INFO] |  +- muse:muse-util-xml:jar:2.2.0:compile
[INFO] |  |  \- xerces:xercesImpl:jar:2.8.1:compile
 
[INFO] +- commons-jxpath:commons-jxpath:jar:1.2:compile
[INFO] |  +- xerces:xerces:jar:1.2.3:compile
 ^

any ideas how to solve this? I think I need the newer one, can I disable the
xerces:xerces:jar:1.2.3 without changeing the parent-dependency jxpath?

Thank,

Jan


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



Re: [Maven2] - exluding some source files from a war

2008-07-11 Thread Jan Verstuyft
Thanks for the quick response.

I've tried the following:

  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-war-plugin/artifactId
version2.0/version
configuration
excludes
exclude**/com/ideal/**/*.java/exclude
/excludes
webResources.../webResources
 /configuration
   /plugin
/plugins

And some other exclude masks like **/com/ideal/**, or **/com/ideal/*
but it seems that they still are compiled.
What is the mask I need to use?

2008/7/10 Geoffrey Wiseman [EMAIL PROTECTED]:
 On Thu, Jul 10, 2008 at 10:51 AM, Jörg Schaible 
 [EMAIL PROTECTED] wrote:

 You can do this in the same POM. Simply execute the jar plugin (also with
 includes), attach it to the package phase, but configure the resulting
 artifact with a classifier.


 Although it wouldn't hurt to note that this would typically be accomplished
 using a multi-module buld in Maven.

  - Geoffrey
 --
 Geoffrey Wiseman


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



Re: Including non-standard named artifacts

2008-07-11 Thread Jan Fredrik Wedén
On Fri, Jul 11, 2008 at 5:53 AM, Brian Albers [EMAIL PROTECTED] wrote:
 Maven gurus-

 I'm running into a problem which seems like it should be simple, but
 I've had no luck in solving it with various Maven plugins.

 In a nutshell, I'm trying to use the assembly plugin to produce a .zip
 file for my project, and as part of this I wish to include a full,
 expanded version of Apache ActiveMQ. In particular, I'm trying to
 include the version assembled by the ActiveMQ Maven and located in the
 central repository at:
  http://repo1.maven.org/maven2/org/apache/activemq/apache-activemq/5.1.0/

 The catch is that I'm trying to include the fully-contained Windows
 ZIP file ( apache-activemq-5.1.0-bin.zip ), and I have not found a way
 to declare a dependency on it since it has been assembled end in
 -bin.zip rather than .zip. I figured that if I could declare a
 dependency on it, I could use a few different options to extract it
 into my own assembly. However, I haven't been able to configure Maven
 to locate the .zip I want because of its name.

 Is there a way to declare a dependency on that specific .zip? Or am I
 going at this entirely the wrong way.

 Thanks in advance!

Did you try to specify bin as the classifier? I think that should
work, although I haven't tried using classifiers with the assembly
plugin myself.


-- 
- Jan Fredrik Wedén

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



Re: global exclusions?

2008-07-11 Thread Jan Fredrik Wedén
On Fri, Jul 11, 2008 at 9:47 AM, Kristian Rink [EMAIL PROTECTED] wrote:
 Folks;

 in my environment, I do have a parent pom all my projects do inherit
 from. This parent pom is used, among other things, to keep global
 dependencies. My question on that, however: Asides from declaring
 dependencies which effectively state what is needed, is there a way to
 also declare global exclusions to, regardless of artifacts included,
 state what artifacts _not at all_ to include?

 To outline what I want: We do use slf4j for logging, along with
 jcl-over-slf4j (briding commons-logging output to slf4j) or
 log4j-over-slf4j (bridging log4j output to slf4j) so no matter what
 happens I don't want to, say, have any artifact (Spring likes to do
 this, in example...) pull commons-logging as a transitive dependency
 simply because this is already satisfied by jcl-over-slf4j and would
 just cause trouble. So far however I have to manually define an
 exclusion to that for every required project and every dependency
 manually which doesn't seem that comfortable a thing to do. Can this be
 done somehow smarter?

 Thanks in advance, best regards.
 Kristian

From what I know this is not supported in Maven 2.0.x. You'll have to
do the manual labour of specifying exclusions for every dependency
which pulls in what you don't want.

I think there's a jira for this somewhere which might be scheduled for 2.1.


-- 
- Jan Fredrik Wedén

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



Re: [Maven2] - exluding some source files from a war

2008-07-11 Thread Jan Verstuyft
Ok,

so the exclude on configuration level, just excludes which .class
files you want to add to the war?

I even tried
   configuration
excludes
exclude**/*.class/exclude
/excludes
   /configuration

and still, all the classes are in my WEB-INF/classes directory.

And is it also possible to exclude them from being build.  I've read
something about the following configuration (it was for jars)
   plugins
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-compiler-plugin/artifactId
   configuration
 excludes
   exclude**/NotNeeded*.java/exclude
 /excludes
   /configuration
 /plugin
   /plugins

but that also not work.  What do I do wrong?

kind regards

Jan

2008/7/11 Jörg Schaible [EMAIL PROTECTED]:
 Jan Verstuyft wrote:
 Thanks for the quick response.

 I've tried the following:

   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-war-plugin/artifactId
 version2.0/version
 configuration
   excludes

 exclude**/com/ideal/**/*.java/exclude
   /excludes
   webResources.../webResources
  /configuration
/plugin
 /plugins

 And some other exclude masks like **/com/ideal/**, or **/com/ideal/*
 but it seems that they still are compiled.
 What is the mask I need to use?

 Well, I told you. Have a look yourself at target/classes and search for any 
 *.java file ... ;-)

 - Jörg

 -
 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: [Maven2] - exluding some source files from a war

2008-07-11 Thread Jan Verstuyft
Sorry,

I've put the maven-compile plugin at the wrong place.  Now it works.

thanks

Jan

2008/7/11 Jan Verstuyft [EMAIL PROTECTED]:
 Ok,

 so the exclude on configuration level, just excludes which .class
 files you want to add to the war?

 I even tried
   configuration
excludes
exclude**/*.class/exclude
/excludes
   /configuration

 and still, all the classes are in my WEB-INF/classes directory.

 And is it also possible to exclude them from being build.  I've read
 something about the following configuration (it was for jars)
   plugins
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-compiler-plugin/artifactId
   configuration
 excludes
   exclude**/NotNeeded*.java/exclude
 /excludes
   /configuration
 /plugin
   /plugins

 but that also not work.  What do I do wrong?

 kind regards

 Jan

 2008/7/11 Jörg Schaible [EMAIL PROTECTED]:
 Jan Verstuyft wrote:
 Thanks for the quick response.

 I've tried the following:

   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-war-plugin/artifactId
 version2.0/version
 configuration
   excludes

 exclude**/com/ideal/**/*.java/exclude
   /excludes
   webResources.../webResources
  /configuration
/plugin
 /plugins

 And some other exclude masks like **/com/ideal/**, or **/com/ideal/*
 but it seems that they still are compiled.
 What is the mask I need to use?

 Well, I told you. Have a look yourself at target/classes and search for any 
 *.java file ... ;-)

 - Jörg

 -
 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]



[Maven2] - exluding some source files from a war

2008-07-10 Thread Jan Verstuyft
Hello,

I'm getting started to use maven2, but we have still some problems.
One of them occurs in the following situation:

We have a project with in the src folder the following structure:
src\com\clarify\...
src\com\ideal\...

the old ant scripts compiles both of them, but put the com\clarify
packages in the WEB-INF\classes folder and the com\ideal packages in a
jar file and in the lib folder.

I've already made a pom file that delivers a war file, but with the
both packages in the WEB-INF\classes folder.
Now is my question, can I exclude the ideal package of being compile
and added to tho WEB-INF\classes folder.  i will make another pom file
for the ideal packages.

Kind Regards

Jan Verstuyft

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



Re: Lock down of plugin versions

2008-07-07 Thread Jan Fredrik Wedén
What you're saying sounds reasonable, I agree. Still waiting for
Enforcer 1.0 release to take advantage of requirePluginVersions,
though :-) Any updates, Brian?

My original attempt at this started from reading the users list and
docs about version ranges. Whenever version ranges were mentioned in
Mavenland it stated that a plain version was a recommendation, while a
plain version surrounded by brackets was a requirement (locked down
version). From my tiny experiment here, and people's responses, I take
it that just a plain version will achieve what I want for plugins.
I'll start implementing this for our POMs.

Thanks for all your input.

On Sun, Jul 6, 2008 at 9:36 AM, Wouter Hermeling [EMAIL PROTECTED] wrote:

 Imo version ranges are best used for developing plugins, more specifically
 plugin dependencies. By using a version range for a dependency rather then a
 specific version, the plugin can be more easily used in a different poms
 using different versions of dependencies.

 I've done a full lock down of plugin versions by specifying the actual
 version and not the version range in the pom.xml. The maven-enforce-plugin
 and specifically the rule 'requirePluginVersions' can help you with this.



 Jan Fredrik Wedén wrote:

 Greetings,

 I'm attempting to follow best practice and lock down plugins in our
 parent POM. From what I understand, I should use a version range
 instead of a plain version number to accomplish a true lock down for
 future reproducibility. E.g. for the clean plugin I would use [2.2]
 instead of just 2.2 as Maven considers the latter to be a
 recommendation rather than a requirement.

 Now trouble starts, I attempt to put the pluginManagement section
 below in my POM and execute mvn clean. From the output below it seems
 like Maven is attempting to resolve the version as [2.2] instead of
 resolving the range to a fixed version first. The same thing happens
 when I try to add the plugin definitions to buildplugins instead.
 However, a version range in my dependencies section resolves like a
 charm. Could be that I've not understood how plugin lock down should
 work, though...

 I'm running Maven 2.0.9 on Windows JDK 1.5 through Cygwin. We have set
 up Proximity as a corporate proxy and I have followed the guide in the
 Sonatype book to configure repositories and mirrors in my settings.

 Adding this block to my POM:

 pluginManagement
   plugins
 plugin
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-clean-plugin/artifactId
   version[2.2]/version
 /plugin
   /plugins
 /pluginManagement

 Produces the output below:

 $ mvn clean -N
 [INFO] Scanning for projects...
 [INFO]
 
 [INFO] Building CORP parent POM
 [INFO]task-segment: [clean]
 [INFO]
 
 Downloading:
 http://corp-server/proximity/repository/external/org/apache/maven/plugins/maven-clean-plugin/[2.2]/maven-clean-plugin-[2.2].pom
 Downloading:
 http://corp-server/proximity/repository/public/org/apache/maven/plugins/maven-clean-plugin/[2.2]/maven-clean-plugin-[2.2].pom
 [INFO]
 
 [ERROR] BUILD ERROR
 [INFO]
 
 [INFO] Failed to resolve artifact.

 GroupId: org.apache.maven.plugins
 ArtifactId: maven-clean-plugin
 Version: [2.2]

 Reason: Unable to download the artifact from any repository

   org.apache.maven.plugins:maven-clean-plugin:pom:[2.2]

 from the specified remote repositories:
   px-external (http://corp-server/proximity/repository/external),
   px-public (http://corp-server/proximity/repository/public)


 [INFO]
 
 [INFO] For more information, run Maven with the -e switch
 [INFO]
 
 [INFO] Total time: 1 second
 [INFO] Finished at: Thu Jul 03 16:16:54 CEST 2008
 [INFO] Final Memory: 2M/63M
 [INFO]
 


 Any clues?

 --
 - Jan Fredrik Wedén

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




 --
 View this message in context: 
 http://www.nabble.com/Lock-down-of-plugin-versions-tp18260685p18299612.html
 Sent from the Maven - Users mailing list archive at Nabble.com.


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





-- 
- Jan Fredrik Wedén

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



Lock down of plugin versions

2008-07-03 Thread Jan Fredrik Wedén
Greetings,

I'm attempting to follow best practice and lock down plugins in our
parent POM. From what I understand, I should use a version range
instead of a plain version number to accomplish a true lock down for
future reproducibility. E.g. for the clean plugin I would use [2.2]
instead of just 2.2 as Maven considers the latter to be a
recommendation rather than a requirement.

Now trouble starts, I attempt to put the pluginManagement section
below in my POM and execute mvn clean. From the output below it seems
like Maven is attempting to resolve the version as [2.2] instead of
resolving the range to a fixed version first. The same thing happens
when I try to add the plugin definitions to buildplugins instead.
However, a version range in my dependencies section resolves like a
charm. Could be that I've not understood how plugin lock down should
work, though...

I'm running Maven 2.0.9 on Windows JDK 1.5 through Cygwin. We have set
up Proximity as a corporate proxy and I have followed the guide in the
Sonatype book to configure repositories and mirrors in my settings.

Adding this block to my POM:

pluginManagement
  plugins
plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-clean-plugin/artifactId
  version[2.2]/version
/plugin
  /plugins
/pluginManagement

Produces the output below:

$ mvn clean -N
[INFO] Scanning for projects...
[INFO] 
[INFO] Building CORP parent POM
[INFO]task-segment: [clean]
[INFO] 
Downloading: 
http://corp-server/proximity/repository/external/org/apache/maven/plugins/maven-clean-plugin/[2.2]/maven-clean-plugin-[2.2].pom
Downloading: 
http://corp-server/proximity/repository/public/org/apache/maven/plugins/maven-clean-plugin/[2.2]/maven-clean-plugin-[2.2].pom
[INFO] 
[ERROR] BUILD ERROR
[INFO] 
[INFO] Failed to resolve artifact.

GroupId: org.apache.maven.plugins
ArtifactId: maven-clean-plugin
Version: [2.2]

Reason: Unable to download the artifact from any repository

  org.apache.maven.plugins:maven-clean-plugin:pom:[2.2]

from the specified remote repositories:
  px-external (http://corp-server/proximity/repository/external),
  px-public (http://corp-server/proximity/repository/public)


[INFO] 
[INFO] For more information, run Maven with the -e switch
[INFO] 
[INFO] Total time: 1 second
[INFO] Finished at: Thu Jul 03 16:16:54 CEST 2008
[INFO] Final Memory: 2M/63M
[INFO] 


Any clues?

-- 
- Jan Fredrik Wedén

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



  1   2   3   4   >