Discussion:
how to not deploy sources.jar to artifactory
Gordon Cody
2009-04-29 20:23:17 UTC
Permalink
I know I read this (on someones blog I think) but did not realise I would
need to care until recently and now I cant find how to do this.

The requirement is to not deploy sources.jar to the artifactory when
we do mvn release:perform

Thanks in advance for any/all help

Regards, Gord

---------- Forwarded message ----------
From: Gordon Cody <***@zafinlabs.com>
Date: Wed, Apr 29, 2009 at 3:14 PM
Subject: Maven inconsistent build with flexbuilder
To: Maven Users List <***@maven.apache.org>


Hello

Working in release mgmt, one of my many jobs is to ensure that we can reliably
reproduce what will be delivered to a customer.

We are using flexbuilder3 in a windows/maven development environment.
I check out the code from svn and run mvn clean install. This generates
a war file that contains swf files among other things.
I move that war file aside and run mvn clean install a second time.

When I compare the 2 wars, I see  that the swf files are different in
the 2 versions.
As swf files are binary it is extremely difficult to determine if the
only difference
between the 2 is timestamps.

Please, what can I do to eliminate these differences?

Thanks in advance for any help,
-Gord
Todd Thiessen
2009-04-29 20:28:52 UTC
Permalink
You can override the "release-profile" profile of the super pom. Define this profile yourself and ensure that the maven-source-plugin does not define an execution to build a sources jar.

---
Todd Thiessen
-----Original Message-----
Sent: Wednesday, April 29, 2009 4:23 PM
Subject: how to not deploy sources.jar to artifactory
I know I read this (on someones blog I think) but did not
realise I would need to care until recently and now I cant
find how to do this.
The requirement is to not deploy sources.jar to the
artifactory when we do mvn release:perform
Thanks in advance for any/all help
Regards, Gord
---------- Forwarded message ----------
Date: Wed, Apr 29, 2009 at 3:14 PM
Subject: Maven inconsistent build with flexbuilder
Hello
Working in release mgmt, one of my many jobs is to ensure
that we can reliably reproduce what will be delivered to a customer.
We are using flexbuilder3 in a windows/maven development environment.
I check out the code from svn and run mvn clean install. This
generates a war file that contains swf files among other things.
I move that war file aside and run mvn clean install a second time.
When I compare the 2 wars, I see  that the swf files are
different in the 2 versions.
As swf files are binary it is extremely difficult to
determine if the only difference between the 2 is timestamps.
Please, what can I do to eliminate these differences?
Thanks in advance for any help,
-Gord
---------------------------------------------------------------------
Gordon Cody
2009-04-29 21:14:45 UTC
Permalink
Hello Todd

My apologies as I am just getting to know mvn.
From my searching, we do not reference the maven-source-plugin
directly anywhere.
I have located the reference to the maven-release-plugin. It is in our
topmost pom.xml
and contains only:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<arguments>-Dmaven.test.skip=true</arguments>
</configuration>
</plugin>
</plugins>
</build>

If I understand what you are saying I need to explicitly invoke the
maven-source-plugin
but configure it so that it does not have specify any goals. Is that correct?

Appreciating your patience, Gord
You can override the "release-profile" profile of the super pom. Define this profile yourself and ensure that the maven-source-plugin does not define an execution to build a sources jar.
---
Todd Thiessen
-----Original Message-----
Sent: Wednesday, April 29, 2009 4:23 PM
Subject: how to not deploy sources.jar to artifactory
I know I read this (on someones blog I think) but did not
realise I would need to care until recently and now I cant
find how to do this.
The requirement is to not deploy sources.jar to the
artifactory when we do mvn release:perform
Thanks in advance for any/all help
Regards, Gord
---------- Forwarded message ----------
Date: Wed, Apr 29, 2009 at 3:14 PM
Subject: Maven inconsistent build with flexbuilder
Hello
Working in release mgmt, one of my many jobs is to ensure
that we can reliably reproduce what will be delivered to a customer.
We are using flexbuilder3 in a windows/maven development environment.
I check out the code from svn and run mvn clean install. This
generates a war file that contains swf files among other things.
I move that war file aside and run mvn clean install a second time.
When I compare the 2 wars, I see  that the swf files are
different in the 2 versions.
As swf files are binary it is extremely difficult to
determine if the only difference between the 2 is timestamps.
Please, what can I do to eliminate these differences?
Thanks in advance for any help,
-Gord
---------------------------------------------------------------------
---------------------------------------------------------------------
Todd Thiessen
2009-04-30 13:02:20 UTC
Permalink
You get these settings indirectly through POM inheritence. So everything in the super POM [1] you get automatically unless you have explicitly overridden it.

Take a look at the <profiles> section of the super pom. You will see a profile with an ID of release-profile. This is where the source and javadoc plugins are configured. So you can get this behaviour simply by issuing the following mvn command:

mvn -DperformRelease=true deploy

or

mvn -Prelease-profile deploy

The release plugin executes this profile during the release:perform goal by setting the performRelease property to true. If you wish to change the behaviour of release:peform, copy this profile to your POM and remove the maven-source-plugin.

[1] http://maven.apache.org/pom.html#The_Super_POM

---
Todd Thiessen
-----Original Message-----
Sent: Wednesday, April 29, 2009 5:15 PM
To: Maven Users List
Subject: Re: how to not deploy sources.jar to artifactory
Hello Todd
My apologies as I am just getting to know mvn.
From my searching, we do not reference the
maven-source-plugin directly anywhere.
I have located the reference to the maven-release-plugin. It
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<arguments>-Dmaven.test.skip=true</arguments>
</configuration>
</plugin>
</plugins>
</build>
If I understand what you are saying I need to explicitly
invoke the maven-source-plugin but configure it so that it
does not have specify any goals. Is that correct?
Appreciating your patience, Gord
On Wed, Apr 29, 2009 at 4:28 PM, Todd Thiessen
Post by Todd Thiessen
You can override the "release-profile" profile of the super
pom. Define this profile yourself and ensure that the
maven-source-plugin does not define an execution to build a
sources jar.
Post by Todd Thiessen
---
Todd Thiessen
-----Original Message-----
Sent: Wednesday, April 29, 2009 4:23 PM
Subject: how to not deploy sources.jar to artifactory
I know I read this (on someones blog I think) but did not
realise I
Post by Todd Thiessen
would need to care until recently and now I cant find how
to do this.
Post by Todd Thiessen
The requirement is to not deploy sources.jar to the
artifactory when
Post by Todd Thiessen
we do mvn release:perform
Thanks in advance for any/all help
Regards, Gord
---------- Forwarded message ----------
Date: Wed, Apr 29, 2009 at 3:14 PM
Subject: Maven inconsistent build with flexbuilder
Hello
Working in release mgmt, one of my many jobs is to ensure
that we can
Post by Todd Thiessen
reliably reproduce what will be delivered to a customer.
We are using flexbuilder3 in a windows/maven development
environment.
Post by Todd Thiessen
I check out the code from svn and run mvn clean install. This
generates a war file that contains swf files among other things.
I move that war file aside and run mvn clean install a second time.
When I compare the 2 wars, I see  that the swf files are
different in
Post by Todd Thiessen
the 2 versions.
As swf files are binary it is extremely difficult to
determine if the
Post by Todd Thiessen
only difference between the 2 is timestamps.
Please, what can I do to eliminate these differences?
Thanks in advance for any help,
-Gord
---------------------------------------------------------------------
---------------------------------------------------------------------
---------------------------------------------------------------------
Wendy Smoak
2009-04-29 21:26:26 UTC
Permalink
Post by Gordon Cody
I know I read this (on someones blog I think) but did not realise I would
need to care until recently and now I cant find how to do this.
The requirement is to not deploy sources.jar to the artifactory when
we do mvn release:perform
Don't activate the 'release' profile during your release -- that's
what has the source and javadoc jars configured.

mvn release:perform ... -DuseReleaseProfile=false

http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html
--
Wendy
Gordon Cody
2009-04-29 21:42:36 UTC
Permalink
Thanks Wendy.

We have to do a release in a couple of days so I wont be able to
verify this till
then and of course once I knew what to look for I found it in the parameter doc
for the release plugin.

Have a great day, Gord
Post by Wendy Smoak
Post by Gordon Cody
I know I read this (on someones blog I think) but did not realise I would
need to care until recently and now I cant find how to do this.
The requirement is to not deploy sources.jar to the artifactory when
we do mvn release:perform
Don't activate the 'release' profile during your release -- that's
what has the source and javadoc jars configured.
mvn release:perform ... -DuseReleaseProfile=false
http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html
--
Wendy
---------------------------------------------------------------------
Todd Thiessen
2009-04-30 13:03:31 UTC
Permalink
haha sorry for my long winded reply. I saw the initial question and
didn't read all the discussions in between ;-). Glad to hear to go it
resovled.

---
Todd Thiessen
-----Original Message-----
Sent: Wednesday, April 29, 2009 5:43 PM
To: Maven Users List
Subject: Re: how to not deploy sources.jar to artifactory
Thanks Wendy.
We have to do a release in a couple of days so I wont be able
to verify this till then and of course once I knew what to
look for I found it in the parameter doc for the release plugin.
Have a great day, Gord
On Wed, Apr 29, 2009 at 1:23 PM, Gordon Cody
Post by Gordon Cody
I know I read this (on someones blog I think) but did not
realise I
Post by Gordon Cody
would need to care until recently and now I cant find how
to do this.
Post by Gordon Cody
The requirement is to not deploy sources.jar to the
artifactory when
Post by Gordon Cody
we do mvn release:perform
Don't activate the 'release' profile during your release -- that's
what has the source and javadoc jars configured.
mvn release:perform ... -DuseReleaseProfile=false
http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html
--
Wendy
---------------------------------------------------------------------
---------------------------------------------------------------------
Gordon Cody
2009-04-30 13:15:45 UTC
Permalink
your efforts were appreciated

Gord Cody
Post by Todd Thiessen
haha sorry for my long winded reply. I saw the initial question and
didn't read all the discussions in between ;-). Glad to hear to go it
resovled.
---
Todd Thiessen
-----Original Message-----
Sent: Wednesday, April 29, 2009 5:43 PM
To: Maven Users List
Subject: Re: how to not deploy sources.jar to artifactory
Thanks Wendy.
We have to do a release in a couple of days so I wont be able
to verify this till then and of course once I knew what to
look for I found it in the parameter doc for the release plugin.
Have a great day, Gord
On Wed, Apr 29, 2009 at 1:23 PM, Gordon Cody
Post by Gordon Cody
I know I read this (on someones blog I think) but did not
realise I
Post by Gordon Cody
would need to care until recently and now I cant find how
to do this.
Post by Gordon Cody
The requirement is to not deploy sources.jar to the
artifactory when
Post by Gordon Cody
we do mvn release:perform
Don't activate the 'release' profile during your release -- that's
what has the source and javadoc jars configured.
mvn release:perform ... -DuseReleaseProfile=false
http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html
--
Wendy
---------------------------------------------------------------------
---------------------------------------------------------------------
---------------------------------------------------------------------
Gordon Cody
2009-05-01 19:50:19 UTC
Permalink
Exactly what I wanted to (not) see.

Thanks again Wendy and Todd too

Regards, Gord
Post by Wendy Smoak
Post by Gordon Cody
I know I read this (on someones blog I think) but did not realise I would
need to care until recently and now I cant find how to do this.
The requirement is to not deploy sources.jar to the artifactory when
we do mvn release:perform
Don't activate the 'release' profile during your release -- that's
what has the source and javadoc jars configured.
mvn release:perform ... -DuseReleaseProfile=false
http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html
--
Wendy
---------------------------------------------------------------------
Loading...