You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Jeff Pierce <ha...@gmail.com> on 2009/10/16 21:33:04 UTC

Re: Strange dependency behavior with Maven command line and custom portal build

We are using Maven 2.09.  No blacklist messages. I also ran with debug on
for Maven and didn't see anything listed there.  I don't believe it's a
Maven problem in general.
It appears something is going on.  I deleted my local maven repository and
tried a few things, each time starting with a clean local repository.

Performing a standard build of "mvn clean install" worked as expected.  All
dependencies were pulled from our nexus server.  However, when running the
jetspeed archetype build, it does not.  (mvn jetspeed:mvn -Dtarget=all). I
can see dependencies being pulled from our Nexus server up until a certain
point. From that point on nothing is pulled from nexus and only
www.bluesunrise.com, repo1.maven.org, or repository.apache.org is tried.
 This is problematic for our automated builds when dependencies don't exist
in the standard location, such as the Spring RC jars.

I will try to keep narrowing it down.  Thanks for the response.

On Fri, Oct 16, 2009 at 12:23 PM, Randy Watler <wa...@wispertel.net> wrote:

> Jeff,
>
> Is there a message in the maven build output that mentions your repository
> being "blacklisted"?
>
> Also, we have been using maven 2.0.9 and 2.0.10 and these have seemed
> stable. What version are you using?
>
> Randy
>
> Jeff Pierce wrote:
>
>> I am having an issue with Maven correctly downloading dependencies and I
>> am
>> not sure if it's configuration problem with my settings, a Jetspeed
>> problem,
>> or a Maven problem.  We are running our own shared local Nexus proxy
>> server.  When a new dependency is added, the expected behavior is that
>> Maven
>> would automatically download the dependency to the user's local repository
>> by first searching the local repository, checking our shared respository,
>> then going out to the Internet.  However, during Jetspeed builds, there
>> seems to be an issue when resolving dependencies.  We are using the custom
>> Jetspeed portal build.  At a certain point in the Jetspeed build it skips
>> checking our shared repository and suddenly switches over to
>> repo1.maven.orgexclusively and from that point on it never checks the
>>
>> shared repository for
>> dependencies.
>>
>> For example, we recently added Spring 3.0.0.RC1 as a dependency.  It's not
>> available from the repos that are coded in the Jetspeed pom but it is
>> available from Atlassian repo. It can be seen when viewing our shared
>> repo.
>> The dependency does not get found when running the command line Maven
>> build
>> and subsequently does not get downloaded into a user's local repo.
>> Therefore the build fails.  If you added the dependency to the project
>> from
>> within Eclipse using the Maven plugin, it gets downloaded correctly to the
>> local repo so it can be found.  It's just the command line build doesn't
>> find it the first time because it doesn't appear to even look there.
>>
>> So I am obviously no Maven expert here.  I looked around in the Jetspeed
>> pom
>> files to see if something odd could be found.  I was wondering if the
>> following settings in the jetspeed-2-2.2.0.pom could be the culprit or if
>> this is just one of those Maven things.
>>
>>  <repositories>
>>    <!-- Temporary staging repository providing Pluto 2.0.0 artifacts under
>> VOTE for release
>>         Will be removed again after the VOTE has passed and the staging
>> repository promoted
>>    -->
>>    <repository>
>>      <id>repository.apache.org.portals-staging-027</id>
>>      <name>Apache Portals Staging Repository For Pluto 2.0.0</name>
>>      <url>
>> https://repository.apache.org/content/repositories/portals-staging-027
>> </url>
>>    </repository>
>>    <repository>
>>      <id>com.bluesunrise.m2</id>
>>      <name>Maven2 BlueSunrise</name>
>>      <url>http://www.bluesunrise.com/maven2</url>
>>    </repository>
>>    <repository>
>>      <id>com.bluesunrise.m1</id>
>>      <name>Maven1 BlueSunrise</name>
>>      <url>http://www.bluesunrise.com/maven</url>
>>      <layout>legacy</layout>
>>    </repository>
>>  </repositories>
>>
>> Sorry for the lengthy note.  To summarize:
>>
>>   - When doing a Maven command line build of our custom portal,
>>   dependencies are not found and downloaded correctly.  Our local shared
>> repo
>>   is ignored.
>>   - This behavior seems to be triggered at some point during the build and
>>   from that point on it never searches past the repo's configured in the
>>   Jetspeed pom even though our local user Maven configs include our local
>>   shared repo in the settings.xml file.
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>