hi geoffrey
thanks for your help
I am out of idea, check on the maven user list?
ok, i did that,
maybe they can help.
http://www.nabble.com/mvn2-url-resolution-for-SNAPSHOT-sources-wrong-ts19...
I am curious, what are you using drools-solver for?
i am using
it for a sports trainings expert system.
your idea of complementing the drools rules engine with a solver
seems perfect for my needs. :-)
the plan is that the rules will be written by physiologists and
trainers and the
solver should find a trainings session that adheres to all the rules.
a typical rule would be: "do warmup before training"
the problem is a typical configuration problem.
Feed-back, comments and patches welcome ;)
thanks a lot for the solver! and congratulations that you got it into
the official
project! your documentation and the samples made my start with
the solver straight forward.
where i got stuck for quite some time was this:
http://www.nabble.com/Questions-about-logically-justified-objects-ts14788...
and i could not find how you solved this problem in the end.
i solved the problem of improving constraints for the same causes that
differ in hashCode by retracting the old fact before inserting the new
one.
but it takes quite some overhead to be able to do so. i could post my
code if anyone is interested.
unfortunately i could not find in your samples how you handle such a scenario.
does the "HACK" part of this rule have something to do with it?
from curriculumCourseScoreRules.drl
// MinimumWorkingDays: The lectures of each course must be spread into
a minimum number of days.
// Each day below the minimum counts as 5 points of penalty.
rule "minimumWorkingDays"
when
$course : Course($minWorkingDaySize : minWorkingDaySize);
$dayCount : Number(intValue < $minWorkingDaySize) from accumulate(
$day : Day()
and exists Lecture(course == $course, day == $day),
count($day)
);
// HACK to fix wierd truth maintance behavior in drools
// because making weight part of the equals/hashcode doesn't cut it
not IntConstraintOccurrence(
ruleId == "minimumWorkingDays",
constraintType == ConstraintType.NEGATIVE_SOFT,
causes contains $course,
eval(weight != (($minWorkingDaySize - $dayCount.intValue()) * 5))
);
// An uninitialized schedule should have no constraints broken
exists Lecture(course == $course);
then
insertLogical(new
IntConstraintOccurrence("minimumWorkingDays",
ConstraintType.NEGATIVE_SOFT,
(($minWorkingDaySize - $dayCount.intValue()) * 5),
$course));
end
but the hack makes the rule not fire at all, when it had fired before.
even if the error has improved by now.
best, tim
With kind regards,
Geoffrey De Smet
tim tim schreef:
>
> thanks geoffrey,
>
> i used the 2.4 version of the eclipse plugin.
>
> but now i changed it to use 2.5.1, and removed the explicit
>
http://repo1.maven.org/maven2 repository but still no sources.
>
> maven is still searching in the wrong repositories:
>
> Downloading:
>
http://repository.jboss.org/maven2/org/drools/drools-core/5.0.0.20081008....
> Downloading:
>
http://repo1.maven.org/maven2/org/drools/drools-core/5.0.0.20081008.10280...
>
>
> best, tim
>
> On Wed, Oct 8, 2008 at 6:35 PM, Geoffrey De Smet
> <ge0ffrey.spam(a)gmail.com> wrote:
>>
>> With kind regards,
>> Geoffrey De Smet
>>
>>
>> tim tim schreef:
>>>
>>> hi
>>>
>>> when i am getting drools snapshot via "mvn eclipse:eclipse"
>>> the compiled drools jars are downloaded but the sources are not,
>>> although
>>> i have
>>> <downloadSources>true</downloadSources>
>>> defined as parameter in my pom.xml and the sources of the other
>>> libraries
>>> are downloaded correctly.
>>> when i use drools 4.0.7 those sources are downloaded correctly.
>>>
>>> i can find the sources manually in the
http://snapshots.jboss.org/maven2
>>> repository, they are just not downloaded
>>> automatically.
>>>
>>> i deleted the |mvn-eclipse-cache.properties |file in my target directory
>>> before calling mvn. (see
>>>
http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html)
>>
>> Doesn't "mvn eclipse:clean" delete that cache too?
>>
>>> an extract from my maven output:
>>>
>>> // the compiled jars are located correctly:
>>> ..
>>> [INFO] snapshot org.drools.solver:drools-solver:5.0.0.SNAPSHOT: checking
>>> for updates from
snapshots.jboss.org <
http://snapshots.jboss.org>
>>> [INFO] snapshot org.drools.solver:drools-solver:5.0.0.SNAPSHOT: checking
>>> for updates from
repo1.maven.org <
http://repo1.maven.org>
>>> Downloading:
>>>
>>>
http://snapshots.jboss.org/maven2/org/drools/solver/drools-solver/5.0.0.S...
>>> 1K downloaded
>>> Downloading:
>>>
>>>
http://snapshots.jboss.org/maven2/org/drools/drools-compiler/5.0.0.SNAPSH...
>>> 943K downloaded
>>> Downloading:
>>>
>>>
http://snapshots.jboss.org/maven2/org/drools/drools-core/5.0.0.SNAPSHOT/d...
>>> 1547K downloaded
>>> Downloading:
>>>
>>>
http://snapshots.jboss.org/maven2/org/drools/solver/drools-solver-core/5....
>>> 94K downloaded
>>> ...
>>> // but maven searches for the sources in the wrong repositories:
>>>
>>> Downloading:
>>>
>>>
http://repository.jboss.org/maven2/org/drools/drools-compiler/5.0.0.20081...
>>> Downloading:
>>>
>>>
http://repo1.maven.org/maven2/org/drools/drools-compiler/5.0.0.20081008.1...
>>> Downloading:
>>>
>>>
http://repo1.maven.org/maven2/org/drools/drools-compiler/5.0.0.20081008.1...
>>> Downloading:
>>>
>>>
http://repository.jboss.org/maven2/org/drools/drools-core/5.0.0.20081008....
>>> Downloading:
>>>
>>>
http://repo1.maven.org/maven2/org/drools/drools-core/5.0.0.20081008.10280...
>>> Downloading:
>>>
>>>
http://repo1.maven.org/maven2/org/drools/drools-core/5.0.0.20081008.10280...
>>> ...
>>>
>>> does someone else have this problem?
>>>
>>> or maybe my pom.xml is wrong?
>>> the relevant parts of my pom.xml file are:
>>>
>>> <repositories>
>>> <repository>
>>> <
id>repo1.maven.org
<
http://repo1.maven.org></id>
>>
>> I don't think you need to explicitly add this one, it's always
>> automatically
>> added, unless you overwrite it with the id "central" I think.
>>>
>>> <
url>http://repo1.maven.org/maven2</url>
>>> <snapshots>
>>> <enabled>true</enabled>
>>
>>
repo1.maven.org doesn't contain snapshots as far as I know, so it should
>> be
>> false
>> It could be that the eclipse plugin only searches on the first snapshot
>> repo
>> it encounters? Which version of the eclipse plugin are you using?
>>>
>>> </snapshots>
>>> <releases>
>>> <enabled>true</enabled>
>>> </releases>
>>> </repository>
>>> <repository>
>>> <
id>repository.jboss.org
<
http://repository.jboss.org></id>
>>> <
url>http://repository.jboss.org/maven2</url>
>>> <snapshots>
>>> <enabled>false</enabled>
>>> </snapshots>
>>> <releases>
>>> <enabled>true</enabled>
>>> </releases>
>>> </repository>
>>> <repository>
>>> <
id>snapshots.jboss.org
<
http://snapshots.jboss.org></id>
>>> <
url>http://snapshots.jboss.org/maven2</url>
>>> <snapshots>
>>> <enabled>true</enabled>
>>> </snapshots>
>>> <releases>
>>> <enabled>false</enabled>
>>> </releases>
>>> </repository>
>>> </repositories>
>>>
>>> <dependencies>
>>> <dependency>
>>> <groupId>janino</groupId>
>>> <artifactId>janino</artifactId>
>>> <version>2.5.10</version>
>>> </dependency>
>>> <dependency>
>>> <groupId>org.drools</groupId>
>>> <artifactId>drools-core</artifactId>
>>> <version>5.0.0.SNAPSHOT</version>
>>> </dependency>
>>> <dependency>
>>> <groupId>org.drools</groupId>
>>> <artifactId>drools-compiler</artifactId>
>>> <version>5.0.0.SNAPSHOT</version>
>>> </dependency>
>>> <dependency>
>>> <groupId>org.drools.solver</groupId>
>>> <artifactId>drools-solver-core</artifactId>
>>> <version>5.0.0.SNAPSHOT</version>
>>> </dependency>
>>> </dependencies>
>>>
>>> unfortunately i have no idea what the problem might be and installing
>>> the
>>> sources manually every time i update is no very attractive option..
>>>
>>>
>>> thanks in advance, tim
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> rules-users mailing list
>>> rules-users(a)lists.jboss.org
>>>
https://lists.jboss.org/mailman/listinfo/rules-users
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users(a)lists.jboss.org
>>
https://lists.jboss.org/mailman/listinfo/rules-users
>>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-users
>
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users