Deploy artifact programmatically

2011-04-20 Thread kgiannou
Hi,

I want to upload an artifact with Java code but without having the
distributionmanagement tag in the settings.xml or in pom.xml files.
Is it possible to do it programmatically?

thank you




--
View this message in context: 
http://maven.40175.n5.nabble.com/Deploy-artifact-programmatically-tp4315124p4315124.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: Deploy artifact programmatically

2011-04-20 Thread Anders Hammar
As part of the build process or as a separate step?
As a separate step you could use deploy:deploy-file.

/Anders

On Wed, Apr 20, 2011 at 09:29, kgiannou kgian...@iti.gr wrote:

 Hi,

 I want to upload an artifact with Java code but without having the
 distributionmanagement tag in the settings.xml or in pom.xml files.
 Is it possible to do it programmatically?

 thank you




 --
 View this message in context:
 http://maven.40175.n5.nabble.com/Deploy-artifact-programmatically-tp4315124p4315124.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: Deploy artifact programmatically

2011-04-20 Thread kgiannou
As a separate step, but no with command line but with Java code if possible
:)

--
View this message in context: 
http://maven.40175.n5.nabble.com/Deploy-artifact-programmatically-tp4315124p4315136.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: Deploy artifact programmatically

2011-04-20 Thread Jochen Wiedmann
Question is, whether you really want to use Maven in that case.

Using Maven is the proper thing to do, if you want to be able to
deploy to multiple targets by just specifying a different URL, as in
scp://... or https://

If you have a fixed target (like a Nexus repository), it is much more
likely that all you need to do is to program a single HTTP PUT request
or something similar, which can be done with a few lines of code and
without depending on the whole Maven infrastructure, like local
repository, and so on.



On Wed, Apr 20, 2011 at 9:43 AM, kgiannou kgian...@iti.gr wrote:
 As a separate step, but no with command line but with Java code if possible
 :)

 --
 View this message in context: 
 http://maven.40175.n5.nabble.com/Deploy-artifact-programmatically-tp4315124p4315136.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





-- 
I Am What I Am And That's All What I Yam (Popeye)

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



Re: Deploy artifact programmatically

2011-04-20 Thread Anders Hammar
I believe you should have a look at Aether, which is the repository API.

Or, depending on the repo manager you're using you could use some
proprietary interface. If you're using Nexus, it has a REST API.

/Anders

On Wed, Apr 20, 2011 at 09:43, kgiannou kgian...@iti.gr wrote:

 As a separate step, but no with command line but with Java code if possible
 :)

 --
 View this message in context:
 http://maven.40175.n5.nabble.com/Deploy-artifact-programmatically-tp4315124p4315136.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: Deploy artifact programmatically

2011-04-20 Thread kgiannou
Thank you both for your quick and informative answers! I will try it and let
you know


--
View this message in context: 
http://maven.40175.n5.nabble.com/Deploy-artifact-programmatically-tp4315124p4315178.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



Maven - Aether - Repositories from settings.xml

2011-04-20 Thread Karl Heinz Marbaise
Hi,

i'm using Aether to get the available versions of an artifact so far so
good...but currently i have line in the code which i would like to solve in
a different way instead of hard coding it:


Artifact artifact = new DefaultArtifact(
com.soebes.subversion.sapm, sapm, null, [0,));
RemoteRepository repo = new RemoteRepository( central, default,
http://repo1.maven.org/maven2/; );
VersionRangeRequest rangeRequest = new VersionRangeRequest();
rangeRequest.setArtifact( artifact );
rangeRequest.addRepository( repo );
VersionRangeResult rangeResult = system.resolveVersionRange(
session, rangeRequest );
List versions = rangeResult.getVersions();

The line i wan't to do different is the following:

RemoteRepository repo = new RemoteRepository( central, default,
http://repo1.maven.org/maven2/; );


Isn't there a better solution to the information about the repositories from
the current settings.xml file or from the system configuration settings.xml
file. 

Does exist an example how to load the settings.xml of the user and the
system configuration to create the above repository configuration?

Many thanks in advance
Kind regards
Karl Heinz Marbaise

-
Kind regards
Karl Heinz Marbaise

http://www.soebes.de
http://www.skmwiki.de
http://supose.org/wiki/supose
--
View this message in context: 
http://maven.40175.n5.nabble.com/Maven-Aether-Repositories-from-settings-xml-tp4315216p4315216.html
Sent from the Maven - Users mailing list archive at Nabble.com.

profile activation

2011-04-20 Thread raymond
Hello,

I like to activate profiles from within a profile. (Or is there an other way
to achieve my goal ?)

For example I have multiple profiles which are activated in different
circumstances. Sometimes none of them are activated and sometimes more are
activated:
- integration-test-tomcat-profile
- integration-test-jetty-profile
- my-personal-special-profile
- company-special-profile
- exotic-verry-unknown-profile
- buildserver-profile

Our buildserver manager doesn't know any details about these profiles, he
just knows our buildserver-profile should be trigger when the buildserver
builds the project.

Normally I would use a property to activate the profile, but these profile
already have property activation. When I add a second property I have to set
both of them (or can I use OR somehow?), but my buildadmin only knows about
one. I don't wan't hem to know about the other properties.

It is up to the developer of the project to correctly configure the
'buildserver-profile'. This is why would like to configure (add) active
profiles from the 'buildserver-profile'.

I tried something like (in MyMojo):
public void execute() throws MojoExecutionException {
...
Profile p = getProfile(allProfiles, profileId);
p.setActivation(new AlwaysOnActivation());
project.setActiveProfiles(updatedActiveProfiles);

But the added profiles aren't executed.
I don't feel this is the way to go, but I can't think of an alternative.

Any tips please ?

Best regards,
Raymond

--
View this message in context: 
http://maven.40175.n5.nabble.com/profile-activation-tp4315068p4315068.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



Hudson: rebuild option

2011-04-20 Thread Hugo de Oude
It would be nice to have a rebuild option in Hudson. 
Because it is possible to add parameters to a build, it would be very nice
if there was a rebuild button. That button could pick up all the latest
provided paramters for that same project. Now I do have to figure out first
which parameters are used etc. 

Idea?

--
View this message in context: 
http://maven.40175.n5.nabble.com/Hudson-rebuild-option-tp4315229p4315229.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: Hudson: rebuild option

2011-04-20 Thread Olivier Lamy
Hello,
Wrong list ?

anyway : have a look here
https://wiki.jenkins-ci.org/display/JENKINS/Rebuild+Plugin

2011/4/20 Hugo de Oude hdo...@allshare.nl:
 It would be nice to have a rebuild option in Hudson.
 Because it is possible to add parameters to a build, it would be very nice
 if there was a rebuild button. That button could pick up all the latest
 provided paramters for that same project. Now I do have to figure out first
 which parameters are used etc.

 Idea?

 --
 View this message in context: 
 http://maven.40175.n5.nabble.com/Hudson-rebuild-option-tp4315229p4315229.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





-- 
Olivier Lamy
http://twitter.com/olamy
http://www.linkedin.com/in/olamy

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



Betr.: Re: Hudson: rebuild option

2011-04-20 Thread Hugo de Oude
Oh sorry, 
Was this the wrong list? Thanks anyway for your answer. Very good!!!
Which list to use for Hudson questions on the new nabble site?
 
Hugo

 Olivier Lamy [via Maven] ml-node+4315243-1451034254-22...@n5.nabble.com 
 10:37 20-04-2011 
Hello, 
Wrong list ? 

anyway : have a look here 
https://wiki.jenkins-ci.org/display/JENKINS/Rebuild+Plugin

2011/4/20 Hugo de Oude [hidden email] ( 
/user/SendEmail.jtp?type=nodenode=4315243i=0by-user=t ): 

 It would be nice to have a rebuild option in Hudson. 
 Because it is possible to add parameters to a build, it would be very nice 
 if there was a rebuild button. That button could pick up all the latest 
 provided paramters for that same project. Now I do have to figure out first 
 which parameters are used etc. 
 
 Idea? 
 
 -- 
 View this message in context: 
 http://maven.40175.n5.nabble.com/Hudson-rebuild-option-tp4315229p4315229.html
 Sent from the Maven - Users mailing list archive at Nabble.com. 
 
 - 
 To unsubscribe, e-mail: [hidden email] ( 
 /user/SendEmail.jtp?type=nodenode=4315243i=1by-user=t ) 
 For additional commands, e-mail: [hidden email] ( 
 /user/SendEmail.jtp?type=nodenode=4315243i=2by-user=t ) 
 
 



-- 
Olivier Lamy 
http://twitter.com/olamy
http://www.linkedin.com/in/olamy

- 
To unsubscribe, e-mail: [hidden email] ( 
/user/SendEmail.jtp?type=nodenode=4315243i=3by-user=t ) 
For additional commands, e-mail: [hidden email] ( 
/user/SendEmail.jtp?type=nodenode=4315243i=4by-user=t ) 



If you reply to this email, your message will be added to the discussion below:
http://maven.40175.n5.nabble.com/Hudson-rebuild-option-tp4315229p4315243.html 
To unsubscribe from Hudson: rebuild option, click here ( 
http://maven.40175.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4315229code=SGRPdWRlQGFsbHNoYXJlLm5sfDQzMTUyMjl8LTEyNjM5NTcz
 ). 


--
View this message in context: 
http://maven.40175.n5.nabble.com/Hudson-rebuild-option-tp4315229p4315250.html
Sent from the Maven - Users mailing list archive at Nabble.com.

Re: Maven - Aether - Repositories from settings.xml

2011-04-20 Thread Benjamin Bentmann

Karl Heinz Marbaise wrote:


Isn't there a better solution to the information about the repositories from
the current settings.xml file or from the system configuration settings.xml
file.


http://maven.apache.org/ref/3.0.3/maven-settings-builder/apidocs/org/apache/maven/settings/building/SettingsBuilder.html

and related components from the maven-settings-builder should do. 
Depending on how fancy you need to get, you might also want to use


http://maven.apache.org/ref/3.0.3/maven-model-builder/apidocs/org/apache/maven/model/profile/ProfileSelector.html


Benjamin

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



Re: Maven and Subversion.

2011-04-20 Thread Marc Rohlfs
I was just thinking a bit about this. You're facing different problems 
You won't be able all at once:


1. You could create the releases of the sub modules independently (first 
You'd have to create a release of the parent, using 'mvn release:prepare 
release:perform -N'). Problem: the dependencies in the other sub modules 
wouldn't be updated to the new SNAPSHOT version of the released module.


2. You could release all modules together. Problems: You can only have 
tags for the whole multi project, but You can't have separate tags for 
each sub module (I think, but I can't verify this right now). 
Furthermore You'd always have to release all the sub modules together, 
but I'd assume that You'd rather like to release just one (or some) of 
the sub modules at the same time.


BTW: You'd face the same (or similar) problems with other SCMs, too.


What about requesting a new feature/parameter for the 
maven-release-plugin, e.g. 'releaseModule'. It could be configured the 
same way like the command line option '--projects'. If the parameter is 
not set, the plugin would create the release as it already does right 
now, and otherwise it would only tag and release the specified module(s).


What do You (list members) think about this approach?


Kind regards, Marc

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



Re: Deploy artifact programmatically

2011-04-20 Thread kgiannou
Hi again :)

I have seen this post
http://maven.40175.n5.nabble.com/Re-Looking-for-help-on-interacting-with-Nexus-programmatically-upload-files-tt132165.html

but I dont know how to add authentication headers and how to add the jar
file to be uploaded to the request.

Do you have any concrete example?

thank you very much

--
View this message in context: 
http://maven.40175.n5.nabble.com/Deploy-artifact-programmatically-tp4315124p4315497.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: Deploy artifact programmatically

2011-04-20 Thread Jochen Wiedmann
Create an instance of java.net.URL, add user name and password as
described in [1], call setMethod(PUT) on the URLconnection, set
doOutput to true and write the file to the output stream.

1) 
http://www.avajava.com/tutorials/lessons/how-do-i-connect-to-a-url-using-basic-authentication.html


On Wed, Apr 20, 2011 at 1:11 PM, kgiannou kgian...@iti.gr wrote:
 Hi again :)

 I have seen this post
 http://maven.40175.n5.nabble.com/Re-Looking-for-help-on-interacting-with-Nexus-programmatically-upload-files-tt132165.html

 but I dont know how to add authentication headers and how to add the jar
 file to be uploaded to the request.

 Do you have any concrete example?

 thank you very much

 --
 View this message in context: 
 http://maven.40175.n5.nabble.com/Deploy-artifact-programmatically-tp4315124p4315497.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





-- 
I Am What I Am And That's All What I Yam (Popeye)

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



Packaged jar cannot access class of a dependency??

2011-04-20 Thread Chris24300
Hi all,

I'm trying to test out db4o (new to db in general) and so I created a new
project to test dumping some random data in.  I use three classes

import com.db4o.ObjectContainer;
import com.db4o.ObjectSet;
import com.db4o.cs.Db4oClientServer;

In my pom.xml I include the db4o repository and the dependency, I wasn't
able to connect to the repository at one point so I installed it to my local
repo and everything was building.. When I goto run the jar I get an class
not found exception with Db4oClientServer, I searched threw the db4o jar and
the class is in there...

Here's the error:
bash-3.2$ java -jar Db4oServer.jar 
Running server test...
Exception in thread main java.lang.NoClassDefFoundError:
com/db4o/cs/Db4oClientServer
at myTest.db4o.client.TestClient.test(TestClient.java:32)
at myTest.db4o.client.TestClient.main(TestClient.java:22)
Caused by: java.lang.ClassNotFoundException: com.db4o.cs.Db4oClientServer
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 2 more

I don't know what I messed up but it doesn't like something.  When I search
through the jar maven packaged I only see my classes, is the db4o jar
supposed to be included as well? Can someone help me out?

Thanks!


--
View this message in context: 
http://maven.40175.n5.nabble.com/Packaged-jar-cannot-access-class-of-a-dependency-tp4315587p4315587.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: Maven and Subversion.

2011-04-20 Thread Wendy Smoak
On Wed, Apr 20, 2011 at 6:59 AM, Marc Rohlfs pomar...@googlemail.com wrote:
 I was just thinking a bit about this. You're facing different problems You
 won't be able all at once:

 1. You could create the releases of the sub modules independently (first
 You'd have to create a release of the parent, using 'mvn release:prepare
 release:perform -N').

Not necessarily.  If that parent (in the directory with the svn
externals) is only there as an aggregator for convenience, it never
needs to be released.

The projects themselves could have some other parent, like a corporate
level parent pom that controls versions, etc.

A project can only declare one parent but it's not 1:1.

-- 
Wendy

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



Re: Packaged jar cannot access class of a dependency??

2011-04-20 Thread Anders Hammar
But you're not including the jb4o jar in the classpath when you're
executing?
As you're executing your Java program the standard Java way Maven is not
involved.

/Anders

On Wed, Apr 20, 2011 at 13:54, Chris24300 chris24...@hotmail.com wrote:

 Hi all,

 I'm trying to test out db4o (new to db in general) and so I created a new
 project to test dumping some random data in.  I use three classes

 import com.db4o.ObjectContainer;
 import com.db4o.ObjectSet;
 import com.db4o.cs.Db4oClientServer;

 In my pom.xml I include the db4o repository and the dependency, I wasn't
 able to connect to the repository at one point so I installed it to my
 local
 repo and everything was building.. When I goto run the jar I get an class
 not found exception with Db4oClientServer, I searched threw the db4o jar
 and
 the class is in there...

 Here's the error:
 bash-3.2$ java -jar Db4oServer.jar
 Running server test...
 Exception in thread main java.lang.NoClassDefFoundError:
 com/db4o/cs/Db4oClientServer
at myTest.db4o.client.TestClient.test(TestClient.java:32)
at myTest.db4o.client.TestClient.main(TestClient.java:22)
 Caused by: java.lang.ClassNotFoundException: com.db4o.cs.Db4oClientServer
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 2 more

 I don't know what I messed up but it doesn't like something.  When I search
 through the jar maven packaged I only see my classes, is the db4o jar
 supposed to be included as well? Can someone help me out?

 Thanks!


 --
 View this message in context:
 http://maven.40175.n5.nabble.com/Packaged-jar-cannot-access-class-of-a-dependency-tp4315587p4315587.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: Maven and Subversion.

2011-04-20 Thread Stephen Connolly
I've never set up a test project to see exactly what it does, but I
thought 
http://maven.apache.org/plugins/maven-release-plugin/prepare-mojo.html#commitByProject
might do something nice... or not!

On 20 April 2011 11:59, Marc Rohlfs pomar...@googlemail.com wrote:
 I was just thinking a bit about this. You're facing different problems You
 won't be able all at once:

 1. You could create the releases of the sub modules independently (first
 You'd have to create a release of the parent, using 'mvn release:prepare
 release:perform -N'). Problem: the dependencies in the other sub modules
 wouldn't be updated to the new SNAPSHOT version of the released module.

 2. You could release all modules together. Problems: You can only have tags
 for the whole multi project, but You can't have separate tags for each sub
 module (I think, but I can't verify this right now). Furthermore You'd
 always have to release all the sub modules together, but I'd assume that
 You'd rather like to release just one (or some) of the sub modules at the
 same time.

 BTW: You'd face the same (or similar) problems with other SCMs, too.


 What about requesting a new feature/parameter for the maven-release-plugin,
 e.g. 'releaseModule'. It could be configured the same way like the command
 line option '--projects'. If the parameter is not set, the plugin would
 create the release as it already does right now, and otherwise it would only
 tag and release the specified module(s).

 What do You (list members) think about this approach?


 Kind regards, Marc

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



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



Re: Packaged jar cannot access class of a dependency??

2011-04-20 Thread Chris24300
I thought maven would include the db4o jar in my project jar? 

If I specify -classpath and point to db4o.jar then java can't find my test
class.  

bash-3.2$ java -classpath ./db4o-8.0.184.15484-all-java5.jar -jar
Db4oServer.jar 

Does not even run..

--
View this message in context: 
http://maven.40175.n5.nabble.com/Packaged-jar-cannot-access-class-of-a-dependency-tp4315587p4315628.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: Maven and Subversion.

2011-04-20 Thread Marc Rohlfs
Didn't notice that parameter before. Sounds interesting - if it would 
really create a separate release tag for every module. But it wouldn't 
solve the problem of releasing just one (or some) of the modules in the 
reactor.



On 20/04/11 14:01, Stephen Connolly wrote:

I've never set up a test project to see exactly what it does, but I
thoughthttp://maven.apache.org/plugins/maven-release-plugin/prepare-mojo.html#commitByProject
might do something nice... or not!


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



Re: Packaged jar cannot access class of a dependency??

2011-04-20 Thread Thomas Sundberg
On Wed, Apr 20, 2011 at 14:12, Chris24300 chris24...@hotmail.com wrote:
 I thought maven would include the db4o jar in my project jar?

 If I specify -classpath and point to db4o.jar then java can't find my test
 class.

 bash-3.2$ java -classpath ./db4o-8.0.184.15484-all-java5.jar -jar
 Db4oServer.jar

 Does not even run..

If you want an executable jar, then you have to specify a main class
and make sure that what you need is included. I wrote a little about a
while ago. You can read it at

http://thomassundberg.wordpress.com/2011/03/05/create-an-executable-jar-from-maven/

HTH
Thomas


 --
 View this message in context: 
 http://maven.40175.n5.nabble.com/Packaged-jar-cannot-access-class-of-a-dependency-tp4315587p4315628.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





-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

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



Advantages of using a Repository Manager

2011-04-20 Thread Sony Antony
Im trying to evaluate whether we should use a repository manager.

Will somebody post at least a few of the advantages here
Our project uses a list of pre approved ( and pre downloaded ) dependencies
and plugins.

--sony


Re: Packaged jar cannot access class of a dependency??

2011-04-20 Thread Chris24300
Thanks for replying with the link, I've already included the main class in my
pom

Majority of my pom

build
finalNameDb4oServer/finalName

plugins
plugin
artifactIdmaven-compiler-plugin/artifactId
configuration
source1.5/source
target1.5/target
/configuration
/plugin

plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-jar-plugin/artifactId
configuration
archive
manifest

mainClass${groupId}.TestClient/mainClass

packageName${groupId}/packageName
/manifest
manifestEntries
modedevelopment/mode
url${pom.url}/url
/manifestEntries
/archive
/configuration
/plugin
plugin
artifactIdmaven-assembly-plugin/artifactId
configuration
archive
manifest

mainClass${groupId}.TestClient/mainClass
/manifest
/archive
descriptorRefs

descriptorRefjar-with-dependencies/descriptorRef
/descriptorRefs
/configuration
/plugin

/plugins
/build

--
View this message in context: 
http://maven.40175.n5.nabble.com/Packaged-jar-cannot-access-class-of-a-dependency-tp4315587p4315651.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: Packaged jar cannot access class of a dependency??

2011-04-20 Thread Chris24300
What confuses me is that it doesn't complain about the other two classes,
ObjectContainer and ObjectSet?

--
View this message in context: 
http://maven.40175.n5.nabble.com/Packaged-jar-cannot-access-class-of-a-dependency-tp4315587p4315664.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: Advantages of using a Repository Manager

2011-04-20 Thread Tamás Cservenák
See here for reasons:

http://www.sonatype.com/books/nexus-book/reference/sect-repoman-reasons.html


Thanks,
~t~

On Wed, Apr 20, 2011 at 2:23 PM, Sony Antony sony.ant...@gmail.com wrote:

 Im trying to evaluate whether we should use a repository manager.

 Will somebody post at least a few of the advantages here
 Our project uses a list of pre approved ( and pre downloaded ) dependencies
 and plugins.

 --sony



Re: Maven and Subversion.

2011-04-20 Thread Marc Rohlfs



On 20/04/11 13:55, Wendy Smoak wrote:

On Wed, Apr 20, 2011 at 6:59 AM, Marc Rohlfspomar...@googlemail.com  wrote:

I was just thinking a bit about this. You're facing different problems You
won't be able all at once:

1. You could create the releases of the sub modules independently (first
You'd have to create a release of the parent, using 'mvn release:prepare
release:perform -N').


Not necessarily.  If that parent (in the directory with the svn
externals) is only there as an aggregator for convenience, it never
needs to be released.


I didn't involve the svn:externals idea into my thoughts, because it 
would only work if the modules don't inherit from the parent. In most 
multi-module projects (I've seen), modules do inherit parent 
configurations. I You want to release a sub module, the release plugin 
requests the parent to be released first - which might be achieved using 
'mvn release:prepare release:perform -N'.





The projects themselves could have some other parent, like a corporate
level parent pom that controls versions, etc.

A project can only declare oneparent  but it's not 1:1.



You're right, but Maven discourages this:

[WARNING]
[WARNING] Some problems were encountered while building the effective 
model for test:my-sub-module:jar:1.0-SNAPSHOT
[WARNING] 'parent.relativePath' points at test:my-parent instead of 
test:another-parent, please verify your project structure @ line 11, 
column 11

[WARNING]
[WARNING] It is highly recommended to fix these problems because they 
threaten the stability of your build.

[WARNING]
[WARNING] For this reason, future Maven versions might no longer support 
building such malformed projects.

[WARNING]

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



Re: Deploy artifact programmatically

2011-04-20 Thread kgiannou
ok done with the authentication..

Shouldn't I somehow put the contents of the jar file to be uploaded to my
request?

--
View this message in context: 
http://maven.40175.n5.nabble.com/Deploy-artifact-programmatically-tp4315124p4315695.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: Maven and Subversion.

2011-04-20 Thread Marc Rohlfs

On 20/04/11 14:41, Marc Rohlfs wrote:

On 20/04/11 13:55, Wendy Smoak wrote:

On Wed, Apr 20, 2011 at 6:59 AM, Marc Rohlfspomar...@googlemail.com
wrote:

I was just thinking a bit about this. You're facing different
problems You
won't be able all at once:

1. You could create the releases of the sub modules independently (first
You'd have to create a release of the parent, using 'mvn release:prepare
release:perform -N').


Not necessarily. If that parent (in the directory with the svn
externals) is only there as an aggregator for convenience, it never
needs to be released.


I didn't involve the svn:externals idea into my thoughts, because it
would only work if the modules don't inherit from the parent. In most
multi-module projects (I've seen), modules do inherit parent
configurations. I You want to release a sub module, the release plugin
requests the parent to be released first - which might be achieved using
'mvn release:prepare release:perform -N'.




The projects themselves could have some other parent, like a corporate
level parent pom that controls versions, etc.

A project can only declare oneparent but it's not 1:1.



You're right, but Maven discourages this:

[WARNING]
[WARNING] Some problems were encountered while building the effective
model for test:my-sub-module:jar:1.0-SNAPSHOT
[WARNING] 'parent.relativePath' points at test:my-parent instead of
test:another-parent, please verify your project structure @ line 11,
column 11
[WARNING]
[WARNING] It is highly recommended to fix these problems because they
threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support
building such malformed projects.
[WARNING]


P.S.: Maybe the maven-invoker-plugin could solve this in another way ...

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



Re: mvn eclipse plugin for multimodule proyect

2011-04-20 Thread Fernando Wermus
Asmann,
 I will explain everything

We have a pom.xml for constructing all the developer environment separate
from the pom's projects. We have,

1. use scm to checkout all proyects and bootstrap it.
2. copy eclipse to developer machine.
3. copy app server to developer machine
4. run eclipse:eclipse and eclipse:configure-workspace to set up code style
and generate all eclipse proyects.

We have a pom.xml which does activities from 1 to 4 and pom.xml which are
part of the proyect.


Our project's structure is the following:

pom.xml (parent)
 pom.xml (project A)
 pom.xml (project B)
 pom.xml (project C)


I am trying to run mvn eclipse:eclipse in parent pom.xml without any
success.
I am not sure if pom.xml for constructing developer environment run mvn
eclipse:eclipse in pom.xml parent or in itself. I am almost sure that is
doing it in parent pom.xml without any success.

thanks in advance

this is my pom.xml for constructing developer environment:

profile
iddeveloper/id
build
plugins
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-scm-plugin/artifactId
version1.1/version
configuration
username.../username
password.../password
checkoutDirectory.../checkoutDirectory
scmVersion.../scmVersion
 wtpversion2.0/wtpversion
scmVersionTypebranch/scmVersionType
  /configuration
executions
execution
phaseverify/phase
goals
  goalbootstrap/goal
/goals
/execution
/executions
 /plugin





 plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdexec-maven-plugin/artifactId
 executions
 execution
 idcopio-eclipse/id
 phaseverify/phase
 configuration
 executablescp/executable
 arguments
 argument.../argument
argument/opt/apps//argument
 /arguments
 /configuration
 goals
 goalexec/goal
 /goals
 /execution
 execution
 iddescomprimo-eclipse/id
 phaseverify/phase
 configuration
 executabletar/executable
 arguments
 argumentzxvf/argument

 argument/opt/apps/helios_jree.tar.gz/argument
 argument-C/argument
 argument/opt/apps//argument
 /arguments
 /configuration
 goals
 goalexec/goal
 /goals
 /execution

...
/executions
  /plugin
plugin
artifactIdmaven-eclipse-plugin/artifactId
version2.8/version
executions

execution
idconfigure-workspace-eclipse/id
phaseverify/phase

configuration
workspace.../workspace
workspaceCodeStylesURL

file:///${user.home}/WorkingDirectory/${odea.cvs.branch}/env/config/IDEs/eclipse/formatting-rules.xml
/workspaceCodeStylesURL
  wtpmanifesttrue/wtpmanifest

wtpapplicationxmltrue/wtpapplicationxml
  wtpversion2.0/wtpversion

manifest${basedir}/src/main/resources/META-INF/MANIFEST.MF/manifest
/configuration
goals
goalconfigure-workspace/goal
goaleclipse/goal
  

Re: Deploy artifact programmatically

2011-04-20 Thread Jochen Wiedmann
Yes, as I said, that's what URLConnection.getOutputStream() is for.
And don't forget to invoke URLconnection.setDoOutput(true) in advance.

On Wed, Apr 20, 2011 at 2:44 PM, kgiannou kgian...@iti.gr wrote:
 ok done with the authentication..

 Shouldn't I somehow put the contents of the jar file to be uploaded to my
 request?

 --
 View this message in context: 
 http://maven.40175.n5.nabble.com/Deploy-artifact-programmatically-tp4315124p4315695.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





-- 
I Am What I Am And That's All What I Yam (Popeye)

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



Re: Advantages of using a Repository Manager

2011-04-20 Thread Sony Antony
Thank you for the link.
I had looked at this section from teh book around a year back.
I couldnt find any clear advantage since we have a  pre approved and pre
decided list of plugins and dependencies.

Currently we have a master repository which is populated only when project
decides to add a new dependency or plugin.
At teh initial hudson setup, this repository is copied to a private
location, and hudson is pointed to this private location ( this is one time
only and is not done with each build ).
Build is done in the offline maven mode.

Given this scenario, Im trying to see if repository managers can provide any
advantage over what we already have.


--sony

2011/4/20 Tamás Cservenák ta...@cservenak.net

 See here for reasons:


 http://www.sonatype.com/books/nexus-book/reference/sect-repoman-reasons.html


 Thanks,
 ~t~

 On Wed, Apr 20, 2011 at 2:23 PM, Sony Antony sony.ant...@gmail.com
 wrote:

  Im trying to evaluate whether we should use a repository manager.
 
  Will somebody post at least a few of the advantages here
  Our project uses a list of pre approved ( and pre downloaded )
 dependencies
  and plugins.
 
  --sony
 



RE: Maven and Subversion.

2011-04-20 Thread tpatch
I am still working through the discussion - just wanted to say thanks for the 
feedback.

Todd

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



Re: Deploy artifact programmatically

2011-04-20 Thread kgiannou


I still can not upload using the following code...any help would be valuable



String webPage = http://myServer.com;;
String name = admin;
String password = admin;

String authString = name + : + password;  

byte[] authEncBytes = 
Base64.encodeBase64(authString.getBytes());
String authStringEnc = new 
String(authEncBytes);
URL url = new URL(webPage);
HttpURLConnection urlConnection = 
(HttpURLConnection)
url.openConnection();
urlConnection = (HttpURLConnection) 
url.openConnection();

urlConnection.setRequestProperty(Authorization, Basic 
+ authStringEnc);

urlConnection.setRequestProperty(repositoryId, releases);
urlConnection.setRequestProperty(groupId ,
CreateConfigurationFile.groupId);
urlConnection.setRequestProperty(artifactId ,
CreateConfigurationFile.artifactId);

urlConnection.setDoOutput(true);
urlConnection.setRequestMethod(PUT);

OutputStreamWriter out = new
OutputStreamWriter(urlConnection.getOutputStream());
File file = new File(
C:/Documents and
Settings/kgiannou/.m2/repository/Test/Test/1/Test-1.jar);
try {
FileInputStream fis = new 
FileInputStream(file);
char current;
while (fis.available()  0) {
current = (char) fis.read();
out.write(current);
}
} catch (IOException e) {
e.printStackTrace();
}
out.close();
InputStream is = urlConnection.getInputStream();
InputStreamReader isr = new 
InputStreamReader(is);
int numCharsRead = 0;
char[] charArray = new char[1024];
StringBuffer sb = new StringBuffer();
while ((numCharsRead = isr.read(charArray))  
0) {
sb.append(charArray, 0, numCharsRead);
}
String result = sb.toString();
System.out.println(result);






--
View this message in context: 
http://maven.40175.n5.nabble.com/Deploy-artifact-programmatically-tp4315124p4326883.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: Deploy artifact programmatically

2011-04-20 Thread kgiannou

its now ok I found the problems in my code..
One last question...Except from uploading the jar file, shouldn't I upload
the corresponding .pom file to the same directory?

Thank you very much for your effort!

--
View this message in context: 
http://maven.40175.n5.nabble.com/Deploy-artifact-programmatically-tp4315124p4327893.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



mvn test and classpath: do I need to execute install?

2011-04-20 Thread leojhartiv-2
I've been using Maven for some time, so I'm a bit embarrassed to ask this
question.  That said...

If I have a multimodule project:

top
-module1
-module2

and the modules have the following dependencies:

module1 depends on top
module2 depends on top
module2 depends on module1

When I want to execute the latest tests after a subversion update, I do the
following:

-Navigate to top
-Execute mvn clean install

Now in my real use case I actually have 50 or so projects and a few of them
end up creating fairly large JAR files.  A significant portion of the time
taken to execute the mvn clean install process is taken up by packaging
and installing those JAR artifacts.

So I'm wondering: do I need to actually use the install for modules to know
about changes to their dependencies?  In other words, could I just do:

-Navigate to top
-Execute mvn clean test

and module2 would be smart enough to use the target folder of module1 in its
classpath to execute those tests or does module2 always use what has been
installed in the local repository?

Thanks!

--
View this message in context: 
http://maven.40175.n5.nabble.com/mvn-test-and-classpath-do-I-need-to-execute-install-tp4327921p4327921.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: Packaged jar cannot access class of a dependency??

2011-04-20 Thread Timothy Mcginnis
Are you expecting this to run as part of the default packaging phase?

If so, I believe you are missing an executions section for the assembly 
plugin that binds the 'single' goal to the packaging phase.

project
  [...]
  build
[...]
plugins
  plugin
artifactIdmaven-assembly-plugin/artifactId
version2.2.1/version
configuration
  descriptorRefs
descriptorRefjar-with-dependencies/descriptorRef
  /descriptorRefs
/configuration
executions
  execution
idmake-assembly/id !-- this is used for inheritance 
merges --
phasepackage/phase !-- bind to the packaging phase --
goals
  goalsingle/goal
/goals
  /execution
/executions
  /plugin
  [...]
/project


See the Execution: Building An Assembly section of this page 
http://maven.apache.org/plugins/maven-assembly-plugin/usage.html


Tim McGinnis
717 720-1962
Web Development
AES/PHEAA



From:
Chris24300 chris24...@hotmail.com
To:
users@maven.apache.org
Date:
04/20/2011 08:25 AM
Subject:
Re: Packaged jar cannot access class of a dependency??



Thanks for replying with the link, I've already included the main class in 
my
pom

Majority of my pom

build
 finalNameDb4oServer/finalName

 plugins
 plugin
 artifactIdmaven-compiler-plugin/artifactId
 configuration
  source1.5/source
  target1.5/target
 /configuration
 /plugin

 plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-jar-plugin/artifactId
 configuration
  archive
 manifest
  mainClass${groupId}.TestClient/mainClass
 packageName${groupId}/packageName
 /manifest
 manifestEntries
 modedevelopment/mode
 url${pom.url}/url
 /manifestEntries
  /archive
 /configuration
 /plugin
 plugin
 artifactIdmaven-assembly-plugin/artifactId
 configuration
  archive
 manifest
  mainClass${groupId}.TestClient/mainClass
 /manifest
  /archive
  descriptorRefs
 descriptorRefjar-with-dependencies/descriptorRef
  /descriptorRefs
 /configuration
 /plugin

 /plugins
 /build

--
View this message in context: 
http://maven.40175.n5.nabble.com/Packaged-jar-cannot-access-class-of-a-dependency-tp4315587p4315651.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





==
This message contains privileged and confidential information intended for the 
above addressees only.  If you
receive this message in error please delete or destroy this message and/or 
attachments.  

The sender of this message will fully cooperate in the civil and criminal 
prosecution of any individual engaging
in the unauthorized use of this message.
==


Re: Release plugin: release project from within subdirectory

2011-04-20 Thread werdex
Hi,
The following did trick for me:
 configuration
goalsdeploy -f Sources/pom.xml/goals
/configuration

--
View this message in context: 
http://maven-users.828.n2.nabble.com/Release-plugin-release-project-from-within-subdirectory-tp5057222p6290891.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: Packaged jar cannot access class of a dependency??

2011-04-20 Thread Chris24300
Thanks for the link, I'll look into it.  I want to create a library that will
handle everything for me so I can pass it an Object to store, I need to test
the client first to make sure it can store..

--
View this message in context: 
http://maven.40175.n5.nabble.com/Packaged-jar-cannot-access-class-of-a-dependency-tp4315587p4328333.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: mvn test and classpath: do I need to execute install?

2011-04-20 Thread Wayne Fay
 So I'm wondering: do I need to actually use the install for modules to know
 about changes to their dependencies?  In other words, could I just do:

 -Navigate to top
 -Execute mvn clean test

 and module2 would be smart enough to use the target folder of module1 in its
 classpath to execute those tests or does module2 always use what has been

Assuming you have the multi-modules set up properly and are executing
from the top/shared parent, the reactor should figure out the correct
build order for your projects and then use the correct recently-built
versions of things as it builds various modules that depend on each
other.

Wayne

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



Re: mvn test and classpath: do I need to execute install?

2011-04-20 Thread leojhartiv-2
So just so I understand completely:

if module2 depends on module1 and I execute mvn clean test at the top
shared parent, the classpath for module2 would look at
module1/target/classes vs m2-repo...module1.jar.  Correct?

--
View this message in context: 
http://maven.40175.n5.nabble.com/mvn-test-and-classpath-do-I-need-to-execute-install-tp4327921p4328446.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: mvn eclipse plugin for multimodule proyect

2011-04-20 Thread Asmann, Roland
Hello Fernando,

You can call me 'Roland', that is my first name. ;-)

If I understand correctly, you have a POM-file on your computer and run 
Maven on it. This will download/checkout/copy/... everything to your 
computer.

Now, I presume that the POM you are using is *not* the one you call 
'parent' in your structure, or is it? If not, I think the problem is 
that 'eclipse:eclipse' is called on the wrong project.
If it is, there might be something else going on here.

Please give me a little more background info on this!

Also, I really like the idea you are having here. I do think this would 
be better as an archetype though, but that's just a matter of opinion. :-)

Regards,

Roland


On 20-04-11 14:54, Fernando Wermus wrote:
 Asmann,
   I will explain everything

 We have a pom.xml for constructing all the developer environment separate
 from the pom's projects. We have,

 1. use scm to checkout all proyects and bootstrap it.
 2. copy eclipse to developer machine.
 3. copy app server to developer machine
 4. run eclipse:eclipse and eclipse:configure-workspace to set up code style
 and generate all eclipse proyects.

 We have a pom.xml which does activities from 1 to 4 and pom.xml which are
 part of the proyect.


 Our project's structure is the following:

 pom.xml (parent)
   pom.xml (project A)
   pom.xml (project B)
   pom.xml (project C)


 I am trying to run mvn eclipse:eclipse in parent pom.xml without any
 success.
 I am not sure if pom.xml for constructing developer environment run mvn
 eclipse:eclipse in pom.xml parent or in itself. I am almost sure that is
 doing it in parent pom.xml without any success.

 thanks in advance

 this is my pom.xml for constructing developer environment:

  profile
  iddeveloper/id
  build
  plugins
  plugin
  groupIdorg.apache.maven.plugins/groupId
  artifactIdmaven-scm-plugin/artifactId
  version1.1/version
  configuration
  username.../username
  password.../password
  checkoutDirectory.../checkoutDirectory
  scmVersion.../scmVersion
   wtpversion2.0/wtpversion
  scmVersionTypebranch/scmVersionType
/configuration
  executions
  execution
  phaseverify/phase
  goals
goalbootstrap/goal
  /goals
  /execution
  /executions
   /plugin





   plugin
   groupIdorg.codehaus.mojo/groupId
   artifactIdexec-maven-plugin/artifactId
   executions
   execution
   idcopio-eclipse/id
   phaseverify/phase
   configuration
   executablescp/executable
   arguments
   argument.../argument
  argument/opt/apps//argument
   /arguments
   /configuration
   goals
   goalexec/goal
   /goals
   /execution
   execution
   iddescomprimo-eclipse/id
   phaseverify/phase
   configuration
   executabletar/executable
   arguments
   argumentzxvf/argument

   argument/opt/apps/helios_jree.tar.gz/argument
   argument-C/argument
   argument/opt/apps//argument
   /arguments
   /configuration
   goals
   goalexec/goal
   /goals
   /execution

 ...
  /executions
/plugin
  plugin
  artifactIdmaven-eclipse-plugin/artifactId
  version2.8/version
  

Re: Packaged jar cannot access class of a dependency??

2011-04-20 Thread Chris24300
I added a addClasspath tag and it included the classpath in the manifest, I
thought I was getting somewhere but still get the same error..

I ended up using a new eclipse project and copying my stuff over and
exporting as exec jar and it works... 

--
View this message in context: 
http://maven.40175.n5.nabble.com/Packaged-jar-cannot-access-class-of-a-dependency-tp4315587p4328511.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: mvn test and classpath: do I need to execute install?

2011-04-20 Thread Wayne Fay
 if module2 depends on module1 and I execute mvn clean test at the top
 shared parent, the classpath for module2 would look at
 module1/target/classes vs m2-repo...module1.jar.  Correct?

Yes, and you can confirm this via mvn -X clean test which will show
the actual classpaths that are being used at various stages of the
build etc.

Wayne

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



2.8.2 release?

2011-04-20 Thread James Neal
Does anyone have any idea when 2.8.2 will come out?


java file path in exec:java

2011-04-20 Thread Zilvinas Vilutis
Hi maven users!

I'm trying to execute a java command and pass a path to a file as an argument:

plugin
  groupIdorg.codehaus.mojo/groupId
  artifactIdexec-maven-plugin/artifactId
  configuration
executablejava/executable
workingDirectory${project.build.outputDirectory}/workingDirectory
classpathScoperuntime/classpathScope
arguments
  argument-c
${project.build.outputDirectory}${file.separator}orm.properties/argument
/arguments
mainClasscom.company.deploy.product.AutomatedProductDeploy/mainClass
  /configuration
/plugin

And I'm using maven properties to construct the filename:
${project.build.outputDirectory}${file.separator}orm.properties

Unfortunately, I'm getting an exception from the java class I'm running:

Caused by: java.io.FileNotFoundException:  C:\path to my
project\target\classes\orm.properties (The filename, directory name,
or volume label syntax is incorrect)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.init(FileInputStream.java:106)

Most likely the it is using the argument and does not escape slashes
to new java.io.File( filePath )

As I don't have access to source code of the class - is there any way
to enforce maven use unix style path generation on windows? ( change
slashes to / )

I tried to override the ${file.separator} property - but it seems to
be read-only and doesn't help.

Any ideas?

Thank you!

Žilvinas Vilutis

E-mail:   cika...@gmail.com

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



Re: java file path in exec:java

2011-04-20 Thread Asmann, Roland
Just use the character '/', it works on Windows!


On 20-04-11 21:45, Zilvinas Vilutis wrote:
 Hi maven users!

 I'm trying to execute a java command and pass a path to a file as an argument:

 plugin
groupIdorg.codehaus.mojo/groupId
artifactIdexec-maven-plugin/artifactId
configuration
  executablejava/executable
  workingDirectory${project.build.outputDirectory}/workingDirectory
  classpathScoperuntime/classpathScope
  arguments
argument-c
 ${project.build.outputDirectory}${file.separator}orm.properties/argument
  /arguments
  mainClasscom.company.deploy.product.AutomatedProductDeploy/mainClass
/configuration
 /plugin

 And I'm using maven properties to construct the filename:
 ${project.build.outputDirectory}${file.separator}orm.properties

 Unfortunately, I'm getting an exception from the java class I'm running:

 Caused by: java.io.FileNotFoundException:  C:\path to my
 project\target\classes\orm.properties (The filename, directory name,
 or volume label syntax is incorrect)
  at java.io.FileInputStream.open(Native Method)
  at java.io.FileInputStream.init(FileInputStream.java:106)

 Most likely the it is using the argument and does not escape slashes
 to new java.io.File( filePath )

 As I don't have access to source code of the class - is there any way
 to enforce maven use unix style path generation on windows? ( change
 slashes to / )

 I tried to override the ${file.separator} property - but it seems to
 be read-only and doesn't help.

 Any ideas?

 Thank you!

 Žilvinas Vilutis

 E-mail:   cika...@gmail.com

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


-- 
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock  T +43 1 2198790-27
Floridsdorfer Hauptstr. 1   F +43 1 2198790-927
A-1210 Wien M +43 664 88657566
E roland.asm...@adesso.at
W www.adesso.at

-
  business. people. technology. 
-

Only partial filtering of .bat with assembly

2011-04-20 Thread David Delbecq
Hello, 

i try to have some .bat files filtered by assembly plugin. However, for some 
reason, any batch line that starts with a @ is ignored by filterer :/ 
This is a big problem considering 90% of the script lines starts with a @. Is 
there some way to have filter don't ignore those lines? 


my source batch file: 

example ${pom.version} 
@java -jar .\lib\dvp-latexrenderer-${pom.version}.jar .\..\documents\%1\%1.xml 
.\..\documents\%1\%1-latex.xml images 
The output i get: 

example 1.0-SNAPSHOT 
@java -jar .\lib\dvp-latexrenderer-${pom.version}.jar .\..\documents\%1\%1.xml 
.\..\documents\%1\%1-latex.xml images 



Here is my assembly configuration by the way 
fileSet 
includesinclude*/include/includes 
directorysrc/assembly/script//directory 
filteredtrue/filtered 
directoryMode0755/directoryMode 
fileMode0755/fileMode 
/fileSet 



Re: java file path in exec:java

2011-04-20 Thread Zilvinas Vilutis
Exactly, but I need *maven* to generate those / :)

I need the ${project.build.outputDirectory}${file.separator}orm.properties
to contain / in the output, but it generates the path with \
slashes, e.g. C:\path to myproject\target\classes\orm.properties

Regards

Žilvinas Vilutis

Mobile:   (+370) 652 38353
E-mail:   cika...@gmail.com



On Wed, Apr 20, 2011 at 12:57 PM, Asmann, Roland
roland.asm...@adesso.at wrote:
 Just use the character '/', it works on Windows!


 On 20-04-11 21:45, Zilvinas Vilutis wrote:
 Hi maven users!

 I'm trying to execute a java command and pass a path to a file as an 
 argument:

 plugin
    groupIdorg.codehaus.mojo/groupId
    artifactIdexec-maven-plugin/artifactId
    configuration
      executablejava/executable
      workingDirectory${project.build.outputDirectory}/workingDirectory
      classpathScoperuntime/classpathScope
      arguments
        argument-c
 ${project.build.outputDirectory}${file.separator}orm.properties/argument
      /arguments
      mainClasscom.company.deploy.product.AutomatedProductDeploy/mainClass
    /configuration
 /plugin

 And I'm using maven properties to construct the filename:
 ${project.build.outputDirectory}${file.separator}orm.properties

 Unfortunately, I'm getting an exception from the java class I'm running:

 Caused by: java.io.FileNotFoundException:  C:\path to my
 project\target\classes\orm.properties (The filename, directory name,
 or volume label syntax is incorrect)
          at java.io.FileInputStream.open(Native Method)
          at java.io.FileInputStream.init(FileInputStream.java:106)

 Most likely the it is using the argument and does not escape slashes
 to new java.io.File( filePath )

 As I don't have access to source code of the class - is there any way
 to enforce maven use unix style path generation on windows? ( change
 slashes to / )

 I tried to override the ${file.separator} property - but it seems to
 be read-only and doesn't help.

 Any ideas?

 Thank you!

 Žilvinas Vilutis

 E-mail:   cika...@gmail.com

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


 --
 Roland Asmann
 Senior Software Engineer

 adesso Austria GmbH
 Floridotower 26. Stock              T +43 1 2198790-27
 Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
 A-1210 Wien                         M +43 664 88657566
                                    E roland.asm...@adesso.at
                                    W www.adesso.at

 -
              business. people. technology. 
 -

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



Re: java file path in exec:java

2011-04-20 Thread Asmann, Roland
What I meant was: don't use ${file.separator} and write '/' in your POM.

Or do you have a reason you need the variable?


On 20-04-11 23:51, Zilvinas Vilutis wrote:
 Exactly, but I need *maven* to generate those / :)

 I need the ${project.build.outputDirectory}${file.separator}orm.properties
 to contain / in the output, but it generates the path with \
 slashes, e.g. C:\path to myproject\target\classes\orm.properties

 Regards

 Žilvinas Vilutis

 Mobile:   (+370) 652 38353
 E-mail:   cika...@gmail.com



 On Wed, Apr 20, 2011 at 12:57 PM, Asmann, Roland
 roland.asm...@adesso.at  wrote:
 Just use the character '/', it works on Windows!


 On 20-04-11 21:45, Zilvinas Vilutis wrote:
 Hi maven users!

 I'm trying to execute a java command and pass a path to a file as an 
 argument:

 plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdexec-maven-plugin/artifactId
 configuration
   executablejava/executable
   workingDirectory${project.build.outputDirectory}/workingDirectory
   classpathScoperuntime/classpathScope
   arguments
 argument-c
 ${project.build.outputDirectory}${file.separator}orm.properties/argument
   /arguments
   
 mainClasscom.company.deploy.product.AutomatedProductDeploy/mainClass
 /configuration
 /plugin

 And I'm using maven properties to construct the filename:
 ${project.build.outputDirectory}${file.separator}orm.properties

 Unfortunately, I'm getting an exception from the java class I'm running:

 Caused by: java.io.FileNotFoundException:  C:\path to my
 project\target\classes\orm.properties (The filename, directory name,
 or volume label syntax is incorrect)
   at java.io.FileInputStream.open(Native Method)
   at java.io.FileInputStream.init(FileInputStream.java:106)

 Most likely the it is using the argument and does not escape slashes
 to new java.io.File( filePath )

 As I don't have access to source code of the class - is there any way
 to enforce maven use unix style path generation on windows? ( change
 slashes to / )

 I tried to override the ${file.separator} property - but it seems to
 be read-only and doesn't help.

 Any ideas?

 Thank you!

 Žilvinas Vilutis

 E-mail:   cika...@gmail.com

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


 --
 Roland Asmann
 Senior Software Engineer

 adesso Austria GmbH
 Floridotower 26. Stock  T +43 1 2198790-27
 Floridsdorfer Hauptstr. 1   F +43 1 2198790-927
 A-1210 Wien M +43 664 88657566
 E roland.asm...@adesso.at
 W www.adesso.at

 -
business. people. technology.
 -

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


-- 
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock  T +43 1 2198790-27
Floridsdorfer Hauptstr. 1   F +43 1 2198790-927
A-1210 Wien M +43 664 88657566
E roland.asm...@adesso.at
W www.adesso.at

-
  business. people. technology. 
-

Re: Only partial filtering of .bat with assembly

2011-04-20 Thread Wayne Fay
 i try to have some .bat files filtered by assembly plugin. However, for some
 reason, any batch line that starts with a @ is ignored by filterer :/
 This is a big problem considering 90% of the script lines starts with a @. Is
 there some way to have filter don't ignore those lines?

Pretty sure the assembly plugin uses the same configuration for
filtering delimiters that m-r-p uses:
http://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html#delimiters

The delimiter list includes ${*} and @.

You should be able to override those delimiters somehow. I honestly
don't know the proper configuration as I've never needed to do this
myself, but probably you can configure delimiters in configuration
somewhere.

Wayne

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



Re: java file path in exec:java

2011-04-20 Thread Zilvinas Vilutis
yes, I can do that, however ${project.build.outputDirectory} still
generates C:\folder1\folder2\...  etc :)

Žilvinas Vilutis

Mobile:   (+370) 652 38353
E-mail:   cika...@gmail.com



On Wed, Apr 20, 2011 at 2:57 PM, Asmann, Roland roland.asm...@adesso.at wrote:
 What I meant was: don't use ${file.separator} and write '/' in your POM.

 Or do you have a reason you need the variable?


 On 20-04-11 23:51, Zilvinas Vilutis wrote:
 Exactly, but I need *maven* to generate those / :)

 I need the ${project.build.outputDirectory}${file.separator}orm.properties
 to contain / in the output, but it generates the path with \
 slashes, e.g. C:\path to myproject\target\classes\orm.properties

 Regards

 Žilvinas Vilutis

 Mobile:   (+370) 652 38353
 E-mail:   cika...@gmail.com



 On Wed, Apr 20, 2011 at 12:57 PM, Asmann, Roland
 roland.asm...@adesso.at  wrote:
 Just use the character '/', it works on Windows!


 On 20-04-11 21:45, Zilvinas Vilutis wrote:
 Hi maven users!

 I'm trying to execute a java command and pass a path to a file as an 
 argument:

 plugin
     groupIdorg.codehaus.mojo/groupId
     artifactIdexec-maven-plugin/artifactId
     configuration
       executablejava/executable
       workingDirectory${project.build.outputDirectory}/workingDirectory
       classpathScoperuntime/classpathScope
       arguments
         argument-c
 ${project.build.outputDirectory}${file.separator}orm.properties/argument
       /arguments
       
 mainClasscom.company.deploy.product.AutomatedProductDeploy/mainClass
     /configuration
 /plugin

 And I'm using maven properties to construct the filename:
 ${project.build.outputDirectory}${file.separator}orm.properties

 Unfortunately, I'm getting an exception from the java class I'm running:

 Caused by: java.io.FileNotFoundException:  C:\path to my
 project\target\classes\orm.properties (The filename, directory name,
 or volume label syntax is incorrect)
           at java.io.FileInputStream.open(Native Method)
           at java.io.FileInputStream.init(FileInputStream.java:106)

 Most likely the it is using the argument and does not escape slashes
 to new java.io.File( filePath )

 As I don't have access to source code of the class - is there any way
 to enforce maven use unix style path generation on windows? ( change
 slashes to / )

 I tried to override the ${file.separator} property - but it seems to
 be read-only and doesn't help.

 Any ideas?

 Thank you!

 Žilvinas Vilutis

 E-mail:   cika...@gmail.com

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


 --
 Roland Asmann
 Senior Software Engineer

 adesso Austria GmbH
 Floridotower 26. Stock              T +43 1 2198790-27
 Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
 A-1210 Wien                         M +43 664 88657566
                                     E roland.asm...@adesso.at
                                     W www.adesso.at

 -
                business. people. technology.
 -

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


 --
 Roland Asmann
 Senior Software Engineer

 adesso Austria GmbH
 Floridotower 26. Stock              T +43 1 2198790-27
 Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
 A-1210 Wien                         M +43 664 88657566
                                    E roland.asm...@adesso.at
                                    W www.adesso.at

 -
              business. people. technology. 
 -

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



Re: mvn eclipse plugin for multimodule proyect

2011-04-20 Thread Barrie Treloar
On Wed, Apr 20, 2011 at 10:24 PM, Fernando Wermus
fwer...@odeasrl.com.ar wrote:
[del]
 I am trying to run mvn eclipse:eclipse in parent pom.xml without any
 success.
 I am not sure if pom.xml for constructing developer environment run mvn
 eclipse:eclipse in pom.xml parent or in itself. I am almost sure that is
 doing it in parent pom.xml without any success.
[del]

What you have described so far appears reasonable.

Can you please run
mvn eclipse:eclipse -Pdeveloper
and paste the error output.

I'd recommend against putting the eclipse configuration inside a profile.
What I do instead is to put this inside
build  pluginManagement
So that people can run
mvn eclipse:eclipse
without having to remember to turn on a profile
Rememeber, the eclipse plugin does not participate in the standard lifecycle.

If this is for internal development inside your company, then I
recommend putting this stuff into your corporate parent pom.
That way any maven projects get this configuration - not just your project

Personally I dont use these options below
  workspace.../workspace
  
workspaceCodeStylesURLfile:///${user.home}/WorkingDirectory/${odea.cvs.branch}/env/config/IDEs/eclipse/formatting-rules.xml/workspaceCodeStylesURL

By doing this you've made some assumptions that may not be valid:
* that the workspace is always one directory above where you checked
out the code.
* that the code style file is in a fixed location on disk.

Since the code style file doesn't change that regularly we do all that
manually, by downloading it and installing it via Window 
Preferences.

If you do want to automate it then check out
http://maven.apache.org/plugins/maven-resources-plugin/copy-resources-mojo.html
If you bundle corporate stuff into its own project, then you can use
copy-resources to put them into your target/ directory and then
reference them that way.  It may be better to place them into a
different directory than target/ so they dont get deleted when you run
clean.  But at least these are now project local references instead of
fixed references.

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