You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Tom Purcell <tp...@chariotsolutions.com> on 2008/05/05 18:01:01 UTC

No SHA1 for Locally Built Open Source Product

Hello

We are using an open source product in which we found a couple of bugs. We
have altered the code and rebuilt locally. We have also reported the issues
to the OS project via Jira and submitted our fixes. 

While we wait for the issues to be resolve in the GA version of the product
we must deploy the locally built(via maven) version to our internal remote
repository in order for our developers to use it. Note that the build is of
a SNAPSHOT release of the source. We have attempted this in four ways. 

1- We copied the artifacts generated by the mvn install for the product from
a local repository to the internal remote repository.

2- We did a mvn install of the product on the machine where the internal
remote repository is hosted referring to that repository as the local
repository.

In these 2 cases, when a developer attempts to access the artifacts in the
internal remote repository the process fails saying: "[DEBUG] SHA1 not
found, trying MD5".  There are SHA1 or MD5 files for the artifacts on which
this message occurs. 

After some research we found some posts that indicate these methods were not
the way to go so:

3- We attempted to do a mvn deploy of the product by specifying our internal
remote repository in the distributionManagement section of the product's
main pom. We had to cancel it when it attempted to get the latest build
number from the open source project's server which we, of course, do not
have access to.

4- We did a deploy-file on an individual artifact but this approach has two
problem. First the open source project that we are concerned about is large
with many individual jars and poms so we'd rather not have to deploy each
one individually. Second when we do this we get a completely different name
for the artifact in the internal remote repository that includes a
timestamped. As each artifact will have a different timestamp it would be
very difficult to keep them all straight in our application's pom.  

We want to know if it is possible to alter the internal remote repository to
make it accessible? We have other projects in our repository that do not
have SHA1 files (commons for instance). Can we delete all the meta-data
files? If not, given that we do not have access to the build number server, 
what is the proper way to deploy? We are using Maven 2.0.8.

Thanks
Tom

-- 
View this message in context: http://www.nabble.com/No-SHA1-for-Locally-Built-Open-Source-Product-tp17064966s177p17064966.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: No SHA1 for Locally Built Open Source Product

Posted by Tom Purcell <tp...@chariotsolutions.com>.
Hello

In my earlier post, in point 4, I indicated that the SNAPSHOT part of the
artifact was being replaced by a timestamp. I've been told that is normal
and that the newest version in the repository should be returned as the
"SNAPSHOT". 

Okay, but I still have a problem in that the pom artifact is getting
resolved but not the jar. This is what I did:

mvn deploy:deploy-file -Dfile=jbi-maven-plugin-3.3-SNAPSHOT.jar
-Durl=scp://216.203.1.133/opt/Maven2/repository -Did=BigDevSun
-DgroupId=org.apache.servicemix.tooling -DartifactId=jbi-maven-plugin
-Dversion=3.3-SNAPSHOT -Dpackaging=maven-plugin

Which produced an internal remote repository directory that looks like this:

-bash-3.00$ pwd
/opt/Maven2/repository/org/apache/servicemix/tooling/jbi-maven-plugin/3.3-SNAPSHOT
-bash-3.00$ ls -la
total 244
drwxrwxr-x   2 tpurcell staff         11 May  5 14:10 .
drwxrwxr-x   3 tpurcell staff          6 May  5 14:10 ..
-rw-r--r--   1 tpurcell staff     112813 May  5 14:10
jbi-maven-plugin-3.3-20080505.181304-1.jar
-rw-r--r--   1 tpurcell staff         32 May  5 14:10
jbi-maven-plugin-3.3-20080505.181304-1.jar.md5
-rw-r--r--   1 tpurcell staff         40 May  5 14:10
jbi-maven-plugin-3.3-20080505.181304-1.jar.sha1
-rw-r--r--   1 tpurcell staff        262 May  5 14:10
jbi-maven-plugin-3.3-20080505.181304-1.pom
-rw-r--r--   1 tpurcell staff         32 May  5 14:10
jbi-maven-plugin-3.3-20080505.181304-1.pom.md5
-rw-r--r--   1 tpurcell staff         40 May  5 14:10
jbi-maven-plugin-3.3-20080505.181304-1.pom.sha1
-rw-r--r--   1 tpurcell staff        377 May  5 14:10 maven-metadata.xml
-rw-r--r--   1 tpurcell staff         32 May  5 14:10 maven-metadata.xml.md5
-rw-r--r--   1 tpurcell staff         40 May  5 14:10
maven-metadata.xml.sha1


When I run the build for our app I get:

[INFO] snapshot org.apache.servicemix.tooling:jbi-maven-plugin:3.3-SNAPSHOT:
checking for updates from BigDevSun
[DEBUG] jbi-maven-plugin: resolved to version 3.3-20080505.181304-1 from
repository BigDevSun
[DEBUG] Trying repository BigDevSun[DEBUG] Trying repository BigDevSun
Downloading:
http://216.203.1.133/maven2/repository/org/apache/servicemix/tooling/jbi-maven-plugin/3.3-SNAPSHOT/jbi-maven-plugin-3.3-20080505.181304-1.pom
262/262b
262b downloaded
[DEBUG]   Artifact resolved
[DEBUG] jbi-maven-plugin: using locally installed snapshot
[DEBUG] Skipping disabled repository apache
[DEBUG] Trying repository apache.snapshots
Downloading:
http://people.apache.org/repo/m2-snapshot-repository/org/apache/servicemix/tooling/jbi-maven-plugin/3.3-SNAPSHOT/jbi-maven-plugin-3.3-SNAPSHOT.jar
[DEBUG] Unable to get resource
'org.apache.servicemix.tooling:jbi-maven-plugin:maven-plugin:3.3-SNAPSHOT'
from repository apache.snapshots
(http://people.apache.org/repo/m2-snapshot-repository)
[DEBUG] Skipping disabled repository central
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Plugin could not be found - check that the goal name is correct:
Unable to download the artifact from any repository

Try downloading the file manually from the project website.

Then, install it using the command: 
    mvn install:install-file -DgroupId=org.apache.servicemix.tooling
-DartifactId=jbi-maven-plugin -Dversion=3.3-SNAPSHOT
-Dpackaging=maven-plugin -Dfile=/path/to/file

Note that the pom (jbi-maven-plugin-3.3-20080505.181304-1.pom) got
downloaded and that "3.3-20080505.181304-1" got resolved to "3.3-SNAPSHOT"
just as you indicated. But then look at what happened to
jbi-maven-plugin-3.3-SNAPSHOT.jar: "Unable to get resource...".

Now look at maven-metadata.xml:

-bash-3.00$ more maven-metadata.xml
<?xml version="1.0" encoding="UTF-8"?><metadata>
  <groupId>org.apache.servicemix.tooling</groupId>
  <artifactId>jbi-maven-plugin</artifactId>
  <version>3.3-SNAPSHOT</version>
  <versioning>
    <snapshot>
      <timestamp>20080505.181304</timestamp>
      <buildNumber>1</buildNumber>
    </snapshot>
    <lastUpdated>20080505181305</lastUpdated>
  </versioning>
</metadata>

The timestamp is 181304 but the last updated is 181305. I'm seeing some Jira
issues and forum noise about this. I'm not sure that's my problem.

I'm running Maven 2.0.8 on my machine. The repository machine has Maven
2.0.6 on it but I don't think that is really involved since all the commands
have been issued from my machine(2.0.8)


Tom Purcell wrote:
> 
> Hello
> 
> We are using an open source product in which we found a couple of bugs. We
> have altered the code and rebuilt locally. We have also reported the
> issues to the OS project via Jira and submitted our fixes. 
> 
> While we wait for the issues to be resolve in the GA version of the
> product we must deploy the locally built(via maven) version to our
> internal remote repository in order for our developers to use it. Note
> that the build is of a SNAPSHOT release of the source. We have attempted
> this in four ways. 
> 
> 1- We copied the artifacts generated by the mvn install for the product
> from a local repository to the internal remote repository.
> 
> 2- We did a mvn install of the product on the machine where the internal
> remote repository is hosted referring to that repository as the local
> repository.
> 
> In these 2 cases, when a developer attempts to access the artifacts in the
> internal remote repository the process fails saying: "[DEBUG] SHA1 not
> found, trying MD5".  There are SHA1 or MD5 files for the artifacts on
> which this message occurs. 
> 
> After some research we found some posts that indicate these methods were
> not the way to go so:
> 
> 3- We attempted to do a mvn deploy of the product by specifying our
> internal remote repository in the distributionManagement section of the
> product's main pom. We had to cancel it when it attempted to get the
> latest build number from the open source project's server which we, of
> course, do not have access to.
> 
> 4- We did a deploy-file on an individual artifact but this approach has
> two problem. First the open source project that we are concerned about is
> large with many individual jars and poms so we'd rather not have to deploy
> each one individually. Second when we do this we get a completely
> different name for the artifact in the internal remote repository that
> includes a timestamped. As each artifact will have a different timestamp
> it would be very difficult to keep them all straight in our application's
> pom.  
> 
> We want to know if it is possible to alter the internal remote repository
> to make it accessible? We have other projects in our repository that do
> not have SHA1 files (commons for instance). Can we delete all the
> meta-data files? If not, given that we do not have access to the build
> number server,  what is the proper way to deploy? We are using Maven
> 2.0.8.
> 
> Thanks
> Tom
> 
> 

-- 
View this message in context: http://www.nabble.com/No-SHA1-for-Locally-Built-Open-Source-Product-tp17064966s177p17069511.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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